diff --git a/src/compiler.ts b/src/compiler.ts index 9b12238c46..59368a08fa 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -1016,13 +1016,14 @@ export class Compiler extends DiagnosticEmitter { let numLocals = locals.length; let varTypes = new Array(numLocals); for (let i = 0; i < numLocals; ++i) varTypes[i] = locals[i].type.toRef(); - module.addFunction( + const funcRef = module.addFunction( startFunction.internalName, startSignature.paramRefs, startSignature.resultRefs, varTypes, module.flatten(startFunctionBody) ); + startFunction.finalize(module, funcRef); previousBody.push( module.call(startFunction.internalName, null, TypeRef.None) ); @@ -10295,7 +10296,6 @@ export class Compiler extends DiagnosticEmitter { } // helpers - function mangleImportName( element: Element, declaration: DeclarationStatement diff --git a/src/module.ts b/src/module.ts index fc2e5055a7..00eb7b347e 100644 --- a/src/module.ts +++ b/src/module.ts @@ -1913,6 +1913,10 @@ export class Module { return ret; } + setLocalName(funcRef: FunctionRef, index: u32, name: string): void { + binaryen._BinaryenFunctionSetLocalName(funcRef, index, this.allocStringCached(name)); + } + getFunction( name: string ): FunctionRef { diff --git a/src/program.ts b/src/program.ts index a393d3f361..366de8e233 100644 --- a/src/program.ts +++ b/src/program.ts @@ -3773,6 +3773,22 @@ export class Function extends TypedElement { ); } } + if (this.program.options.debugInfo) { + let localNameMap = new Set(); + let localsByIndex = this.localsByIndex; + for (let i = 0, k = localsByIndex.length; i < k; i++) { + let localName = localsByIndex[i].name; + if (localNameMap.has(localName)) { + let repeat = 0; + while (localNameMap.has(`${localName}_${repeat}`)) { + repeat++; + } + localName = `${localName}_${repeat}`; + } + localNameMap.add(localName); + module.setLocalName(ref, i, localName); + } + } } } diff --git a/tests/compiler/NonNullable.debug.wat b/tests/compiler/NonNullable.debug.wat index 7eff35425c..e94247bfef 100644 --- a/tests/compiler/NonNullable.debug.wat +++ b/tests/compiler/NonNullable.debug.wat @@ -25,44 +25,44 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (start $~start) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.get $1 + (func $~lib/util/string/compareImpl (param $str1 i32) (param $index1 i32) (param $str2 i32) (param $index2 i32) (param $len i32) (result i32) + (local $ptr1 i32) + (local $ptr2 i32) + (local $var$7 i32) + (local $a i32) + (local $b i32) + local.get $str1 + local.get $index1 i32.const 1 i32.shl i32.add - local.set $5 - local.get $2 - local.get $3 + local.set $ptr1 + local.get $str2 + local.get $index2 i32.const 1 i32.shl i32.add - local.set $6 + local.set $ptr2 i32.const 0 i32.const 2 i32.lt_s drop - local.get $4 + local.get $len i32.const 4 i32.ge_u if (result i32) - local.get $5 + local.get $ptr1 i32.const 7 i32.and - local.get $6 + local.get $ptr2 i32.const 7 i32.and i32.or @@ -73,27 +73,27 @@ if block $do-break|0 loop $do-loop|0 - local.get $5 + local.get $ptr1 i64.load - local.get $6 + local.get $ptr2 i64.load i64.ne if br $do-break|0 end - local.get $5 + local.get $ptr1 i32.const 8 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 8 i32.add - local.set $6 - local.get $4 + local.set $ptr2 + local.get $len i32.const 4 i32.sub - local.set $4 - local.get $4 + local.set $len + local.get $len i32.const 4 i32.ge_u br_if $do-loop|0 @@ -101,59 +101,59 @@ end end loop $while-continue|1 - local.get $4 - local.tee $7 + local.get $len + local.tee $var$7 i32.const 1 i32.sub - local.set $4 - local.get $7 - local.set $7 - local.get $7 + local.set $len + local.get $var$7 + local.set $var$7 + local.get $var$7 if - local.get $5 + local.get $ptr1 i32.load16_u - local.set $8 - local.get $6 + local.set $a + local.get $ptr2 i32.load16_u - local.set $9 - local.get $8 - local.get $9 + local.set $b + local.get $a + local.get $b i32.ne if - local.get $8 - local.get $9 + local.get $a + local.get $b i32.sub return end - local.get $5 + local.get $ptr1 i32.const 2 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 2 i32.add - local.set $6 + local.set $ptr2 br $while-continue|1 end end i32.const 0 ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__eq (param $left i32) (param $right i32) (result i32) + (local $leftLength i32) + local.get $left + local.get $right i32.eq if i32.const 1 return end - local.get $0 + local.get $left i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $1 + local.get $right i32.const 0 i32.eq end @@ -161,36 +161,36 @@ i32.const 0 return end - local.get $0 + local.get $left call $~lib/string/String#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $leftLength + local.get $leftLength + local.get $right call $~lib/string/String#get:length i32.ne if i32.const 0 return end - local.get $0 + local.get $left i32.const 0 - local.get $1 + local.get $right i32.const 0 - local.get $2 + local.get $leftLength call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String.__ne (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__ne (param $left i32) (param $right i32) (result i32) + local.get $left + local.get $right call $~lib/string/String.__eq i32.eqz ) - (func $NonNullable/assertNonNull<~lib/string/String> (param $0 i32) + (func $NonNullable/assertNonNull<~lib/string/String> (param $t i32) i32.const 0 i32.eqz drop - local.get $0 + local.get $t i32.const 0 call $~lib/string/String.__ne i32.eqz @@ -203,12 +203,12 @@ unreachable end ) - (func $NonNullable/safetyCheck<~lib/string/String|null> (param $0 i32) - local.get $0 + (func $NonNullable/safetyCheck<~lib/string/String|null> (param $t i32) + local.get $t i32.const 0 call $~lib/string/String.__ne if - local.get $0 + local.get $t call $NonNullable/assertNonNull<~lib/string/String> end ) diff --git a/tests/compiler/abi.debug.wat b/tests/compiler/abi.debug.wat index adead12126..a566331bb7 100644 --- a/tests/compiler/abi.debug.wat +++ b/tests/compiler/abi.debug.wat @@ -21,16 +21,16 @@ i32.const 128 ) (func $start:abi - (local $0 i32) - (local $1 i32) + (local $var$0 i32) + (local $var$1 i32) call $abi/internal drop i32.const 0 i32.eqz global.set $abi/condition i32.const 256 - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 i32.extend8_s i32.eqz i32.eqz @@ -43,22 +43,22 @@ unreachable end i32.const 256 - local.set $0 + local.set $var$0 global.get $abi/condition if - local.get $0 + local.get $var$0 i32.extend8_s i32.const 2 i32.div_s - local.set $0 + local.set $var$0 else - local.get $0 + local.get $var$0 i32.extend8_s i32.const 2 i32.div_s - local.set $0 + local.set $var$0 end - local.get $0 + local.get $var$0 i32.extend8_s i32.eqz i32.eqz @@ -71,23 +71,23 @@ unreachable end i32.const 256 - local.set $0 + local.set $var$0 global.get $abi/condition if - local.get $0 + local.get $var$0 i32.extend8_s i32.const 24 i32.const 7 i32.and i32.shr_s - local.set $0 + local.set $var$0 else - local.get $0 + local.get $var$0 i32.const 127 i32.and - local.set $0 + local.set $var$0 end - local.get $0 + local.get $var$0 i32.eqz i32.eqz if @@ -114,8 +114,8 @@ end i32.const 2 i32.ctz - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 i32.const 0 i32.ne i32.eqz @@ -129,8 +129,8 @@ end i32.const 1 i32.clz - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 i32.const 0 i32.ne i32.eqz @@ -144,8 +144,8 @@ end i32.const 2 i32.ctz - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.eqz if i32.const 0 @@ -157,8 +157,8 @@ end i32.const 1 i32.clz - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.eqz if i32.const 0 diff --git a/tests/compiler/assert-nonnull.debug.wat b/tests/compiler/assert-nonnull.debug.wat index e81b28c8b2..12554ec34c 100644 --- a/tests/compiler/assert-nonnull.debug.wat +++ b/tests/compiler/assert-nonnull.debug.wat @@ -33,12 +33,12 @@ (export "testRet" (func $export:assert-nonnull/testRet)) (export "testObjFn" (func $export:assert-nonnull/testObjFn)) (export "testObjRet" (func $export:assert-nonnull/testObjRet)) - (func $assert-nonnull/testVar (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.tee $1 + (func $assert-nonnull/testVar (param $n i32) (result i32) + (local $var$1 i32) + local.get $n + local.tee $var$1 if (result i32) - local.get $1 + local.get $var$1 else i32.const 32 i32.const 96 @@ -48,12 +48,12 @@ unreachable end ) - (func $assert-nonnull/testObj (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.tee $1 + (func $assert-nonnull/testObj (param $foo i32) (result i32) + (local $var$1 i32) + local.get $foo + local.tee $var$1 if (result i32) - local.get $1 + local.get $var$1 else i32.const 32 i32.const 96 @@ -64,17 +64,17 @@ end i32.load ) - (func $assert-nonnull/testFn (param $0 i32) (result i32) + (func $assert-nonnull/testFn (param $fn i32) (result i32) i32.const 0 global.set $~argumentsLength - local.get $0 + local.get $fn i32.load call_indirect $0 (type $none_=>_i32) ) - (func $assert-nonnull/testObjFn (param $0 i32) (result i32) + (func $assert-nonnull/testObjFn (param $foo i32) (result i32) i32.const 0 global.set $~argumentsLength - local.get $0 + local.get $foo i32.load offset=4 i32.load call_indirect $0 (type $none_=>_i32) diff --git a/tests/compiler/binary.debug.wat b/tests/compiler/binary.debug.wat index 9d9e568bd7..7c1958dc6e 100644 --- a/tests/compiler/binary.debug.wat +++ b/tests/compiler/binary.debug.wat @@ -22,315 +22,315 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (start $~start) - (func $~lib/math/ipow32 (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (func $~lib/math/ipow32 (param $x i32) (param $e i32) (result i32) + (local $out i32) + (local $var$3 i32) + (local $var$4 i32) i32.const 1 - local.set $2 + local.set $out i32.const 0 i32.const 1 i32.lt_s drop - local.get $0 + local.get $x i32.const 2 i32.eq if i32.const 1 - local.get $1 + local.get $e i32.shl i32.const 0 - local.get $1 + local.get $e i32.const 32 i32.lt_u select return end - local.get $1 + local.get $e i32.const 0 i32.le_s if - local.get $0 + local.get $x i32.const -1 i32.eq if i32.const -1 i32.const 1 - local.get $1 + local.get $e i32.const 1 i32.and select return end - local.get $1 + local.get $e i32.const 0 i32.eq - local.get $0 + local.get $x i32.const 1 i32.eq i32.or return else - local.get $1 + local.get $e i32.const 1 i32.eq if - local.get $0 + local.get $x return else - local.get $1 + local.get $e i32.const 2 i32.eq if - local.get $0 - local.get $0 + local.get $x + local.get $x i32.mul return else - local.get $1 + local.get $e i32.const 32 i32.lt_s if i32.const 32 - local.get $1 + local.get $e i32.clz i32.sub - local.set $3 + local.set $var$3 block $break|0 block $case4|0 block $case3|0 block $case2|0 block $case1|0 block $case0|0 - local.get $3 - local.set $4 - local.get $4 + local.get $var$3 + local.set $var$4 + local.get $var$4 i32.const 5 i32.eq br_if $case0|0 - local.get $4 + local.get $var$4 i32.const 4 i32.eq br_if $case1|0 - local.get $4 + local.get $var$4 i32.const 3 i32.eq br_if $case2|0 - local.get $4 + local.get $var$4 i32.const 2 i32.eq br_if $case3|0 - local.get $4 + local.get $var$4 i32.const 1 i32.eq br_if $case4|0 br $break|0 end - local.get $1 + local.get $e i32.const 1 i32.and if - local.get $2 - local.get $0 + local.get $out + local.get $x i32.mul - local.set $2 + local.set $out end - local.get $1 + local.get $e i32.const 1 i32.shr_u - local.set $1 - local.get $0 - local.get $0 + local.set $e + local.get $x + local.get $x i32.mul - local.set $0 + local.set $x end - local.get $1 + local.get $e i32.const 1 i32.and if - local.get $2 - local.get $0 + local.get $out + local.get $x i32.mul - local.set $2 + local.set $out end - local.get $1 + local.get $e i32.const 1 i32.shr_u - local.set $1 - local.get $0 - local.get $0 + local.set $e + local.get $x + local.get $x i32.mul - local.set $0 + local.set $x end - local.get $1 + local.get $e i32.const 1 i32.and if - local.get $2 - local.get $0 + local.get $out + local.get $x i32.mul - local.set $2 + local.set $out end - local.get $1 + local.get $e i32.const 1 i32.shr_u - local.set $1 - local.get $0 - local.get $0 + local.set $e + local.get $x + local.get $x i32.mul - local.set $0 + local.set $x end - local.get $1 + local.get $e i32.const 1 i32.and if - local.get $2 - local.get $0 + local.get $out + local.get $x i32.mul - local.set $2 + local.set $out end - local.get $1 + local.get $e i32.const 1 i32.shr_u - local.set $1 - local.get $0 - local.get $0 + local.set $e + local.get $x + local.get $x i32.mul - local.set $0 + local.set $x end - local.get $1 + local.get $e i32.const 1 i32.and if - local.get $2 - local.get $0 + local.get $out + local.get $x i32.mul - local.set $2 + local.set $out end end - local.get $2 + local.get $out return end end end end loop $while-continue|1 - local.get $1 - local.set $3 - local.get $3 + local.get $e + local.set $var$3 + local.get $var$3 if - local.get $1 + local.get $e i32.const 1 i32.and if - local.get $2 - local.get $0 + local.get $out + local.get $x i32.mul - local.set $2 + local.set $out end - local.get $1 + local.get $e i32.const 1 i32.shr_u - local.set $1 - local.get $0 - local.get $0 + local.set $e + local.get $x + local.get $x i32.mul - local.set $0 + local.set $x br $while-continue|1 end end - local.get $2 + local.get $out ) - (func $~lib/math/NativeMath.pow (param $0 f64) (param $1 f64) (result f64) - (local $2 f64) - (local $3 f64) - (local $4 i32) - (local $5 i64) - (local $6 i64) - (local $7 i64) - (local $8 i64) - (local $9 i64) - (local $10 f64) - (local $11 i64) - (local $12 i32) - (local $13 i64) - (local $14 i64) - (local $15 f64) - (local $16 f64) - (local $17 f64) - (local $18 f64) - (local $19 f64) - (local $20 f64) - (local $21 f64) - (local $22 f64) - (local $23 f64) - (local $24 f64) - (local $25 f64) - (local $26 f64) - (local $27 f64) - (local $28 f64) - (local $29 f64) - (local $30 f64) - (local $31 f64) - (local $32 f64) - (local $33 f64) - (local $34 f64) - (local $35 f64) - (local $36 f64) - (local $37 f64) - (local $38 f64) - (local $39 i32) - (local $40 i32) - (local $41 i32) - (local $42 i32) - (local $43 i64) - (local $44 i64) - local.get $1 + (func $~lib/math/NativeMath.pow (param $x f64) (param $y f64) (result f64) + (local $var$2 f64) + (local $var$3 f64) + (local $var$4 i32) + (local $var$5 i64) + (local $var$6 i64) + (local $var$7 i64) + (local $var$8 i64) + (local $var$9 i64) + (local $var$10 f64) + (local $var$11 i64) + (local $var$12 i32) + (local $var$13 i64) + (local $var$14 i64) + (local $var$15 f64) + (local $var$16 f64) + (local $var$17 f64) + (local $var$18 f64) + (local $var$19 f64) + (local $var$20 f64) + (local $var$21 f64) + (local $var$22 f64) + (local $var$23 f64) + (local $var$24 f64) + (local $var$25 f64) + (local $var$26 f64) + (local $var$27 f64) + (local $var$28 f64) + (local $var$29 f64) + (local $var$30 f64) + (local $var$31 f64) + (local $var$32 f64) + (local $var$33 f64) + (local $var$34 f64) + (local $var$35 f64) + (local $var$36 f64) + (local $var$37 f64) + (local $var$38 f64) + (local $var$39 i32) + (local $var$40 i32) + (local $var$41 i32) + (local $var$42 i32) + (local $var$43 i64) + (local $var$44 i64) + local.get $y f64.abs f64.const 2 f64.le if - local.get $1 + local.get $y f64.const 2 f64.eq if - local.get $0 - local.get $0 + local.get $x + local.get $x f64.mul return end - local.get $1 + local.get $y f64.const 0.5 f64.eq if - local.get $0 + local.get $x f64.sqrt f64.abs f64.const inf - local.get $0 + local.get $x f64.const inf f64.neg f64.ne select return end - local.get $1 + local.get $y f64.const -1 f64.eq if f64.const 1 - local.get $0 + local.get $x f64.div return end - local.get $1 + local.get $y f64.const 1 f64.eq if - local.get $0 + local.get $x return end - local.get $1 + local.get $y f64.const 0 f64.eq if @@ -343,27 +343,27 @@ i32.lt_s drop block $~lib/util/math/pow_lut|inlined.0 (result f64) - local.get $0 - local.set $3 - local.get $1 - local.set $2 + local.get $x + local.set $var$3 + local.get $y + local.set $var$2 i32.const 0 - local.set $4 - local.get $3 + local.set $var$4 + local.get $var$3 i64.reinterpret_f64 - local.set $5 - local.get $2 + local.set $var$5 + local.get $var$2 i64.reinterpret_f64 - local.set $6 - local.get $5 + local.set $var$6 + local.get $var$5 i64.const 52 i64.shr_u - local.set $7 - local.get $6 + local.set $var$7 + local.get $var$6 i64.const 52 i64.shr_u - local.set $8 - local.get $7 + local.set $var$8 + local.get $var$7 i64.const 1 i64.sub i64.const 2047 @@ -373,7 +373,7 @@ if (result i32) i32.const 1 else - local.get $8 + local.get $var$8 i64.const 2047 i64.and i64.const 958 @@ -384,9 +384,9 @@ i64.ge_u end if - local.get $6 - local.set $9 - local.get $9 + local.get $var$6 + local.set $var$9 + local.get $var$9 i64.const 1 i64.shl i64.const 1 @@ -396,7 +396,7 @@ i64.sub i64.ge_u if - local.get $6 + local.get $var$6 i64.const 1 i64.shl i64.const 0 @@ -405,14 +405,14 @@ f64.const 1 br $~lib/util/math/pow_lut|inlined.0 end - local.get $5 + local.get $var$5 i64.const 4607182418800017408 i64.eq if f64.const nan:0x8000000000000 br $~lib/util/math/pow_lut|inlined.0 end - local.get $5 + local.get $var$5 i64.const 1 i64.shl i64.const -9007199254740992 @@ -420,19 +420,19 @@ if (result i32) i32.const 1 else - local.get $6 + local.get $var$6 i64.const 1 i64.shl i64.const -9007199254740992 i64.gt_u end if - local.get $3 - local.get $2 + local.get $var$3 + local.get $var$2 f64.add br $~lib/util/math/pow_lut|inlined.0 end - local.get $5 + local.get $var$5 i64.const 1 i64.shl i64.const 9214364837600034816 @@ -441,12 +441,12 @@ f64.const nan:0x8000000000000 br $~lib/util/math/pow_lut|inlined.0 end - local.get $5 + local.get $var$5 i64.const 1 i64.shl i64.const 9214364837600034816 i64.lt_u - local.get $6 + local.get $var$6 i64.const 63 i64.shr_u i64.const 0 @@ -457,14 +457,14 @@ f64.const 0 br $~lib/util/math/pow_lut|inlined.0 end - local.get $2 - local.get $2 + local.get $var$2 + local.get $var$2 f64.mul br $~lib/util/math/pow_lut|inlined.0 end - local.get $5 - local.set $9 - local.get $9 + local.get $var$5 + local.set $var$9 + local.get $var$9 i64.const 1 i64.shl i64.const 1 @@ -474,32 +474,32 @@ i64.sub i64.ge_u if - local.get $3 - local.get $3 + local.get $var$3 + local.get $var$3 f64.mul - local.set $10 - local.get $5 + local.set $var$10 + local.get $var$5 i64.const 63 i64.shr_u i32.wrap_i64 if (result i32) block $~lib/util/math/checkint|inlined.0 (result i32) - local.get $6 - local.set $9 - local.get $9 + local.get $var$6 + local.set $var$9 + local.get $var$9 i64.const 52 i64.shr_u i64.const 2047 i64.and - local.set $11 - local.get $11 + local.set $var$11 + local.get $var$11 i64.const 1023 i64.lt_u if i32.const 0 br $~lib/util/math/checkint|inlined.0 end - local.get $11 + local.get $var$11 i64.const 1023 i64.const 52 i64.add @@ -512,12 +512,12 @@ i64.const 1023 i64.const 52 i64.add - local.get $11 + local.get $var$11 i64.sub i64.shl - local.set $11 - local.get $9 - local.get $11 + local.set $var$11 + local.get $var$9 + local.get $var$11 i64.const 1 i64.sub i64.and @@ -527,8 +527,8 @@ i32.const 0 br $~lib/util/math/checkint|inlined.0 end - local.get $9 - local.get $11 + local.get $var$9 + local.get $var$11 i64.and i64.const 0 i64.ne @@ -544,43 +544,43 @@ i32.const 0 end if - local.get $10 + local.get $var$10 f64.neg - local.set $10 + local.set $var$10 end - local.get $6 + local.get $var$6 i64.const 0 i64.lt_s if (result f64) f64.const 1 - local.get $10 + local.get $var$10 f64.div else - local.get $10 + local.get $var$10 end br $~lib/util/math/pow_lut|inlined.0 end - local.get $5 + local.get $var$5 i64.const 0 i64.lt_s if block $~lib/util/math/checkint|inlined.1 (result i32) - local.get $6 - local.set $9 - local.get $9 + local.get $var$6 + local.set $var$9 + local.get $var$9 i64.const 52 i64.shr_u i64.const 2047 i64.and - local.set $11 - local.get $11 + local.set $var$11 + local.get $var$11 i64.const 1023 i64.lt_u if i32.const 0 br $~lib/util/math/checkint|inlined.1 end - local.get $11 + local.get $var$11 i64.const 1023 i64.const 52 i64.add @@ -593,12 +593,12 @@ i64.const 1023 i64.const 52 i64.add - local.get $11 + local.get $var$11 i64.sub i64.shl - local.set $11 - local.get $9 - local.get $11 + local.set $var$11 + local.get $var$9 + local.get $var$11 i64.const 1 i64.sub i64.and @@ -608,8 +608,8 @@ i32.const 0 br $~lib/util/math/checkint|inlined.1 end - local.get $9 - local.get $11 + local.get $var$9 + local.get $var$11 i64.and i64.const 0 i64.ne @@ -619,37 +619,37 @@ end i32.const 2 end - local.set $12 - local.get $12 + local.set $var$12 + local.get $var$12 i32.const 0 i32.eq if - local.get $3 - local.get $3 + local.get $var$3 + local.get $var$3 f64.sub - local.get $3 - local.get $3 + local.get $var$3 + local.get $var$3 f64.sub f64.div br $~lib/util/math/pow_lut|inlined.0 end - local.get $12 + local.get $var$12 i32.const 1 i32.eq if i32.const 262144 - local.set $4 + local.set $var$4 end - local.get $5 + local.get $var$5 i64.const 9223372036854775807 i64.and - local.set $5 - local.get $7 + local.set $var$5 + local.get $var$7 i64.const 2047 i64.and - local.set $7 + local.set $var$7 end - local.get $8 + local.get $var$8 i64.const 2047 i64.and i64.const 958 @@ -659,14 +659,14 @@ i64.sub i64.ge_u if - local.get $5 + local.get $var$5 i64.const 4607182418800017408 i64.eq if f64.const 1 br $~lib/util/math/pow_lut|inlined.0 end - local.get $8 + local.get $var$8 i64.const 2047 i64.and i64.const 958 @@ -675,10 +675,10 @@ f64.const 1 br $~lib/util/math/pow_lut|inlined.0 end - local.get $5 + local.get $var$5 i64.const 4607182418800017408 i64.gt_u - local.get $8 + local.get $var$8 i64.const 2048 i64.lt_u i32.eq @@ -689,34 +689,34 @@ end br $~lib/util/math/pow_lut|inlined.0 end - local.get $7 + local.get $var$7 i64.const 0 i64.eq if - local.get $3 + local.get $var$3 f64.const 4503599627370496 f64.mul i64.reinterpret_f64 - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i64.const 9223372036854775807 i64.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i64.const 52 i64.const 52 i64.shl i64.sub - local.set $5 + local.set $var$5 end end - local.get $5 - local.set $9 - local.get $9 + local.get $var$5 + local.set $var$9 + local.get $var$9 i64.const 4604531861337669632 i64.sub - local.set $11 - local.get $11 + local.set $var$11 + local.get $var$11 i64.const 52 i32.const 7 i64.extend_i32_s @@ -726,150 +726,150 @@ i64.extend_i32_s i64.and i32.wrap_i64 - local.set $12 - local.get $11 + local.set $var$12 + local.get $var$11 i64.const 52 i64.shr_s - local.set $13 - local.get $9 - local.get $11 + local.set $var$13 + local.get $var$9 + local.get $var$11 i64.const 4095 i64.const 52 i64.shl i64.and i64.sub - local.set $14 - local.get $14 + local.set $var$14 + local.get $var$14 f64.reinterpret_i64 - local.set $10 - local.get $13 + local.set $var$10 + local.get $var$13 f64.convert_i64_s - local.set $15 + local.set $var$15 i32.const 8 - local.get $12 + local.get $var$12 i32.const 2 i32.const 3 i32.add i32.shl i32.add f64.load - local.set $16 + local.set $var$16 i32.const 8 - local.get $12 + local.get $var$12 i32.const 2 i32.const 3 i32.add i32.shl i32.add f64.load offset=16 - local.set $17 + local.set $var$17 i32.const 8 - local.get $12 + local.get $var$12 i32.const 2 i32.const 3 i32.add i32.shl i32.add f64.load offset=24 - local.set $18 - local.get $14 + local.set $var$18 + local.get $var$14 i64.const 2147483648 i64.add i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $19 - local.get $10 - local.get $19 + local.set $var$19 + local.get $var$10 + local.get $var$19 f64.sub - local.set $20 - local.get $19 - local.get $16 + local.set $var$20 + local.get $var$19 + local.get $var$16 f64.mul f64.const 1 f64.sub - local.set $21 - local.get $20 - local.get $16 + local.set $var$21 + local.get $var$20 + local.get $var$16 f64.mul - local.set $22 - local.get $21 - local.get $22 + local.set $var$22 + local.get $var$21 + local.get $var$22 f64.add - local.set $23 - local.get $15 + local.set $var$23 + local.get $var$15 f64.const 0.6931471805598903 f64.mul - local.get $17 + local.get $var$17 f64.add - local.set $24 - local.get $24 - local.get $23 + local.set $var$24 + local.get $var$24 + local.get $var$23 f64.add - local.set $25 - local.get $15 + local.set $var$25 + local.get $var$15 f64.const 5.497923018708371e-14 f64.mul - local.get $18 + local.get $var$18 f64.add - local.set $26 - local.get $24 - local.get $25 + local.set $var$26 + local.get $var$24 + local.get $var$25 f64.sub - local.get $23 + local.get $var$23 f64.add - local.set $27 + local.set $var$27 f64.const -0.5 - local.get $23 + local.get $var$23 f64.mul - local.set $28 - local.get $23 - local.get $28 + local.set $var$28 + local.get $var$23 + local.get $var$28 f64.mul - local.set $29 - local.get $23 - local.get $29 + local.set $var$29 + local.get $var$23 + local.get $var$29 f64.mul - local.set $30 + local.set $var$30 f64.const -0.5 - local.get $21 + local.get $var$21 f64.mul - local.set $31 - local.get $21 - local.get $31 + local.set $var$31 + local.get $var$21 + local.get $var$31 f64.mul - local.set $32 - local.get $25 - local.get $32 + local.set $var$32 + local.get $var$25 + local.get $var$32 f64.add - local.set $33 - local.get $22 - local.get $28 - local.get $31 + local.set $var$33 + local.get $var$22 + local.get $var$28 + local.get $var$31 f64.add f64.mul - local.set $34 - local.get $25 - local.get $33 + local.set $var$34 + local.get $var$25 + local.get $var$33 f64.sub - local.get $32 + local.get $var$32 f64.add - local.set $35 - local.get $30 + local.set $var$35 + local.get $var$30 f64.const -0.6666666666666679 - local.get $23 + local.get $var$23 f64.const 0.5000000000000007 f64.mul f64.add - local.get $29 + local.get $var$29 f64.const 0.7999999995323976 - local.get $23 + local.get $var$23 f64.const -0.6666666663487739 f64.mul f64.add - local.get $29 + local.get $var$29 f64.const -1.142909628459501 - local.get $23 + local.get $var$23 f64.const 1.0000415263675542 f64.mul f64.add @@ -878,88 +878,88 @@ f64.mul f64.add f64.mul - local.set $36 - local.get $26 - local.get $27 + local.set $var$36 + local.get $var$26 + local.get $var$27 f64.add - local.get $34 + local.get $var$34 f64.add - local.get $35 + local.get $var$35 f64.add - local.get $36 + local.get $var$36 f64.add - local.set $37 - local.get $33 - local.get $37 + local.set $var$37 + local.get $var$33 + local.get $var$37 f64.add - local.set $38 - local.get $33 - local.get $38 + local.set $var$38 + local.get $var$33 + local.get $var$38 f64.sub - local.get $37 + local.get $var$37 f64.add global.set $~lib/util/math/log_tail - local.get $38 - local.set $38 + local.get $var$38 + local.set $var$38 global.get $~lib/util/math/log_tail - local.set $37 - local.get $6 + local.set $var$37 + local.get $var$6 i64.const -134217728 i64.and f64.reinterpret_i64 - local.set $34 - local.get $2 - local.get $34 + local.set $var$34 + local.get $var$2 + local.get $var$34 f64.sub - local.set $33 - local.get $38 + local.set $var$33 + local.get $var$38 i64.reinterpret_f64 i64.const -134217728 i64.and f64.reinterpret_i64 - local.set $32 - local.get $38 - local.get $32 + local.set $var$32 + local.get $var$38 + local.get $var$32 f64.sub - local.get $37 + local.get $var$37 f64.add - local.set $31 - local.get $34 - local.get $32 + local.set $var$31 + local.get $var$34 + local.get $var$32 f64.mul - local.set $36 - local.get $33 - local.get $32 + local.set $var$36 + local.get $var$33 + local.get $var$32 f64.mul - local.get $2 - local.get $31 + local.get $var$2 + local.get $var$31 f64.mul f64.add - local.set $35 + local.set $var$35 block $~lib/util/math/exp_inline|inlined.0 (result f64) - local.get $36 - local.set $15 - local.get $35 - local.set $10 - local.get $4 - local.set $12 - local.get $15 + local.get $var$36 + local.set $var$15 + local.get $var$35 + local.set $var$10 + local.get $var$4 + local.set $var$12 + local.get $var$15 i64.reinterpret_f64 - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 i64.const 52 i64.shr_u i32.wrap_i64 i32.const 2047 i32.and - local.set $39 - local.get $39 + local.set $var$39 + local.get $var$39 i32.const 969 i32.sub i32.const 63 i32.ge_u if - local.get $39 + local.get $var$39 i32.const 969 i32.sub i32.const -2147483648 @@ -967,92 +967,92 @@ if f64.const -1 f64.const 1 - local.get $12 + local.get $var$12 select br $~lib/util/math/exp_inline|inlined.0 end - local.get $39 + local.get $var$39 i32.const 1033 i32.ge_u if - local.get $9 + local.get $var$9 i64.const 0 i64.lt_s if (result f64) - local.get $12 - local.set $41 - local.get $41 - local.set $42 + local.get $var$12 + local.set $var$41 + local.get $var$41 + local.set $var$42 i64.const 1152921504606846976 f64.reinterpret_i64 - local.set $16 - local.get $16 + local.set $var$16 + local.get $var$16 f64.neg - local.get $16 - local.get $42 + local.get $var$16 + local.get $var$42 select - local.get $16 + local.get $var$16 f64.mul else - local.get $12 - local.set $42 - local.get $42 - local.set $41 + local.get $var$12 + local.set $var$42 + local.get $var$42 + local.set $var$41 i64.const 8070450532247928832 f64.reinterpret_i64 - local.set $17 - local.get $17 + local.set $var$17 + local.get $var$17 f64.neg - local.get $17 - local.get $41 + local.get $var$17 + local.get $var$41 select - local.get $17 + local.get $var$17 f64.mul end br $~lib/util/math/exp_inline|inlined.0 end i32.const 0 - local.set $39 + local.set $var$39 end f64.const 184.6649652337873 - local.get $15 + local.get $var$15 f64.mul - local.set $29 - local.get $29 + local.set $var$29 + local.get $var$29 f64.const 6755399441055744 f64.add - local.set $30 - local.get $30 + local.set $var$30 + local.get $var$30 i64.reinterpret_f64 - local.set $14 - local.get $30 + local.set $var$14 + local.get $var$30 f64.const 6755399441055744 f64.sub - local.set $30 - local.get $15 - local.get $30 + local.set $var$30 + local.get $var$15 + local.get $var$30 f64.const -0.005415212348111709 f64.mul f64.add - local.get $30 + local.get $var$30 f64.const -1.2864023111638346e-14 f64.mul f64.add - local.set $28 - local.get $28 - local.get $10 + local.set $var$28 + local.get $var$28 + local.get $var$10 f64.add - local.set $28 - local.get $14 + local.set $var$28 + local.get $var$14 i32.const 127 i64.extend_i32_s i64.and i64.const 1 i64.shl i32.wrap_i64 - local.set $40 - local.get $14 - local.get $12 + local.set $var$40 + local.get $var$14 + local.get $var$12 i64.extend_i32_u i64.add i64.const 52 @@ -1060,486 +1060,486 @@ i64.extend_i32_s i64.sub i64.shl - local.set $13 + local.set $var$13 i32.const 4104 - local.get $40 + local.get $var$40 i32.const 3 i32.shl i32.add i64.load f64.reinterpret_i64 - local.set $25 + local.set $var$25 i32.const 4104 - local.get $40 + local.get $var$40 i32.const 3 i32.shl i32.add i64.load offset=8 - local.get $13 + local.get $var$13 i64.add - local.set $11 - local.get $28 - local.get $28 + local.set $var$11 + local.get $var$28 + local.get $var$28 f64.mul - local.set $27 - local.get $25 - local.get $28 + local.set $var$27 + local.get $var$25 + local.get $var$28 f64.add - local.get $27 + local.get $var$27 f64.const 0.49999999999996786 - local.get $28 + local.get $var$28 f64.const 0.16666666666665886 f64.mul f64.add f64.mul f64.add - local.get $27 - local.get $27 + local.get $var$27 + local.get $var$27 f64.mul f64.const 0.0416666808410674 - local.get $28 + local.get $var$28 f64.const 0.008333335853059549 f64.mul f64.add f64.mul f64.add - local.set $24 - local.get $39 + local.set $var$24 + local.get $var$39 i32.const 0 i32.eq if block $~lib/util/math/specialcase|inlined.0 (result f64) - local.get $24 - local.set $18 - local.get $11 - local.set $44 - local.get $14 - local.set $43 - local.get $43 + local.get $var$24 + local.set $var$18 + local.get $var$11 + local.set $var$44 + local.get $var$14 + local.set $var$43 + local.get $var$43 i64.const 2147483648 i64.and i64.const 0 i64.ne i32.eqz if - local.get $44 + local.get $var$44 i64.const 1009 i64.const 52 i64.shl i64.sub - local.set $44 - local.get $44 + local.set $var$44 + local.get $var$44 f64.reinterpret_i64 - local.set $17 + local.set $var$17 f64.const 5486124068793688683255936e279 - local.get $17 - local.get $17 - local.get $18 + local.get $var$17 + local.get $var$17 + local.get $var$18 f64.mul f64.add f64.mul br $~lib/util/math/specialcase|inlined.0 end - local.get $44 + local.get $var$44 i64.const 1022 i64.const 52 i64.shl i64.add - local.set $44 - local.get $44 + local.set $var$44 + local.get $var$44 f64.reinterpret_i64 - local.set $17 - local.get $17 - local.get $17 - local.get $18 + local.set $var$17 + local.get $var$17 + local.get $var$17 + local.get $var$18 f64.mul f64.add - local.set $16 - local.get $16 + local.set $var$16 + local.get $var$16 f64.abs f64.const 1 f64.lt if f64.const 1 - local.get $16 + local.get $var$16 f64.copysign - local.set $23 - local.get $17 - local.get $16 + local.set $var$23 + local.get $var$17 + local.get $var$16 f64.sub - local.get $17 - local.get $18 + local.get $var$17 + local.get $var$18 f64.mul f64.add - local.set $22 - local.get $23 - local.get $16 + local.set $var$22 + local.get $var$23 + local.get $var$16 f64.add - local.set $21 - local.get $23 - local.get $21 + local.set $var$21 + local.get $var$23 + local.get $var$21 f64.sub - local.get $16 + local.get $var$16 f64.add - local.get $22 + local.get $var$22 f64.add - local.set $22 - local.get $21 - local.get $22 + local.set $var$22 + local.get $var$21 + local.get $var$22 f64.add - local.get $23 + local.get $var$23 f64.sub - local.set $16 - local.get $16 + local.set $var$16 + local.get $var$16 f64.const 0 f64.eq if - local.get $44 + local.get $var$44 i64.const -9223372036854775808 i64.and f64.reinterpret_i64 - local.set $16 + local.set $var$16 end end - local.get $16 + local.get $var$16 f64.const 2.2250738585072014e-308 f64.mul end br $~lib/util/math/exp_inline|inlined.0 end - local.get $11 + local.get $var$11 f64.reinterpret_i64 - local.set $26 - local.get $26 - local.get $26 - local.get $24 + local.set $var$26 + local.get $var$26 + local.get $var$26 + local.get $var$24 f64.mul f64.add end end return ) - (func $~lib/math/NativeMathf.mod (param $0 f32) (param $1 f32) (result f32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 f32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/math/NativeMathf.mod (param $x f32) (param $y f32) (result f32) + (local $ux i32) + (local $uy i32) + (local $ex i32) + (local $ey i32) + (local $sm i32) + (local $uy1 i32) + (local $var$8 f32) + (local $ux1 i32) + (local $var$10 i32) + (local $shift i32) + local.get $y f32.abs f32.const 1 f32.eq if - local.get $0 - local.get $0 + local.get $x + local.get $x f32.trunc f32.sub - local.get $0 + local.get $x f32.copysign return end - local.get $0 + local.get $x i32.reinterpret_f32 - local.set $2 - local.get $1 + local.set $ux + local.get $y i32.reinterpret_f32 - local.set $3 - local.get $2 + local.set $uy + local.get $ux i32.const 23 i32.shr_u i32.const 255 i32.and - local.set $4 - local.get $3 + local.set $ex + local.get $uy i32.const 23 i32.shr_u i32.const 255 i32.and - local.set $5 - local.get $2 + local.set $ey + local.get $ux i32.const -2147483648 i32.and - local.set $6 - local.get $3 + local.set $sm + local.get $uy i32.const 1 i32.shl - local.set $7 - local.get $7 + local.set $uy1 + local.get $uy1 i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $4 + local.get $ex i32.const 255 i32.eq end if (result i32) i32.const 1 else - local.get $1 - local.get $1 + local.get $y + local.get $y f32.ne end if - local.get $0 - local.get $1 + local.get $x + local.get $y f32.mul - local.set $8 - local.get $8 - local.get $8 + local.set $var$8 + local.get $var$8 + local.get $var$8 f32.div return end - local.get $2 + local.get $ux i32.const 1 i32.shl - local.set $9 - local.get $9 - local.get $7 + local.set $ux1 + local.get $ux1 + local.get $uy1 i32.le_u if - local.get $0 - local.get $9 - local.get $7 + local.get $x + local.get $ux1 + local.get $uy1 i32.ne f32.convert_i32_u f32.mul return end - local.get $4 + local.get $ex i32.eqz if - local.get $4 - local.get $2 + local.get $ex + local.get $ux i32.const 9 i32.shl i32.clz i32.sub - local.set $4 - local.get $2 + local.set $ex + local.get $ux i32.const 1 - local.get $4 + local.get $ex i32.sub i32.shl - local.set $2 + local.set $ux else - local.get $2 + local.get $ux i32.const -1 i32.const 9 i32.shr_u i32.and - local.set $2 - local.get $2 + local.set $ux + local.get $ux i32.const 1 i32.const 23 i32.shl i32.or - local.set $2 + local.set $ux end - local.get $5 + local.get $ey i32.eqz if - local.get $5 - local.get $3 + local.get $ey + local.get $uy i32.const 9 i32.shl i32.clz i32.sub - local.set $5 - local.get $3 + local.set $ey + local.get $uy i32.const 1 - local.get $5 + local.get $ey i32.sub i32.shl - local.set $3 + local.set $uy else - local.get $3 + local.get $uy i32.const -1 i32.const 9 i32.shr_u i32.and - local.set $3 - local.get $3 + local.set $uy + local.get $uy i32.const 1 i32.const 23 i32.shl i32.or - local.set $3 + local.set $uy end loop $while-continue|0 - local.get $4 - local.get $5 + local.get $ex + local.get $ey i32.gt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $2 - local.get $3 + local.get $ux + local.get $uy i32.ge_u if - local.get $2 - local.get $3 + local.get $ux + local.get $uy i32.eq if f32.const 0 - local.get $0 + local.get $x f32.mul return end - local.get $2 - local.get $3 + local.get $ux + local.get $uy i32.sub - local.set $2 + local.set $ux end - local.get $2 + local.get $ux i32.const 1 i32.shl - local.set $2 - local.get $4 + local.set $ux + local.get $ex i32.const 1 i32.sub - local.set $4 + local.set $ex br $while-continue|0 end end - local.get $2 - local.get $3 + local.get $ux + local.get $uy i32.ge_u if - local.get $2 - local.get $3 + local.get $ux + local.get $uy i32.eq if f32.const 0 - local.get $0 + local.get $x f32.mul return end - local.get $2 - local.get $3 + local.get $ux + local.get $uy i32.sub - local.set $2 + local.set $ux end - local.get $2 + local.get $ux i32.const 8 i32.shl i32.clz - local.set $11 - local.get $4 - local.get $11 + local.set $shift + local.get $ex + local.get $shift i32.sub - local.set $4 - local.get $2 - local.get $11 + local.set $ex + local.get $ux + local.get $shift i32.shl - local.set $2 - local.get $4 + local.set $ux + local.get $ex i32.const 0 i32.gt_s if - local.get $2 + local.get $ux i32.const 1 i32.const 23 i32.shl i32.sub - local.set $2 - local.get $2 - local.get $4 + local.set $ux + local.get $ux + local.get $ex i32.const 23 i32.shl i32.or - local.set $2 + local.set $ux else - local.get $2 + local.get $ux i32.const 0 - local.get $4 + local.get $ex i32.sub i32.const 1 i32.add i32.shr_u - local.set $2 + local.set $ux end - local.get $2 - local.get $6 + local.get $ux + local.get $sm i32.or f32.reinterpret_i32 ) - (func $~lib/math/NativeMathf.pow (param $0 f32) (param $1 f32) (result f32) - (local $2 f32) - (local $3 f32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 f32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 f64) - (local $16 f64) - (local $17 f64) - (local $18 f64) - (local $19 f64) - (local $20 f64) - (local $21 f64) - (local $22 f64) - (local $23 i64) - (local $24 i64) - local.get $1 + (func $~lib/math/NativeMathf.pow (param $x f32) (param $y f32) (result f32) + (local $var$2 f32) + (local $var$3 f32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 f32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) + (local $var$14 i32) + (local $var$15 f64) + (local $var$16 f64) + (local $var$17 f64) + (local $var$18 f64) + (local $var$19 f64) + (local $var$20 f64) + (local $var$21 f64) + (local $var$22 f64) + (local $var$23 i64) + (local $var$24 i64) + local.get $y f32.abs f32.const 2 f32.le if - local.get $1 + local.get $y f32.const 2 f32.eq if - local.get $0 - local.get $0 + local.get $x + local.get $x f32.mul return end - local.get $1 + local.get $y f32.const 0.5 f32.eq if - local.get $0 + local.get $x f32.sqrt f32.abs f32.const inf - local.get $0 + local.get $x f32.const inf f32.neg f32.ne select return end - local.get $1 + local.get $y f32.const -1 f32.eq if f32.const 1 - local.get $0 + local.get $x f32.div return end - local.get $1 + local.get $y f32.const 1 f32.eq if - local.get $0 + local.get $x return end - local.get $1 + local.get $y f32.const 0 f32.eq if @@ -1552,30 +1552,30 @@ i32.lt_s drop block $~lib/util/math/powf_lut|inlined.0 (result f32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 + local.get $x + local.set $var$3 + local.get $y + local.set $var$2 i32.const 0 - local.set $4 - local.get $3 + local.set $var$4 + local.get $var$3 i32.reinterpret_f32 - local.set $5 - local.get $2 + local.set $var$5 + local.get $var$2 i32.reinterpret_f32 - local.set $6 + local.set $var$6 i32.const 0 - local.set $7 - local.get $5 + local.set $var$7 + local.get $var$5 i32.const 8388608 i32.sub i32.const 2139095040 i32.const 8388608 i32.sub i32.ge_u - local.get $6 - local.set $8 - local.get $8 + local.get $var$6 + local.set $var$8 + local.get $var$8 i32.const 1 i32.shl i32.const 1 @@ -1588,12 +1588,12 @@ i32.ge_u i32.const 0 i32.ne - local.tee $7 + local.tee $var$7 i32.or if - local.get $7 + local.get $var$7 if - local.get $6 + local.get $var$6 i32.const 1 i32.shl i32.const 0 @@ -1602,14 +1602,14 @@ f32.const 1 br $~lib/util/math/powf_lut|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1065353216 i32.eq if f32.const nan:0x400000 br $~lib/util/math/powf_lut|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.shl i32.const 2139095040 @@ -1619,7 +1619,7 @@ if (result i32) i32.const 1 else - local.get $6 + local.get $var$6 i32.const 1 i32.shl i32.const 2139095040 @@ -1628,12 +1628,12 @@ i32.gt_u end if - local.get $3 - local.get $2 + local.get $var$3 + local.get $var$2 f32.add br $~lib/util/math/powf_lut|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.shl i32.const 1065353216 @@ -1644,14 +1644,14 @@ f32.const nan:0x400000 br $~lib/util/math/powf_lut|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.shl i32.const 1065353216 i32.const 1 i32.shl i32.lt_u - local.get $6 + local.get $var$6 i32.const 31 i32.shr_u i32.eqz @@ -1660,14 +1660,14 @@ f32.const 0 br $~lib/util/math/powf_lut|inlined.0 end - local.get $2 - local.get $2 + local.get $var$2 + local.get $var$2 f32.mul br $~lib/util/math/powf_lut|inlined.0 end - local.get $5 - local.set $8 - local.get $8 + local.get $var$5 + local.set $var$8 + local.get $var$8 i32.const 1 i32.shl i32.const 1 @@ -1679,31 +1679,31 @@ i32.sub i32.ge_u if - local.get $3 - local.get $3 + local.get $var$3 + local.get $var$3 f32.mul - local.set $9 - local.get $5 + local.set $var$9 + local.get $var$5 i32.const 31 i32.shr_u if (result i32) block $~lib/util/math/checkintf|inlined.0 (result i32) - local.get $6 - local.set $8 - local.get $8 + local.get $var$6 + local.set $var$8 + local.get $var$8 i32.const 23 i32.shr_u i32.const 255 i32.and - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 i32.const 127 i32.lt_u if i32.const 0 br $~lib/util/math/checkintf|inlined.0 end - local.get $10 + local.get $var$10 i32.const 127 i32.const 23 i32.add @@ -1716,12 +1716,12 @@ i32.const 127 i32.const 23 i32.add - local.get $10 + local.get $var$10 i32.sub i32.shl - local.set $10 - local.get $8 - local.get $10 + local.set $var$10 + local.get $var$8 + local.get $var$10 i32.const 1 i32.sub i32.and @@ -1729,8 +1729,8 @@ i32.const 0 br $~lib/util/math/checkintf|inlined.0 end - local.get $8 - local.get $10 + local.get $var$8 + local.get $var$10 i32.and if i32.const 1 @@ -1744,43 +1744,43 @@ i32.const 0 end if - local.get $9 + local.get $var$9 f32.neg - local.set $9 + local.set $var$9 end - local.get $6 + local.get $var$6 i32.const 0 i32.lt_s if (result f32) f32.const 1 - local.get $9 + local.get $var$9 f32.div else - local.get $9 + local.get $var$9 end br $~lib/util/math/powf_lut|inlined.0 end - local.get $5 + local.get $var$5 i32.const 0 i32.lt_s if block $~lib/util/math/checkintf|inlined.1 (result i32) - local.get $6 - local.set $8 - local.get $8 + local.get $var$6 + local.set $var$8 + local.get $var$8 i32.const 23 i32.shr_u i32.const 255 i32.and - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 i32.const 127 i32.lt_u if i32.const 0 br $~lib/util/math/checkintf|inlined.1 end - local.get $10 + local.get $var$10 i32.const 127 i32.const 23 i32.add @@ -1793,12 +1793,12 @@ i32.const 127 i32.const 23 i32.add - local.get $10 + local.get $var$10 i32.sub i32.shl - local.set $10 - local.get $8 - local.get $10 + local.set $var$10 + local.get $var$8 + local.get $var$10 i32.const 1 i32.sub i32.and @@ -1806,8 +1806,8 @@ i32.const 0 br $~lib/util/math/checkintf|inlined.1 end - local.get $8 - local.get $10 + local.get $var$8 + local.get $var$10 i32.and if i32.const 1 @@ -1815,156 +1815,156 @@ end i32.const 2 end - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 i32.const 0 i32.eq if - local.get $3 - local.get $3 + local.get $var$3 + local.get $var$3 f32.sub - local.get $3 - local.get $3 + local.get $var$3 + local.get $var$3 f32.sub f32.div br $~lib/util/math/powf_lut|inlined.0 end - local.get $10 + local.get $var$10 i32.const 1 i32.eq if i32.const 65536 - local.set $4 + local.set $var$4 end - local.get $5 + local.get $var$5 i32.const 2147483647 i32.and - local.set $5 + local.set $var$5 end - local.get $5 + local.get $var$5 i32.const 8388608 i32.lt_u if - local.get $3 + local.get $var$3 f32.const 8388608 f32.mul i32.reinterpret_f32 - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.const 2147483647 i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.const 23 i32.const 23 i32.shl i32.sub - local.set $5 + local.set $var$5 end end - local.get $5 - local.set $8 - local.get $8 + local.get $var$5 + local.set $var$8 + local.get $var$8 i32.const 1060306944 i32.sub - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 i32.const 23 i32.const 4 i32.sub i32.shr_u i32.const 15 i32.and - local.set $11 - local.get $10 + local.set $var$11 + local.get $var$10 i32.const -8388608 i32.and - local.set $12 - local.get $8 - local.get $12 + local.set $var$12 + local.get $var$8 + local.get $var$12 i32.sub - local.set $13 - local.get $12 + local.set $var$13 + local.get $var$12 i32.const 23 i32.shr_s - local.set $14 + local.set $var$14 i32.const 6152 - local.get $11 + local.get $var$11 i32.const 1 i32.const 3 i32.add i32.shl i32.add f64.load - local.set $15 + local.set $var$15 i32.const 6152 - local.get $11 + local.get $var$11 i32.const 1 i32.const 3 i32.add i32.shl i32.add f64.load offset=8 - local.set $16 - local.get $13 + local.set $var$16 + local.get $var$13 f32.reinterpret_i32 f64.promote_f32 - local.set $17 - local.get $17 - local.get $15 + local.set $var$17 + local.get $var$17 + local.get $var$15 f64.mul f64.const 1 f64.sub - local.set $18 - local.get $16 - local.get $14 + local.set $var$18 + local.get $var$16 + local.get $var$14 f64.convert_i32_s f64.add - local.set $19 + local.set $var$19 f64.const 0.288457581109214 - local.get $18 + local.get $var$18 f64.mul f64.const -0.36092606229713164 f64.add - local.set $20 + local.set $var$20 f64.const 0.480898481472577 - local.get $18 + local.get $var$18 f64.mul f64.const -0.7213474675006291 f64.add - local.set $21 + local.set $var$21 f64.const 1.4426950408774342 - local.get $18 + local.get $var$18 f64.mul - local.get $19 + local.get $var$19 f64.add - local.set $22 - local.get $18 - local.get $18 + local.set $var$22 + local.get $var$18 + local.get $var$18 f64.mul - local.set $18 - local.get $22 - local.get $21 - local.get $18 + local.set $var$18 + local.get $var$22 + local.get $var$21 + local.get $var$18 f64.mul f64.add - local.set $22 - local.get $20 - local.get $18 - local.get $18 + local.set $var$22 + local.get $var$20 + local.get $var$18 + local.get $var$18 f64.mul f64.mul - local.get $22 + local.get $var$22 f64.add - local.set $20 - local.get $20 - local.set $22 - local.get $2 + local.set $var$20 + local.get $var$20 + local.set $var$22 + local.get $var$2 f64.promote_f32 - local.get $22 + local.get $var$22 f64.mul - local.set $21 - local.get $21 + local.set $var$21 + local.get $var$21 i64.reinterpret_f64 i64.const 47 i64.shr_u @@ -1973,66 +1973,66 @@ i64.const 32959 i64.ge_u if - local.get $21 + local.get $var$21 f64.const 127.99999995700433 f64.gt if - local.get $4 - local.set $8 - local.get $8 - local.set $10 + local.get $var$4 + local.set $var$8 + local.get $var$8 + local.set $var$10 i32.const 1879048192 f32.reinterpret_i32 - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 f32.neg - local.get $9 - local.get $10 + local.get $var$9 + local.get $var$10 select - local.get $9 + local.get $var$9 f32.mul br $~lib/util/math/powf_lut|inlined.0 end - local.get $21 + local.get $var$21 f64.const -150 f64.le if - local.get $4 - local.set $11 - local.get $11 - local.set $12 + local.get $var$4 + local.set $var$11 + local.get $var$11 + local.set $var$12 i32.const 268435456 f32.reinterpret_i32 - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 f32.neg - local.get $9 - local.get $12 + local.get $var$9 + local.get $var$12 select - local.get $9 + local.get $var$9 f32.mul br $~lib/util/math/powf_lut|inlined.0 end end - local.get $21 - local.set $15 - local.get $4 - local.set $13 - local.get $15 + local.get $var$21 + local.set $var$15 + local.get $var$4 + local.set $var$13 + local.get $var$15 f64.const 211106232532992 f64.add - local.set $20 - local.get $20 + local.set $var$20 + local.get $var$20 i64.reinterpret_f64 - local.set $23 - local.get $15 - local.get $20 + local.set $var$23 + local.get $var$15 + local.get $var$20 f64.const 211106232532992 f64.sub f64.sub - local.set $19 + local.set $var$19 i32.const 6408 - local.get $23 + local.get $var$23 i32.wrap_i64 i32.const 31 i32.and @@ -2040,10 +2040,10 @@ i32.shl i32.add i64.load - local.set $24 - local.get $24 - local.get $23 - local.get $13 + local.set $var$24 + local.get $var$24 + local.get $var$23 + local.get $var$13 i64.extend_i32_u i64.add i64.const 52 @@ -2052,291 +2052,291 @@ i64.sub i64.shl i64.add - local.set $24 - local.get $24 + local.set $var$24 + local.get $var$24 f64.reinterpret_i64 - local.set $16 + local.set $var$16 f64.const 0.05550361559341535 - local.get $19 + local.get $var$19 f64.mul f64.const 0.2402284522445722 f64.add - local.set $18 + local.set $var$18 f64.const 0.6931471806916203 - local.get $19 + local.get $var$19 f64.mul f64.const 1 f64.add - local.set $17 - local.get $17 - local.get $18 - local.get $19 - local.get $19 + local.set $var$17 + local.get $var$17 + local.get $var$18 + local.get $var$19 + local.get $var$19 f64.mul f64.mul f64.add - local.set $17 - local.get $17 - local.get $16 + local.set $var$17 + local.get $var$17 + local.get $var$16 f64.mul - local.set $17 - local.get $17 + local.set $var$17 + local.get $var$17 f32.demote_f64 end return ) - (func $~lib/math/NativeMath.mod (param $0 f64) (param $1 f64) (result f64) - (local $2 i64) - (local $3 i64) - (local $4 i64) - (local $5 i64) - (local $6 i64) - (local $7 i64) - (local $8 f64) - (local $9 i64) - (local $10 i32) - (local $11 i64) - local.get $1 + (func $~lib/math/NativeMath.mod (param $x f64) (param $y f64) (result f64) + (local $ux i64) + (local $uy i64) + (local $ex i64) + (local $ey i64) + (local $sx i64) + (local $uy1 i64) + (local $var$8 f64) + (local $ux1 i64) + (local $var$10 i32) + (local $shift i64) + local.get $y f64.abs f64.const 1 f64.eq if - local.get $0 - local.get $0 + local.get $x + local.get $x f64.trunc f64.sub - local.get $0 + local.get $x f64.copysign return end - local.get $0 + local.get $x i64.reinterpret_f64 - local.set $2 - local.get $1 + local.set $ux + local.get $y i64.reinterpret_f64 - local.set $3 - local.get $2 + local.set $uy + local.get $ux i64.const 52 i64.shr_u i64.const 2047 i64.and - local.set $4 - local.get $3 + local.set $ex + local.get $uy i64.const 52 i64.shr_u i64.const 2047 i64.and - local.set $5 - local.get $2 + local.set $ey + local.get $ux i64.const 63 i64.shr_u - local.set $6 - local.get $3 + local.set $sx + local.get $uy i64.const 1 i64.shl - local.set $7 - local.get $7 + local.set $uy1 + local.get $uy1 i64.const 0 i64.eq if (result i32) i32.const 1 else - local.get $4 + local.get $ex i64.const 2047 i64.eq end if (result i32) i32.const 1 else - local.get $1 - local.get $1 + local.get $y + local.get $y f64.ne end if - local.get $0 - local.get $1 + local.get $x + local.get $y f64.mul - local.set $8 - local.get $8 - local.get $8 + local.set $var$8 + local.get $var$8 + local.get $var$8 f64.div return end - local.get $2 + local.get $ux i64.const 1 i64.shl - local.set $9 - local.get $9 - local.get $7 + local.set $ux1 + local.get $ux1 + local.get $uy1 i64.le_u if - local.get $0 - local.get $9 - local.get $7 + local.get $x + local.get $ux1 + local.get $uy1 i64.ne f64.convert_i32_u f64.mul return end - local.get $4 + local.get $ex i64.const 0 i64.ne i32.eqz if - local.get $4 - local.get $2 + local.get $ex + local.get $ux i64.const 12 i64.shl i64.clz i64.sub - local.set $4 - local.get $2 + local.set $ex + local.get $ux i64.const 1 - local.get $4 + local.get $ex i64.sub i64.shl - local.set $2 + local.set $ux else - local.get $2 + local.get $ux i64.const -1 i64.const 12 i64.shr_u i64.and - local.set $2 - local.get $2 + local.set $ux + local.get $ux i64.const 1 i64.const 52 i64.shl i64.or - local.set $2 + local.set $ux end - local.get $5 + local.get $ey i64.const 0 i64.ne i32.eqz if - local.get $5 - local.get $3 + local.get $ey + local.get $uy i64.const 12 i64.shl i64.clz i64.sub - local.set $5 - local.get $3 + local.set $ey + local.get $uy i64.const 1 - local.get $5 + local.get $ey i64.sub i64.shl - local.set $3 + local.set $uy else - local.get $3 + local.get $uy i64.const -1 i64.const 12 i64.shr_u i64.and - local.set $3 - local.get $3 + local.set $uy + local.get $uy i64.const 1 i64.const 52 i64.shl i64.or - local.set $3 + local.set $uy end loop $while-continue|0 - local.get $4 - local.get $5 + local.get $ex + local.get $ey i64.gt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $2 - local.get $3 + local.get $ux + local.get $uy i64.ge_u if - local.get $2 - local.get $3 + local.get $ux + local.get $uy i64.eq if f64.const 0 - local.get $0 + local.get $x f64.mul return end - local.get $2 - local.get $3 + local.get $ux + local.get $uy i64.sub - local.set $2 + local.set $ux end - local.get $2 + local.get $ux i64.const 1 i64.shl - local.set $2 - local.get $4 + local.set $ux + local.get $ex i64.const 1 i64.sub - local.set $4 + local.set $ex br $while-continue|0 end end - local.get $2 - local.get $3 + local.get $ux + local.get $uy i64.ge_u if - local.get $2 - local.get $3 + local.get $ux + local.get $uy i64.eq if f64.const 0 - local.get $0 + local.get $x f64.mul return end - local.get $2 - local.get $3 + local.get $ux + local.get $uy i64.sub - local.set $2 + local.set $ux end - local.get $2 + local.get $ux i64.const 11 i64.shl i64.clz - local.set $11 - local.get $4 - local.get $11 + local.set $shift + local.get $ex + local.get $shift i64.sub - local.set $4 - local.get $2 - local.get $11 + local.set $ex + local.get $ux + local.get $shift i64.shl - local.set $2 - local.get $4 + local.set $ux + local.get $ex i64.const 0 i64.gt_s if - local.get $2 + local.get $ux i64.const 1 i64.const 52 i64.shl i64.sub - local.set $2 - local.get $2 - local.get $4 + local.set $ux + local.get $ux + local.get $ex i64.const 52 i64.shl i64.or - local.set $2 + local.set $ux else - local.get $2 + local.get $ux i64.const 0 - local.get $4 + local.get $ex i64.sub i64.const 1 i64.add i64.shr_u - local.set $2 + local.set $ux end - local.get $2 - local.get $6 + local.get $ux + local.get $sx i64.const 63 i64.shl i64.or diff --git a/tests/compiler/bindings/esm.debug.wat b/tests/compiler/bindings/esm.debug.wat index 7a2a0db5f6..7e6db0845f 100644 --- a/tests/compiler/bindings/esm.debug.wat +++ b/tests/compiler/bindings/esm.debug.wat @@ -122,14 +122,14 @@ (func $start:bindings/esm~anonymous|0 nop ) - (func $bindings/esm/plainFunction (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $bindings/esm/plainFunction (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.add ) - (func $bindings/esm/plainFunction64 (param $0 i64) (param $1 i64) (result i64) - local.get $0 - local.get $1 + (func $bindings/esm/plainFunction64 (param $a i64) (param $b i64) (result i64) + local.get $a + local.get $b i64.add ) (func $bindings/esm/getMaxUnsigned32 (result i32) @@ -138,8 +138,8 @@ (func $bindings/esm/getMaxUnsigned64 (result i64) global.get $~lib/builtins/u64.MAX_VALUE ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (param $0 i32) (result i32) - local.get $0 + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 @@ -154,50 +154,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -210,58 +210,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -278,12 +278,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -293,19 +293,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -316,27 +316,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -344,35 +344,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -382,15 +382,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -400,25 +400,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -426,33 +426,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -480,23 +480,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -508,15 +508,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -528,33 +528,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -562,21 +562,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -591,36 +591,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -628,67 +628,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -698,22 +698,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -723,12 +723,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -740,75 +740,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -820,38 +820,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -865,12 +865,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -881,38 +881,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -920,21 +920,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -949,101 +949,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -1054,7 +1054,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1065,26 +1065,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1097,27 +1097,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1131,11 +1131,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1146,66 +1146,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1215,10 +1215,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1229,13 +1229,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1246,109 +1246,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1356,7 +1356,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1373,23 +1373,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1401,54 +1401,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1469,30 +1469,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1502,9 +1502,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1514,8 +1514,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1523,43 +1523,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1571,17 +1571,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1595,7 +1595,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1613,7 +1613,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1623,12 +1623,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1650,7 +1650,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1670,14 +1670,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1690,8 +1690,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1702,37 +1702,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1740,16 +1740,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1757,21 +1757,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1786,12 +1786,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1799,49 +1799,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1850,91 +1850,91 @@ i32.const 18 call $~lib/builtins/abort unreachable - end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + end + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 - ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + local.get $head + ) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1943,22 +1943,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1967,27 +1967,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -2002,69 +2002,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2079,29 +2079,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2114,13 +2114,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2131,25 +2131,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2164,10 +2164,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2185,72 +2185,72 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u ) - (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__concat (param $left i32) (param $right i32) (result i32) + local.get $left + local.get $right call $~lib/string/String#concat ) - (func $bindings/esm/stringFunction (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $bindings/esm/stringFunction (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b call $~lib/string/String.__concat ) - (func $bindings/esm/stringFunctionOptional (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $bindings/esm/stringFunctionOptional (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b call $~lib/string/String.__concat ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32) + (local $child i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $childPtr i32.eqz if return end i32.const 1 drop - local.get $0 + local.get $parentPtr i32.eqz if i32.const 0 @@ -2260,37 +2260,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $childPtr i32.const 20 i32.sub - local.set $3 - local.get $3 + local.set $child + local.get $child call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $0 + local.get $parentPtr i32.const 20 i32.sub - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 call $~lib/rt/itcms/Object#get:color - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $2 + local.get $expectMultiple if - local.get $4 + local.get $var$4 call $~lib/rt/itcms/Object#makeGray else - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end else - local.get $5 + local.get $var$5 i32.const 3 i32.eq if (result i32) @@ -2301,7 +2301,7 @@ i32.const 0 end if - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end end @@ -2326,21 +2326,21 @@ local.get $1 i32.store offset=8 ) - (func $~lib/typedarray/Int16Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Int16Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=8 i32.const 1 i32.shr_u ) - (func $~lib/typedarray/Float32Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Float32Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=8 i32.const 2 i32.shr_u ) - (func $~lib/typedarray/Int16Array#__get (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 + (func $~lib/typedarray/Int16Array#__get (param $this i32) (param $index i32) (result i32) + local.get $index + local.get $this i32.load offset=8 i32.const 1 i32.shr_u @@ -2353,17 +2353,17 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 1 i32.shl i32.add i32.load16_s ) - (func $~lib/typedarray/Uint64Array#__set (param $0 i32) (param $1 i32) (param $2 i64) - local.get $1 - local.get $0 + (func $~lib/typedarray/Uint64Array#__set (param $this i32) (param $index i32) (param $value i64) + local.get $index + local.get $this i32.load offset=8 i32.const 3 i32.shr_u @@ -2376,18 +2376,18 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add - local.get $2 + local.get $value i64.store ) - (func $~lib/typedarray/Float32Array#__get (param $0 i32) (param $1 i32) (result f32) - local.get $1 - local.get $0 + (func $~lib/typedarray/Float32Array#__get (param $this i32) (param $index i32) (result f32) + local.get $index + local.get $this i32.load offset=8 i32.const 2 i32.shr_u @@ -2400,26 +2400,26 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add f32.load ) - (func $~lib/staticarray/StaticArray#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/staticarray/StaticArray#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 2 i32.shr_u ) - (func $~lib/staticarray/StaticArray#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 + (func $~lib/staticarray/StaticArray#__get (param $this i32) (param $index i32) (result i32) + (local $value i32) + local.get $index + local.get $this call $~lib/staticarray/StaticArray#get:length i32.ge_u if @@ -2430,31 +2430,31 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $this + local.get $index i32.const 2 i32.shl i32.add i32.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) - (func $~lib/staticarray/StaticArray#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 + (func $~lib/staticarray/StaticArray#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store i32.const 0 drop ) - (func $~lib/staticarray/StaticArray#__set (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - local.get $0 + (func $~lib/staticarray/StaticArray#__set (param $this i32) (param $index i32) (param $value i32) + local.get $index + local.get $this call $~lib/staticarray/StaticArray#get:length i32.ge_u if @@ -2465,16 +2465,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 - local.get $2 + local.get $this + local.get $index + local.get $value call $~lib/staticarray/StaticArray#__uset ) - (func $bindings/esm/staticarrayU16 (param $0 i32) (result i32) - local.get $0 + (func $bindings/esm/staticarrayU16 (param $a i32) (result i32) + local.get $a ) - (func $bindings/esm/staticarrayI64 (param $0 i32) (result i32) - local.get $0 + (func $bindings/esm/staticarrayI64 (param $a i32) (result i32) + local.get $a ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) local.get $0 @@ -2500,14 +2500,14 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i32) + (local $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -2518,29 +2518,29 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add i32.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 - ) - (func $~lib/rt/itcms/__renew (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + local.get $value + ) + (func $~lib/rt/itcms/__renew (param $oldPtr i32) (param $size i32) (result i32) + (local $oldObj i32) + (local $newPtr i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $oldPtr i32.const 20 i32.sub - local.set $2 - local.get $1 - local.get $2 + local.set $oldObj + local.get $size + local.get $oldObj i32.load i32.const 3 i32.const -1 @@ -2550,49 +2550,49 @@ i32.sub i32.le_u if - local.get $2 - local.get $1 + local.get $oldObj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $0 + local.get $oldPtr return end - local.get $1 - local.get $2 + local.get $size + local.get $oldObj i32.load offset=12 call $~lib/rt/itcms/__new - local.set $3 - local.get $3 - local.get $0 - local.get $1 - local.tee $4 - local.get $2 + local.set $newPtr + local.get $newPtr + local.get $oldPtr + local.get $size + local.tee $var$4 + local.get $oldObj i32.load offset=16 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.lt_u select memory.copy - local.get $3 - ) - (func $~lib/array/ensureCapacity (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $0 + local.get $newPtr + ) + (func $~lib/array/ensureCapacity (param $array i32) (param $newSize i32) (param $alignLog2 i32) (param $canGrow i32) + (local $oldCapacity i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $array i32.load offset=8 - local.set $4 - local.get $1 - local.get $4 - local.get $2 + local.set $oldCapacity + local.get $newSize + local.get $oldCapacity + local.get $alignLog2 i32.shr_u i32.gt_u if - local.get $1 + local.get $newSize i32.const 1073741820 - local.get $2 + local.get $alignLog2 i32.shr_u i32.gt_u if @@ -2603,88 +2603,88 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.load - local.set $5 - local.get $1 - local.tee $6 + local.set $var$5 + local.get $newSize + local.tee $var$6 i32.const 8 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.gt_u select - local.get $2 + local.get $alignLog2 i32.shl - local.set $6 - local.get $3 + local.set $var$6 + local.get $canGrow if - local.get $4 + local.get $oldCapacity i32.const 1 i32.shl - local.tee $7 + local.tee $var$7 i32.const 1073741820 - local.tee $8 - local.get $7 - local.get $8 + local.tee $var$8 + local.get $var$7 + local.get $var$8 i32.lt_u select - local.tee $8 - local.get $6 - local.tee $7 - local.get $8 - local.get $7 + local.tee $var$8 + local.get $var$6 + local.tee $var$7 + local.get $var$8 + local.get $var$7 i32.gt_u select - local.set $6 + local.set $var$6 end - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 call $~lib/rt/itcms/__renew - local.set $8 + local.set $var$8 i32.const 2 global.get $~lib/shared/runtime/Runtime.Incremental i32.ne drop - local.get $8 - local.get $5 + local.get $var$8 + local.get $var$5 i32.ne if - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.store - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.store offset=4 - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.const 0 call $~lib/rt/itcms/__link end - local.get $0 - local.get $6 + local.get $array + local.get $var$6 i32.store offset=8 end ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store i32.const 0 drop ) - (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__set (param $this i32) (param $index i32) (param $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if - local.get $1 + local.get $index i32.const 0 i32.lt_s if @@ -2695,22 +2695,22 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $this + local.get $index i32.const 1 i32.add i32.const 2 i32.const 1 call $~lib/array/ensureCapacity - local.get $0 - local.get $1 + local.get $this + local.get $index i32.const 1 i32.add call $~lib/array/Array#set:length_ end - local.get $0 - local.get $1 - local.get $2 + local.get $this + local.get $index + local.get $value call $~lib/array/Array#__uset ) (func $bindings/esm/PlainObject#set:a (param $0 i32) (param $1 i32) @@ -2809,21 +2809,21 @@ i32.const 0 call $bindings/esm/NonPlainObject#constructor ) - (func $bindings/esm/internrefFunction (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $bindings/esm/internrefFunction (param $a i32) (param $b i32) (result i32) + local.get $a ) - (func $bindings/esm/functionFunction (param $0 i32) (result i32) - local.get $0 + (func $bindings/esm/functionFunction (param $fn i32) (result i32) + local.get $fn ) - (func $~lib/rt/itcms/__pin (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/__pin (param $ptr i32) (result i32) + (local $var$1 i32) + local.get $ptr if - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -2835,27 +2835,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 call $~lib/rt/itcms/Object#unlink - local.get $1 + local.get $var$1 global.get $~lib/rt/itcms/pinSpace i32.const 3 call $~lib/rt/itcms/Object#linkTo end - local.get $0 + local.get $ptr ) - (func $~lib/rt/itcms/__unpin (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/__unpin (param $ptr i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $1 - local.get $1 + local.set $obj + local.get $obj call $~lib/rt/itcms/Object#get:color i32.const 3 i32.ne @@ -2871,19 +2871,19 @@ i32.const 1 i32.eq if - local.get $1 + local.get $obj call $~lib/rt/itcms/Object#makeGray else - local.get $1 + local.get $obj call $~lib/rt/itcms/Object#unlink - local.get $1 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo end ) (func $~lib/rt/itcms/__collect - (local $0 i32) + (local $var$0 i32) i32.const 0 drop global.get $~lib/rt/itcms/state @@ -2894,8 +2894,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -2909,8 +2909,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -2976,10 +2976,10 @@ call $~lib/rt/itcms/__visit end ) - (func $~lib/function/Function<%28%29=>void>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28%29=>void>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28%29=>void>~visit (param $0 i32) (param $1 i32) @@ -3002,12 +3002,12 @@ local.get $1 call $~lib/arraybuffer/ArrayBufferView~visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -3047,49 +3047,49 @@ local.get $1 call $~lib/arraybuffer/ArrayBufferView~visit ) - (func $~lib/array/Array<~lib/string/String>#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array<~lib/string/String>#__visit (param $this i32) (param $cookie i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $val i32) i32.const 1 drop - local.get $0 + local.get $this i32.load offset=4 - local.set $2 - local.get $2 - local.get $0 + local.set $var$2 + local.get $var$2 + local.get $this i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $var$2 i32.load - local.set $5 - local.get $5 + local.set $val + local.get $val if - local.get $5 - local.get $1 + local.get $val + local.get $cookie call $~lib/rt/itcms/__visit end - local.get $2 + local.get $var$2 i32.const 4 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array<~lib/string/String>~visit (param $0 i32) (param $1 i32) diff --git a/tests/compiler/bindings/noExportRuntime.debug.wat b/tests/compiler/bindings/noExportRuntime.debug.wat index c29c4de1ea..65c394f58d 100644 --- a/tests/compiler/bindings/noExportRuntime.debug.wat +++ b/tests/compiler/bindings/noExportRuntime.debug.wat @@ -80,50 +80,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -136,58 +136,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -204,12 +204,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -219,19 +219,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -242,27 +242,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -270,35 +270,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -308,15 +308,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -326,25 +326,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -352,33 +352,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -406,23 +406,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -434,15 +434,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -454,33 +454,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -488,21 +488,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -517,36 +517,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -554,67 +554,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -624,22 +624,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -649,12 +649,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -666,75 +666,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -746,38 +746,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -791,12 +791,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -807,38 +807,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -846,21 +846,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -875,101 +875,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -980,7 +980,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -991,26 +991,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1023,27 +1023,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1057,11 +1057,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1072,66 +1072,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1141,10 +1141,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1155,13 +1155,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1172,109 +1172,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1282,7 +1282,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1299,23 +1299,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1327,54 +1327,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1395,30 +1395,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1428,9 +1428,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1440,8 +1440,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1449,43 +1449,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1497,17 +1497,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1521,7 +1521,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1539,7 +1539,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1549,12 +1549,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1576,7 +1576,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1596,14 +1596,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1616,8 +1616,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1628,37 +1628,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1666,16 +1666,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1683,21 +1683,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1712,12 +1712,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1725,49 +1725,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1777,90 +1777,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1869,22 +1869,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1893,27 +1893,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1928,69 +1928,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2005,29 +2005,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2040,13 +2040,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2057,25 +2057,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2090,10 +2090,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2111,49 +2111,49 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32) + (local $child i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $childPtr i32.eqz if return end i32.const 1 drop - local.get $0 + local.get $parentPtr i32.eqz if i32.const 0 @@ -2163,37 +2163,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $childPtr i32.const 20 i32.sub - local.set $3 - local.get $3 + local.set $child + local.get $child call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $0 + local.get $parentPtr i32.const 20 i32.sub - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 call $~lib/rt/itcms/Object#get:color - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $2 + local.get $expectMultiple if - local.get $4 + local.get $var$4 call $~lib/rt/itcms/Object#makeGray else - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end else - local.get $5 + local.get $var$5 i32.const 3 i32.eq if (result i32) @@ -2204,7 +2204,7 @@ i32.const 0 end if - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end end @@ -2230,8 +2230,8 @@ i32.store offset=8 ) (func $start:bindings/noExportRuntime - (local $0 i32) - (local $1 i32) + (local $var$0 i32) + (local $var$1 i32) memory.size i32.const 16 i32.shl @@ -2258,7 +2258,7 @@ call $~lib/typedarray/Int32Array#constructor global.set $bindings/noExportRuntime/isTypedArray ) - (func $bindings/noExportRuntime/takesReturnsBasic (param $0 i32) (result i32) + (func $bindings/noExportRuntime/takesReturnsBasic (param $a i32) (result i32) global.get $bindings/noExportRuntime/isBasic ) (func $bindings/noExportRuntime/returnsString (result i32) @@ -2276,10 +2276,10 @@ (func $bindings/noExportRuntime/returnsArrayOfArray (result i32) global.get $bindings/noExportRuntime/isArrayOfArray ) - (func $bindings/noExportRuntime/takesNonPlainObject (param $0 i32) + (func $bindings/noExportRuntime/takesNonPlainObject (param $obj i32) nop ) - (func $bindings/noExportRuntime/takesFunction (param $0 i32) + (func $bindings/noExportRuntime/takesFunction (param $fn i32) nop ) (func $~lib/rt/__visit_globals (param $0 i32) @@ -2345,12 +2345,12 @@ local.get $1 call $~lib/arraybuffer/ArrayBufferView~visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -2358,49 +2358,49 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array<~lib/array/Array>#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array<~lib/array/Array>#__visit (param $this i32) (param $cookie i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $val i32) i32.const 1 drop - local.get $0 + local.get $this i32.load offset=4 - local.set $2 - local.get $2 - local.get $0 + local.set $var$2 + local.get $var$2 + local.get $this i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $var$2 i32.load - local.set $5 - local.get $5 + local.set $val + local.get $val if - local.get $5 - local.get $1 + local.get $val + local.get $cookie call $~lib/rt/itcms/__visit end - local.get $2 + local.get $var$2 i32.const 4 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array<~lib/array/Array>~visit (param $0 i32) (param $1 i32) diff --git a/tests/compiler/bindings/raw.debug.wat b/tests/compiler/bindings/raw.debug.wat index e06762f954..8942759e2f 100644 --- a/tests/compiler/bindings/raw.debug.wat +++ b/tests/compiler/bindings/raw.debug.wat @@ -125,14 +125,14 @@ (func $start:bindings/raw call $start:bindings/esm ) - (func $bindings/esm/plainFunction (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $bindings/esm/plainFunction (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.add ) - (func $bindings/esm/plainFunction64 (param $0 i64) (param $1 i64) (result i64) - local.get $0 - local.get $1 + (func $bindings/esm/plainFunction64 (param $a i64) (param $b i64) (result i64) + local.get $a + local.get $b i64.add ) (func $bindings/esm/getMaxUnsigned32 (result i32) @@ -141,8 +141,8 @@ (func $bindings/esm/getMaxUnsigned64 (result i64) global.get $~lib/builtins/u64.MAX_VALUE ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (param $0 i32) (result i32) - local.get $0 + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 @@ -157,50 +157,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -213,58 +213,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -281,12 +281,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -296,19 +296,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -319,27 +319,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -347,35 +347,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -385,15 +385,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -403,25 +403,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -429,33 +429,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -483,23 +483,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -511,15 +511,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -531,33 +531,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -565,21 +565,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -594,36 +594,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -631,67 +631,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -701,22 +701,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -726,12 +726,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -743,75 +743,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -823,38 +823,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -868,12 +868,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -884,38 +884,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -923,21 +923,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -952,101 +952,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -1057,7 +1057,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1068,26 +1068,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1100,27 +1100,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1134,11 +1134,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1149,66 +1149,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1218,10 +1218,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1232,13 +1232,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1249,109 +1249,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1359,7 +1359,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1376,23 +1376,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1404,54 +1404,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1472,30 +1472,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1505,9 +1505,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1517,8 +1517,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1526,43 +1526,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1574,17 +1574,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1598,7 +1598,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1616,7 +1616,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1626,12 +1626,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1653,7 +1653,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1673,14 +1673,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1693,8 +1693,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1705,37 +1705,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1743,16 +1743,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1760,21 +1760,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1789,12 +1789,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1802,49 +1802,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1853,91 +1853,91 @@ i32.const 18 call $~lib/builtins/abort unreachable - end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + end + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 - ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + local.get $head + ) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1946,22 +1946,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1970,27 +1970,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -2005,69 +2005,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2082,29 +2082,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2117,13 +2117,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2134,25 +2134,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2167,10 +2167,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2188,72 +2188,72 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u ) - (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__concat (param $left i32) (param $right i32) (result i32) + local.get $left + local.get $right call $~lib/string/String#concat ) - (func $bindings/esm/stringFunction (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $bindings/esm/stringFunction (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b call $~lib/string/String.__concat ) - (func $bindings/esm/stringFunctionOptional (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $bindings/esm/stringFunctionOptional (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b call $~lib/string/String.__concat ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32) + (local $child i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $childPtr i32.eqz if return end i32.const 1 drop - local.get $0 + local.get $parentPtr i32.eqz if i32.const 0 @@ -2263,37 +2263,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $childPtr i32.const 20 i32.sub - local.set $3 - local.get $3 + local.set $child + local.get $child call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $0 + local.get $parentPtr i32.const 20 i32.sub - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 call $~lib/rt/itcms/Object#get:color - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $2 + local.get $expectMultiple if - local.get $4 + local.get $var$4 call $~lib/rt/itcms/Object#makeGray else - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end else - local.get $5 + local.get $var$5 i32.const 3 i32.eq if (result i32) @@ -2304,7 +2304,7 @@ i32.const 0 end if - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end end @@ -2329,21 +2329,21 @@ local.get $1 i32.store offset=8 ) - (func $~lib/typedarray/Int16Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Int16Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=8 i32.const 1 i32.shr_u ) - (func $~lib/typedarray/Float32Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Float32Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=8 i32.const 2 i32.shr_u ) - (func $~lib/typedarray/Int16Array#__get (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 + (func $~lib/typedarray/Int16Array#__get (param $this i32) (param $index i32) (result i32) + local.get $index + local.get $this i32.load offset=8 i32.const 1 i32.shr_u @@ -2356,17 +2356,17 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 1 i32.shl i32.add i32.load16_s ) - (func $~lib/typedarray/Uint64Array#__set (param $0 i32) (param $1 i32) (param $2 i64) - local.get $1 - local.get $0 + (func $~lib/typedarray/Uint64Array#__set (param $this i32) (param $index i32) (param $value i64) + local.get $index + local.get $this i32.load offset=8 i32.const 3 i32.shr_u @@ -2379,18 +2379,18 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add - local.get $2 + local.get $value i64.store ) - (func $~lib/typedarray/Float32Array#__get (param $0 i32) (param $1 i32) (result f32) - local.get $1 - local.get $0 + (func $~lib/typedarray/Float32Array#__get (param $this i32) (param $index i32) (result f32) + local.get $index + local.get $this i32.load offset=8 i32.const 2 i32.shr_u @@ -2403,26 +2403,26 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add f32.load ) - (func $~lib/staticarray/StaticArray#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/staticarray/StaticArray#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 2 i32.shr_u ) - (func $~lib/staticarray/StaticArray#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 + (func $~lib/staticarray/StaticArray#__get (param $this i32) (param $index i32) (result i32) + (local $value i32) + local.get $index + local.get $this call $~lib/staticarray/StaticArray#get:length i32.ge_u if @@ -2433,31 +2433,31 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $this + local.get $index i32.const 2 i32.shl i32.add i32.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) - (func $~lib/staticarray/StaticArray#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 + (func $~lib/staticarray/StaticArray#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store i32.const 0 drop ) - (func $~lib/staticarray/StaticArray#__set (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - local.get $0 + (func $~lib/staticarray/StaticArray#__set (param $this i32) (param $index i32) (param $value i32) + local.get $index + local.get $this call $~lib/staticarray/StaticArray#get:length i32.ge_u if @@ -2468,16 +2468,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 - local.get $2 + local.get $this + local.get $index + local.get $value call $~lib/staticarray/StaticArray#__uset ) - (func $bindings/esm/staticarrayU16 (param $0 i32) (result i32) - local.get $0 + (func $bindings/esm/staticarrayU16 (param $a i32) (result i32) + local.get $a ) - (func $bindings/esm/staticarrayI64 (param $0 i32) (result i32) - local.get $0 + (func $bindings/esm/staticarrayI64 (param $a i32) (result i32) + local.get $a ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) local.get $0 @@ -2503,14 +2503,14 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i32) + (local $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -2521,29 +2521,29 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add i32.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 - ) - (func $~lib/rt/itcms/__renew (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + local.get $value + ) + (func $~lib/rt/itcms/__renew (param $oldPtr i32) (param $size i32) (result i32) + (local $oldObj i32) + (local $newPtr i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $oldPtr i32.const 20 i32.sub - local.set $2 - local.get $1 - local.get $2 + local.set $oldObj + local.get $size + local.get $oldObj i32.load i32.const 3 i32.const -1 @@ -2553,49 +2553,49 @@ i32.sub i32.le_u if - local.get $2 - local.get $1 + local.get $oldObj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $0 + local.get $oldPtr return end - local.get $1 - local.get $2 + local.get $size + local.get $oldObj i32.load offset=12 call $~lib/rt/itcms/__new - local.set $3 - local.get $3 - local.get $0 - local.get $1 - local.tee $4 - local.get $2 + local.set $newPtr + local.get $newPtr + local.get $oldPtr + local.get $size + local.tee $var$4 + local.get $oldObj i32.load offset=16 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.lt_u select memory.copy - local.get $3 - ) - (func $~lib/array/ensureCapacity (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $0 + local.get $newPtr + ) + (func $~lib/array/ensureCapacity (param $array i32) (param $newSize i32) (param $alignLog2 i32) (param $canGrow i32) + (local $oldCapacity i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $array i32.load offset=8 - local.set $4 - local.get $1 - local.get $4 - local.get $2 + local.set $oldCapacity + local.get $newSize + local.get $oldCapacity + local.get $alignLog2 i32.shr_u i32.gt_u if - local.get $1 + local.get $newSize i32.const 1073741820 - local.get $2 + local.get $alignLog2 i32.shr_u i32.gt_u if @@ -2606,88 +2606,88 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.load - local.set $5 - local.get $1 - local.tee $6 + local.set $var$5 + local.get $newSize + local.tee $var$6 i32.const 8 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.gt_u select - local.get $2 + local.get $alignLog2 i32.shl - local.set $6 - local.get $3 + local.set $var$6 + local.get $canGrow if - local.get $4 + local.get $oldCapacity i32.const 1 i32.shl - local.tee $7 + local.tee $var$7 i32.const 1073741820 - local.tee $8 - local.get $7 - local.get $8 + local.tee $var$8 + local.get $var$7 + local.get $var$8 i32.lt_u select - local.tee $8 - local.get $6 - local.tee $7 - local.get $8 - local.get $7 + local.tee $var$8 + local.get $var$6 + local.tee $var$7 + local.get $var$8 + local.get $var$7 i32.gt_u select - local.set $6 + local.set $var$6 end - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 call $~lib/rt/itcms/__renew - local.set $8 + local.set $var$8 i32.const 2 global.get $~lib/shared/runtime/Runtime.Incremental i32.ne drop - local.get $8 - local.get $5 + local.get $var$8 + local.get $var$5 i32.ne if - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.store - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.store offset=4 - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.const 0 call $~lib/rt/itcms/__link end - local.get $0 - local.get $6 + local.get $array + local.get $var$6 i32.store offset=8 end ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store i32.const 0 drop ) - (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__set (param $this i32) (param $index i32) (param $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if - local.get $1 + local.get $index i32.const 0 i32.lt_s if @@ -2698,22 +2698,22 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $this + local.get $index i32.const 1 i32.add i32.const 2 i32.const 1 call $~lib/array/ensureCapacity - local.get $0 - local.get $1 + local.get $this + local.get $index i32.const 1 i32.add call $~lib/array/Array#set:length_ end - local.get $0 - local.get $1 - local.get $2 + local.get $this + local.get $index + local.get $value call $~lib/array/Array#__uset ) (func $bindings/esm/PlainObject#set:a (param $0 i32) (param $1 i32) @@ -2812,21 +2812,21 @@ i32.const 0 call $bindings/esm/NonPlainObject#constructor ) - (func $bindings/esm/internrefFunction (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $bindings/esm/internrefFunction (param $a i32) (param $b i32) (result i32) + local.get $a ) - (func $bindings/esm/functionFunction (param $0 i32) (result i32) - local.get $0 + (func $bindings/esm/functionFunction (param $fn i32) (result i32) + local.get $fn ) - (func $~lib/rt/itcms/__pin (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/__pin (param $ptr i32) (result i32) + (local $var$1 i32) + local.get $ptr if - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -2838,27 +2838,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 call $~lib/rt/itcms/Object#unlink - local.get $1 + local.get $var$1 global.get $~lib/rt/itcms/pinSpace i32.const 3 call $~lib/rt/itcms/Object#linkTo end - local.get $0 + local.get $ptr ) - (func $~lib/rt/itcms/__unpin (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/__unpin (param $ptr i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $1 - local.get $1 + local.set $obj + local.get $obj call $~lib/rt/itcms/Object#get:color i32.const 3 i32.ne @@ -2874,19 +2874,19 @@ i32.const 1 i32.eq if - local.get $1 + local.get $obj call $~lib/rt/itcms/Object#makeGray else - local.get $1 + local.get $obj call $~lib/rt/itcms/Object#unlink - local.get $1 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo end ) (func $~lib/rt/itcms/__collect - (local $0 i32) + (local $var$0 i32) i32.const 0 drop global.get $~lib/rt/itcms/state @@ -2897,8 +2897,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -2912,8 +2912,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -2979,10 +2979,10 @@ call $~lib/rt/itcms/__visit end ) - (func $~lib/function/Function<%28%29=>void>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28%29=>void>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28%29=>void>~visit (param $0 i32) (param $1 i32) @@ -3005,12 +3005,12 @@ local.get $1 call $~lib/arraybuffer/ArrayBufferView~visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -3050,49 +3050,49 @@ local.get $1 call $~lib/arraybuffer/ArrayBufferView~visit ) - (func $~lib/array/Array<~lib/string/String>#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array<~lib/string/String>#__visit (param $this i32) (param $cookie i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $val i32) i32.const 1 drop - local.get $0 + local.get $this i32.load offset=4 - local.set $2 - local.get $2 - local.get $0 + local.set $var$2 + local.get $var$2 + local.get $this i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $var$2 i32.load - local.set $5 - local.get $5 + local.set $val + local.get $val if - local.get $5 - local.get $1 + local.get $val + local.get $cookie call $~lib/rt/itcms/__visit end - local.get $2 + local.get $var$2 i32.const 4 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array<~lib/string/String>~visit (param $0 i32) (param $1 i32) diff --git a/tests/compiler/builtins.debug.wat b/tests/compiler/builtins.debug.wat index 5db3749938..ebf13c189e 100644 --- a/tests/compiler/builtins.debug.wat +++ b/tests/compiler/builtins.debug.wat @@ -93,56 +93,56 @@ (export "test" (func $builtins/test)) (export "memory" (memory $0)) (start $~start) - (func $start:builtins~anonymous|0 (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $start:builtins~anonymous|0 (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.add ) - (func $~lib/function/Function<%28i32%2Ci32%29=>i32>#get:index (param $0 i32) (result i32) - local.get $0 + (func $~lib/function/Function<%28i32%2Ci32%29=>i32>#get:index (param $this i32) (result i32) + local.get $this i32.load ) - (func $~lib/function/Function<%28i32%2Ci32%29=>i32>#get:name (param $0 i32) (result i32) + (func $~lib/function/Function<%28i32%2Ci32%29=>i32>#get:name (param $this i32) (result i32) i32.const 32 ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.get $1 + (func $~lib/util/string/compareImpl (param $str1 i32) (param $index1 i32) (param $str2 i32) (param $index2 i32) (param $len i32) (result i32) + (local $ptr1 i32) + (local $ptr2 i32) + (local $var$7 i32) + (local $a i32) + (local $b i32) + local.get $str1 + local.get $index1 i32.const 1 i32.shl i32.add - local.set $5 - local.get $2 - local.get $3 + local.set $ptr1 + local.get $str2 + local.get $index2 i32.const 1 i32.shl i32.add - local.set $6 + local.set $ptr2 i32.const 0 i32.const 2 i32.lt_s drop - local.get $4 + local.get $len i32.const 4 i32.ge_u if (result i32) - local.get $5 + local.get $ptr1 i32.const 7 i32.and - local.get $6 + local.get $ptr2 i32.const 7 i32.and i32.or @@ -153,27 +153,27 @@ if block $do-break|0 loop $do-loop|0 - local.get $5 + local.get $ptr1 i64.load - local.get $6 + local.get $ptr2 i64.load i64.ne if br $do-break|0 end - local.get $5 + local.get $ptr1 i32.const 8 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 8 i32.add - local.set $6 - local.get $4 + local.set $ptr2 + local.get $len i32.const 4 i32.sub - local.set $4 - local.get $4 + local.set $len + local.get $len i32.const 4 i32.ge_u br_if $do-loop|0 @@ -181,59 +181,59 @@ end end loop $while-continue|1 - local.get $4 - local.tee $7 + local.get $len + local.tee $var$7 i32.const 1 i32.sub - local.set $4 - local.get $7 - local.set $7 - local.get $7 + local.set $len + local.get $var$7 + local.set $var$7 + local.get $var$7 if - local.get $5 + local.get $ptr1 i32.load16_u - local.set $8 - local.get $6 + local.set $a + local.get $ptr2 i32.load16_u - local.set $9 - local.get $8 - local.get $9 + local.set $b + local.get $a + local.get $b i32.ne if - local.get $8 - local.get $9 + local.get $a + local.get $b i32.sub return end - local.get $5 + local.get $ptr1 i32.const 2 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 2 i32.add - local.set $6 + local.set $ptr2 br $while-continue|1 end end i32.const 0 ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__eq (param $left i32) (param $right i32) (result i32) + (local $leftLength i32) + local.get $left + local.get $right i32.eq if i32.const 1 return end - local.get $0 + local.get $left i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $1 + local.get $right i32.const 0 i32.eq end @@ -241,46 +241,46 @@ i32.const 0 return end - local.get $0 + local.get $left call $~lib/string/String#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $leftLength + local.get $leftLength + local.get $right call $~lib/string/String#get:length i32.ne if i32.const 0 return end - local.get $0 + local.get $left i32.const 0 - local.get $1 + local.get $right i32.const 0 - local.get $2 + local.get $leftLength call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/function/Function<%28i32%2Ci32%29=>i32>#get:length (param $0 i32) (result i32) + (func $~lib/function/Function<%28i32%2Ci32%29=>i32>#get:length (param $this i32) (result i32) i32.const 2 ) - (func $~lib/function/Function<%28i32%2Ci32%29=>i32>#toString (param $0 i32) (result i32) + (func $~lib/function/Function<%28i32%2Ci32%29=>i32>#toString (param $this i32) (result i32) i32.const 176 ) - (func $~lib/atomics/Atomics.isLockFree (param $0 i32) (result i32) - local.get $0 + (func $~lib/atomics/Atomics.isLockFree (param $size i32) (result i32) + local.get $size i32.const 1 i32.eq if (result i32) i32.const 1 else - local.get $0 + local.get $size i32.const 2 i32.eq end if (result i32) i32.const 1 else - local.get $0 + local.get $size i32.const 4 i32.eq end @@ -288,79 +288,79 @@ (func $start:builtins~anonymous|1 nop ) - (func $start:builtins~anonymous|2 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $start:builtins~anonymous|2 (param $a i32) (param $b i32) (param $c i32) (param $d i32) nop ) - (func $builtins/max3 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - local.tee $5 - local.get $1 - local.tee $3 - local.get $2 - local.tee $4 - local.get $3 - local.get $4 + (func $builtins/max3 (param $a i32) (param $b i32) (param $c i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $a + local.tee $var$5 + local.get $b + local.tee $var$3 + local.get $c + local.tee $var$4 + local.get $var$3 + local.get $var$4 i32.gt_s select - local.tee $3 - local.get $5 - local.get $3 + local.tee $var$3 + local.get $var$5 + local.get $var$3 i32.gt_s select ) - (func $builtins/min3 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - local.tee $5 - local.get $1 - local.tee $3 - local.get $2 - local.tee $4 - local.get $3 - local.get $4 + (func $builtins/min3 (param $a i32) (param $b i32) (param $c i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $a + local.tee $var$5 + local.get $b + local.tee $var$3 + local.get $c + local.tee $var$4 + local.get $var$3 + local.get $var$4 i32.lt_s select - local.tee $3 - local.get $5 - local.get $3 + local.tee $var$3 + local.get $var$5 + local.get $var$3 i32.lt_s select ) - (func $builtins/rotl3 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $builtins/rotl3 (param $a i32) (param $b i32) (param $c i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $a i32.extend8_s - local.tee $5 - local.get $1 + local.tee $var$5 + local.get $b i32.extend8_s - local.tee $3 - local.get $2 - local.tee $4 + local.tee $var$3 + local.get $c + local.tee $var$4 i32.const 7 i32.and i32.shl - local.get $3 + local.get $var$3 i32.const 0 - local.get $4 + local.get $var$4 i32.sub i32.const 7 i32.and i32.shr_u i32.or - local.tee $3 + local.tee $var$3 i32.const 7 i32.and i32.shl - local.get $5 + local.get $var$5 i32.const 0 - local.get $3 + local.get $var$3 i32.sub i32.const 7 i32.and @@ -368,36 +368,36 @@ i32.or i32.extend8_s ) - (func $builtins/rotr3 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $builtins/rotr3 (param $a i32) (param $b i32) (param $c i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $a i32.extend8_s - local.tee $5 - local.get $1 + local.tee $var$5 + local.get $b i32.extend8_s - local.tee $3 - local.get $2 - local.tee $4 + local.tee $var$3 + local.get $c + local.tee $var$4 i32.const 7 i32.and i32.shr_u - local.get $3 + local.get $var$3 i32.const 0 - local.get $4 + local.get $var$4 i32.sub i32.const 7 i32.and i32.shl i32.or - local.tee $3 + local.tee $var$3 i32.const 7 i32.and i32.shr_u - local.get $5 + local.get $var$5 i32.const 0 - local.get $3 + local.get $var$3 i32.sub i32.const 7 i32.and diff --git a/tests/compiler/call-inferred.debug.wat b/tests/compiler/call-inferred.debug.wat index 378caab1b2..3e2dbfb66e 100644 --- a/tests/compiler/call-inferred.debug.wat +++ b/tests/compiler/call-inferred.debug.wat @@ -15,19 +15,19 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (start $~start) - (func $call-inferred/foo (param $0 i32) (result i32) - local.get $0 + (func $call-inferred/foo (param $a i32) (result i32) + local.get $a ) - (func $call-inferred/foo (param $0 f64) (result f64) - local.get $0 + (func $call-inferred/foo (param $a f64) (result f64) + local.get $a ) - (func $call-inferred/foo (param $0 f32) (result f32) - local.get $0 + (func $call-inferred/foo (param $a f32) (result f32) + local.get $a ) - (func $call-inferred/bar (param $0 f32) (result f32) - local.get $0 + (func $call-inferred/bar (param $a f32) (result f32) + local.get $a ) - (func $call-inferred/bar@varargs (param $0 f32) (result f32) + (func $call-inferred/bar@varargs (param $a f32) (result f32) block $1of1 block $0of1 block $outOfRange @@ -37,9 +37,9 @@ unreachable end f32.const 42 - local.set $0 + local.set $a end - local.get $0 + local.get $a call $call-inferred/bar ) (func $start:call-inferred diff --git a/tests/compiler/call-optional.debug.wat b/tests/compiler/call-optional.debug.wat index d6bc4a8a10..b5dafd9078 100644 --- a/tests/compiler/call-optional.debug.wat +++ b/tests/compiler/call-optional.debug.wat @@ -15,14 +15,14 @@ (elem $0 (i32.const 1) $call-optional/opt@varargs) (export "memory" (memory $0)) (start $~start) - (func $call-optional/opt (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $1 + (func $call-optional/opt (param $a i32) (param $b i32) (param $c i32) (result i32) + local.get $a + local.get $b i32.add - local.get $2 + local.get $c i32.add ) - (func $call-optional/opt@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $call-optional/opt@varargs (param $a i32) (param $b i32) (param $c i32) (result i32) block $2of2 block $1of2 block $0of2 @@ -35,14 +35,14 @@ unreachable end i32.const -1 - local.set $1 + local.set $b end i32.const -2 - local.set $2 + local.set $c end - local.get $0 - local.get $1 - local.get $2 + local.get $a + local.get $b + local.get $c call $call-optional/opt ) (func $start:call-optional diff --git a/tests/compiler/call-super.debug.wat b/tests/compiler/call-super.debug.wat index a848b48c78..b0f92ce8bc 100644 --- a/tests/compiler/call-super.debug.wat +++ b/tests/compiler/call-super.debug.wat @@ -52,50 +52,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -108,58 +108,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -176,12 +176,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -191,19 +191,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -214,27 +214,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -242,35 +242,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -280,15 +280,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -298,25 +298,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -324,33 +324,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -378,23 +378,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -406,15 +406,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -426,33 +426,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -460,21 +460,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -489,36 +489,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -526,67 +526,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -596,22 +596,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -621,12 +621,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -638,75 +638,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -718,38 +718,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -763,12 +763,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -779,38 +779,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -818,21 +818,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -847,101 +847,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -952,7 +952,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -963,26 +963,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -995,27 +995,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1029,11 +1029,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1044,66 +1044,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1113,10 +1113,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1127,13 +1127,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1144,109 +1144,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1254,7 +1254,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1271,23 +1271,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1299,54 +1299,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1367,30 +1367,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1400,9 +1400,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1412,8 +1412,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1421,43 +1421,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1469,17 +1469,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1493,7 +1493,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1511,7 +1511,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1521,12 +1521,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1548,7 +1548,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1568,14 +1568,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1588,8 +1588,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1600,37 +1600,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1638,16 +1638,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1655,21 +1655,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1684,12 +1684,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1697,49 +1697,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1749,90 +1749,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1841,22 +1841,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1865,27 +1865,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1900,69 +1900,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1977,29 +1977,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2012,13 +2012,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2029,25 +2029,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2062,10 +2062,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2083,36 +2083,36 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) (func $call-super/A#set:a (param $0 i32) (param $1 i32) local.get $0 @@ -2125,7 +2125,7 @@ i32.store offset=4 ) (func $call-super/test1 - (local $0 i32) + (local $b i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -2137,9 +2137,9 @@ global.get $~lib/memory/__stack_pointer i32.const 0 call $call-super/B#constructor - local.tee $0 + local.tee $b i32.store - local.get $0 + local.get $b i32.load i32.const 1 i32.eq @@ -2152,7 +2152,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $b i32.load offset=4 i32.const 2 i32.eq @@ -2181,7 +2181,7 @@ i32.store offset=4 ) (func $call-super/test2 - (local $0 i32) + (local $d i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -2193,9 +2193,9 @@ global.get $~lib/memory/__stack_pointer i32.const 0 call $call-super/D#constructor - local.tee $0 + local.tee $d i32.store - local.get $0 + local.get $d i32.load i32.const 1 i32.eq @@ -2208,7 +2208,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $d i32.load offset=4 i32.const 2 i32.eq @@ -2237,7 +2237,7 @@ i32.store offset=4 ) (func $call-super/test3 - (local $0 i32) + (local $f i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -2249,9 +2249,9 @@ global.get $~lib/memory/__stack_pointer i32.const 0 call $call-super/F#constructor - local.tee $0 + local.tee $f i32.store - local.get $0 + local.get $f i32.load i32.const 1 i32.eq @@ -2264,7 +2264,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $f i32.load offset=4 i32.const 2 i32.eq @@ -2293,7 +2293,7 @@ i32.store offset=4 ) (func $call-super/test4 - (local $0 i32) + (local $h i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -2305,9 +2305,9 @@ global.get $~lib/memory/__stack_pointer i32.const 0 call $call-super/H#constructor - local.tee $0 + local.tee $h i32.store - local.get $0 + local.get $h i32.load i32.const 1 i32.eq @@ -2320,7 +2320,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $h i32.load offset=4 i32.const 2 i32.eq @@ -2349,7 +2349,7 @@ i32.store offset=4 ) (func $call-super/test5 - (local $0 i32) + (local $h i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -2361,9 +2361,9 @@ global.get $~lib/memory/__stack_pointer i32.const 0 call $call-super/J#constructor - local.tee $0 + local.tee $h i32.store - local.get $0 + local.get $h i32.load i32.const 1 i32.eq @@ -2376,7 +2376,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $h i32.load offset=4 i32.const 2 i32.eq diff --git a/tests/compiler/cast.debug.wat b/tests/compiler/cast.debug.wat index 9af7af81f4..c4910b99a1 100644 --- a/tests/compiler/cast.debug.wat +++ b/tests/compiler/cast.debug.wat @@ -12,567 +12,567 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (start $~start) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x i32.extend8_s - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x i32.extend8_s - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x i32.extend8_s - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x i32.extend8_s - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i32) (result i64) - (local $1 i64) - local.get $0 + (func $cast/test (param $x i32) (result i64) + (local $y i64) + local.get $x i32.extend8_s i64.extend_i32_s - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i32) (result i64) - (local $1 i64) - local.get $0 + (func $cast/test (param $x i32) (result i64) + (local $y i64) + local.get $x i32.extend8_s i64.extend_i32_s - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x i32.const 255 i32.and - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x i32.const 255 i32.and - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x i32.const 255 i32.and - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x i32.const 255 i32.and - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i32) (result i64) - (local $1 i64) - local.get $0 + (func $cast/test (param $x i32) (result i64) + (local $y i64) + local.get $x i32.const 255 i32.and i64.extend_i32_u - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i32) (result i64) - (local $1 i64) - local.get $0 + (func $cast/test (param $x i32) (result i64) + (local $y i64) + local.get $x i32.const 255 i32.and i64.extend_i32_u - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x i32.extend16_s - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x i32.extend16_s - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i32) (result i64) - (local $1 i64) - local.get $0 + (func $cast/test (param $x i32) (result i64) + (local $y i64) + local.get $x i32.extend16_s i64.extend_i32_s - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i32) (result i64) - (local $1 i64) - local.get $0 + (func $cast/test (param $x i32) (result i64) + (local $y i64) + local.get $x i32.extend16_s i64.extend_i32_s - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x i32.const 65535 i32.and - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x i32.const 65535 i32.and - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i32) (result i64) - (local $1 i64) - local.get $0 + (func $cast/test (param $x i32) (result i64) + (local $y i64) + local.get $x i32.const 65535 i32.and i64.extend_i32_u - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i32) (result i64) - (local $1 i64) - local.get $0 + (func $cast/test (param $x i32) (result i64) + (local $y i64) + local.get $x i32.const 65535 i32.and i64.extend_i32_u - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i64) - (local $1 i64) - local.get $0 + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i64) + (local $y i64) + local.get $x i64.extend_i32_s - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i32) (result i64) - (local $1 i64) - local.get $0 + (func $cast/test (param $x i32) (result i64) + (local $y i64) + local.get $x i64.extend_i32_s - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i64) - (local $1 i64) - local.get $0 + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i64) + (local $y i64) + local.get $x i64.extend_i32_u - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i32) (result i64) - (local $1 i64) - local.get $0 + (func $cast/test (param $x i32) (result i64) + (local $y i64) + local.get $x i64.extend_i32_u - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i64) (result i32) - (local $1 i32) - local.get $0 + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i64) (result i32) + (local $y i32) + local.get $x i32.wrap_i64 - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i64) (result i32) - (local $1 i32) - local.get $0 + (func $cast/test (param $x i64) (result i32) + (local $y i32) + local.get $x i32.wrap_i64 - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i64) (result i32) - (local $1 i32) - local.get $0 + (func $cast/test (param $x i64) (result i32) + (local $y i32) + local.get $x i32.wrap_i64 - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i64) (result i32) - (local $1 i32) - local.get $0 + (func $cast/test (param $x i64) (result i32) + (local $y i32) + local.get $x i32.wrap_i64 - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i64) (result i32) - (local $1 i32) - local.get $0 + (func $cast/test (param $x i64) (result i32) + (local $y i32) + local.get $x i32.wrap_i64 - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i64) (result i32) - (local $1 i32) - local.get $0 + (func $cast/test (param $x i64) (result i32) + (local $y i32) + local.get $x i32.wrap_i64 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i64) (result i64) - (local $1 i64) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i64) (result i64) - (local $1 i64) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i64) (result i32) - (local $1 i32) - local.get $0 + local.set $y + local.get $y + ) + (func $cast/test (param $x i64) (result i64) + (local $y i64) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i64) (result i64) + (local $y i64) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i64) (result i32) + (local $y i32) + local.get $x i64.const 0 i64.ne - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i64) (result i32) - (local $1 i32) - local.get $0 + (func $cast/test (param $x i64) (result i32) + (local $y i32) + local.get $x i32.wrap_i64 - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i64) (result i32) - (local $1 i32) - local.get $0 + (func $cast/test (param $x i64) (result i32) + (local $y i32) + local.get $x i32.wrap_i64 - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i64) (result i32) - (local $1 i32) - local.get $0 + (func $cast/test (param $x i64) (result i32) + (local $y i32) + local.get $x i32.wrap_i64 - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i64) (result i32) - (local $1 i32) - local.get $0 + (func $cast/test (param $x i64) (result i32) + (local $y i32) + local.get $x i32.wrap_i64 - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i64) (result i32) - (local $1 i32) - local.get $0 + (func $cast/test (param $x i64) (result i32) + (local $y i32) + local.get $x i32.wrap_i64 - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i64) (result i32) - (local $1 i32) - local.get $0 + (func $cast/test (param $x i64) (result i32) + (local $y i32) + local.get $x i32.wrap_i64 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i64) (result i64) - (local $1 i64) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i64) (result i64) - (local $1 i64) - local.get $0 - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i64) (result i32) - (local $1 i32) - local.get $0 + local.set $y + local.get $y + ) + (func $cast/test (param $x i64) (result i64) + (local $y i64) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i64) (result i64) + (local $y i64) + local.get $x + local.set $y + local.get $y + ) + (func $cast/test (param $x i64) (result i32) + (local $y i32) + local.get $x i64.const 0 i64.ne - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x i32.const 0 i32.ne - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x i32.const 0 i32.ne - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x i32.const 0 i32.ne - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x i32.const 0 i32.ne - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x i32.const 0 i32.ne - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x i32.const 0 i32.ne - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i32) (result i64) - (local $1 i64) - local.get $0 + (func $cast/test (param $x i32) (result i64) + (local $y i64) + local.get $x i32.const 0 i32.ne i64.extend_i32_u - local.set $1 - local.get $1 + local.set $y + local.get $y ) - (func $cast/test (param $0 i32) (result i64) - (local $1 i64) - local.get $0 + (func $cast/test (param $x i32) (result i64) + (local $y i64) + local.get $x i32.const 0 i32.ne i64.extend_i32_u - local.set $1 - local.get $1 - ) - (func $cast/test (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 + local.set $y + local.get $y + ) + (func $cast/test (param $x i32) (result i32) + (local $y i32) + local.get $x + local.set $y + local.get $y ) (func $start:cast i32.const 0 diff --git a/tests/compiler/class-extends.debug.wat b/tests/compiler/class-extends.debug.wat index d00f3ac67a..97a3353464 100644 --- a/tests/compiler/class-extends.debug.wat +++ b/tests/compiler/class-extends.debug.wat @@ -22,17 +22,17 @@ local.get $1 i32.store16 offset=4 ) - (func $class-extends/test (param $0 i32) - local.get $0 + (func $class-extends/test (param $b i32) + local.get $b i32.load drop - local.get $0 + local.get $b i32.load16_s offset=4 drop - local.get $0 + local.get $b i32.const 2 call $class-extends/A#set:a - local.get $0 + local.get $b i32.const 3 call $class-extends/B#set:b ) diff --git a/tests/compiler/class-implements.debug.wat b/tests/compiler/class-implements.debug.wat index 79c4e3571c..7b76e5cbc6 100644 --- a/tests/compiler/class-implements.debug.wat +++ b/tests/compiler/class-implements.debug.wat @@ -54,50 +54,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -110,58 +110,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -178,12 +178,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -193,19 +193,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -216,27 +216,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -244,35 +244,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -282,15 +282,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -300,25 +300,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -326,33 +326,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -380,23 +380,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -408,15 +408,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -428,33 +428,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -462,21 +462,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -491,36 +491,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -528,67 +528,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -598,22 +598,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -623,12 +623,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -640,75 +640,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -720,38 +720,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -765,12 +765,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -781,38 +781,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -820,21 +820,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -849,101 +849,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -954,7 +954,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -965,26 +965,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -997,27 +997,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1031,11 +1031,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1046,66 +1046,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1115,10 +1115,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1129,13 +1129,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1146,109 +1146,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1256,7 +1256,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1273,23 +1273,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1301,54 +1301,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1369,30 +1369,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1402,9 +1402,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1414,8 +1414,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1423,43 +1423,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1471,17 +1471,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1495,7 +1495,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1513,7 +1513,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1523,12 +1523,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1550,7 +1550,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1570,14 +1570,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1590,8 +1590,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1602,37 +1602,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1640,16 +1640,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1657,21 +1657,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1686,12 +1686,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1699,49 +1699,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1751,90 +1751,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1843,22 +1843,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1867,27 +1867,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1902,69 +1902,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1979,29 +1979,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2014,13 +2014,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2031,25 +2031,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2064,10 +2064,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2085,41 +2085,41 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $class-implements/A#foo (param $0 i32) (result i32) + (func $class-implements/A#foo (param $this i32) (result i32) i32.const 1 ) - (func $class-implements/C#foo (param $0 i32) (result i32) + (func $class-implements/C#foo (param $this i32) (result i32) i32.const 2 ) (func $~lib/rt/__visit_globals (param $0 i32) diff --git a/tests/compiler/class-overloading-cast.debug.wat b/tests/compiler/class-overloading-cast.debug.wat index 383e81f270..aed85038f6 100644 --- a/tests/compiler/class-overloading-cast.debug.wat +++ b/tests/compiler/class-overloading-cast.debug.wat @@ -63,50 +63,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -119,58 +119,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -187,12 +187,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -202,19 +202,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -225,27 +225,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -253,35 +253,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -291,15 +291,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -309,25 +309,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -335,33 +335,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -389,23 +389,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -417,15 +417,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -437,33 +437,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -471,21 +471,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -500,36 +500,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -537,67 +537,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -607,22 +607,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -632,12 +632,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -649,75 +649,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -729,38 +729,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -774,12 +774,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -790,38 +790,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -829,21 +829,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -858,101 +858,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -963,7 +963,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -974,26 +974,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1006,27 +1006,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1040,11 +1040,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1055,66 +1055,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1124,10 +1124,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1138,13 +1138,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1155,109 +1155,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1265,7 +1265,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1282,23 +1282,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1310,54 +1310,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1378,30 +1378,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1411,9 +1411,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1423,8 +1423,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1432,43 +1432,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1480,17 +1480,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1504,7 +1504,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1522,7 +1522,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1532,12 +1532,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1559,7 +1559,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1579,14 +1579,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1599,8 +1599,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1611,37 +1611,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1649,16 +1649,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1666,21 +1666,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1695,12 +1695,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1708,49 +1708,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1760,90 +1760,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1852,22 +1852,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1876,27 +1876,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1911,69 +1911,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1988,29 +1988,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2023,13 +2023,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2040,25 +2040,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2073,10 +2073,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2094,78 +2094,78 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $class-overloading-cast/A#foo (param $0 i32) (param $1 i32) (result i32) + (func $class-overloading-cast/A#foo (param $this i32) (param $a i32) (result i32) i32.const 432 ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.get $1 + (func $~lib/util/string/compareImpl (param $str1 i32) (param $index1 i32) (param $str2 i32) (param $index2 i32) (param $len i32) (result i32) + (local $ptr1 i32) + (local $ptr2 i32) + (local $var$7 i32) + (local $a i32) + (local $b i32) + local.get $str1 + local.get $index1 i32.const 1 i32.shl i32.add - local.set $5 - local.get $2 - local.get $3 + local.set $ptr1 + local.get $str2 + local.get $index2 i32.const 1 i32.shl i32.add - local.set $6 + local.set $ptr2 i32.const 0 i32.const 2 i32.lt_s drop - local.get $4 + local.get $len i32.const 4 i32.ge_u if (result i32) - local.get $5 + local.get $ptr1 i32.const 7 i32.and - local.get $6 + local.get $ptr2 i32.const 7 i32.and i32.or @@ -2176,27 +2176,27 @@ if block $do-break|0 loop $do-loop|0 - local.get $5 + local.get $ptr1 i64.load - local.get $6 + local.get $ptr2 i64.load i64.ne if br $do-break|0 end - local.get $5 + local.get $ptr1 i32.const 8 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 8 i32.add - local.set $6 - local.get $4 + local.set $ptr2 + local.get $len i32.const 4 i32.sub - local.set $4 - local.get $4 + local.set $len + local.get $len i32.const 4 i32.ge_u br_if $do-loop|0 @@ -2204,59 +2204,59 @@ end end loop $while-continue|1 - local.get $4 - local.tee $7 + local.get $len + local.tee $var$7 i32.const 1 i32.sub - local.set $4 - local.get $7 - local.set $7 - local.get $7 + local.set $len + local.get $var$7 + local.set $var$7 + local.get $var$7 if - local.get $5 + local.get $ptr1 i32.load16_u - local.set $8 - local.get $6 + local.set $a + local.get $ptr2 i32.load16_u - local.set $9 - local.get $8 - local.get $9 + local.set $b + local.get $a + local.get $b i32.ne if - local.get $8 - local.get $9 + local.get $a + local.get $b i32.sub return end - local.get $5 + local.get $ptr1 i32.const 2 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 2 i32.add - local.set $6 + local.set $ptr2 br $while-continue|1 end end i32.const 0 ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__eq (param $left i32) (param $right i32) (result i32) + (local $leftLength i32) + local.get $left + local.get $right i32.eq if i32.const 1 return end - local.get $0 + local.get $left i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $1 + local.get $right i32.const 0 i32.eq end @@ -2264,38 +2264,38 @@ i32.const 0 return end - local.get $0 + local.get $left call $~lib/string/String#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $leftLength + local.get $leftLength + local.get $right call $~lib/string/String#get:length i32.ne if i32.const 0 return end - local.get $0 + local.get $left i32.const 0 - local.get $1 + local.get $right i32.const 0 - local.get $2 + local.get $leftLength call $~lib/util/string/compareImpl i32.eqz ) - (func $class-overloading-cast/B#foo (param $0 i32) (param $1 i32) (result i32) + (func $class-overloading-cast/B#foo (param $this i32) (param $a i32) (result i32) i32.const 464 ) - (func $class-overloading-cast/A#foo (param $0 i32) (param $1 f64) (result i32) + (func $class-overloading-cast/A#foo (param $this i32) (param $a f64) (result i32) i32.const 432 ) - (func $class-overloading-cast/A<~lib/string/String>#foo (param $0 i32) (param $1 i32) (result i32) + (func $class-overloading-cast/A<~lib/string/String>#foo (param $this i32) (param $a i32) (result i32) i32.const 432 ) - (func $class-overloading-cast/B#foo (param $0 i32) (param $1 i32) (result i32) + (func $class-overloading-cast/B#foo (param $this i32) (param $a i32) (result i32) i32.const 464 ) - (func $class-overloading-cast/B#foo (param $0 i32) (param $1 f64) (result i32) + (func $class-overloading-cast/B#foo (param $this i32) (param $a f64) (result i32) i32.const 464 ) (func $class-overloading-cast/A#foo@virtual (param $0 i32) (param $1 i32) (result i32) diff --git a/tests/compiler/class-overloading.debug.wat b/tests/compiler/class-overloading.debug.wat index 44d8f98102..26cbc0f1cd 100644 --- a/tests/compiler/class-overloading.debug.wat +++ b/tests/compiler/class-overloading.debug.wat @@ -69,50 +69,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -125,58 +125,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -193,12 +193,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -208,19 +208,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -231,27 +231,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -259,35 +259,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -297,15 +297,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -315,25 +315,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -341,33 +341,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -395,23 +395,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -423,15 +423,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -443,33 +443,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -477,21 +477,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -506,36 +506,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -543,67 +543,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -613,22 +613,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -638,12 +638,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -655,75 +655,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -735,38 +735,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -780,12 +780,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -796,38 +796,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -835,21 +835,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -864,101 +864,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -969,7 +969,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -980,26 +980,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1012,27 +1012,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1046,11 +1046,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1061,66 +1061,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1130,10 +1130,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1144,13 +1144,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1161,109 +1161,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1271,7 +1271,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1288,23 +1288,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1316,54 +1316,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1384,30 +1384,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1417,9 +1417,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1429,8 +1429,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1438,43 +1438,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1486,17 +1486,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1510,7 +1510,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1528,7 +1528,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1538,12 +1538,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1565,7 +1565,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1585,14 +1585,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1605,8 +1605,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1617,37 +1617,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1655,16 +1655,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1672,21 +1672,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1701,12 +1701,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1714,49 +1714,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1766,90 +1766,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1858,22 +1858,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1882,27 +1882,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1917,69 +1917,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1994,29 +1994,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2029,13 +2029,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2046,25 +2046,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2079,10 +2079,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2100,79 +2100,79 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $class-overloading/A#a (param $0 i32) (param $1 i32) + (func $class-overloading/A#a (param $this i32) (param $a i32) i32.const 464 global.set $class-overloading/which ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.get $1 + (func $~lib/util/string/compareImpl (param $str1 i32) (param $index1 i32) (param $str2 i32) (param $index2 i32) (param $len i32) (result i32) + (local $ptr1 i32) + (local $ptr2 i32) + (local $var$7 i32) + (local $a i32) + (local $b i32) + local.get $str1 + local.get $index1 i32.const 1 i32.shl i32.add - local.set $5 - local.get $2 - local.get $3 + local.set $ptr1 + local.get $str2 + local.get $index2 i32.const 1 i32.shl i32.add - local.set $6 + local.set $ptr2 i32.const 0 i32.const 2 i32.lt_s drop - local.get $4 + local.get $len i32.const 4 i32.ge_u if (result i32) - local.get $5 + local.get $ptr1 i32.const 7 i32.and - local.get $6 + local.get $ptr2 i32.const 7 i32.and i32.or @@ -2183,27 +2183,27 @@ if block $do-break|0 loop $do-loop|0 - local.get $5 + local.get $ptr1 i64.load - local.get $6 + local.get $ptr2 i64.load i64.ne if br $do-break|0 end - local.get $5 + local.get $ptr1 i32.const 8 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 8 i32.add - local.set $6 - local.get $4 + local.set $ptr2 + local.get $len i32.const 4 i32.sub - local.set $4 - local.get $4 + local.set $len + local.get $len i32.const 4 i32.ge_u br_if $do-loop|0 @@ -2211,59 +2211,59 @@ end end loop $while-continue|1 - local.get $4 - local.tee $7 + local.get $len + local.tee $var$7 i32.const 1 i32.sub - local.set $4 - local.get $7 - local.set $7 - local.get $7 + local.set $len + local.get $var$7 + local.set $var$7 + local.get $var$7 if - local.get $5 + local.get $ptr1 i32.load16_u - local.set $8 - local.get $6 + local.set $a + local.get $ptr2 i32.load16_u - local.set $9 - local.get $8 - local.get $9 + local.set $b + local.get $a + local.get $b i32.ne if - local.get $8 - local.get $9 + local.get $a + local.get $b i32.sub return end - local.get $5 + local.get $ptr1 i32.const 2 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 2 i32.add - local.set $6 + local.set $ptr2 br $while-continue|1 end end i32.const 0 ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__eq (param $left i32) (param $right i32) (result i32) + (local $leftLength i32) + local.get $left + local.get $right i32.eq if i32.const 1 return end - local.get $0 + local.get $left i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $1 + local.get $right i32.const 0 i32.eq end @@ -2271,59 +2271,59 @@ i32.const 0 return end - local.get $0 + local.get $left call $~lib/string/String#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $leftLength + local.get $leftLength + local.get $right call $~lib/string/String#get:length i32.ne if i32.const 0 return end - local.get $0 + local.get $left i32.const 0 - local.get $1 + local.get $right i32.const 0 - local.get $2 + local.get $leftLength call $~lib/util/string/compareImpl i32.eqz ) - (func $class-overloading/A#b (param $0 i32) (param $1 i32) + (func $class-overloading/A#b (param $this i32) (param $b i32) i32.const 464 global.set $class-overloading/which ) - (func $class-overloading/A#get:c (param $0 i32) (result i32) + (func $class-overloading/A#get:c (param $this i32) (result i32) i32.const 464 global.set $class-overloading/which i32.const 0 ) - (func $class-overloading/A#set:c (param $0 i32) (param $1 i32) + (func $class-overloading/A#set:c (param $this i32) (param $c i32) i32.const 464 global.set $class-overloading/which ) - (func $class-overloading/B#a (param $0 i32) (param $1 i32) + (func $class-overloading/B#a (param $this i32) (param $a i32) i32.const 496 global.set $class-overloading/which ) - (func $class-overloading/C#b (param $0 i32) (param $1 i32) + (func $class-overloading/C#b (param $this i32) (param $b i32) i32.const 592 global.set $class-overloading/which ) - (func $class-overloading/C#get:c (param $0 i32) (result i32) + (func $class-overloading/C#get:c (param $this i32) (result i32) i32.const 592 global.set $class-overloading/which i32.const 0 ) - (func $class-overloading/C#set:c (param $0 i32) (param $1 i32) + (func $class-overloading/C#set:c (param $this i32) (param $c i32) i32.const 592 global.set $class-overloading/which ) - (func $class-overloading/IA#foo (param $0 i32) + (func $class-overloading/IA#foo (param $this i32) unreachable ) - (func $class-overloading/A2#foo (param $0 i32) (result i32) + (func $class-overloading/A2#foo (param $this i32) (result i32) i32.const 720 i32.const 528 i32.const 198 @@ -2331,45 +2331,45 @@ call $~lib/builtins/abort unreachable ) - (func $class-overloading/F#a (param $0 i32) (param $1 i32) + (func $class-overloading/F#a (param $this i32) (param $a i32) i32.const 624 global.set $class-overloading/which ) - (func $class-overloading/B#b (param $0 i32) (param $1 i32) + (func $class-overloading/B#b (param $this i32) (param $b i32) i32.const 496 global.set $class-overloading/which ) - (func $class-overloading/F#b (param $0 i32) (param $1 i32) + (func $class-overloading/F#b (param $this i32) (param $b i32) i32.const 624 global.set $class-overloading/which ) - (func $class-overloading/B#get:c (param $0 i32) (result i32) + (func $class-overloading/B#get:c (param $this i32) (result i32) i32.const 496 global.set $class-overloading/which i32.const 0 ) - (func $class-overloading/F#get:c (param $0 i32) (result i32) + (func $class-overloading/F#get:c (param $this i32) (result i32) i32.const 624 global.set $class-overloading/which i32.const 0 ) - (func $class-overloading/B#set:c (param $0 i32) (param $1 i32) + (func $class-overloading/B#set:c (param $this i32) (param $c i32) i32.const 496 global.set $class-overloading/which ) - (func $class-overloading/F#set:c (param $0 i32) (param $1 i32) + (func $class-overloading/F#set:c (param $this i32) (param $c i32) i32.const 624 global.set $class-overloading/which ) - (func $class-overloading/CA#foo (param $0 i32) + (func $class-overloading/CA#foo (param $this i32) i32.const 656 global.set $class-overloading/which ) - (func $class-overloading/CC#foo (param $0 i32) + (func $class-overloading/CC#foo (param $this i32) i32.const 688 global.set $class-overloading/which ) - (func $class-overloading/A1#baz (param $0 i32) (result i32) + (func $class-overloading/A1#baz (param $this i32) (result i32) i32.const 720 i32.const 528 i32.const 186 @@ -2377,11 +2377,11 @@ call $~lib/builtins/abort unreachable ) - (func $class-overloading/A1#bar (param $0 i32) (result i32) - local.get $0 + (func $class-overloading/A1#bar (param $this i32) (result i32) + local.get $this call $class-overloading/A1#baz@virtual ) - (func $class-overloading/B1#baz (param $0 i32) (result i32) + (func $class-overloading/B1#baz (param $this i32) (result i32) i32.const 3 ) (func $class-overloading/A#a@virtual (param $0 i32) (param $1 i32) diff --git a/tests/compiler/class-static-function.debug.wat b/tests/compiler/class-static-function.debug.wat index dd4ba23d24..d6f37b328b 100644 --- a/tests/compiler/class-static-function.debug.wat +++ b/tests/compiler/class-static-function.debug.wat @@ -18,10 +18,10 @@ (func $class-static-function/Example.staticFunc (result i32) i32.const 42 ) - (func $class-static-function/call (param $0 i32) (result i32) + (func $class-static-function/call (param $func i32) (result i32) i32.const 0 global.set $~argumentsLength - local.get $0 + local.get $func i32.load call_indirect $0 (type $none_=>_i32) ) diff --git a/tests/compiler/class.debug.wat b/tests/compiler/class.debug.wat index 03d532d757..a0841d3fbe 100644 --- a/tests/compiler/class.debug.wat +++ b/tests/compiler/class.debug.wat @@ -49,16 +49,16 @@ (export "memory" (memory $0)) (export "test" (func $export:class/test)) (start $~start) - (func $class/Animal.add (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $class/Animal.add (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.add global.get $class/Animal.ONE i32.add ) - (func $class/Animal.sub (param $0 f32) (param $1 f32) (result f32) - local.get $0 - local.get $1 + (func $class/Animal.sub (param $a f32) (param $b f32) (result f32) + local.get $a + local.get $b f32.sub global.get $class/Animal.ONE f32.convert_i32_s @@ -80,16 +80,16 @@ call $class/Animal.sub drop ) - (func $class/Animal#instanceAdd (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $1 - local.get $2 + (func $class/Animal#instanceAdd (param $this i32) (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.add global.get $class/Animal.ONE i32.add ) - (func $class/Animal#instanceSub (param $0 i32) (param $1 f32) (param $2 f32) (result f32) - local.get $1 - local.get $2 + (func $class/Animal#instanceSub (param $this i32) (param $a f32) (param $b f32) (result f32) + local.get $a + local.get $b f32.sub global.get $class/Animal.ONE f32.convert_i32_s @@ -110,50 +110,50 @@ local.get $1 i32.store8 offset=6 ) - (func $class/test (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $class/test (param $animal i32) (result i32) + (local $ptr i32) + (local $cls i32) + local.get $animal i32.const 1 i32.const 2 call $class/Animal#instanceAdd drop - local.get $0 + local.get $animal f32.const 1 f32.const 2 call $class/Animal#instanceSub drop - local.get $0 + local.get $animal i32.load drop - local.get $0 + local.get $animal i32.load16_s offset=4 drop - local.get $0 + local.get $animal i32.load8_s offset=6 drop - local.get $0 + local.get $animal i32.const 0 i32.const 1 i32.add call $class/Animal#set:one - local.get $0 + local.get $animal i32.const 1 i32.const 1 i32.add call $class/Animal#set:two - local.get $0 + local.get $animal i32.const 1 i32.const 1 i32.add i32.const 1 i32.add call $class/Animal#set:three - local.get $0 - local.set $1 - local.get $1 - local.set $2 - local.get $2 + local.get $animal + local.set $ptr + local.get $ptr + local.set $cls + local.get $cls ) (func $~lib/rt/itcms/Object#set:nextWithColor (param $0 i32) (param $1 i32) local.get $0 @@ -165,50 +165,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -221,58 +221,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -289,12 +289,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -304,19 +304,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -327,27 +327,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -355,35 +355,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -393,15 +393,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -411,25 +411,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -437,33 +437,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -491,23 +491,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -519,15 +519,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -539,33 +539,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -573,21 +573,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -602,36 +602,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -639,67 +639,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -709,22 +709,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -734,12 +734,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -751,75 +751,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -831,38 +831,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -876,12 +876,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -892,38 +892,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -931,21 +931,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -960,101 +960,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -1065,7 +1065,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1076,26 +1076,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1108,27 +1108,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1142,11 +1142,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1157,66 +1157,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1226,10 +1226,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1240,13 +1240,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1257,109 +1257,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1367,7 +1367,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1384,23 +1384,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1412,54 +1412,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1480,30 +1480,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1513,9 +1513,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1525,8 +1525,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1534,43 +1534,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1582,17 +1582,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1606,7 +1606,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1624,7 +1624,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1634,12 +1634,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1661,7 +1661,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1681,14 +1681,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1701,8 +1701,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1713,37 +1713,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1751,16 +1751,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1768,21 +1768,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1797,12 +1797,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1810,49 +1810,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1862,90 +1862,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1954,22 +1954,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1978,27 +1978,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -2013,69 +2013,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2090,29 +2090,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2125,13 +2125,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2142,25 +2142,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2175,10 +2175,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2196,49 +2196,49 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32) + (local $child i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $childPtr i32.eqz if return end i32.const 1 drop - local.get $0 + local.get $parentPtr i32.eqz if i32.const 0 @@ -2248,37 +2248,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $childPtr i32.const 20 i32.sub - local.set $3 - local.get $3 + local.set $child + local.get $child call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $0 + local.get $parentPtr i32.const 20 i32.sub - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 call $~lib/rt/itcms/Object#get:color - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $2 + local.get $expectMultiple if - local.get $4 + local.get $var$4 call $~lib/rt/itcms/Object#makeGray else - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end else - local.get $5 + local.get $var$5 i32.const 3 i32.eq if (result i32) @@ -2289,7 +2289,7 @@ i32.const 0 end if - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end end @@ -2367,12 +2367,12 @@ call $~lib/rt/itcms/__visit end ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) diff --git a/tests/compiler/comma.debug.wat b/tests/compiler/comma.debug.wat index 67a5fd94b8..2596e279c0 100644 --- a/tests/compiler/comma.debug.wat +++ b/tests/compiler/comma.debug.wat @@ -14,14 +14,14 @@ (export "memory" (memory $0)) (start $~start) (func $start:comma - (local $0 i32) - (local $1 i32) + (local $var$0 i32) + (local $c i32) global.get $comma/a - local.tee $0 + local.tee $var$0 i32.const 1 i32.add global.set $comma/a - local.get $0 + local.get $var$0 global.set $comma/b global.get $comma/a drop @@ -146,27 +146,27 @@ unreachable end i32.const 0 - local.set $1 + local.set $c loop $for-loop|0 - local.get $1 + local.get $c global.get $comma/a i32.lt_s - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if nop global.get $comma/a i32.const 1 i32.sub global.set $comma/a - local.get $1 + local.get $c i32.const 1 i32.add - local.set $1 + local.set $c br $for-loop|0 end end - local.get $1 + local.get $c i32.const 1 i32.eq i32.eqz diff --git a/tests/compiler/const-folding.debug.wat b/tests/compiler/const-folding.debug.wat index 420dbdd688..bd7f52c722 100644 --- a/tests/compiler/const-folding.debug.wat +++ b/tests/compiler/const-folding.debug.wat @@ -29,41 +29,41 @@ global.get $const-folding/w global.set $const-folding/x ) - (func $const-folding/test (param $0 i64) (result i64) - (local $1 i64) - (local $2 i64) - (local $3 i64) - (local $4 i64) + (func $const-folding/test (param $value i64) (result i64) + (local $mod1 i64) + (local $mod2 i64) + (local $rlo i64) + (local $rhi i64) i64.const -1 - local.set $1 + local.set $mod1 i64.const -1 - local.set $2 - local.get $0 + local.set $mod2 + local.get $value i64.const 1 i64.shl - local.set $3 - local.get $3 - local.get $2 + local.set $rlo + local.get $rlo + local.get $mod2 i64.const -1 i64.xor i64.and - local.set $4 - local.get $4 - local.get $4 + local.set $rhi + local.get $rhi + local.get $rhi i64.const 1 i64.shl i64.or - local.set $4 - local.get $4 - local.get $0 + local.set $rhi + local.get $rhi + local.get $value i64.const 63 i64.shr_u - local.get $1 + local.get $mod1 i64.and i64.or - local.set $4 - local.get $3 - local.get $4 + local.set $rhi + local.get $rlo + local.get $rhi i64.add ) (func $~start diff --git a/tests/compiler/constructor.debug.wat b/tests/compiler/constructor.debug.wat index 251422c872..7b3c4bd921 100644 --- a/tests/compiler/constructor.debug.wat +++ b/tests/compiler/constructor.debug.wat @@ -64,50 +64,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -120,58 +120,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -188,12 +188,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -203,19 +203,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -226,27 +226,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -254,35 +254,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -292,15 +292,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -310,25 +310,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -336,33 +336,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -390,23 +390,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -418,15 +418,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -438,33 +438,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -472,21 +472,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -501,36 +501,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -538,67 +538,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -608,22 +608,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -633,12 +633,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -650,75 +650,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -730,38 +730,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -775,12 +775,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -791,38 +791,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -830,21 +830,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -859,101 +859,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -964,7 +964,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -975,26 +975,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1007,27 +1007,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1041,11 +1041,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1056,66 +1056,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1125,10 +1125,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1139,13 +1139,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1156,109 +1156,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1266,7 +1266,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1283,23 +1283,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1311,54 +1311,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1379,30 +1379,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1412,9 +1412,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1424,8 +1424,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1433,43 +1433,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1481,17 +1481,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1505,7 +1505,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1523,7 +1523,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1533,12 +1533,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1560,7 +1560,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1580,14 +1580,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1600,8 +1600,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1612,37 +1612,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1650,16 +1650,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1667,21 +1667,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1696,12 +1696,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1709,49 +1709,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1761,90 +1761,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1853,22 +1853,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1877,27 +1877,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1912,69 +1912,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1989,29 +1989,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2024,13 +2024,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2041,25 +2041,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2074,10 +2074,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2095,36 +2095,36 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) (func $constructor/EmptyCtorWithFieldInit#set:a (param $0 i32) (param $1 i32) local.get $0 @@ -2151,7 +2151,7 @@ local.get $1 i32.store ) - (func $constructor/CtorReturns#constructor (param $0 i32) (result i32) + (func $constructor/CtorReturns#constructor (param $this i32) (result i32) i32.const 0 ) (func $constructor/CtorFieldInitOrder#set:a (param $0 i32) (param $1 i32) diff --git a/tests/compiler/continue.debug.wat b/tests/compiler/continue.debug.wat index 7a89d3bda8..68dd8942e5 100644 --- a/tests/compiler/continue.debug.wat +++ b/tests/compiler/continue.debug.wat @@ -8,22 +8,22 @@ (elem $0 (i32.const 1)) (export "testInherit" (func $continue/testInherit)) (export "memory" (memory $0)) - (func $continue/testInherit (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $continue/testInherit (param $b i32) + (local $var$1 i32) + (local $var$2 i32) i32.const 0 - local.set $1 + local.set $var$1 loop $for-loop|0 - local.get $1 + local.get $var$1 i32.const 10 i32.lt_s - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if block $for-continue|0 - local.get $0 + local.get $b if - local.get $1 + local.get $var$1 i32.const 5 i32.eq if @@ -31,10 +31,10 @@ end end end - local.get $1 + local.get $var$1 i32.const 1 i32.add - local.set $1 + local.set $var$1 br $for-loop|0 end end diff --git a/tests/compiler/do.debug.wat b/tests/compiler/do.debug.wat index afa8f4ea47..caaebe0544 100644 --- a/tests/compiler/do.debug.wat +++ b/tests/compiler/do.debug.wat @@ -44,25 +44,25 @@ (export "memory" (memory $0)) (start $~start) (func $do/testSimple - (local $0 i32) - (local $1 i32) + (local $n i32) + (local $m i32) i32.const 10 - local.set $0 + local.set $n i32.const 0 - local.set $1 + local.set $m loop $do-loop|0 - local.get $0 + local.get $n i32.const 1 i32.sub - local.set $0 - local.get $1 + local.set $n + local.get $m i32.const 1 i32.add - local.set $1 - local.get $0 + local.set $m + local.get $n br_if $do-loop|0 end - local.get $0 + local.get $n i32.const 0 i32.eq i32.eqz @@ -74,7 +74,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $m i32.const 10 i32.eq i32.eqz @@ -90,21 +90,21 @@ global.set $do/ran ) (func $do/testEmpty - (local $0 i32) - (local $1 i32) + (local $n i32) + (local $var$1 i32) i32.const 10 - local.set $0 + local.set $n loop $do-loop|0 nop - local.get $0 - local.tee $1 + local.get $n + local.tee $var$1 i32.const 1 i32.sub - local.set $0 - local.get $1 + local.set $n + local.get $var$1 br_if $do-loop|0 end - local.get $0 + local.get $n i32.const -1 i32.eq i32.eqz @@ -120,37 +120,37 @@ global.set $do/ran ) (func $do/testNested - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $n i32) + (local $m i32) + (local $o i32) i32.const 10 - local.set $0 + local.set $n i32.const 0 - local.set $1 + local.set $m i32.const 0 - local.set $2 + local.set $o loop $do-loop|0 - local.get $0 + local.get $n i32.const 1 i32.sub - local.set $0 - local.get $1 + local.set $n + local.get $m i32.const 1 i32.add - local.set $1 + local.set $m loop $do-loop|1 - local.get $0 + local.get $n i32.const 1 i32.sub - local.set $0 - local.get $2 + local.set $n + local.get $o i32.const 1 i32.add - local.set $2 - local.get $0 + local.set $o + local.get $n br_if $do-loop|1 end - local.get $0 + local.get $n i32.const 0 i32.eq i32.eqz @@ -162,7 +162,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $o i32.const 9 i32.eq i32.eqz @@ -174,10 +174,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $n br_if $do-loop|0 end - local.get $0 + local.get $n i32.const 0 i32.eq i32.eqz @@ -189,7 +189,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $m i32.const 1 i32.eq i32.eqz @@ -201,7 +201,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $o i32.const 9 i32.eq i32.eqz @@ -217,15 +217,15 @@ global.set $do/ran ) (func $do/testAlwaysTrue - (local $0 i32) + (local $i i32) i32.const 0 - local.set $0 + local.set $i block $do-break|0 loop $do-loop|0 - local.get $0 + local.get $i i32.const 1 i32.add - local.tee $0 + local.tee $i i32.const 10 i32.eq if @@ -235,7 +235,7 @@ br_if $do-loop|0 end end - local.get $0 + local.get $i i32.const 10 i32.eq i32.eqz @@ -251,18 +251,18 @@ global.set $do/ran ) (func $do/testAlwaysTrueNeverBreaks (result i32) - (local $0 i32) + (local $i i32) i32.const 0 - local.set $0 + local.set $i loop $do-loop|0 - local.get $0 + local.get $i i32.const 1 i32.add - local.tee $0 + local.tee $i i32.const 10 i32.eq if - local.get $0 + local.get $i return end i32.const 1 @@ -272,18 +272,18 @@ unreachable ) (func $do/testAlwaysFalse - (local $0 i32) + (local $i i32) i32.const 0 - local.set $0 + local.set $i loop $do-loop|0 - local.get $0 + local.get $i i32.const 1 i32.add - local.set $0 + local.set $i i32.const 0 drop end - local.get $0 + local.get $i i32.const 1 i32.eq i32.eqz @@ -299,20 +299,20 @@ global.set $do/ran ) (func $do/testAlwaysBreaks - (local $0 i32) + (local $i i32) i32.const 0 - local.set $0 + local.set $i block $do-break|0 loop $do-loop|0 - local.get $0 + local.get $i i32.const 1 i32.add - local.set $0 + local.set $i br $do-break|0 end unreachable end - local.get $0 + local.get $i i32.const 1 i32.eq i32.eqz @@ -328,14 +328,14 @@ global.set $do/ran ) (func $do/testAlwaysReturns - (local $0 i32) + (local $i i32) i32.const 0 - local.set $0 + local.set $i loop $do-loop|0 - local.get $0 + local.get $i i32.const 1 i32.add - local.set $0 + local.set $i i32.const 1 global.set $do/ran return @@ -343,16 +343,16 @@ unreachable ) (func $do/testContinue - (local $0 i32) + (local $i i32) i32.const 0 - local.set $0 + local.set $i block $do-break|0 loop $do-loop|0 block $do-continue|0 - local.get $0 + local.get $i i32.const 1 i32.add - local.tee $0 + local.tee $i i32.const 10 i32.eq if @@ -360,11 +360,11 @@ end br $do-continue|0 end - local.get $0 + local.get $i br_if $do-loop|0 end end - local.get $0 + local.get $i i32.const 10 i32.eq i32.eqz @@ -380,19 +380,19 @@ global.set $do/ran ) (func $do/testNestedContinue - (local $0 i32) - (local $1 i32) + (local $i i32) + (local $j i32) i32.const 0 - local.set $0 + local.set $i i32.const 0 - local.set $1 + local.set $j block $do-break|0 loop $do-loop|0 block $do-continue|0 - local.get $0 + local.get $i i32.const 1 i32.add - local.tee $0 + local.tee $i i32.const 10 i32.eq if @@ -401,10 +401,10 @@ block $do-break|1 loop $do-loop|1 block $do-continue|1 - local.get $1 + local.get $j i32.const 1 i32.add - local.tee $1 + local.tee $j i32.const 10 i32.rem_s i32.const 0 @@ -414,17 +414,17 @@ end br $do-continue|1 end - local.get $1 + local.get $j br_if $do-loop|1 end end br $do-continue|0 end - local.get $0 + local.get $i br_if $do-loop|0 end end - local.get $0 + local.get $i i32.const 10 i32.eq i32.eqz @@ -436,7 +436,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $j i32.const 90 i32.eq i32.eqz @@ -461,50 +461,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -517,58 +517,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -585,12 +585,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -600,19 +600,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -623,27 +623,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -651,35 +651,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -689,15 +689,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -707,25 +707,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -733,33 +733,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -787,23 +787,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -815,15 +815,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -835,33 +835,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -869,21 +869,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -898,36 +898,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -935,67 +935,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -1005,22 +1005,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -1030,12 +1030,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -1047,75 +1047,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -1127,38 +1127,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -1172,12 +1172,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -1188,38 +1188,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1227,21 +1227,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -1256,101 +1256,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -1361,7 +1361,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1372,26 +1372,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1404,27 +1404,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1438,11 +1438,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1453,66 +1453,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1522,10 +1522,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1536,13 +1536,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1553,109 +1553,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1663,7 +1663,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1680,23 +1680,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1708,54 +1708,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1776,30 +1776,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1809,9 +1809,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1821,8 +1821,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1830,43 +1830,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1878,17 +1878,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1902,7 +1902,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1920,7 +1920,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1930,12 +1930,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1957,7 +1957,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1977,14 +1977,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1997,8 +1997,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -2009,37 +2009,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -2047,16 +2047,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -2064,21 +2064,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -2093,12 +2093,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -2106,49 +2106,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -2158,90 +2158,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -2250,22 +2250,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -2274,27 +2274,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -2309,69 +2309,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2386,29 +2386,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2421,13 +2421,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2438,25 +2438,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2471,10 +2471,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2492,40 +2492,40 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) (func $do/testRef - (local $0 i32) - (local $1 i32) + (local $i i32) + (local $ref i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -2535,33 +2535,33 @@ i32.const 0 i32.store i32.const 0 - local.set $0 + local.set $i global.get $~lib/memory/__stack_pointer i32.const 0 call $do/Ref#constructor - local.tee $1 + local.tee $ref i32.store loop $do-loop|0 - local.get $0 + local.get $i i32.const 1 i32.add - local.tee $0 + local.tee $i i32.const 10 i32.eq if i32.const 0 - local.set $1 + local.set $ref else global.get $~lib/memory/__stack_pointer i32.const 0 call $do/Ref#constructor - local.tee $1 + local.tee $ref i32.store end - local.get $1 + local.get $ref br_if $do-loop|0 end - local.get $0 + local.get $i i32.const 10 i32.eq i32.eqz @@ -2573,7 +2573,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ref i32.eqz i32.eqz if @@ -2596,8 +2596,8 @@ call $do/Ref#constructor ) (func $do/testRefAutorelease - (local $0 i32) - (local $1 i32) + (local $i i32) + (local $ref i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -2607,30 +2607,30 @@ i32.const 0 i32.store i32.const 0 - local.set $0 + local.set $i global.get $~lib/memory/__stack_pointer i32.const 0 call $do/Ref#constructor - local.tee $1 + local.tee $ref i32.store block $do-break|0 loop $do-loop|0 - local.get $0 + local.get $i i32.const 1 i32.add - local.tee $0 + local.tee $i i32.const 10 i32.eq if i32.const 0 - local.set $1 + local.set $ref br $do-break|0 end call $do/getRef br_if $do-loop|0 end end - local.get $0 + local.get $i i32.const 10 i32.eq i32.eqz @@ -2642,7 +2642,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ref i32.eqz i32.eqz if @@ -2661,7 +2661,7 @@ global.set $~lib/memory/__stack_pointer ) (func $~lib/rt/itcms/__collect - (local $0 i32) + (local $var$0 i32) i32.const 0 drop global.get $~lib/rt/itcms/state @@ -2672,8 +2672,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -2687,8 +2687,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop diff --git a/tests/compiler/duplicate-fields.debug.wat b/tests/compiler/duplicate-fields.debug.wat index 9ec82fefea..d14b56c638 100644 --- a/tests/compiler/duplicate-fields.debug.wat +++ b/tests/compiler/duplicate-fields.debug.wat @@ -59,50 +59,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -115,58 +115,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -183,12 +183,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -198,19 +198,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -221,27 +221,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -249,35 +249,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -287,15 +287,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -305,25 +305,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -331,33 +331,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -385,23 +385,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -413,15 +413,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -433,33 +433,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -467,21 +467,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -496,36 +496,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -533,67 +533,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -603,22 +603,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -628,12 +628,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -645,75 +645,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -725,38 +725,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -770,12 +770,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -786,38 +786,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -825,21 +825,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -854,101 +854,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -959,7 +959,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -970,26 +970,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1002,27 +1002,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1036,11 +1036,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1051,66 +1051,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1120,10 +1120,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1134,13 +1134,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1151,109 +1151,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1261,7 +1261,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1278,23 +1278,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1306,54 +1306,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1374,30 +1374,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1407,9 +1407,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1419,8 +1419,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1428,43 +1428,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1476,17 +1476,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1500,7 +1500,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1518,7 +1518,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1528,12 +1528,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1555,7 +1555,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1575,14 +1575,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1595,8 +1595,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1607,37 +1607,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1645,16 +1645,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1662,21 +1662,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1691,12 +1691,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1704,49 +1704,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1756,90 +1756,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1848,22 +1848,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1872,27 +1872,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1907,69 +1907,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1984,29 +1984,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2019,13 +2019,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2036,25 +2036,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2069,10 +2069,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2090,54 +2090,54 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) (func $duplicate-fields/B#set:bar (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32) + (local $child i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $childPtr i32.eqz if return end i32.const 1 drop - local.get $0 + local.get $parentPtr i32.eqz if i32.const 0 @@ -2147,37 +2147,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $childPtr i32.const 20 i32.sub - local.set $3 - local.get $3 + local.set $child + local.get $child call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $0 + local.get $parentPtr i32.const 20 i32.sub - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 call $~lib/rt/itcms/Object#get:color - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $2 + local.get $expectMultiple if - local.get $4 + local.get $var$4 call $~lib/rt/itcms/Object#makeGray else - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end else - local.get $5 + local.get $var$5 i32.const 3 i32.eq if (result i32) @@ -2188,7 +2188,7 @@ i32.const 0 end if - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end end diff --git a/tests/compiler/empty-exportruntime.debug.wat b/tests/compiler/empty-exportruntime.debug.wat index 0c319d2eed..42d85f1720 100644 --- a/tests/compiler/empty-exportruntime.debug.wat +++ b/tests/compiler/empty-exportruntime.debug.wat @@ -58,50 +58,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -114,58 +114,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -182,12 +182,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -197,19 +197,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -220,27 +220,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -248,35 +248,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -286,15 +286,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -304,25 +304,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -330,33 +330,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -384,23 +384,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -412,15 +412,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -432,33 +432,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -466,21 +466,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -495,36 +495,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -532,67 +532,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -602,22 +602,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -627,12 +627,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -644,75 +644,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -724,38 +724,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -769,12 +769,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -785,38 +785,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -824,21 +824,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -853,101 +853,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -958,7 +958,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -969,26 +969,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1001,27 +1001,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1035,11 +1035,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1050,66 +1050,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1119,10 +1119,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1133,13 +1133,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1150,109 +1150,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1260,7 +1260,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1277,23 +1277,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1305,54 +1305,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1373,30 +1373,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1406,9 +1406,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1418,8 +1418,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1427,43 +1427,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1475,17 +1475,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1499,7 +1499,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1517,7 +1517,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1527,12 +1527,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1554,7 +1554,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1574,14 +1574,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1594,8 +1594,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1606,37 +1606,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1644,16 +1644,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1661,21 +1661,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1690,12 +1690,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1703,49 +1703,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1755,90 +1755,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1847,22 +1847,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1871,27 +1871,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1906,69 +1906,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1983,29 +1983,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2018,13 +2018,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2035,25 +2035,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2068,10 +2068,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2089,46 +2089,46 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/rt/itcms/__pin (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/__pin (param $ptr i32) (result i32) + (local $var$1 i32) + local.get $ptr if - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -2140,27 +2140,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 call $~lib/rt/itcms/Object#unlink - local.get $1 + local.get $var$1 global.get $~lib/rt/itcms/pinSpace i32.const 3 call $~lib/rt/itcms/Object#linkTo end - local.get $0 + local.get $ptr ) - (func $~lib/rt/itcms/__unpin (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/__unpin (param $ptr i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $1 - local.get $1 + local.set $obj + local.get $obj call $~lib/rt/itcms/Object#get:color i32.const 3 i32.ne @@ -2176,19 +2176,19 @@ i32.const 1 i32.eq if - local.get $1 + local.get $obj call $~lib/rt/itcms/Object#makeGray else - local.get $1 + local.get $obj call $~lib/rt/itcms/Object#unlink - local.get $1 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo end ) (func $~lib/rt/itcms/__collect - (local $0 i32) + (local $var$0 i32) i32.const 0 drop global.get $~lib/rt/itcms/state @@ -2199,8 +2199,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -2214,8 +2214,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop diff --git a/tests/compiler/empty-new.debug.wat b/tests/compiler/empty-new.debug.wat index f520871fde..4fbafde18d 100644 --- a/tests/compiler/empty-new.debug.wat +++ b/tests/compiler/empty-new.debug.wat @@ -51,50 +51,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -107,58 +107,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -175,12 +175,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -190,19 +190,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -213,27 +213,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -241,35 +241,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -279,15 +279,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -297,25 +297,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -323,33 +323,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -377,23 +377,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -405,15 +405,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -425,33 +425,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -459,21 +459,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -488,36 +488,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -525,67 +525,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -595,22 +595,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -620,12 +620,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -637,75 +637,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -717,38 +717,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -762,12 +762,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -778,38 +778,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -817,21 +817,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -846,101 +846,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -951,7 +951,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -962,26 +962,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -994,27 +994,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1028,11 +1028,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1043,66 +1043,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1112,10 +1112,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1126,13 +1126,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1143,109 +1143,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1253,7 +1253,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1270,23 +1270,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1298,54 +1298,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1366,30 +1366,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1399,9 +1399,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1411,8 +1411,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1420,43 +1420,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1468,17 +1468,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1492,7 +1492,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1510,7 +1510,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1520,12 +1520,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1547,7 +1547,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1567,14 +1567,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1587,8 +1587,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1599,37 +1599,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1637,16 +1637,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1654,21 +1654,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1683,12 +1683,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1696,49 +1696,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1748,90 +1748,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1840,22 +1840,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1864,27 +1864,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1899,69 +1899,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1976,29 +1976,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2011,13 +2011,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2028,25 +2028,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2061,10 +2061,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2082,36 +2082,36 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) (func $start:empty-new memory.size diff --git a/tests/compiler/export.debug.wat b/tests/compiler/export.debug.wat index ac3ab363c5..457b6bbca6 100644 --- a/tests/compiler/export.debug.wat +++ b/tests/compiler/export.debug.wat @@ -16,19 +16,19 @@ (export "b" (global $export/b)) (export "renamed_c" (global $export/c)) (export "memory" (memory $0)) - (func $export/add (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $export/add (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.add ) - (func $export/sub (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $export/sub (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.sub ) - (func $export/mul (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $export/mul (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.mul ) ) diff --git a/tests/compiler/exports-lazy.debug.wat b/tests/compiler/exports-lazy.debug.wat index 1b3c4319b0..cc2df2bd1c 100644 --- a/tests/compiler/exports-lazy.debug.wat +++ b/tests/compiler/exports-lazy.debug.wat @@ -17,8 +17,8 @@ (export "memory" (memory $0)) (start $~start) (func $start:exports-lazy - (local $0 i32) - (local $1 i32) + (local $var$0 i32) + (local $var$1 i32) global.get $exports-lazy/lazyGlobalUsed drop call $exports-lazy/lazyFuncUsed diff --git a/tests/compiler/exports.debug.wat b/tests/compiler/exports.debug.wat index 4e1c5d6ba7..84902734a1 100644 --- a/tests/compiler/exports.debug.wat +++ b/tests/compiler/exports.debug.wat @@ -25,17 +25,17 @@ (export "renamed_mul" (func $export/mul)) (export "memory" (memory $0)) (export "__setArgumentsLength" (func $~setArgumentsLength)) - (func $exports/add (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $exports/add (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.add ) - (func $exports/subOpt (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $exports/subOpt (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.sub ) - (func $exports/subOpt@varargs (param $0 i32) (param $1 i32) (result i32) + (func $exports/subOpt@varargs (param $a i32) (param $b i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -47,15 +47,15 @@ unreachable end i32.const 0 - local.set $1 + local.set $b end - local.get $0 - local.get $1 + local.get $a + local.get $b call $exports/subOpt ) - (func $export/mul (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $export/mul (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.mul ) (func $~setArgumentsLength (param $0 i32) diff --git a/tests/compiler/exportstar-rereexport.debug.wat b/tests/compiler/exportstar-rereexport.debug.wat index 820cafe0c7..af818a122b 100644 --- a/tests/compiler/exportstar-rereexport.debug.wat +++ b/tests/compiler/exportstar-rereexport.debug.wat @@ -58,19 +58,19 @@ (export "renamed_default" (func $export-default/theDefault)) (export "memory" (memory $0)) (start $~start) - (func $export/add (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $export/add (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.add ) - (func $export/mul (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $export/mul (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.mul ) - (func $exports/add (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $exports/add (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.add ) (func $exports/Car#set:doors (param $0 i32) (param $1 i32) @@ -88,50 +88,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -144,58 +144,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -212,12 +212,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -227,19 +227,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -250,27 +250,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -278,35 +278,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -316,15 +316,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -334,25 +334,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -360,33 +360,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -414,23 +414,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -442,15 +442,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -462,33 +462,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -496,21 +496,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -525,36 +525,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -562,67 +562,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -632,22 +632,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -657,12 +657,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -674,75 +674,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -754,38 +754,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -799,12 +799,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -815,38 +815,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -854,21 +854,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -883,101 +883,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -988,7 +988,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -999,26 +999,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1031,27 +1031,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1065,11 +1065,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1080,66 +1080,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1149,10 +1149,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1163,13 +1163,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1180,109 +1180,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1290,7 +1290,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1307,23 +1307,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1335,54 +1335,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1403,30 +1403,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1436,9 +1436,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1448,8 +1448,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1457,43 +1457,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1505,17 +1505,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1529,7 +1529,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1547,7 +1547,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1557,12 +1557,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1584,7 +1584,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1604,14 +1604,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1624,8 +1624,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1636,37 +1636,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1674,16 +1674,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1691,21 +1691,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1720,12 +1720,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1733,49 +1733,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1785,90 +1785,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1877,22 +1877,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1901,27 +1901,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1936,69 +1936,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2013,29 +2013,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2048,13 +2048,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2065,25 +2065,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2098,10 +2098,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2119,39 +2119,39 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $exports/Car#get:numDoors (param $0 i32) (result i32) - local.get $0 + (func $exports/Car#get:numDoors (param $this i32) (result i32) + local.get $this i32.load ) (func $start:exportstar-rereexport diff --git a/tests/compiler/exportstar.debug.wat b/tests/compiler/exportstar.debug.wat index ac3ab363c5..457b6bbca6 100644 --- a/tests/compiler/exportstar.debug.wat +++ b/tests/compiler/exportstar.debug.wat @@ -16,19 +16,19 @@ (export "b" (global $export/b)) (export "renamed_c" (global $export/c)) (export "memory" (memory $0)) - (func $export/add (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $export/add (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.add ) - (func $export/sub (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $export/sub (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.sub ) - (func $export/mul (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $export/mul (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.mul ) ) diff --git a/tests/compiler/extends-baseaggregate.debug.wat b/tests/compiler/extends-baseaggregate.debug.wat index a5a5a150c2..bf29dfb28e 100644 --- a/tests/compiler/extends-baseaggregate.debug.wat +++ b/tests/compiler/extends-baseaggregate.debug.wat @@ -61,50 +61,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -117,58 +117,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -185,12 +185,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -200,19 +200,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -223,27 +223,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -251,35 +251,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -289,15 +289,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -307,25 +307,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -333,33 +333,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -387,23 +387,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -415,15 +415,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -435,33 +435,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -469,21 +469,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -498,36 +498,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -535,67 +535,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -605,22 +605,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -630,12 +630,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -647,75 +647,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -727,38 +727,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -772,12 +772,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -788,38 +788,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -827,21 +827,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -856,101 +856,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -961,7 +961,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -972,26 +972,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1004,27 +1004,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1038,11 +1038,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1053,66 +1053,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1122,10 +1122,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1136,13 +1136,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1153,109 +1153,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1263,7 +1263,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1280,23 +1280,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1308,54 +1308,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1376,30 +1376,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1409,9 +1409,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1421,8 +1421,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1430,43 +1430,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1478,17 +1478,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1502,7 +1502,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1520,7 +1520,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1530,12 +1530,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1557,7 +1557,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1577,14 +1577,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1597,8 +1597,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1609,37 +1609,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1647,16 +1647,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1664,21 +1664,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1693,12 +1693,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1706,49 +1706,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1758,90 +1758,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1850,22 +1850,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1874,27 +1874,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1909,69 +1909,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1986,29 +1986,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2021,13 +2021,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2038,25 +2038,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2071,10 +2071,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2092,36 +2092,36 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) (func $extends-baseaggregate/A1#set:padding0 (param $0 i32) (param $1 f64) local.get $0 @@ -2133,18 +2133,18 @@ local.get $1 f64.store offset=8 ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32) + (local $child i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $childPtr i32.eqz if return end i32.const 1 drop - local.get $0 + local.get $parentPtr i32.eqz if i32.const 0 @@ -2154,37 +2154,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $childPtr i32.const 20 i32.sub - local.set $3 - local.get $3 + local.set $child + local.get $child call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $0 + local.get $parentPtr i32.const 20 i32.sub - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 call $~lib/rt/itcms/Object#get:color - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $2 + local.get $expectMultiple if - local.get $4 + local.get $var$4 call $~lib/rt/itcms/Object#makeGray else - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end else - local.get $5 + local.get $var$5 i32.const 3 i32.eq if (result i32) @@ -2195,7 +2195,7 @@ i32.const 0 end if - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end end @@ -2210,17 +2210,17 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/rt/itcms/__renew (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/rt/itcms/__renew (param $oldPtr i32) (param $size i32) (result i32) + (local $oldObj i32) + (local $newPtr i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $oldPtr i32.const 20 i32.sub - local.set $2 - local.get $1 - local.get $2 + local.set $oldObj + local.get $size + local.get $oldObj i32.load i32.const 3 i32.const -1 @@ -2230,49 +2230,49 @@ i32.sub i32.le_u if - local.get $2 - local.get $1 + local.get $oldObj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $0 + local.get $oldPtr return end - local.get $1 - local.get $2 + local.get $size + local.get $oldObj i32.load offset=12 call $~lib/rt/itcms/__new - local.set $3 - local.get $3 - local.get $0 - local.get $1 - local.tee $4 - local.get $2 + local.set $newPtr + local.get $newPtr + local.get $oldPtr + local.get $size + local.tee $var$4 + local.get $oldObj i32.load offset=16 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.lt_u select memory.copy - local.get $3 - ) - (func $~lib/array/ensureCapacity (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $0 + local.get $newPtr + ) + (func $~lib/array/ensureCapacity (param $array i32) (param $newSize i32) (param $alignLog2 i32) (param $canGrow i32) + (local $oldCapacity i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $array i32.load offset=8 - local.set $4 - local.get $1 - local.get $4 - local.get $2 + local.set $oldCapacity + local.get $newSize + local.get $oldCapacity + local.get $alignLog2 i32.shr_u i32.gt_u if - local.get $1 + local.get $newSize i32.const 1073741820 - local.get $2 + local.get $alignLog2 i32.shr_u i32.gt_u if @@ -2283,66 +2283,66 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.load - local.set $5 - local.get $1 - local.tee $6 + local.set $var$5 + local.get $newSize + local.tee $var$6 i32.const 8 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.gt_u select - local.get $2 + local.get $alignLog2 i32.shl - local.set $6 - local.get $3 + local.set $var$6 + local.get $canGrow if - local.get $4 + local.get $oldCapacity i32.const 1 i32.shl - local.tee $7 + local.tee $var$7 i32.const 1073741820 - local.tee $8 - local.get $7 - local.get $8 + local.tee $var$8 + local.get $var$7 + local.get $var$8 i32.lt_u select - local.tee $8 - local.get $6 - local.tee $7 - local.get $8 - local.get $7 + local.tee $var$8 + local.get $var$6 + local.tee $var$7 + local.get $var$8 + local.get $var$7 i32.gt_u select - local.set $6 + local.set $var$6 end - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 call $~lib/rt/itcms/__renew - local.set $8 + local.set $var$8 i32.const 2 global.get $~lib/shared/runtime/Runtime.Incremental i32.ne drop - local.get $8 - local.get $5 + local.get $var$8 + local.get $var$5 i32.ne if - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.store - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.store offset=4 - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.const 0 call $~lib/rt/itcms/__link end - local.get $0 - local.get $6 + local.get $array + local.get $var$6 i32.store offset=8 end ) @@ -2351,39 +2351,39 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#push (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/array/Array#push (param $this i32) (param $value i32) (result i32) + (local $oldLen i32) + (local $len i32) + local.get $this i32.load offset=12 - local.set $2 - local.get $2 + local.set $oldLen + local.get $oldLen i32.const 1 i32.add - local.set $3 - local.get $0 - local.get $3 + local.set $len + local.get $this + local.get $len i32.const 2 i32.const 1 call $~lib/array/ensureCapacity i32.const 1 drop - local.get $0 + local.get $this i32.load offset=4 - local.get $2 + local.get $oldLen i32.const 2 i32.shl i32.add - local.get $1 + local.get $value i32.store - local.get $0 - local.get $1 + local.get $this + local.get $value i32.const 1 call $~lib/rt/itcms/__link - local.get $0 - local.get $3 + local.get $this + local.get $len call $~lib/array/Array#set:length_ - local.get $3 + local.get $len ) (func $~lib/rt/__visit_globals (param $0 i32) (local $1 i32) @@ -2460,49 +2460,49 @@ local.get $1 call $extends-baseaggregate/A1~visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $val i32) i32.const 1 drop - local.get $0 + local.get $this i32.load offset=4 - local.set $2 - local.get $2 - local.get $0 + local.set $var$2 + local.get $var$2 + local.get $this i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $var$2 i32.load - local.set $5 - local.get $5 + local.set $val + local.get $val if - local.get $5 - local.get $1 + local.get $val + local.get $cookie call $~lib/rt/itcms/__visit end - local.get $2 + local.get $var$2 i32.const 4 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -2510,49 +2510,49 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $val i32) i32.const 1 drop - local.get $0 + local.get $this i32.load offset=4 - local.set $2 - local.get $2 - local.get $0 + local.set $var$2 + local.get $var$2 + local.get $this i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $var$2 i32.load - local.set $5 - local.get $5 + local.set $val + local.get $val if - local.get $5 - local.get $1 + local.get $val + local.get $cookie call $~lib/rt/itcms/__visit end - local.get $2 + local.get $var$2 i32.const 4 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) diff --git a/tests/compiler/extends-recursive.debug.wat b/tests/compiler/extends-recursive.debug.wat index 574032e2d2..c458aa45ce 100644 --- a/tests/compiler/extends-recursive.debug.wat +++ b/tests/compiler/extends-recursive.debug.wat @@ -51,50 +51,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -107,58 +107,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -175,12 +175,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -190,19 +190,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -213,27 +213,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -241,35 +241,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -279,15 +279,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -297,25 +297,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -323,33 +323,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -377,23 +377,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -405,15 +405,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -425,33 +425,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -459,21 +459,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -488,36 +488,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -525,67 +525,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -595,22 +595,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -620,12 +620,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -637,75 +637,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -717,38 +717,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -762,12 +762,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -778,38 +778,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -817,21 +817,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -846,101 +846,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -951,7 +951,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -962,26 +962,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -994,27 +994,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1028,11 +1028,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1043,66 +1043,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1112,10 +1112,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1126,13 +1126,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1143,109 +1143,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1253,7 +1253,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1270,23 +1270,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1298,54 +1298,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1366,30 +1366,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1399,9 +1399,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1411,8 +1411,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1420,43 +1420,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1468,17 +1468,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1492,7 +1492,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1510,7 +1510,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1520,12 +1520,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1547,7 +1547,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1567,14 +1567,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1587,8 +1587,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1599,37 +1599,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1637,16 +1637,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1654,21 +1654,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1683,12 +1683,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1696,49 +1696,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1748,90 +1748,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1840,22 +1840,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1864,27 +1864,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1899,69 +1899,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1976,29 +1976,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2011,13 +2011,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2028,25 +2028,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2061,10 +2061,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2082,49 +2082,49 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32) + (local $child i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $childPtr i32.eqz if return end i32.const 1 drop - local.get $0 + local.get $parentPtr i32.eqz if i32.const 0 @@ -2134,37 +2134,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $childPtr i32.const 20 i32.sub - local.set $3 - local.get $3 + local.set $child + local.get $child call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $0 + local.get $parentPtr i32.const 20 i32.sub - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 call $~lib/rt/itcms/Object#get:color - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $2 + local.get $expectMultiple if - local.get $4 + local.get $var$4 call $~lib/rt/itcms/Object#makeGray else - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end else - local.get $5 + local.get $var$5 i32.const 3 i32.eq if (result i32) @@ -2175,7 +2175,7 @@ i32.const 0 end if - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end end diff --git a/tests/compiler/features/gc.debug.wat b/tests/compiler/features/gc.debug.wat index f3413a9242..6638263b7a 100644 --- a/tests/compiler/features/gc.debug.wat +++ b/tests/compiler/features/gc.debug.wat @@ -15,13 +15,13 @@ (export "memory" (memory $0)) (export "_start" (func $~start)) (func $features/gc/test_i31 - (local $0 i31ref) - (local $1 i32) - (local $2 i32) + (local $ref i31ref) + (local $val i32) + (local $uval i32) i32.const 123 i31.new - local.set $0 - local.get $0 + local.set $ref + local.get $ref ref.is_null if i32.const 0 @@ -31,12 +31,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $ref i31.get_s - local.set $1 - local.get $0 + local.set $val + local.get $ref i31.get_u - local.set $2 + local.set $uval ) (func $start:features/gc call $features/gc/test_i31 diff --git a/tests/compiler/features/reference-types.debug.wat b/tests/compiler/features/reference-types.debug.wat index 2d90f1ad8d..fd40fb3b01 100644 --- a/tests/compiler/features/reference-types.debug.wat +++ b/tests/compiler/features/reference-types.debug.wat @@ -36,9 +36,9 @@ (export "memory" (memory $0)) (start $~start) (func $features/reference-types/testLocal - (local $0 funcref) - (local $1 funcref) - local.get $0 + (local $local funcref) + (local $localInit funcref) + local.get $local ref.is_null i32.eqz i32.eqz @@ -52,8 +52,8 @@ unreachable end ref.null func - local.set $0 - local.get $0 + local.set $local + local.get $local ref.is_null i32.eqz i32.eqz @@ -67,8 +67,8 @@ unreachable end ref.null func - local.set $1 - local.get $1 + local.set $localInit + local.get $localInit ref.is_null i32.eqz i32.eqz @@ -83,9 +83,9 @@ end ) (func $features/reference-types/testLocal - (local $0 anyref) - (local $1 anyref) - local.get $0 + (local $local anyref) + (local $localInit anyref) + local.get $local ref.is_null i32.eqz i32.eqz @@ -99,8 +99,8 @@ unreachable end ref.null any - local.set $0 - local.get $0 + local.set $local + local.get $local ref.is_null i32.eqz i32.eqz @@ -114,8 +114,8 @@ unreachable end ref.null any - local.set $1 - local.get $1 + local.set $localInit + local.get $localInit ref.is_null i32.eqz i32.eqz @@ -133,8 +133,8 @@ nop ) (func $start:features/reference-types - (local $0 funcref) - (local $1 anyref) + (local $var$0 funcref) + (local $var$1 anyref) call $features/reference-types/somethingReal ref.is_null i32.eqz @@ -308,8 +308,8 @@ unreachable end ref.func $features/reference-types/someFunc - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 ref.is_null if i32.const 0 @@ -320,7 +320,7 @@ unreachable end global.get $features/reference-types/otherFuncGlobal - local.tee $0 + local.tee $var$0 ref.is_null if (result funcref) i32.const 112 @@ -330,11 +330,11 @@ call $~lib/builtins/abort unreachable else - local.get $0 + local.get $var$0 end global.set $features/reference-types/nonNullFunc call $features/reference-types/somethingReal - local.tee $1 + local.tee $var$1 ref.is_null if (result anyref) i32.const 112 @@ -344,24 +344,24 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $features/reference-types/nonNullReal ) - (func $features/reference-types/internal (param $0 anyref) (result anyref) - (local $1 anyref) - (local $2 anyref) - (local $3 anyref) - local.get $0 + (func $features/reference-types/internal (param $a anyref) (result anyref) + (local $var$1 anyref) + (local $var$2 anyref) + (local $d anyref) + local.get $a call $features/reference-types/external - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 call $features/reference-types/external - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 call $features/reference-types/external - local.set $3 - local.get $3 + local.set $d + local.get $d ) (func $~start call $start:features/reference-types diff --git a/tests/compiler/field-initialization.debug.wat b/tests/compiler/field-initialization.debug.wat index 862ae7815d..41df288cad 100644 --- a/tests/compiler/field-initialization.debug.wat +++ b/tests/compiler/field-initialization.debug.wat @@ -62,50 +62,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -118,58 +118,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -186,12 +186,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -201,19 +201,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -224,27 +224,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -252,35 +252,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -290,15 +290,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -308,25 +308,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -334,33 +334,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -388,23 +388,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -416,15 +416,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -436,33 +436,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -470,21 +470,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -499,36 +499,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -536,67 +536,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -606,22 +606,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -631,12 +631,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -648,75 +648,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -728,38 +728,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -773,12 +773,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -789,38 +789,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -828,21 +828,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -857,101 +857,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -962,7 +962,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -973,26 +973,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1005,27 +1005,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1039,11 +1039,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1054,66 +1054,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1123,10 +1123,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1137,13 +1137,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1154,109 +1154,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1264,7 +1264,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1281,23 +1281,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1309,54 +1309,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1377,30 +1377,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1410,9 +1410,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1422,8 +1422,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1431,43 +1431,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1479,17 +1479,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1503,7 +1503,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1521,7 +1521,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1531,12 +1531,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1558,7 +1558,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1578,14 +1578,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1598,8 +1598,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1610,37 +1610,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1648,16 +1648,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1665,21 +1665,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1694,12 +1694,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1707,49 +1707,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1759,90 +1759,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1851,22 +1851,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1875,27 +1875,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1910,69 +1910,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1987,29 +1987,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2022,13 +2022,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2039,25 +2039,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2072,10 +2072,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2093,36 +2093,36 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) (func $field-initialization/Value_Init#set:a (param $0 i32) (param $1 i32) local.get $0 @@ -2134,18 +2134,18 @@ local.get $1 i32.store ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32) + (local $child i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $childPtr i32.eqz if return end i32.const 1 drop - local.get $0 + local.get $parentPtr i32.eqz if i32.const 0 @@ -2155,37 +2155,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $childPtr i32.const 20 i32.sub - local.set $3 - local.get $3 + local.set $child + local.get $child call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $0 + local.get $parentPtr i32.const 20 i32.sub - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 call $~lib/rt/itcms/Object#get:color - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $2 + local.get $expectMultiple if - local.get $4 + local.get $var$4 call $~lib/rt/itcms/Object#makeGray else - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end else - local.get $5 + local.get $var$5 i32.const 3 i32.eq if (result i32) @@ -2196,7 +2196,7 @@ i32.const 0 end if - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end end @@ -2321,44 +2321,44 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.get $1 + (func $~lib/util/string/compareImpl (param $str1 i32) (param $index1 i32) (param $str2 i32) (param $index2 i32) (param $len i32) (result i32) + (local $ptr1 i32) + (local $ptr2 i32) + (local $var$7 i32) + (local $a i32) + (local $b i32) + local.get $str1 + local.get $index1 i32.const 1 i32.shl i32.add - local.set $5 - local.get $2 - local.get $3 + local.set $ptr1 + local.get $str2 + local.get $index2 i32.const 1 i32.shl i32.add - local.set $6 + local.set $ptr2 i32.const 0 i32.const 2 i32.lt_s drop - local.get $4 + local.get $len i32.const 4 i32.ge_u if (result i32) - local.get $5 + local.get $ptr1 i32.const 7 i32.and - local.get $6 + local.get $ptr2 i32.const 7 i32.and i32.or @@ -2369,27 +2369,27 @@ if block $do-break|0 loop $do-loop|0 - local.get $5 + local.get $ptr1 i64.load - local.get $6 + local.get $ptr2 i64.load i64.ne if br $do-break|0 end - local.get $5 + local.get $ptr1 i32.const 8 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 8 i32.add - local.set $6 - local.get $4 + local.set $ptr2 + local.get $len i32.const 4 i32.sub - local.set $4 - local.get $4 + local.set $len + local.get $len i32.const 4 i32.ge_u br_if $do-loop|0 @@ -2397,59 +2397,59 @@ end end loop $while-continue|1 - local.get $4 - local.tee $7 + local.get $len + local.tee $var$7 i32.const 1 i32.sub - local.set $4 - local.get $7 - local.set $7 - local.get $7 + local.set $len + local.get $var$7 + local.set $var$7 + local.get $var$7 if - local.get $5 + local.get $ptr1 i32.load16_u - local.set $8 - local.get $6 + local.set $a + local.get $ptr2 i32.load16_u - local.set $9 - local.get $8 - local.get $9 + local.set $b + local.get $a + local.get $b i32.ne if - local.get $8 - local.get $9 + local.get $a + local.get $b i32.sub return end - local.get $5 + local.get $ptr1 i32.const 2 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 2 i32.add - local.set $6 + local.set $ptr2 br $while-continue|1 end end i32.const 0 ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__eq (param $left i32) (param $right i32) (result i32) + (local $leftLength i32) + local.get $left + local.get $right i32.eq if i32.const 1 return end - local.get $0 + local.get $left i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $1 + local.get $right i32.const 0 i32.eq end @@ -2457,22 +2457,22 @@ i32.const 0 return end - local.get $0 + local.get $left call $~lib/string/String#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $leftLength + local.get $leftLength + local.get $right call $~lib/string/String#get:length i32.ne if i32.const 0 return end - local.get $0 + local.get $left i32.const 0 - local.get $1 + local.get $right i32.const 0 - local.get $2 + local.get $leftLength call $~lib/util/string/compareImpl i32.eqz ) diff --git a/tests/compiler/field.debug.wat b/tests/compiler/field.debug.wat index fcc7d3a9d5..d010794fc9 100644 --- a/tests/compiler/field.debug.wat +++ b/tests/compiler/field.debug.wat @@ -53,50 +53,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -109,58 +109,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -177,12 +177,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -192,19 +192,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -215,27 +215,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -243,35 +243,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -281,15 +281,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -299,25 +299,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -325,33 +325,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -379,23 +379,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -407,15 +407,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -427,33 +427,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -461,21 +461,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -490,36 +490,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -527,67 +527,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -597,22 +597,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -622,12 +622,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -639,75 +639,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -719,38 +719,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -764,12 +764,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -780,38 +780,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -819,21 +819,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -848,101 +848,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -953,7 +953,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -964,26 +964,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -996,27 +996,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1030,11 +1030,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1045,66 +1045,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1114,10 +1114,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1128,13 +1128,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1145,109 +1145,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1255,7 +1255,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1272,23 +1272,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1300,54 +1300,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1368,30 +1368,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1401,9 +1401,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1413,8 +1413,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1422,43 +1422,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1470,17 +1470,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1494,7 +1494,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1512,7 +1512,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1522,12 +1522,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1549,7 +1549,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1569,14 +1569,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1589,8 +1589,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1601,37 +1601,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1639,16 +1639,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1656,21 +1656,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1685,12 +1685,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1698,49 +1698,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1750,90 +1750,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1842,22 +1842,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1866,27 +1866,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1901,69 +1901,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1978,29 +1978,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2013,13 +2013,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2030,25 +2030,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2063,10 +2063,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2084,49 +2084,49 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32) + (local $child i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $childPtr i32.eqz if return end i32.const 1 drop - local.get $0 + local.get $parentPtr i32.eqz if i32.const 0 @@ -2136,37 +2136,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $childPtr i32.const 20 i32.sub - local.set $3 - local.get $3 + local.set $child + local.get $child call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $0 + local.get $parentPtr i32.const 20 i32.sub - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 call $~lib/rt/itcms/Object#get:color - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $2 + local.get $expectMultiple if - local.get $4 + local.get $var$4 call $~lib/rt/itcms/Object#makeGray else - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end else - local.get $5 + local.get $var$5 i32.const 3 i32.eq if (result i32) @@ -2177,7 +2177,7 @@ i32.const 0 end if - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end end @@ -2192,26 +2192,26 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/rt/__newBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - local.get $1 + (func $~lib/rt/__newBuffer (param $size i32) (param $id i32) (param $data i32) (result i32) + (local $buffer i32) + local.get $size + local.get $id call $~lib/rt/itcms/__new - local.set $3 - local.get $2 + local.set $buffer + local.get $data if - local.get $3 - local.get $2 - local.get $0 + local.get $buffer + local.get $data + local.get $size memory.copy end - local.get $3 + local.get $buffer ) - (func $field/NoStaticConflict.a (param $0 i32) + (func $field/NoStaticConflict.a (param $v i32) nop ) (func $field/testNoStaticConflict - (local $0 i32) + (local $inst i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -2223,9 +2223,9 @@ global.get $~lib/memory/__stack_pointer i32.const 0 call $field/NoStaticConflict#constructor - local.tee $0 + local.tee $inst i32.store - local.get $0 + local.get $inst call $field/NoStaticConflict.a global.get $~lib/memory/__stack_pointer i32.const 4 @@ -2233,7 +2233,7 @@ global.set $~lib/memory/__stack_pointer ) (func $~lib/rt/itcms/__collect - (local $0 i32) + (local $var$0 i32) i32.const 0 drop global.get $~lib/rt/itcms/state @@ -2244,8 +2244,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -2259,8 +2259,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -2335,49 +2335,49 @@ call $~lib/rt/itcms/__visit end ) - (func $~lib/array/Array<~lib/string/String>#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array<~lib/string/String>#__visit (param $this i32) (param $cookie i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $val i32) i32.const 1 drop - local.get $0 + local.get $this i32.load offset=4 - local.set $2 - local.get $2 - local.get $0 + local.set $var$2 + local.get $var$2 + local.get $this i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $var$2 i32.load - local.set $5 - local.get $5 + local.set $val + local.get $val if - local.get $5 - local.get $1 + local.get $val + local.get $cookie call $~lib/rt/itcms/__visit end - local.get $2 + local.get $var$2 i32.const 4 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array<~lib/string/String>~visit (param $0 i32) (param $1 i32) @@ -2385,12 +2385,12 @@ local.get $1 call $~lib/array/Array<~lib/string/String>#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) diff --git a/tests/compiler/for.debug.wat b/tests/compiler/for.debug.wat index da03fcda17..420c6f02e2 100644 --- a/tests/compiler/for.debug.wat +++ b/tests/compiler/for.debug.wat @@ -44,25 +44,25 @@ (export "memory" (memory $0)) (start $~start) (func $for/testInitExpression - (local $0 i32) - (local $1 i32) + (local $i i32) + (local $var$1 i32) i32.const 0 - local.set $0 + local.set $i loop $for-loop|0 - local.get $0 + local.get $i i32.const 10 i32.lt_s - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 if - local.get $0 + local.get $i i32.const 1 i32.add - local.set $0 + local.set $i br $for-loop|0 end end - local.get $0 + local.get $i i32.const 10 i32.eq i32.eqz @@ -78,25 +78,25 @@ global.set $for/ran ) (func $for/testInitStatement - (local $0 i32) - (local $1 i32) + (local $j i32) + (local $var$1 i32) i32.const 0 - local.set $0 + local.set $j loop $for-loop|0 - local.get $0 + local.get $j i32.const 10 i32.lt_s - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 if - local.get $0 + local.get $j i32.const 1 i32.add - local.set $0 + local.set $j br $for-loop|0 end end - local.get $0 + local.get $j i32.const 10 i32.eq i32.eqz @@ -112,26 +112,26 @@ global.set $for/ran ) (func $for/testEmpty - (local $0 i32) - (local $1 i32) + (local $i i32) + (local $var$1 i32) i32.const 10 - local.set $0 + local.set $i loop $for-loop|0 - local.get $0 + local.get $i i32.const 0 i32.gt_s - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 if nop - local.get $0 + local.get $i i32.const 1 i32.sub - local.set $0 + local.set $i br $for-loop|0 end end - local.get $0 + local.get $i i32.const 0 i32.eq i32.eqz @@ -147,31 +147,31 @@ global.set $for/ran ) (func $for/testConditionOmitted - (local $0 i32) - (local $1 i32) + (local $i i32) + (local $var$1 i32) i32.const 0 - local.set $0 + local.set $i block $for-break0 loop $for-loop|0 i32.const 1 - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 if - local.get $0 + local.get $i i32.const 10 i32.eq if br $for-break0 end - local.get $0 + local.get $i i32.const 1 i32.add - local.set $0 + local.set $i br $for-loop|0 end end end - local.get $0 + local.get $i i32.const 10 i32.eq i32.eqz @@ -187,20 +187,20 @@ global.set $for/ran ) (func $for/testAllOmitted - (local $0 i32) - (local $1 i32) + (local $i i32) + (local $var$1 i32) i32.const 10 - local.set $0 + local.set $i block $for-break0 loop $for-loop|0 i32.const 1 - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 if - local.get $0 + local.get $i i32.const 1 i32.sub - local.tee $0 + local.tee $i i32.const 0 i32.eq if @@ -210,7 +210,7 @@ end end end - local.get $0 + local.get $i i32.const 0 i32.eq i32.eqz @@ -226,20 +226,20 @@ global.set $for/ran ) (func $for/testAlwaysTrue - (local $0 i32) - (local $1 i32) + (local $i i32) + (local $var$1 i32) i32.const 0 - local.set $0 + local.set $i block $for-break0 loop $for-loop|0 i32.const 1 - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 if - local.get $0 + local.get $i i32.const 1 i32.add - local.tee $0 + local.tee $i i32.const 10 i32.eq if @@ -249,7 +249,7 @@ end end end - local.get $0 + local.get $i i32.const 10 i32.eq i32.eqz @@ -271,28 +271,28 @@ global.set $for/ran ) (func $for/testAlwaysContinues - (local $0 i32) - (local $1 i32) + (local $k i32) + (local $var$1 i32) i32.const 0 - local.set $0 + local.set $k loop $for-loop|0 - local.get $0 + local.get $k i32.const 10 i32.lt_s - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 if block $for-continue|0 br $for-continue|0 end - local.get $0 + local.get $k i32.const 1 i32.add - local.set $0 + local.set $k br $for-loop|0 end end - local.get $0 + local.get $k i32.const 10 i32.eq i32.eqz @@ -308,23 +308,23 @@ global.set $for/ran ) (func $for/testAlwaysBreaks - (local $0 i32) - (local $1 i32) + (local $k i32) + (local $var$1 i32) i32.const 0 - local.set $0 + local.set $k block $for-break0 loop $for-loop|0 - local.get $0 + local.get $k i32.const 10 i32.lt_s - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 if br $for-break0 end end end - local.get $0 + local.get $k i32.const 0 i32.eq i32.eqz @@ -340,16 +340,16 @@ global.set $for/ran ) (func $for/testAlwaysReturns - (local $0 i32) - (local $1 i32) + (local $var$0 i32) + (local $var$1 i32) i32.const 0 - local.set $0 + local.set $var$0 loop $for-loop|0 - local.get $0 + local.get $var$0 i32.const 10 i32.lt_s - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 if i32.const 1 global.set $for/ran @@ -368,68 +368,68 @@ end ) (func $for/testNestedContinue - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (local $i i32) + (local $j i32) + (local $k i32) + (local $var$3 i32) + (local $var$4 i32) i32.const 0 - local.set $0 + local.set $i i32.const 0 - local.set $1 + local.set $j i32.const 0 - local.set $2 + local.set $k loop $for-loop|0 - local.get $0 + local.get $i i32.const 10 i32.lt_s - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if block $for-continue|0 - local.get $0 + local.get $i i32.const 2 i32.lt_s if br $for-continue|0 end i32.const 0 - local.set $1 + local.set $j loop $for-loop|1 - local.get $1 + local.get $j i32.const 10 i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if block $for-continue|1 - local.get $0 - local.get $1 + local.get $i + local.get $j i32.lt_s if - local.get $2 + local.get $k i32.const 1 i32.add - local.set $2 + local.set $k br $for-continue|1 end end - local.get $1 + local.get $j i32.const 1 i32.add - local.set $1 + local.set $j br $for-loop|1 end end end - local.get $0 + local.get $i i32.const 1 i32.add - local.set $0 + local.set $i br $for-loop|0 end end - local.get $0 + local.get $i i32.const 10 i32.eq i32.eqz @@ -441,7 +441,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $j i32.const 10 i32.eq i32.eqz @@ -453,7 +453,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $k i32.const 28 i32.eq i32.eqz @@ -478,50 +478,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -534,58 +534,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -602,12 +602,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -617,19 +617,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -640,27 +640,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -668,35 +668,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -706,15 +706,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -724,25 +724,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -750,33 +750,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -804,23 +804,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -832,15 +832,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -852,33 +852,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -886,21 +886,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -915,36 +915,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -952,67 +952,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -1022,22 +1022,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -1047,12 +1047,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -1064,75 +1064,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -1144,38 +1144,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -1189,12 +1189,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -1205,38 +1205,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1244,21 +1244,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -1273,101 +1273,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -1378,7 +1378,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1389,26 +1389,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1421,27 +1421,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1455,11 +1455,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1470,66 +1470,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1539,10 +1539,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1553,13 +1553,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1570,109 +1570,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1680,7 +1680,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1697,23 +1697,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1725,54 +1725,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1793,30 +1793,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1826,9 +1826,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1838,8 +1838,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1847,43 +1847,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1895,17 +1895,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1919,7 +1919,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1937,7 +1937,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1947,12 +1947,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1974,7 +1974,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1994,14 +1994,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -2014,8 +2014,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -2026,37 +2026,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -2064,16 +2064,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -2081,21 +2081,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -2110,12 +2110,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -2123,49 +2123,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -2175,90 +2175,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -2267,22 +2267,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -2291,27 +2291,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -2326,69 +2326,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2403,29 +2403,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2438,13 +2438,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2455,25 +2455,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2488,10 +2488,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2509,41 +2509,41 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) (func $for/testRef - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $i i32) + (local $ref i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -2553,37 +2553,37 @@ i32.const 0 i32.store i32.const 0 - local.set $0 + local.set $i global.get $~lib/memory/__stack_pointer i32.const 0 call $for/Ref#constructor - local.tee $1 + local.tee $ref i32.store loop $for-loop|0 - local.get $1 - local.set $2 - local.get $2 + local.get $ref + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $i i32.const 1 i32.add - local.tee $0 + local.tee $i i32.const 10 i32.eq if i32.const 0 - local.set $1 + local.set $ref else global.get $~lib/memory/__stack_pointer i32.const 0 call $for/Ref#constructor - local.tee $1 + local.tee $ref i32.store end br $for-loop|0 end end - local.get $0 + local.get $i i32.const 10 i32.eq i32.eqz @@ -2595,7 +2595,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ref i32.eqz i32.eqz if @@ -2618,9 +2618,9 @@ call $for/Ref#constructor ) (func $for/testRefAutorelease - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $i i32) + (local $ref i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -2630,42 +2630,42 @@ i32.const 0 i32.store i32.const 0 - local.set $0 + local.set $i global.get $~lib/memory/__stack_pointer i32.const 0 call $for/Ref#constructor - local.tee $1 + local.tee $ref i32.store global.get $~lib/memory/__stack_pointer call $for/getRef - local.tee $1 + local.tee $ref i32.store block $for-break0 loop $for-loop|0 call $for/getRef - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $i i32.const 1 i32.add - local.tee $0 + local.tee $i i32.const 10 i32.eq if i32.const 0 - local.set $1 + local.set $ref br $for-break0 end global.get $~lib/memory/__stack_pointer call $for/getRef - local.tee $1 + local.tee $ref i32.store br $for-loop|0 end end end - local.get $0 + local.get $i i32.const 10 i32.eq i32.eqz @@ -2677,7 +2677,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ref i32.eqz i32.eqz if @@ -2696,7 +2696,7 @@ global.set $~lib/memory/__stack_pointer ) (func $~lib/rt/itcms/__collect - (local $0 i32) + (local $var$0 i32) i32.const 0 drop global.get $~lib/rt/itcms/state @@ -2707,8 +2707,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -2722,8 +2722,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop diff --git a/tests/compiler/function-call.debug.wat b/tests/compiler/function-call.debug.wat index 0ccc21e9d4..8b193b3864 100644 --- a/tests/compiler/function-call.debug.wat +++ b/tests/compiler/function-call.debug.wat @@ -63,18 +63,18 @@ (func $start:function-call~anonymous|1 nop ) - (func $start:function-call~anonymous|2 (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $start:function-call~anonymous|2 (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.add ) - (func $start:function-call~anonymous|3 (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $start:function-call~anonymous|3 (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.add ) - (func $start:function-call~fn2|4 (param $0 i32) (result i32) - local.get $0 + (func $start:function-call~fn2|4 (param $this i32) (result i32) + local.get $this ) (func $~lib/rt/itcms/Object#set:nextWithColor (param $0 i32) (param $1 i32) local.get $0 @@ -86,50 +86,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -142,58 +142,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -210,12 +210,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -225,19 +225,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -248,27 +248,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -276,35 +276,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -314,15 +314,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -332,25 +332,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -358,33 +358,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -412,23 +412,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -440,15 +440,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -460,33 +460,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -494,21 +494,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -523,36 +523,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -560,67 +560,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -630,22 +630,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -655,12 +655,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -672,75 +672,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -752,38 +752,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -797,12 +797,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -813,38 +813,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -852,21 +852,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -881,101 +881,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -986,7 +986,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -997,26 +997,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1029,27 +1029,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1063,11 +1063,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1078,66 +1078,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1147,10 +1147,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1161,13 +1161,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1178,109 +1178,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1288,7 +1288,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1305,23 +1305,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1333,54 +1333,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1401,30 +1401,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1434,9 +1434,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1446,8 +1446,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1455,43 +1455,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1503,17 +1503,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1527,7 +1527,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1545,7 +1545,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1555,12 +1555,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1582,7 +1582,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1602,14 +1602,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1622,8 +1622,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1634,37 +1634,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1672,16 +1672,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1689,21 +1689,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1718,12 +1718,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1731,49 +1731,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1783,90 +1783,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1875,22 +1875,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1899,27 +1899,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1934,69 +1934,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2011,29 +2011,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2046,13 +2046,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2063,25 +2063,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2096,10 +2096,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2117,46 +2117,46 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $function-call/Foo#fnVoid (param $0 i32) + (func $function-call/Foo#fnVoid (param $this i32) nop ) - (func $function-call/Foo#fnThis (param $0 i32) (result i32) - local.get $0 + (func $function-call/Foo#fnThis (param $this i32) (result i32) + local.get $this ) - (func $function-call/Foo#fnRet (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $1 - local.get $2 + (func $function-call/Foo#fnRet (param $this i32) (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.add ) (func $~lib/rt/__visit_globals (param $0 i32) @@ -2186,10 +2186,10 @@ call $~lib/rt/itcms/__visit end ) - (func $~lib/function/Function<%28%29=>void>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28%29=>void>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28%29=>void>~visit (param $0 i32) (param $1 i32) @@ -2197,10 +2197,10 @@ local.get $1 call $~lib/function/Function<%28%29=>void>#__visit ) - (func $~lib/function/Function<%28i32%2Ci32%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i32%2Ci32%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i32%2Ci32%29=>i32>~visit (param $0 i32) (param $1 i32) @@ -2208,10 +2208,10 @@ local.get $1 call $~lib/function/Function<%28i32%2Ci32%29=>i32>#__visit ) - (func $~lib/function/Function<%28this:i32%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28this:i32%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28this:i32%29=>i32>~visit (param $0 i32) (param $1 i32) @@ -2219,10 +2219,10 @@ local.get $1 call $~lib/function/Function<%28this:i32%29=>i32>#__visit ) - (func $~lib/function/Function<%28this:function-call/Foo%29=>void>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28this:function-call/Foo%29=>void>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28this:function-call/Foo%29=>void>~visit (param $0 i32) (param $1 i32) @@ -2230,10 +2230,10 @@ local.get $1 call $~lib/function/Function<%28this:function-call/Foo%29=>void>#__visit ) - (func $~lib/function/Function<%28this:function-call/Foo%2Ci32%2Ci32%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28this:function-call/Foo%2Ci32%2Ci32%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28this:function-call/Foo%2Ci32%2Ci32%29=>i32>~visit (param $0 i32) (param $1 i32) diff --git a/tests/compiler/function-expression.debug.wat b/tests/compiler/function-expression.debug.wat index 46f559163f..7b0896027e 100644 --- a/tests/compiler/function-expression.debug.wat +++ b/tests/compiler/function-expression.debug.wat @@ -69,11 +69,11 @@ (export "semanticallyAnonymous" (func $function-expression/semanticallyAnonymous)) (export "memory" (memory $0)) (start $~start) - (func $start:function-expression~anonymous|0 (param $0 i32) (result i32) - local.get $0 + (func $start:function-expression~anonymous|0 (param $a i32) (result i32) + local.get $a ) - (func $start:function-expression~anonymous|1 (param $0 i32) (result i32) - local.get $0 + (func $start:function-expression~anonymous|1 (param $a i32) (result i32) + local.get $a ) (func $start:function-expression~someName|2 nop @@ -81,41 +81,41 @@ (func $start:function-expression~anonymous|3 (result i32) i32.const 1 ) - (func $start:function-expression~anonymous|4 (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $start:function-expression~anonymous|4 (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.add ) - (func $function-expression/testOmitted (param $0 i32) (result i32) + (func $function-expression/testOmitted (param $fn i32) (result i32) i32.const 1 i32.const 2 i32.const 2 global.set $~argumentsLength - local.get $0 + local.get $fn i32.load call_indirect $0 (type $i32_i32_=>_i32) ) - (func $start:function-expression~anonymous|5 (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $start:function-expression~anonymous|5 (param $a i32) (param $$1 i32) (result i32) + local.get $a ) - (func $start:function-expression~anonymous|6 (param $0 i32) (param $1 i32) (result i32) + (func $start:function-expression~anonymous|6 (param $$0 i32) (param $$1 i32) (result i32) i32.const 42 ) - (func $function-expression/testOmittedReturn1~anonymous|0 (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $function-expression/testOmittedReturn1~anonymous|0 (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.add ) (func $function-expression/testOmittedReturn1 (result i32) i32.const 320 ) - (func $function-expression/testOmittedReturn2~anonymous|0 (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $function-expression/testOmittedReturn2~anonymous|0 (param $a i32) (param $$1 i32) (result i32) + local.get $a ) (func $function-expression/testOmittedReturn2 (result i32) i32.const 352 ) - (func $function-expression/testOmittedReturn3~anonymous|0 (param $0 i32) (param $1 i32) (result i32) + (func $function-expression/testOmittedReturn3~anonymous|0 (param $$0 i32) (param $$1 i32) (result i32) i32.const 42 ) (func $function-expression/testOmittedReturn3 (result i32) @@ -124,8 +124,8 @@ (func $function-expression/testNullable~anonymous|0 (result i32) i32.const 1 ) - (func $function-expression/testNullable (param $0 i32) (result i32) - local.get $0 + (func $function-expression/testNullable (param $b i32) (result i32) + local.get $b if i32.const 416 return @@ -135,13 +135,13 @@ end unreachable ) - (func $function-expression/testGlobal~anonymous|0~anonymous|0 (param $0 i32) (result i32) + (func $function-expression/testGlobal~anonymous|0~anonymous|0 (param $x i32) (result i32) i32.const 24 - local.get $0 + local.get $x i32.add ) (func $function-expression/testGlobal - (local $0 i32) + (local $var$0 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -159,11 +159,11 @@ global.get $function-expression/globalFunc i32.load call_indirect $0 (type $none_=>_i32) - local.tee $0 + local.tee $var$0 i32.store i32.const 1 global.set $~argumentsLength - local.get $0 + local.get $var$0 i32.load call_indirect $0 (type $i32_=>_i32) i32.const 25 @@ -182,14 +182,14 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $function-expression/testLocal~anonymous|0~anonymous|0 (param $0 i32) (result i32) + (func $function-expression/testLocal~anonymous|0~anonymous|0 (param $x i32) (result i32) i32.const 24 - local.get $0 + local.get $x i32.add ) (func $function-expression/testLocal - (local $0 i32) - (local $1 i32) + (local $localFunc i32) + (local $var$1 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -200,20 +200,20 @@ i64.store global.get $~lib/memory/__stack_pointer i32.const 544 - local.tee $0 + local.tee $localFunc i32.store i32.const 1 global.get $~lib/memory/__stack_pointer i32.const 0 global.set $~argumentsLength - local.get $0 + local.get $localFunc i32.load call_indirect $0 (type $none_=>_i32) - local.tee $1 + local.tee $var$1 i32.store offset=4 i32.const 1 global.set $~argumentsLength - local.get $1 + local.get $var$1 i32.load call_indirect $0 (type $i32_=>_i32) i32.const 25 @@ -242,50 +242,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -298,58 +298,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -366,12 +366,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -381,19 +381,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -404,27 +404,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -432,35 +432,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -470,15 +470,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -488,25 +488,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -514,33 +514,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -568,23 +568,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -596,15 +596,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -616,33 +616,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -650,21 +650,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -679,36 +679,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -716,67 +716,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -786,22 +786,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -811,12 +811,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -828,75 +828,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -908,38 +908,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -953,12 +953,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -969,38 +969,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1008,21 +1008,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -1037,101 +1037,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -1142,7 +1142,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1153,26 +1153,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1185,27 +1185,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1219,11 +1219,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1234,66 +1234,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1303,10 +1303,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1317,13 +1317,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1334,109 +1334,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1444,7 +1444,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1461,23 +1461,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1489,54 +1489,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1557,30 +1557,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1590,9 +1590,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1602,8 +1602,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1611,43 +1611,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1659,17 +1659,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1683,7 +1683,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1701,7 +1701,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1711,12 +1711,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1738,7 +1738,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1758,14 +1758,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1778,8 +1778,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1790,37 +1790,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1828,16 +1828,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1845,21 +1845,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1874,12 +1874,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1887,49 +1887,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1939,90 +1939,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -2031,22 +2031,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -2055,27 +2055,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -2090,69 +2090,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2167,29 +2167,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2202,13 +2202,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2219,25 +2219,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2252,10 +2252,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2273,49 +2273,49 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32) + (local $child i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $childPtr i32.eqz if return end i32.const 1 drop - local.get $0 + local.get $parentPtr i32.eqz if i32.const 0 @@ -2325,37 +2325,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $childPtr i32.const 20 i32.sub - local.set $3 - local.get $3 + local.set $child + local.get $child call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $0 + local.get $parentPtr i32.const 20 i32.sub - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 call $~lib/rt/itcms/Object#get:color - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $2 + local.get $expectMultiple if - local.get $4 + local.get $var$4 call $~lib/rt/itcms/Object#makeGray else - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end else - local.get $5 + local.get $var$5 i32.const 3 i32.eq if (result i32) @@ -2366,7 +2366,7 @@ i32.const 0 end if - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end end @@ -2381,19 +2381,19 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $function-expression/testField~anonymous|0~anonymous|0 (param $0 i32) (result i32) + (func $function-expression/testField~anonymous|0~anonymous|0 (param $x i32) (result i32) i32.const 24 - local.get $0 + local.get $x i32.add ) - (func $function-expression/semanticallyAnonymous~fnDecl (param $0 i32) (result i32) - local.get $0 + (func $function-expression/semanticallyAnonymous~fnDecl (param $val i32) (result i32) + local.get $val ) - (func $function-expression/semanticallyAnonymous~fnDecl|0 (param $0 i64) (result i64) - local.get $0 + (func $function-expression/semanticallyAnonymous~fnDecl|0 (param $val i64) (result i64) + local.get $val ) (func $function-expression/semanticallyAnonymous - (local $0 i32) + (local $fnDecl i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -2404,11 +2404,11 @@ i32.store global.get $~lib/memory/__stack_pointer i32.const 1040 - local.tee $0 + local.tee $fnDecl i32.store - local.get $0 + local.get $fnDecl drop - local.get $0 + local.get $fnDecl i32.const 1072 i32.ne i32.eqz @@ -2445,10 +2445,10 @@ call $~lib/rt/itcms/__visit end ) - (func $~lib/function/Function<%28i32%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i32%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i32%29=>i32>~visit (param $0 i32) (param $1 i32) @@ -2456,10 +2456,10 @@ local.get $1 call $~lib/function/Function<%28i32%29=>i32>#__visit ) - (func $~lib/function/Function<%28%29=>void>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28%29=>void>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28%29=>void>~visit (param $0 i32) (param $1 i32) @@ -2467,10 +2467,10 @@ local.get $1 call $~lib/function/Function<%28%29=>void>#__visit ) - (func $~lib/function/Function<%28%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28%29=>i32>~visit (param $0 i32) (param $1 i32) @@ -2478,10 +2478,10 @@ local.get $1 call $~lib/function/Function<%28%29=>i32>#__visit ) - (func $~lib/function/Function<%28i32%2Ci32%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i32%2Ci32%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i32%2Ci32%29=>i32>~visit (param $0 i32) (param $1 i32) @@ -2489,10 +2489,10 @@ local.get $1 call $~lib/function/Function<%28i32%2Ci32%29=>i32>#__visit ) - (func $~lib/function/Function<%28%29=>%28i32%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28%29=>%28i32%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28%29=>%28i32%29=>i32>~visit (param $0 i32) (param $1 i32) @@ -2511,10 +2511,10 @@ call $~lib/rt/itcms/__visit end ) - (func $~lib/function/Function<%28i64%29=>i64>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i64%29=>i64>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i64%29=>i64>~visit (param $0 i32) (param $1 i32) diff --git a/tests/compiler/function-inline-regressions.debug.wat b/tests/compiler/function-inline-regressions.debug.wat index acd2654201..40c6fdd6fd 100644 --- a/tests/compiler/function-inline-regressions.debug.wat +++ b/tests/compiler/function-inline-regressions.debug.wat @@ -14,17 +14,17 @@ (export "baz" (func $function-inline-regressions/baz)) (export "foo" (func $function-inline-regressions/foo)) (export "memory" (memory $0)) - (func $function-inline-regressions/baz (param $0 i32) - local.get $0 + (func $function-inline-regressions/baz (param $v i32) + local.get $v if unreachable end ) - (func $function-inline-regressions/loadX (param $0 i32) (param $1 i32) (result i32) + (func $function-inline-regressions/loadX (param $a i32) (param $b i32) (result i32) i32.const 2 - local.get $0 + local.get $a i32.mul - local.get $1 + local.get $b i32.add i32.load ) @@ -47,35 +47,35 @@ local.get $1 i32.store offset=8 ) - (func $function-inline-regressions/foo (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $function-inline-regressions/foo (param $v0 i32) (param $v1 i32) (param $v2 i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $v0 i32.const 0 call $function-inline-regressions/loadX - local.set $3 - local.get $0 + local.set $var$3 + local.get $v0 i32.const 1 call $function-inline-regressions/loadX - local.set $4 + local.set $var$4 call $function-inline-regressions/loadZ - local.set $5 - local.get $5 - local.get $3 + local.set $var$5 + local.get $var$5 + local.get $var$3 i32.add - local.get $4 + local.get $var$4 i32.add call $function-inline-regressions/baz global.get $function-inline-regressions/struct - local.get $0 + local.get $v0 call $function-inline-regressions/Struct#set:v0 global.get $function-inline-regressions/struct - local.get $1 + local.get $v1 call $function-inline-regressions/Struct#set:v1 global.get $function-inline-regressions/struct - local.get $2 + local.get $v2 call $function-inline-regressions/Struct#set:v2 - local.get $5 + local.get $var$5 ) ) diff --git a/tests/compiler/function-types.debug.wat b/tests/compiler/function-types.debug.wat index 11b90a8006..eac4cdfcfa 100644 --- a/tests/compiler/function-types.debug.wat +++ b/tests/compiler/function-types.debug.wat @@ -23,59 +23,59 @@ (elem $0 (i32.const 1) $function-types/makeAdder~anonymous|0 $function-types/makeAdder~anonymous|0 $function-types/makeAdder~anonymous|0 $function-types/addI32) (export "memory" (memory $0)) (start $~start) - (func $function-types/makeAdder~anonymous|0 (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $function-types/makeAdder~anonymous|0 (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.add ) (func $function-types/makeAdder (result i32) i32.const 32 ) - (func $function-types/makeAdder~anonymous|0 (param $0 i64) (param $1 i64) (result i64) - local.get $0 - local.get $1 + (func $function-types/makeAdder~anonymous|0 (param $a i64) (param $b i64) (result i64) + local.get $a + local.get $b i64.add ) (func $function-types/makeAdder (result i32) i32.const 128 ) - (func $function-types/makeAdder~anonymous|0 (param $0 f64) (param $1 f64) (result f64) - local.get $0 - local.get $1 + (func $function-types/makeAdder~anonymous|0 (param $a f64) (param $b f64) (result f64) + local.get $a + local.get $b f64.add ) (func $function-types/makeAdder (result i32) i32.const 160 ) - (func $function-types/doAddWithFn (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $1 + (func $function-types/doAddWithFn (param $a i32) (param $b i32) (param $fn i32) (result i32) + local.get $a + local.get $b i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $fn i32.load call_indirect $0 (type $i32_i32_=>_i32) ) - (func $function-types/doAdd (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $function-types/doAdd (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.const 2 global.set $~argumentsLength call $function-types/makeAdder i32.load call_indirect $0 (type $i32_i32_=>_i32) ) - (func $function-types/addI32 (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $function-types/addI32 (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.add ) - (func $function-types/makeAndAdd (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $1 + (func $function-types/makeAndAdd (param $a i32) (param $b i32) (param $adder i32) (result i32) + local.get $a + local.get $b i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $adder i32.load call_indirect $0 (type $i32_i32_=>_i32) ) diff --git a/tests/compiler/getter-call.debug.wat b/tests/compiler/getter-call.debug.wat index e941fca060..b0cd79c802 100644 --- a/tests/compiler/getter-call.debug.wat +++ b/tests/compiler/getter-call.debug.wat @@ -54,50 +54,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -110,58 +110,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -178,12 +178,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -193,19 +193,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -216,27 +216,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -244,35 +244,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -282,15 +282,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -300,25 +300,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -326,33 +326,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -380,23 +380,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -408,15 +408,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -428,33 +428,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -462,21 +462,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -491,36 +491,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -528,67 +528,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -598,22 +598,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -623,12 +623,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -640,75 +640,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -720,38 +720,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -765,12 +765,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -781,38 +781,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -820,21 +820,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -849,101 +849,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -954,7 +954,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -965,26 +965,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -997,27 +997,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1031,11 +1031,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1046,66 +1046,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1115,10 +1115,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1129,13 +1129,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1146,109 +1146,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1256,7 +1256,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1273,23 +1273,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1301,54 +1301,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1369,30 +1369,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1402,9 +1402,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1414,8 +1414,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1423,43 +1423,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1471,17 +1471,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1495,7 +1495,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1513,7 +1513,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1523,12 +1523,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1550,7 +1550,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1570,14 +1570,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1590,8 +1590,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1602,37 +1602,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1640,16 +1640,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1657,21 +1657,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1686,12 +1686,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1699,49 +1699,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1751,90 +1751,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1843,22 +1843,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1867,27 +1867,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1902,69 +1902,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1979,29 +1979,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2014,13 +2014,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2031,25 +2031,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2064,10 +2064,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2085,41 +2085,41 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) (func $getter-call/C#get:x~anonymous|0 (result i32) i32.const 42 ) - (func $getter-call/C#get:x (param $0 i32) (result i32) + (func $getter-call/C#get:x (param $this i32) (result i32) i32.const 432 ) (func $~lib/rt/__visit_globals (param $0 i32) @@ -2142,10 +2142,10 @@ call $~lib/rt/itcms/__visit end ) - (func $~lib/function/Function<%28%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28%29=>i32>~visit (param $0 i32) (param $1 i32) diff --git a/tests/compiler/getter-setter.debug.wat b/tests/compiler/getter-setter.debug.wat index 1e0613aef7..e31d8cf5d3 100644 --- a/tests/compiler/getter-setter.debug.wat +++ b/tests/compiler/getter-setter.debug.wat @@ -17,8 +17,8 @@ (func $getter-setter/Foo.get:bar (result i32) global.get $getter-setter/Foo._bar ) - (func $getter-setter/Foo.set:bar (param $0 i32) - local.get $0 + (func $getter-setter/Foo.set:bar (param $bar i32) + local.get $bar global.set $getter-setter/Foo._bar ) (func $start:getter-setter diff --git a/tests/compiler/heap.debug.wat b/tests/compiler/heap.debug.wat index 74f69fcfba..1a71ded96e 100644 --- a/tests/compiler/heap.debug.wat +++ b/tests/compiler/heap.debug.wat @@ -41,23 +41,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -69,15 +69,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -89,33 +89,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -123,21 +123,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -152,36 +152,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -189,67 +189,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -259,22 +259,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -284,12 +284,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -301,75 +301,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -381,38 +381,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -426,12 +426,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -442,38 +442,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -481,21 +481,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -510,101 +510,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -615,7 +615,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -626,26 +626,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -658,27 +658,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -692,11 +692,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -707,66 +707,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -776,10 +776,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -790,13 +790,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -807,106 +807,106 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -919,8 +919,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -931,37 +931,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -969,16 +969,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -986,21 +986,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1015,12 +1015,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1028,49 +1028,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1080,90 +1080,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1172,22 +1172,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1196,27 +1196,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1231,69 +1231,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1308,29 +1308,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -1343,13 +1343,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -1360,44 +1360,44 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add ) - (func $~lib/memory/heap.alloc (param $0 i32) (result i32) - local.get $0 + (func $~lib/memory/heap.alloc (param $size i32) (result i32) + local.get $size call $~lib/rt/tlsf/__alloc ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1405,7 +1405,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1422,175 +1422,175 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/moveBlock (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - local.get $2 + (func $~lib/rt/tlsf/moveBlock (param $root i32) (param $block i32) (param $newSize i32) (result i32) + (local $newBlock i32) + local.get $root + local.get $newSize call $~lib/rt/tlsf/allocateBlock - local.set $3 - local.get $3 + local.set $newBlock + local.get $newBlock i32.const 4 i32.add - local.get $1 + local.get $block i32.const 4 i32.add - local.get $1 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and memory.copy - local.get $1 + local.get $block global.get $~lib/memory/__heap_base i32.ge_u if i32.const 0 drop - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/freeBlock end - local.get $3 + local.get $newBlock ) - (func $~lib/rt/tlsf/reallocateBlock (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $2 + (func $~lib/rt/tlsf/reallocateBlock (param $root i32) (param $block i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $blockInfo i32) + (local $blockSize i32) + (local $var$6 i32) + (local $right i32) + (local $rightInfo i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $3 - local.get $1 + local.set $payloadSize + local.get $block i32.load - local.set $4 - local.get $4 + local.set $blockInfo + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $5 - local.get $3 - local.get $5 + local.set $blockSize + local.get $payloadSize + local.get $blockSize i32.le_u if - local.get $0 - local.get $1 - local.get $3 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $1 + local.get $block return end - local.get $1 - local.set $6 - local.get $6 + local.get $block + local.set $var$6 + local.get $var$6 i32.const 4 i32.add - local.get $6 + local.get $var$6 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $7 - local.get $7 + local.set $right + local.get $right i32.load - local.set $8 - local.get $8 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $5 + local.get $blockSize i32.const 4 i32.add - local.get $8 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $6 - local.get $6 - local.get $3 + local.set $var$6 + local.get $var$6 + local.get $payloadSize i32.ge_u if - local.get $0 - local.get $7 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $4 + local.get $block + local.get $blockInfo i32.const 3 i32.and - local.get $6 + local.get $var$6 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 - local.get $3 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $1 + local.get $block return end end - local.get $0 - local.get $1 - local.get $2 + local.get $root + local.get $block + local.get $size call $~lib/rt/tlsf/moveBlock ) - (func $~lib/rt/tlsf/__realloc (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__realloc (param $ptr i32) (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end - local.get $0 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if (result i32) global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock - local.get $1 + local.get $size call $~lib/rt/tlsf/moveBlock else global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock - local.get $1 + local.get $size call $~lib/rt/tlsf/reallocateBlock end i32.const 4 i32.add ) - (func $~lib/memory/heap.realloc (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/memory/heap.realloc (param $ptr i32) (param $size i32) (result i32) + local.get $ptr + local.get $size call $~lib/rt/tlsf/__realloc ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1602,12 +1602,12 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/memory/heap.free (param $0 i32) - local.get $0 + (func $~lib/memory/heap.free (param $ptr i32) + local.get $ptr call $~lib/rt/tlsf/__free ) (func $start:heap diff --git a/tests/compiler/if.debug.wat b/tests/compiler/if.debug.wat index e6d428dab6..050457159f 100644 --- a/tests/compiler/if.debug.wat +++ b/tests/compiler/if.debug.wat @@ -17,8 +17,8 @@ (export "ifAlwaysReturns" (func $if/ifAlwaysReturns)) (export "memory" (memory $0)) (start $~start) - (func $if/ifThenElse (param $0 i32) (result i32) - local.get $0 + (func $if/ifThenElse (param $n i32) (result i32) + local.get $n if i32.const 1 return @@ -28,16 +28,16 @@ end unreachable ) - (func $if/ifThen (param $0 i32) (result i32) - local.get $0 + (func $if/ifThen (param $n i32) (result i32) + local.get $n if i32.const 1 return end i32.const 0 ) - (func $if/ifThenElseBlock (param $0 i32) (result i32) - local.get $0 + (func $if/ifThenElseBlock (param $n i32) (result i32) + local.get $n if i32.const 1 return @@ -127,8 +127,8 @@ unreachable end ) - (func $if/ifAlwaysReturns (param $0 i32) (result i32) - local.get $0 + (func $if/ifAlwaysReturns (param $n i32) (result i32) + local.get $n if i32.const 1 return diff --git a/tests/compiler/import.debug.wat b/tests/compiler/import.debug.wat index 0ce08c467d..2889d2cd21 100644 --- a/tests/compiler/import.debug.wat +++ b/tests/compiler/import.debug.wat @@ -12,19 +12,19 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (start $~start) - (func $export/add (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $export/add (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.add ) - (func $export/sub (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $export/sub (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.sub ) - (func $export/mul (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $export/mul (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.mul ) (func $export/ns.two diff --git a/tests/compiler/infer-array.debug.wat b/tests/compiler/infer-array.debug.wat index 5dada730df..4a0fbd7038 100644 --- a/tests/compiler/infer-array.debug.wat +++ b/tests/compiler/infer-array.debug.wat @@ -70,50 +70,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -126,58 +126,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -194,12 +194,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -209,19 +209,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -232,27 +232,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -260,35 +260,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -298,15 +298,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -316,25 +316,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -342,33 +342,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -396,23 +396,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -424,15 +424,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -444,33 +444,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -478,21 +478,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -507,36 +507,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -544,67 +544,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -614,22 +614,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -639,12 +639,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -656,75 +656,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -736,38 +736,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -781,12 +781,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -797,38 +797,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -836,21 +836,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -865,101 +865,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -970,7 +970,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -981,26 +981,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1013,27 +1013,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1047,11 +1047,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1062,66 +1062,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1131,10 +1131,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1145,13 +1145,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1162,109 +1162,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1272,7 +1272,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1289,23 +1289,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1317,54 +1317,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1385,30 +1385,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1418,9 +1418,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1430,8 +1430,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1439,43 +1439,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1487,17 +1487,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1511,7 +1511,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1529,7 +1529,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1539,12 +1539,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1566,7 +1566,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1586,14 +1586,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1606,8 +1606,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1616,39 +1616,39 @@ i32.const 458 i32.const 29 call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/tlsf/computeSize - ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + unreachable + end + local.get $size + call $~lib/rt/tlsf/computeSize + ) + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1656,16 +1656,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1673,21 +1673,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1702,12 +1702,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1715,49 +1715,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1767,90 +1767,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1859,22 +1859,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1883,27 +1883,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1918,69 +1918,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1995,29 +1995,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2030,13 +2030,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2047,25 +2047,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2080,10 +2080,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2101,64 +2101,64 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/rt/__newBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - local.get $1 + (func $~lib/rt/__newBuffer (param $size i32) (param $id i32) (param $data i32) (result i32) + (local $buffer i32) + local.get $size + local.get $id call $~lib/rt/itcms/__new - local.set $3 - local.get $2 + local.set $buffer + local.get $data if - local.get $3 - local.get $2 - local.get $0 + local.get $buffer + local.get $data + local.get $size memory.copy end - local.get $3 + local.get $buffer ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32) + (local $child i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $childPtr i32.eqz if return end i32.const 1 drop - local.get $0 + local.get $parentPtr i32.eqz if i32.const 0 @@ -2168,37 +2168,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $childPtr i32.const 20 i32.sub - local.set $3 - local.get $3 + local.set $child + local.get $child call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $0 + local.get $parentPtr i32.const 20 i32.sub - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 call $~lib/rt/itcms/Object#get:color - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $2 + local.get $expectMultiple if - local.get $4 + local.get $var$4 call $~lib/rt/itcms/Object#makeGray else - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end else - local.get $5 + local.get $var$5 i32.const 3 i32.eq if (result i32) @@ -2209,16 +2209,16 @@ i32.const 0 end if - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end end end ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i32) + (local $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -2229,22 +2229,22 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add i32.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result f64) - (local $2 f64) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result f64) + (local $value f64) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -2255,22 +2255,22 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add f64.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i32) + (local $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -2281,22 +2281,22 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add i32.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result f32) - (local $2 f32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result f32) + (local $value f32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -2307,38 +2307,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add f32.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store i32.const 1 drop - local.get $0 - local.get $2 + local.get $this + local.get $value i32.const 1 call $~lib/rt/itcms/__link ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i32) + (local $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -2349,40 +2349,40 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add i32.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) - (func $~lib/array/Array<~lib/array/Array>#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array<~lib/array/Array>#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store i32.const 1 drop - local.get $0 - local.get $2 + local.get $this + local.get $value i32.const 1 call $~lib/rt/itcms/__link ) (func $start:infer-array - (local $0 i32) - (local $1 i32) - (local $2 f32) - (local $3 i32) - (local $4 i32) + (local $var$0 i32) + (local $var$1 i32) + (local $var$2 f32) + (local $var$3 i32) + (local $var$4 i32) global.get $~lib/memory/__stack_pointer i32.const 16 i32.sub @@ -2417,9 +2417,9 @@ i32.const 3 i32.const 32 call $~lib/rt/__newArray - local.tee $1 + local.tee $var$1 i32.store - local.get $1 + local.get $var$1 i32.const 0 call $~lib/array/Array#__get drop @@ -2433,7 +2433,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i32.const 0 call $~lib/array/Array#__get drop @@ -2453,9 +2453,9 @@ i32.const 4 i32.const 560 call $~lib/rt/__newArray - local.tee $0 + local.tee $var$0 i32.store offset=4 - local.get $0 + local.get $var$0 i32.const 0 call $~lib/array/Array#__get drop @@ -2475,9 +2475,9 @@ i32.const 5 i32.const 608 call $~lib/rt/__newArray - local.tee $1 + local.tee $var$1 i32.store - local.get $1 + local.get $var$1 i32.const 0 call $~lib/array/Array#__get drop @@ -2491,7 +2491,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i32.const 0 call $~lib/array/Array#__get drop @@ -2506,7 +2506,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i32.const 1 call $~lib/array/Array#__get i32.const -1 @@ -2526,9 +2526,9 @@ i32.const 4 i32.const 640 call $~lib/rt/__newArray - local.tee $0 + local.tee $var$0 i32.store offset=4 - local.get $0 + local.get $var$0 i32.const 0 call $~lib/array/Array#__get drop @@ -2548,9 +2548,9 @@ i32.const 6 i32.const 688 call $~lib/rt/__newArray - local.tee $1 + local.tee $var$1 i32.store - local.get $1 + local.get $var$1 i32.const 0 call $~lib/array/Array#__get drop @@ -2564,19 +2564,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i32.const 1 call $~lib/array/Array#__get - local.set $2 + local.set $var$2 global.get $~lib/memory/__stack_pointer i32.const 0 call $infer-array/Ref#constructor - local.tee $1 + local.tee $var$1 i32.store global.get $~lib/memory/__stack_pointer i32.const 0 call $infer-array/Ref#constructor - local.tee $0 + local.tee $var$0 i32.store offset=4 global.get $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer @@ -2585,25 +2585,25 @@ i32.const 8 i32.const 0 call $~lib/rt/__newArray - local.tee $3 + local.tee $var$3 i32.store offset=8 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $var$3 i32.load offset=4 - local.tee $4 + local.tee $var$4 i32.store offset=12 - local.get $3 + local.get $var$3 i32.const 0 - local.get $1 + local.get $var$1 call $~lib/array/Array#__uset - local.get $3 + local.get $var$3 i32.const 1 - local.get $0 + local.get $var$0 call $~lib/array/Array#__uset - local.get $3 - local.tee $4 + local.get $var$3 + local.tee $var$4 i32.store offset=12 - local.get $4 + local.get $var$4 i32.const 0 call $~lib/array/Array#__get drop @@ -2620,12 +2620,12 @@ global.get $~lib/memory/__stack_pointer i32.const 0 call $infer-array/Ref#constructor - local.tee $4 + local.tee $var$4 i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 0 call $infer-array/Ref#constructor - local.tee $0 + local.tee $var$0 i32.store offset=4 global.get $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer @@ -2634,25 +2634,25 @@ i32.const 8 i32.const 0 call $~lib/rt/__newArray - local.tee $1 + local.tee $var$1 i32.store global.get $~lib/memory/__stack_pointer - local.get $1 + local.get $var$1 i32.load offset=4 - local.tee $3 + local.tee $var$3 i32.store offset=8 - local.get $1 + local.get $var$1 i32.const 0 - local.get $4 + local.get $var$4 call $~lib/array/Array#__uset - local.get $1 + local.get $var$1 i32.const 1 - local.get $0 + local.get $var$0 call $~lib/array/Array#__uset - local.get $1 - local.tee $3 + local.get $var$1 + local.tee $var$3 i32.store offset=8 - local.get $3 + local.get $var$3 i32.const 1 call $~lib/array/Array#__get drop @@ -2669,7 +2669,7 @@ global.get $~lib/memory/__stack_pointer i32.const 0 call $infer-array/Ref#constructor - local.tee $3 + local.tee $var$3 i32.store offset=8 global.get $~lib/memory/__stack_pointer global.get $~lib/memory/__stack_pointer @@ -2678,25 +2678,25 @@ i32.const 8 i32.const 0 call $~lib/rt/__newArray - local.tee $0 + local.tee $var$0 i32.store offset=4 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $var$0 i32.load offset=4 - local.tee $4 + local.tee $var$4 i32.store offset=12 - local.get $0 + local.get $var$0 i32.const 0 - local.get $3 + local.get $var$3 call $~lib/array/Array#__uset - local.get $0 + local.get $var$0 i32.const 1 i32.const 0 call $~lib/array/Array#__uset - local.get $0 - local.tee $4 + local.get $var$0 + local.tee $var$4 i32.store offset=12 - local.get $4 + local.get $var$4 i32.const 0 call $~lib/array/Array#__get drop @@ -2716,9 +2716,9 @@ i32.const 9 i32.const 752 call $~lib/rt/__newArray - local.tee $3 + local.tee $var$3 i32.store offset=8 - local.get $3 + local.get $var$3 i32.const 0 call $~lib/array/Array<~lib/string/String|null>#__get drop @@ -2738,9 +2738,9 @@ i32.const 10 i32.const 784 call $~lib/rt/__newArray - local.tee $4 + local.tee $var$4 i32.store offset=12 - local.get $4 + local.get $var$4 i32.const 0 call $~lib/array/Array#__get drop @@ -2754,7 +2754,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $var$4 i32.const 0 call $~lib/array/Array#__get drop @@ -2775,9 +2775,9 @@ i32.const 10 i32.const 816 call $~lib/rt/__newArray - local.tee $0 + local.tee $var$0 i32.store offset=4 - local.get $0 + local.get $var$0 i32.const 0 call $~lib/array/Array#__get drop @@ -2791,7 +2791,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $var$0 i32.const 0 call $~lib/array/Array#__get drop @@ -2812,9 +2812,9 @@ i32.const 3 i32.const 848 call $~lib/rt/__newArray - local.tee $4 + local.tee $var$4 i32.store offset=12 - local.get $4 + local.get $var$4 i32.const 0 call $~lib/array/Array#__get drop @@ -2828,7 +2828,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $var$4 i32.const 0 call $~lib/array/Array#__get drop @@ -2849,9 +2849,9 @@ i32.const 3 i32.const 880 call $~lib/rt/__newArray - local.tee $3 + local.tee $var$3 i32.store offset=8 - local.get $3 + local.get $var$3 i32.const 0 call $~lib/array/Array#__get drop @@ -2865,7 +2865,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $var$3 i32.const 0 call $~lib/array/Array#__get drop @@ -2887,14 +2887,14 @@ i32.const 11 i32.const 0 call $~lib/rt/__newArray - local.tee $3 + local.tee $var$3 i32.store offset=8 global.get $~lib/memory/__stack_pointer - local.get $3 + local.get $var$3 i32.load offset=4 - local.tee $4 + local.tee $var$4 i32.store offset=12 - local.get $3 + local.get $var$3 i32.const 0 i32.const 1 i32.const 2 @@ -2902,7 +2902,7 @@ i32.const 912 call $~lib/rt/__newArray call $~lib/array/Array<~lib/array/Array>#__uset - local.get $3 + local.get $var$3 i32.const 1 i32.const 1 i32.const 2 @@ -2910,10 +2910,10 @@ i32.const 944 call $~lib/rt/__newArray call $~lib/array/Array<~lib/array/Array>#__uset - local.get $3 - local.tee $4 + local.get $var$3 + local.tee $var$4 i32.store offset=12 - local.get $4 + local.get $var$4 i32.const 0 call $~lib/array/Array<~lib/array/Array>#__get drop @@ -2958,12 +2958,12 @@ call $~lib/rt/itcms/__visit end ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -2971,12 +2971,12 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -2984,12 +2984,12 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -2997,12 +2997,12 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -3010,49 +3010,49 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $val i32) i32.const 1 drop - local.get $0 + local.get $this i32.load offset=4 - local.set $2 - local.get $2 - local.get $0 + local.set $var$2 + local.get $var$2 + local.get $this i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $var$2 i32.load - local.set $5 - local.get $5 + local.set $val + local.get $val if - local.get $5 - local.get $1 + local.get $val + local.get $cookie call $~lib/rt/itcms/__visit end - local.get $2 + local.get $var$2 i32.const 4 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -3060,49 +3060,49 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array<~lib/string/String|null>#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array<~lib/string/String|null>#__visit (param $this i32) (param $cookie i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $val i32) i32.const 1 drop - local.get $0 + local.get $this i32.load offset=4 - local.set $2 - local.get $2 - local.get $0 + local.set $var$2 + local.get $var$2 + local.get $this i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $var$2 i32.load - local.set $5 - local.get $5 + local.set $val + local.get $val if - local.get $5 - local.get $1 + local.get $val + local.get $cookie call $~lib/rt/itcms/__visit end - local.get $2 + local.get $var$2 i32.const 4 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array<~lib/string/String|null>~visit (param $0 i32) (param $1 i32) @@ -3110,12 +3110,12 @@ local.get $1 call $~lib/array/Array<~lib/string/String|null>#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -3123,49 +3123,49 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array<~lib/array/Array>#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array<~lib/array/Array>#__visit (param $this i32) (param $cookie i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $val i32) i32.const 1 drop - local.get $0 + local.get $this i32.load offset=4 - local.set $2 - local.get $2 - local.get $0 + local.set $var$2 + local.get $var$2 + local.get $this i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $var$2 i32.load - local.set $5 - local.get $5 + local.set $val + local.get $val if - local.get $5 - local.get $1 + local.get $val + local.get $cookie call $~lib/rt/itcms/__visit end - local.get $2 + local.get $var$2 i32.const 4 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array<~lib/array/Array>~visit (param $0 i32) (param $1 i32) diff --git a/tests/compiler/infer-generic.debug.wat b/tests/compiler/infer-generic.debug.wat index 1a6006328e..831cbdc183 100644 --- a/tests/compiler/infer-generic.debug.wat +++ b/tests/compiler/infer-generic.debug.wat @@ -55,76 +55,76 @@ (export "test4" (func $export:infer-generic/test4)) (export "inferAssert" (func $export:infer-generic/inferAssert)) (start $~start) - (func $infer-generic/inferCompatible (param $0 f64) (param $1 f64) (result i32) - local.get $0 - local.get $1 + (func $infer-generic/inferCompatible (param $a f64) (param $b f64) (result i32) + local.get $a + local.get $b f64.eq ) - (func $start:infer-generic~anonymous|0 (param $0 i32) (param $1 f32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 + (func $start:infer-generic~anonymous|0 (param $acc i32) (param $cur f32) (param $$2 i32) (param $$3 i32) (result i32) + local.get $acc if (result i32) - local.get $1 + local.get $cur f32.const 0 f32.ne else i32.const 0 end ) - (func $~lib/array/Array#reduce (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $2 - local.set $3 + (func $~lib/array/Array#reduce (param $this i32) (param $fn i32) (param $initialValue i32) (result i32) + (local $acc i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + local.get $initialValue + local.set $acc i32.const 0 - local.set $4 - local.get $0 + local.set $var$4 + local.get $this i32.load offset=12 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $4 - local.get $5 - local.tee $6 - local.get $0 + local.get $var$4 + local.get $var$5 + local.tee $var$6 + local.get $this i32.load offset=12 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_s select i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $3 - local.get $0 + local.get $acc + local.get $this i32.load offset=4 - local.get $4 + local.get $var$4 i32.const 2 i32.shl i32.add f32.load - local.get $4 - local.get $0 + local.get $var$4 + local.get $this i32.const 4 global.set $~argumentsLength - local.get $1 + local.get $fn i32.load call_indirect $0 (type $i32_f32_i32_i32_=>_i32) - local.set $3 - local.get $4 + local.set $acc + local.get $var$4 i32.const 1 i32.add - local.set $4 + local.set $var$4 br $for-loop|0 end end - local.get $3 + local.get $acc ) - (func $infer-generic/inferDefault (param $0 i32) (result i32) - local.get $0 + (func $infer-generic/inferDefault (param $a i32) (result i32) + local.get $a ) (func $infer-generic/Ref#set:x (param $0 i32) (param $1 i32) local.get $0 @@ -141,50 +141,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -197,58 +197,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -265,12 +265,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -280,19 +280,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -303,27 +303,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -331,35 +331,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -369,15 +369,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -387,25 +387,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -413,33 +413,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -467,23 +467,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -495,15 +495,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -515,33 +515,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -549,21 +549,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -578,36 +578,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -615,67 +615,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -685,22 +685,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -710,12 +710,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -727,75 +727,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -807,38 +807,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -852,12 +852,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -868,38 +868,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -907,21 +907,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -936,101 +936,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -1041,7 +1041,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1052,26 +1052,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1084,27 +1084,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1118,11 +1118,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1133,66 +1133,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1202,10 +1202,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1216,13 +1216,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1233,109 +1233,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1343,7 +1343,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1360,23 +1360,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1388,54 +1388,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1456,30 +1456,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1489,9 +1489,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1501,8 +1501,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1510,43 +1510,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1558,17 +1558,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1582,7 +1582,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1600,7 +1600,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1610,12 +1610,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1637,7 +1637,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1657,14 +1657,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1677,8 +1677,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1689,37 +1689,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1727,16 +1727,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1744,21 +1744,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1773,12 +1773,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1786,49 +1786,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1838,90 +1838,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1930,22 +1930,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1954,27 +1954,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1989,69 +1989,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2066,29 +2066,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2101,13 +2101,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2118,25 +2118,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2151,10 +2151,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2172,72 +2172,72 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $infer-generic/inferDefault (param $0 i32) (result i32) - local.get $0 + (func $infer-generic/inferDefault (param $a i32) (result i32) + local.get $a ) - (func $infer-generic/inferPlain (param $0 f32) (result f32) - local.get $0 + (func $infer-generic/inferPlain (param $arr f32) (result f32) + local.get $arr ) - (func $infer-generic/test1 (param $0 f32) (result f32) - local.get $0 + (func $infer-generic/test1 (param $arr f32) (result f32) + local.get $arr call $infer-generic/inferPlain ) - (func $infer-generic/inferEncapsulatedClass (param $0 i32) (result i32) - local.get $0 + (func $infer-generic/inferEncapsulatedClass (param $arr i32) (result i32) + local.get $arr ) - (func $infer-generic/test2 (param $0 i32) (result i32) - local.get $0 + (func $infer-generic/test2 (param $arr i32) (result i32) + local.get $arr call $infer-generic/inferEncapsulatedClass ) - (func $infer-generic/inferEncapsulatedFunction (param $0 i32) (result i32) - local.get $0 + (func $infer-generic/inferEncapsulatedFunction (param $fn i32) (result i32) + local.get $fn ) - (func $infer-generic/test3 (param $0 i32) (result i32) - local.get $0 + (func $infer-generic/test3 (param $fn i32) (result i32) + local.get $fn call $infer-generic/inferEncapsulatedFunction ) - (func $infer-generic/inferEncapsulatedFunctionMixed (param $0 i32) (result i32) - local.get $0 + (func $infer-generic/inferEncapsulatedFunctionMixed (param $fn i32) (result i32) + local.get $fn ) - (func $infer-generic/test4 (param $0 i32) (result i32) - local.get $0 + (func $infer-generic/test4 (param $fn i32) (result i32) + local.get $fn call $infer-generic/inferEncapsulatedFunctionMixed ) - (func $infer-generic/inferAssert (param $0 i32) - (local $1 i32) - local.get $0 - local.tee $1 + (func $infer-generic/inferAssert (param $v i32) + (local $var$1 i32) + local.get $v + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -2247,7 +2247,7 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end i32.load drop @@ -2279,12 +2279,12 @@ call $~lib/rt/itcms/__visit end ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -2292,10 +2292,10 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/function/Function<%28bool%2Cf32%2Ci32%2C~lib/array/Array%29=>bool>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28bool%2Cf32%2Ci32%2C~lib/array/Array%29=>bool>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28bool%2Cf32%2Ci32%2C~lib/array/Array%29=>bool>~visit (param $0 i32) (param $1 i32) @@ -2303,10 +2303,10 @@ local.get $1 call $~lib/function/Function<%28bool%2Cf32%2Ci32%2C~lib/array/Array%29=>bool>#__visit ) - (func $~lib/function/Function<%28f32%29=>f64>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28f32%29=>f64>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28f32%29=>f64>~visit (param $0 i32) (param $1 i32) @@ -2314,10 +2314,10 @@ local.get $1 call $~lib/function/Function<%28f32%29=>f64>#__visit ) - (func $~lib/function/Function<%28f32%2Ci32%29=>f64>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28f32%2Ci32%29=>f64>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28f32%2Ci32%29=>f64>~visit (param $0 i32) (param $1 i32) diff --git a/tests/compiler/infer-type.debug.wat b/tests/compiler/infer-type.debug.wat index 5ee9dd8483..4833b3d5b7 100644 --- a/tests/compiler/infer-type.debug.wat +++ b/tests/compiler/infer-type.debug.wat @@ -22,24 +22,24 @@ (export "memory" (memory $0)) (start $~start) (func $infer-type/locals - (local $0 i32) - (local $1 i64) - (local $2 f64) - (local $3 i32) - (local $4 i64) - (local $5 f64) + (local $li i32) + (local $lI i64) + (local $lF f64) + (local $ai i32) + (local $aI i64) + (local $aF f64) i32.const 10 - local.set $0 + local.set $li i64.const 4294967296 - local.set $1 + local.set $lI f64.const 1.5 - local.set $2 + local.set $lF global.get $infer-type/i - local.set $3 + local.set $ai global.get $infer-type/I - local.set $4 + local.set $aI global.get $infer-type/F - local.set $5 + local.set $aF ) (func $infer-type/reti (result i32) i32.const 0 @@ -54,9 +54,9 @@ f64.const 0 ) (func $start:infer-type - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $a i32) + (local $b i32) + (local $var$2 i32) global.get $infer-type/i drop global.get $infer-type/I @@ -81,20 +81,20 @@ global.get $infer-type/rF drop i32.const 0 - local.set $0 + local.set $a i32.const 10 - local.set $1 + local.set $b loop $for-loop|0 - local.get $0 - local.get $1 + local.get $a + local.get $b i32.lt_s - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $a i32.const 1 i32.add - local.set $0 + local.set $a br $for-loop|0 end end diff --git a/tests/compiler/inlining-blocklocals.debug.wat b/tests/compiler/inlining-blocklocals.debug.wat index 590bcf10db..53f42fcd55 100644 --- a/tests/compiler/inlining-blocklocals.debug.wat +++ b/tests/compiler/inlining-blocklocals.debug.wat @@ -16,36 +16,36 @@ (export "memory" (memory $0)) (start $~start) (func $inlining-blocklocals/test - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + (local $a i32) + (local $var$1 i32) + (local $var$2 i32) + (local $var$3 i32) i32.const 1 - local.set $0 - local.get $0 - local.tee $1 + local.set $a + local.get $a + local.tee $var$1 i32.const 1 i32.add - local.set $0 - local.get $1 - local.set $3 + local.set $a + local.get $var$1 + local.set $var$3 global.get $inlining-blocklocals/b - local.tee $1 + local.tee $var$1 i32.const 1 i32.add global.set $inlining-blocklocals/b - local.get $1 - local.set $2 - local.get $0 + local.get $var$1 + local.set $var$2 + local.get $a i32.const 1 i32.add - local.tee $0 - local.set $1 - local.get $3 + local.tee $a + local.set $var$1 + local.get $var$3 global.set $inlining-blocklocals/theCall_a - local.get $2 + local.get $var$2 global.set $inlining-blocklocals/theCall_b - local.get $1 + local.get $var$1 global.set $inlining-blocklocals/theCall_c global.get $inlining-blocklocals/theCall_a i32.const 1 @@ -83,7 +83,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $a i32.const 3 i32.eq i32.eqz diff --git a/tests/compiler/inlining.debug.wat b/tests/compiler/inlining.debug.wat index 103b4d59d6..978460ac1b 100644 --- a/tests/compiler/inlining.debug.wat +++ b/tests/compiler/inlining.debug.wat @@ -51,18 +51,18 @@ i32.const 2 i32.add ) - (func $inlining/func_fe~anonymous|0 (param $0 i32) (result i32) - local.get $0 + (func $inlining/func_fe~anonymous|0 (param $a i32) (result i32) + local.get $a ) (func $inlining/test_funcs - (local $0 f32) - (local $1 f64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (local $a f32) + (local $b f64) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $foo i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -72,20 +72,20 @@ i32.const 0 i32.store f32.const -1 - local.set $0 + local.set $a f64.const -2 - local.set $1 + local.set $b block $inlining/func_ii|inlined.0 (result i32) i32.const 42 - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const 42 i32.eq if i32.const 1 br $inlining/func_ii|inlined.0 end - local.get $2 + local.get $var$2 i32.const 42 i32.lt_s if (result i32) @@ -99,15 +99,15 @@ drop block $inlining/func_ii|inlined.1 (result i32) i32.const 41 - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const 42 i32.eq if i32.const 1 br $inlining/func_ii|inlined.1 end - local.get $2 + local.get $var$2 i32.const 42 i32.lt_s if (result i32) @@ -121,15 +121,15 @@ drop block $inlining/func_ii|inlined.2 (result i32) i32.const 43 - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const 42 i32.eq if i32.const 1 br $inlining/func_ii|inlined.2 end - local.get $2 + local.get $var$2 i32.const 42 i32.lt_s if (result i32) @@ -142,55 +142,55 @@ i32.eq drop i32.const 0 - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const 0 i32.eq drop i32.const 1 - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const 1 i32.eq drop i32.const 2 - local.set $2 - local.get $2 - local.set $3 + local.set $var$2 + local.get $var$2 + local.set $var$3 i32.const 1 drop - local.get $3 - local.set $5 - local.get $5 - local.set $6 - local.get $6 + local.get $var$3 + local.set $var$5 + local.get $var$5 + local.set $var$6 + local.get $var$6 i32.const 1 i32.add - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 i32.const 3 i32.eq drop i32.const 3 - local.set $5 - local.get $5 - local.set $4 + local.set $var$5 + local.get $var$5 + local.set $var$4 i32.const 1 drop - local.get $4 - local.set $2 - local.get $2 - local.set $6 - local.get $6 + local.get $var$4 + local.set $var$2 + local.get $var$2 + local.set $var$6 + local.get $var$6 i32.const 1 i32.add - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const 4 i32.eq drop i32.const 0 - local.set $2 + local.set $var$2 i32.const 2 i32.const 1 global.set $~argumentsLength @@ -209,26 +209,26 @@ unreachable end i32.const 42 - local.set $6 + local.set $var$6 i32.const 2 - local.set $2 - local.get $6 - local.get $2 + local.set $var$2 + local.get $var$6 + local.get $var$2 i32.add i32.const 44 i32.eq drop global.get $~lib/memory/__stack_pointer i32.const 123 - local.tee $7 + local.tee $foo i32.store - local.get $7 - local.set $4 + local.get $foo + local.set $var$4 i32.const 43 - local.set $5 + local.set $var$5 i32.const 3 - local.set $2 - local.get $4 + local.set $var$2 + local.get $var$4 i32.const 123 i32.eq i32.eqz @@ -260,50 +260,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -316,58 +316,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -384,12 +384,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -399,19 +399,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -422,27 +422,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -450,35 +450,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -488,15 +488,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -506,25 +506,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -532,33 +532,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -586,23 +586,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -614,15 +614,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -634,33 +634,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -668,21 +668,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -697,36 +697,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -734,67 +734,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -804,22 +804,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -829,12 +829,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -846,75 +846,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -926,38 +926,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -971,12 +971,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -987,38 +987,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1026,21 +1026,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -1055,101 +1055,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -1160,7 +1160,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1171,26 +1171,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1203,27 +1203,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1237,11 +1237,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1252,66 +1252,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1321,10 +1321,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1335,13 +1335,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1352,109 +1352,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1462,7 +1462,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1479,23 +1479,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1507,54 +1507,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1575,30 +1575,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1608,9 +1608,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1620,8 +1620,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1629,43 +1629,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1677,17 +1677,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1701,7 +1701,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1719,7 +1719,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1729,12 +1729,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1756,7 +1756,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1776,14 +1776,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1796,8 +1796,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1808,37 +1808,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1846,16 +1846,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1863,21 +1863,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1892,12 +1892,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1905,49 +1905,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1957,90 +1957,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -2049,22 +2049,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -2073,27 +2073,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -2108,69 +2108,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2185,29 +2185,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2220,13 +2220,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2237,25 +2237,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2270,10 +2270,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2291,36 +2291,36 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) (func $inlining/Baz#set:a (param $0 i32) (param $1 i32) local.get $0 @@ -2338,11 +2338,11 @@ i32.store offset=8 ) (func $inlining/test_ctor - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (local $var$0 i32) + (local $var$1 i32) + (local $var$2 i32) + (local $var$3 i32) + (local $bar i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -2356,59 +2356,59 @@ i32.store offset=8 global.get $~lib/memory/__stack_pointer i32.const 0 - local.set $1 + local.set $var$1 i32.const 4 - local.set $0 - local.get $1 + local.set $var$0 + local.get $var$1 i32.eqz if global.get $~lib/memory/__stack_pointer i32.const 16 i32.const 5 call $~lib/rt/itcms/__new - local.tee $1 + local.tee $var$1 i32.store end - local.get $1 + local.get $var$1 i32.const 3 call $inlining/Bar#set:d - local.get $1 + local.get $var$1 i32.const 0 call $inlining/Bar#set:e global.get $~lib/memory/__stack_pointer - local.get $1 - local.set $3 + local.get $var$1 + local.set $var$3 i32.const 2 - local.set $2 - local.get $3 + local.set $var$2 + local.get $var$3 i32.eqz if global.get $~lib/memory/__stack_pointer i32.const 8 i32.const 6 call $~lib/rt/itcms/__new - local.tee $3 + local.tee $var$3 i32.store offset=4 end - local.get $3 + local.get $var$3 i32.const 1 call $inlining/Baz#set:a - local.get $3 + local.get $var$3 i32.const 0 call $inlining/Baz#set:b - local.get $3 - local.get $2 + local.get $var$3 + local.get $var$2 call $inlining/Baz#set:b - local.get $3 - local.tee $1 + local.get $var$3 + local.tee $var$1 i32.store - local.get $1 - local.get $0 + local.get $var$1 + local.get $var$0 call $inlining/Bar#set:e - local.get $1 - local.tee $4 + local.get $var$1 + local.tee $bar i32.store offset=8 - local.get $4 + local.get $bar i32.load i32.const 1 i32.eq @@ -2421,7 +2421,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $bar i32.load offset=4 i32.const 2 i32.eq @@ -2434,7 +2434,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $bar i32.load offset=8 i32.const 3 i32.eq @@ -2447,7 +2447,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $bar i32.load offset=12 i32.const 4 i32.eq @@ -2518,10 +2518,10 @@ call $~lib/rt/itcms/__visit end ) - (func $~lib/function/Function<%28i32%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i32%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i32%29=>i32>~visit (param $0 i32) (param $1 i32) diff --git a/tests/compiler/instanceof-class.debug.wat b/tests/compiler/instanceof-class.debug.wat index faa6b531f2..b50069c408 100644 --- a/tests/compiler/instanceof-class.debug.wat +++ b/tests/compiler/instanceof-class.debug.wat @@ -54,50 +54,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -110,58 +110,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -178,12 +178,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -193,19 +193,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -216,27 +216,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -244,35 +244,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -282,15 +282,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -300,25 +300,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -326,33 +326,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -380,23 +380,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -408,15 +408,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -428,33 +428,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -462,21 +462,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -491,36 +491,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -528,67 +528,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -598,22 +598,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -623,12 +623,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -640,75 +640,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -720,38 +720,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -765,12 +765,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -781,38 +781,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -820,21 +820,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -849,101 +849,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -954,7 +954,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -965,26 +965,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -997,27 +997,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1031,11 +1031,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1046,66 +1046,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1115,10 +1115,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1129,13 +1129,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1146,109 +1146,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1256,7 +1256,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1273,23 +1273,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1301,54 +1301,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1369,30 +1369,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1402,9 +1402,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1414,8 +1414,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1423,43 +1423,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1471,17 +1471,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1495,7 +1495,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1513,7 +1513,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1523,12 +1523,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1550,7 +1550,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1570,14 +1570,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1590,8 +1590,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1602,37 +1602,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1640,16 +1640,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1657,21 +1657,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1686,12 +1686,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1699,49 +1699,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1751,90 +1751,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1843,22 +1843,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1867,27 +1867,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1902,69 +1902,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1979,29 +1979,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2014,13 +2014,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2031,25 +2031,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2064,10 +2064,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2085,36 +2085,36 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) (func $start:instanceof-class memory.size @@ -2164,38 +2164,38 @@ i32.eqz drop ) - (func $~lib/rt/__instanceof (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/__instanceof (param $ptr i32) (param $classId i32) (result i32) + (local $id i32) + (local $rttiBase i32) + local.get $ptr i32.const 20 i32.sub i32.load offset=12 - local.set $2 + local.set $id global.get $~lib/rt/__rtti_base - local.set $3 - local.get $2 - local.get $3 + local.set $rttiBase + local.get $id + local.get $rttiBase i32.load i32.le_u if loop $do-loop|0 - local.get $2 - local.get $1 + local.get $id + local.get $classId i32.eq if i32.const 1 return end - local.get $3 + local.get $rttiBase i32.const 4 i32.add - local.get $2 + local.get $id i32.const 8 i32.mul i32.add i32.load offset=4 - local.tee $2 + local.tee $id br_if $do-loop|0 end end diff --git a/tests/compiler/instanceof.debug.wat b/tests/compiler/instanceof.debug.wat index 53dc5efda5..e38e428462 100644 --- a/tests/compiler/instanceof.debug.wat +++ b/tests/compiler/instanceof.debug.wat @@ -20,25 +20,25 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (start $~start) - (func $instanceof/isI32 (param $0 i32) (result i32) + (func $instanceof/isI32 (param $v i32) (result i32) i32.const 1 drop i32.const 1 return ) - (func $instanceof/isI32 (param $0 f64) (result i32) + (func $instanceof/isI32 (param $v f64) (result i32) i32.const 0 drop i32.const 0 return ) - (func $instanceof/isI32 (param $0 i32) (result i32) + (func $instanceof/isI32 (param $v i32) (result i32) i32.const 0 drop i32.const 0 return ) - (func $instanceof/isI32 (param $0 i32) (result i32) + (func $instanceof/isI32 (param $v i32) (result i32) i32.const 0 drop i32.const 0 diff --git a/tests/compiler/issues/1095.debug.wat b/tests/compiler/issues/1095.debug.wat index a2ca43b0cd..17d9a7d4ac 100644 --- a/tests/compiler/issues/1095.debug.wat +++ b/tests/compiler/issues/1095.debug.wat @@ -54,50 +54,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -110,58 +110,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -178,12 +178,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -193,19 +193,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -216,27 +216,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -244,35 +244,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -282,15 +282,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -300,25 +300,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -326,33 +326,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -380,23 +380,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -408,15 +408,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -428,33 +428,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -462,21 +462,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -491,36 +491,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -528,67 +528,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -598,22 +598,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -623,12 +623,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -640,75 +640,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -720,38 +720,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -765,12 +765,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -781,38 +781,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -820,21 +820,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -849,101 +849,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -954,7 +954,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -965,26 +965,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -997,27 +997,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1031,11 +1031,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1046,66 +1046,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1115,10 +1115,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1129,13 +1129,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1146,109 +1146,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1256,7 +1256,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1273,23 +1273,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1301,54 +1301,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1369,30 +1369,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1402,9 +1402,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1414,8 +1414,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1423,43 +1423,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1471,17 +1471,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1495,7 +1495,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1513,7 +1513,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1523,12 +1523,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1550,7 +1550,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1570,14 +1570,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1590,8 +1590,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1602,37 +1602,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1640,16 +1640,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1657,21 +1657,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1686,12 +1686,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1699,49 +1699,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1751,90 +1751,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1843,22 +1843,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1867,27 +1867,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1902,69 +1902,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1979,29 +1979,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2014,13 +2014,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2031,25 +2031,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2064,10 +2064,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2085,49 +2085,49 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32) + (local $child i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $childPtr i32.eqz if return end i32.const 1 drop - local.get $0 + local.get $parentPtr i32.eqz if i32.const 0 @@ -2137,37 +2137,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $childPtr i32.const 20 i32.sub - local.set $3 - local.get $3 + local.set $child + local.get $child call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $0 + local.get $parentPtr i32.const 20 i32.sub - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 call $~lib/rt/itcms/Object#get:color - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $2 + local.get $expectMultiple if - local.get $4 + local.get $var$4 call $~lib/rt/itcms/Object#makeGray else - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end else - local.get $5 + local.get $var$5 i32.const 3 i32.eq if (result i32) @@ -2178,7 +2178,7 @@ i32.const 0 end if - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end end @@ -2193,8 +2193,8 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $issues/1095/test (param $0 i32) - (local $1 i32) + (func $issues/1095/test (param $foo i32) + (local $var$1 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -2203,15 +2203,15 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store - local.get $0 + local.get $foo global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $foo i32.load - local.tee $1 + local.tee $var$1 i32.store - local.get $1 + local.get $var$1 if (result i32) - local.get $1 + local.get $var$1 else i32.const 464 i32.const 528 diff --git a/tests/compiler/issues/1225.debug.wat b/tests/compiler/issues/1225.debug.wat index 1868f557a7..9c4e6d98ab 100644 --- a/tests/compiler/issues/1225.debug.wat +++ b/tests/compiler/issues/1225.debug.wat @@ -65,50 +65,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -121,58 +121,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -189,12 +189,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -204,19 +204,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -227,27 +227,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -255,35 +255,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -293,15 +293,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -311,25 +311,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -337,33 +337,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -391,23 +391,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -419,15 +419,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -439,33 +439,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -473,21 +473,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -502,36 +502,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -539,67 +539,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -609,22 +609,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -634,12 +634,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -651,75 +651,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -731,38 +731,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -776,12 +776,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -792,38 +792,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -831,21 +831,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -860,101 +860,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -965,7 +965,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -976,26 +976,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1008,27 +1008,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1042,11 +1042,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1057,66 +1057,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1126,10 +1126,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1140,13 +1140,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1157,109 +1157,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1267,7 +1267,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1284,23 +1284,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1312,54 +1312,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1380,30 +1380,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1413,9 +1413,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1425,8 +1425,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1434,43 +1434,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1482,17 +1482,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1506,7 +1506,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1524,7 +1524,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1534,12 +1534,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1561,7 +1561,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1581,14 +1581,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1601,8 +1601,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1613,37 +1613,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1651,16 +1651,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1668,21 +1668,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1697,12 +1697,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1710,49 +1710,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1762,90 +1762,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1854,22 +1854,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1878,27 +1878,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1913,69 +1913,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1990,29 +1990,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2025,13 +2025,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2042,25 +2042,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2075,10 +2075,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2096,36 +2096,36 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) (func $issues/1225/X#set:x (param $0 i32) (param $1 i32) local.get $0 @@ -2141,7 +2141,7 @@ i32.load offset=4 ) (func $~lib/rt/itcms/__collect - (local $0 i32) + (local $var$0 i32) i32.const 0 drop global.get $~lib/rt/itcms/state @@ -2152,8 +2152,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -2167,8 +2167,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop diff --git a/tests/compiler/issues/1699.debug.wat b/tests/compiler/issues/1699.debug.wat index 93ecd89896..4f18ede6a2 100644 --- a/tests/compiler/issues/1699.debug.wat +++ b/tests/compiler/issues/1699.debug.wat @@ -56,50 +56,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -112,58 +112,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -180,12 +180,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -195,19 +195,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -218,27 +218,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -246,35 +246,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -284,15 +284,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -302,25 +302,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -328,33 +328,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -382,23 +382,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -410,15 +410,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -430,33 +430,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -464,21 +464,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -493,36 +493,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -530,67 +530,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -600,22 +600,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -625,12 +625,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -642,75 +642,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -722,38 +722,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -767,12 +767,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -783,38 +783,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -822,21 +822,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -851,101 +851,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -956,7 +956,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -967,26 +967,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -999,27 +999,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1033,11 +1033,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1048,66 +1048,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1117,10 +1117,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1131,13 +1131,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1148,109 +1148,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1258,7 +1258,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1275,23 +1275,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1303,54 +1303,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1371,30 +1371,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1404,9 +1404,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1416,8 +1416,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1425,43 +1425,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1473,17 +1473,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1497,7 +1497,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1515,7 +1515,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1525,12 +1525,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1552,7 +1552,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1572,14 +1572,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1592,8 +1592,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1604,37 +1604,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1642,16 +1642,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1659,21 +1659,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1688,12 +1688,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1701,49 +1701,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1753,90 +1753,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1845,22 +1845,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1869,27 +1869,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1904,69 +1904,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1981,29 +1981,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2016,13 +2016,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2033,25 +2033,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2066,10 +2066,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2087,49 +2087,49 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32) + (local $child i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $childPtr i32.eqz if return end i32.const 1 drop - local.get $0 + local.get $parentPtr i32.eqz if i32.const 0 @@ -2139,37 +2139,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $childPtr i32.const 20 i32.sub - local.set $3 - local.get $3 + local.set $child + local.get $child call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $0 + local.get $parentPtr i32.const 20 i32.sub - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 call $~lib/rt/itcms/Object#get:color - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $2 + local.get $expectMultiple if - local.get $4 + local.get $var$4 call $~lib/rt/itcms/Object#makeGray else - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end else - local.get $5 + local.get $var$5 i32.const 3 i32.eq if (result i32) @@ -2180,7 +2180,7 @@ i32.const 0 end if - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end end @@ -2215,17 +2215,17 @@ local.get $1 i32.store ) - (func $~lib/rt/itcms/__renew (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/rt/itcms/__renew (param $oldPtr i32) (param $size i32) (result i32) + (local $oldObj i32) + (local $newPtr i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $oldPtr i32.const 20 i32.sub - local.set $2 - local.get $1 - local.get $2 + local.set $oldObj + local.get $size + local.get $oldObj i32.load i32.const 3 i32.const -1 @@ -2235,49 +2235,49 @@ i32.sub i32.le_u if - local.get $2 - local.get $1 + local.get $oldObj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $0 + local.get $oldPtr return end - local.get $1 - local.get $2 + local.get $size + local.get $oldObj i32.load offset=12 call $~lib/rt/itcms/__new - local.set $3 - local.get $3 - local.get $0 - local.get $1 - local.tee $4 - local.get $2 + local.set $newPtr + local.get $newPtr + local.get $oldPtr + local.get $size + local.tee $var$4 + local.get $oldObj i32.load offset=16 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.lt_u select memory.copy - local.get $3 + local.get $newPtr ) - (func $~lib/array/ensureCapacity (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $0 + (func $~lib/array/ensureCapacity (param $array i32) (param $newSize i32) (param $alignLog2 i32) (param $canGrow i32) + (local $oldCapacity i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $array i32.load offset=8 - local.set $4 - local.get $1 - local.get $4 - local.get $2 + local.set $oldCapacity + local.get $newSize + local.get $oldCapacity + local.get $alignLog2 i32.shr_u i32.gt_u if - local.get $1 + local.get $newSize i32.const 1073741820 - local.get $2 + local.get $alignLog2 i32.shr_u i32.gt_u if @@ -2288,92 +2288,92 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.load - local.set $5 - local.get $1 - local.tee $6 + local.set $var$5 + local.get $newSize + local.tee $var$6 i32.const 8 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.gt_u select - local.get $2 + local.get $alignLog2 i32.shl - local.set $6 - local.get $3 + local.set $var$6 + local.get $canGrow if - local.get $4 + local.get $oldCapacity i32.const 1 i32.shl - local.tee $7 + local.tee $var$7 i32.const 1073741820 - local.tee $8 - local.get $7 - local.get $8 + local.tee $var$8 + local.get $var$7 + local.get $var$8 i32.lt_u select - local.tee $8 - local.get $6 - local.tee $7 - local.get $8 - local.get $7 + local.tee $var$8 + local.get $var$6 + local.tee $var$7 + local.get $var$8 + local.get $var$7 i32.gt_u select - local.set $6 + local.set $var$6 end - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 call $~lib/rt/itcms/__renew - local.set $8 + local.set $var$8 i32.const 2 global.get $~lib/shared/runtime/Runtime.Incremental i32.ne drop - local.get $8 - local.get $5 + local.get $var$8 + local.get $var$5 i32.ne if - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.store - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.store offset=4 - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.const 0 call $~lib/rt/itcms/__link end - local.get $0 - local.get $6 + local.get $array + local.get $var$6 i32.store offset=8 end ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store i32.const 1 drop - local.get $0 - local.get $2 + local.get $this + local.get $value i32.const 1 call $~lib/rt/itcms/__link ) - (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__set (param $this i32) (param $index i32) (param $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if - local.get $1 + local.get $index i32.const 0 i32.lt_s if @@ -2384,26 +2384,26 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $this + local.get $index i32.const 1 i32.add i32.const 2 i32.const 1 call $~lib/array/ensureCapacity - local.get $0 - local.get $1 + local.get $this + local.get $index i32.const 1 i32.add call $~lib/array/Array#set:length_ end - local.get $0 - local.get $1 - local.get $2 + local.get $this + local.get $index + local.get $value call $~lib/array/Array#__uset ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) (func $start:issues/1699 @@ -2452,49 +2452,49 @@ call $~lib/rt/itcms/__visit end ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $val i32) i32.const 1 drop - local.get $0 + local.get $this i32.load offset=4 - local.set $2 - local.get $2 - local.get $0 + local.set $var$2 + local.get $var$2 + local.get $this i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $var$2 i32.load - local.set $5 - local.get $5 + local.set $val + local.get $val if - local.get $5 - local.get $1 + local.get $val + local.get $cookie call $~lib/rt/itcms/__visit end - local.get $2 + local.get $var$2 i32.const 4 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) diff --git a/tests/compiler/issues/1714.debug.wat b/tests/compiler/issues/1714.debug.wat index 79f87c9299..b5dadfd2a8 100644 --- a/tests/compiler/issues/1714.debug.wat +++ b/tests/compiler/issues/1714.debug.wat @@ -41,44 +41,44 @@ call $issues/1714/bar return ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.get $1 + (func $~lib/util/string/compareImpl (param $str1 i32) (param $index1 i32) (param $str2 i32) (param $index2 i32) (param $len i32) (result i32) + (local $ptr1 i32) + (local $ptr2 i32) + (local $var$7 i32) + (local $a i32) + (local $b i32) + local.get $str1 + local.get $index1 i32.const 1 i32.shl i32.add - local.set $5 - local.get $2 - local.get $3 + local.set $ptr1 + local.get $str2 + local.get $index2 i32.const 1 i32.shl i32.add - local.set $6 + local.set $ptr2 i32.const 0 i32.const 2 i32.lt_s drop - local.get $4 + local.get $len i32.const 4 i32.ge_u if (result i32) - local.get $5 + local.get $ptr1 i32.const 7 i32.and - local.get $6 + local.get $ptr2 i32.const 7 i32.and i32.or @@ -89,27 +89,27 @@ if block $do-break|0 loop $do-loop|0 - local.get $5 + local.get $ptr1 i64.load - local.get $6 + local.get $ptr2 i64.load i64.ne if br $do-break|0 end - local.get $5 + local.get $ptr1 i32.const 8 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 8 i32.add - local.set $6 - local.get $4 + local.set $ptr2 + local.get $len i32.const 4 i32.sub - local.set $4 - local.get $4 + local.set $len + local.get $len i32.const 4 i32.ge_u br_if $do-loop|0 @@ -117,59 +117,59 @@ end end loop $while-continue|1 - local.get $4 - local.tee $7 + local.get $len + local.tee $var$7 i32.const 1 i32.sub - local.set $4 - local.get $7 - local.set $7 - local.get $7 + local.set $len + local.get $var$7 + local.set $var$7 + local.get $var$7 if - local.get $5 + local.get $ptr1 i32.load16_u - local.set $8 - local.get $6 + local.set $a + local.get $ptr2 i32.load16_u - local.set $9 - local.get $8 - local.get $9 + local.set $b + local.get $a + local.get $b i32.ne if - local.get $8 - local.get $9 + local.get $a + local.get $b i32.sub return end - local.get $5 + local.get $ptr1 i32.const 2 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 2 i32.add - local.set $6 + local.set $ptr2 br $while-continue|1 end end i32.const 0 ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__eq (param $left i32) (param $right i32) (result i32) + (local $leftLength i32) + local.get $left + local.get $right i32.eq if i32.const 1 return end - local.get $0 + local.get $left i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $1 + local.get $right i32.const 0 i32.eq end @@ -177,22 +177,22 @@ i32.const 0 return end - local.get $0 + local.get $left call $~lib/string/String#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $leftLength + local.get $leftLength + local.get $right call $~lib/string/String#get:length i32.ne if i32.const 0 return end - local.get $0 + local.get $left i32.const 0 - local.get $1 + local.get $right i32.const 0 - local.get $2 + local.get $leftLength call $~lib/util/string/compareImpl i32.eqz ) diff --git a/tests/compiler/issues/2166.debug.wat b/tests/compiler/issues/2166.debug.wat index 541b04286e..d5806c7b4a 100644 --- a/tests/compiler/issues/2166.debug.wat +++ b/tests/compiler/issues/2166.debug.wat @@ -58,50 +58,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -114,58 +114,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -182,12 +182,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -197,19 +197,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -220,27 +220,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -248,35 +248,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -286,15 +286,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -304,25 +304,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -330,33 +330,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -384,23 +384,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -412,15 +412,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -432,33 +432,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -466,21 +466,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -495,36 +495,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -532,67 +532,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -602,22 +602,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -627,12 +627,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -644,75 +644,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -724,38 +724,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -769,12 +769,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -785,38 +785,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -824,21 +824,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -853,101 +853,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -958,7 +958,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -969,26 +969,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1001,27 +1001,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1035,11 +1035,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1050,66 +1050,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1119,10 +1119,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1133,13 +1133,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1150,109 +1150,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1260,7 +1260,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1277,23 +1277,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1305,54 +1305,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1373,30 +1373,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1406,9 +1406,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1418,8 +1418,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1427,43 +1427,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1475,17 +1475,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1499,7 +1499,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1517,7 +1517,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1527,12 +1527,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1554,7 +1554,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1574,14 +1574,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1594,8 +1594,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1606,37 +1606,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1644,16 +1644,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1661,21 +1661,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1690,12 +1690,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1703,49 +1703,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1755,90 +1755,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1847,22 +1847,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1871,27 +1871,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1906,69 +1906,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1983,29 +1983,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2018,13 +2018,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2035,25 +2035,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2068,10 +2068,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2089,75 +2089,75 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.get $1 + (func $~lib/util/string/compareImpl (param $str1 i32) (param $index1 i32) (param $str2 i32) (param $index2 i32) (param $len i32) (result i32) + (local $ptr1 i32) + (local $ptr2 i32) + (local $var$7 i32) + (local $a i32) + (local $b i32) + local.get $str1 + local.get $index1 i32.const 1 i32.shl i32.add - local.set $5 - local.get $2 - local.get $3 + local.set $ptr1 + local.get $str2 + local.get $index2 i32.const 1 i32.shl i32.add - local.set $6 + local.set $ptr2 i32.const 0 i32.const 2 i32.lt_s drop - local.get $4 + local.get $len i32.const 4 i32.ge_u if (result i32) - local.get $5 + local.get $ptr1 i32.const 7 i32.and - local.get $6 + local.get $ptr2 i32.const 7 i32.and i32.or @@ -2168,27 +2168,27 @@ if block $do-break|0 loop $do-loop|0 - local.get $5 + local.get $ptr1 i64.load - local.get $6 + local.get $ptr2 i64.load i64.ne if br $do-break|0 end - local.get $5 + local.get $ptr1 i32.const 8 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 8 i32.add - local.set $6 - local.get $4 + local.set $ptr2 + local.get $len i32.const 4 i32.sub - local.set $4 - local.get $4 + local.set $len + local.get $len i32.const 4 i32.ge_u br_if $do-loop|0 @@ -2196,59 +2196,59 @@ end end loop $while-continue|1 - local.get $4 - local.tee $7 + local.get $len + local.tee $var$7 i32.const 1 i32.sub - local.set $4 - local.get $7 - local.set $7 - local.get $7 + local.set $len + local.get $var$7 + local.set $var$7 + local.get $var$7 if - local.get $5 + local.get $ptr1 i32.load16_u - local.set $8 - local.get $6 + local.set $a + local.get $ptr2 i32.load16_u - local.set $9 - local.get $8 - local.get $9 + local.set $b + local.get $a + local.get $b i32.ne if - local.get $8 - local.get $9 + local.get $a + local.get $b i32.sub return end - local.get $5 + local.get $ptr1 i32.const 2 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 2 i32.add - local.set $6 + local.set $ptr2 br $while-continue|1 end end i32.const 0 ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__eq (param $left i32) (param $right i32) (result i32) + (local $leftLength i32) + local.get $left + local.get $right i32.eq if i32.const 1 return end - local.get $0 + local.get $left i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $1 + local.get $right i32.const 0 i32.eq end @@ -2256,22 +2256,22 @@ i32.const 0 return end - local.get $0 + local.get $left call $~lib/string/String#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $leftLength + local.get $leftLength + local.get $right call $~lib/string/String#get:length i32.ne if i32.const 0 return end - local.get $0 + local.get $left i32.const 0 - local.get $1 + local.get $right i32.const 0 - local.get $2 + local.get $leftLength call $~lib/util/string/compareImpl i32.eqz ) diff --git a/tests/compiler/issues/2322/index.debug.wat b/tests/compiler/issues/2322/index.debug.wat index 598fdee71f..d49addc4eb 100644 --- a/tests/compiler/issues/2322/index.debug.wat +++ b/tests/compiler/issues/2322/index.debug.wat @@ -52,50 +52,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -108,58 +108,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -176,12 +176,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -191,19 +191,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -214,27 +214,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -242,35 +242,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -280,15 +280,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -298,25 +298,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -324,33 +324,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -378,23 +378,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -406,15 +406,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -426,33 +426,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -460,21 +460,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -489,36 +489,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -526,67 +526,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -596,22 +596,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -621,12 +621,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -638,75 +638,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -718,38 +718,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -763,12 +763,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -779,38 +779,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -818,21 +818,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -847,101 +847,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -952,7 +952,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -963,26 +963,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -995,27 +995,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1029,11 +1029,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1044,66 +1044,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1113,10 +1113,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1127,13 +1127,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1144,109 +1144,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1254,7 +1254,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1271,23 +1271,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1299,54 +1299,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1367,30 +1367,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1400,9 +1400,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1412,8 +1412,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1421,43 +1421,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1469,17 +1469,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1493,7 +1493,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1511,7 +1511,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1521,12 +1521,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1548,7 +1548,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1568,14 +1568,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1588,8 +1588,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1600,37 +1600,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1638,16 +1638,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1655,21 +1655,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1684,12 +1684,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1697,49 +1697,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1749,90 +1749,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1841,22 +1841,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1865,27 +1865,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1900,69 +1900,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1977,29 +1977,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2012,13 +2012,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2029,25 +2029,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2062,10 +2062,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2083,43 +2083,43 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) (func $issues/2322/lib/Wrapper#set:v (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $issues/2322/lib/test (param $0 i32) + (func $issues/2322/lib/test (param $t i32) nop ) (func $~lib/rt/__visit_globals (param $0 i32) diff --git a/tests/compiler/logical.debug.wat b/tests/compiler/logical.debug.wat index 814ee9df13..49e33f28a0 100644 --- a/tests/compiler/logical.debug.wat +++ b/tests/compiler/logical.debug.wat @@ -47,24 +47,24 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (start $~start) - (func $logical/testShortcutAnd (param $0 i64) (param $1 i32) (result i32) - local.get $0 + (func $logical/testShortcutAnd (param $a i64) (param $b i32) (result i32) + local.get $a i64.const 0 i64.ne if (result i32) - local.get $1 + local.get $b else i32.const 0 end ) - (func $logical/testShortcutOr (param $0 i64) (param $1 i32) (result i32) - local.get $0 + (func $logical/testShortcutOr (param $a i64) (param $b i32) (result i32) + local.get $a i64.const 0 i64.ne if (result i32) i32.const 1 else - local.get $1 + local.get $b end ) (func $~lib/rt/itcms/Object#set:nextWithColor (param $0 i32) (param $1 i32) @@ -77,50 +77,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -133,58 +133,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -201,12 +201,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -216,19 +216,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -239,27 +239,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -267,35 +267,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -305,15 +305,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -323,25 +323,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -349,33 +349,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -403,23 +403,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -431,15 +431,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -451,33 +451,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -485,21 +485,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -514,36 +514,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -551,67 +551,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -621,22 +621,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -646,12 +646,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -663,75 +663,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -743,38 +743,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -788,12 +788,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -804,38 +804,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -843,21 +843,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -872,101 +872,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -977,7 +977,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -988,26 +988,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1020,27 +1020,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1054,11 +1054,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1069,66 +1069,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1138,10 +1138,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1152,13 +1152,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1169,109 +1169,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1279,7 +1279,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1296,23 +1296,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1324,54 +1324,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1392,30 +1392,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1425,9 +1425,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1437,8 +1437,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1446,43 +1446,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1494,17 +1494,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1518,7 +1518,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1536,7 +1536,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1546,12 +1546,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1573,7 +1573,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1593,14 +1593,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1613,8 +1613,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1625,37 +1625,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1663,16 +1663,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1680,21 +1680,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1709,12 +1709,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1722,49 +1722,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1774,90 +1774,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1866,22 +1866,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1890,27 +1890,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1925,69 +1925,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2002,29 +2002,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2037,13 +2037,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2054,25 +2054,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2087,10 +2087,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2108,55 +2108,55 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $logical/testContextualBoolAnd (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $logical/testContextualBoolAnd (param $someObj i32) (param $someInt i32) (result i32) + local.get $someObj if (result i32) - local.get $1 + local.get $someInt else i32.const 0 end ) - (func $logical/testContextualBoolOr (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $logical/testContextualBoolOr (param $someObj i32) (param $someInt i32) (result i32) + local.get $someObj if (result i32) i32.const 1 else - local.get $1 + local.get $someInt end ) (func $~lib/rt/itcms/__collect - (local $0 i32) + (local $var$0 i32) i32.const 0 drop global.get $~lib/rt/itcms/state @@ -2167,8 +2167,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -2182,8 +2182,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop diff --git a/tests/compiler/loop-flow.debug.wat b/tests/compiler/loop-flow.debug.wat index e95aa63200..1fa35655e0 100644 --- a/tests/compiler/loop-flow.debug.wat +++ b/tests/compiler/loop-flow.debug.wat @@ -26,11 +26,11 @@ (export "memory" (memory $0)) (start $~start) (func $loop-flow/whileReturn (result i32) - (local $0 i32) + (local $var$0 i32) loop $while-continue|0 i32.const 1 - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if i32.const 1 return @@ -38,21 +38,21 @@ end unreachable ) - (func $loop-flow/whileAny (param $0 i32) (result i32) - (local $1 i32) + (func $loop-flow/whileAny (param $a i32) (result i32) + (local $var$1 i32) loop $while-continue|0 i32.const 1 - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 if - local.get $0 + local.get $a i32.const 1 i32.eq if i32.const 1 return else - local.get $0 + local.get $a i32.const 2 i32.eq if @@ -73,11 +73,11 @@ unreachable ) (func $loop-flow/forReturn (result i32) - (local $0 i32) + (local $var$0 i32) loop $for-loop|0 i32.const 1 - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if i32.const 1 return @@ -85,22 +85,22 @@ end unreachable ) - (func $loop-flow/forAny (param $0 i32) (result i32) - (local $1 i32) + (func $loop-flow/forAny (param $a i32) (result i32) + (local $var$1 i32) loop $for-loop|0 i32.const 1 - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 if block $for-continue|0 - local.get $0 + local.get $a i32.const 1 i32.eq if i32.const 1 return else - local.get $0 + local.get $a i32.const 2 i32.eq if @@ -129,17 +129,17 @@ end unreachable ) - (func $loop-flow/doAny (param $0 i32) (result i32) + (func $loop-flow/doAny (param $a i32) (result i32) loop $do-loop|0 block $do-continue|0 - local.get $0 + local.get $a i32.const 1 i32.eq if i32.const 1 return else - local.get $0 + local.get $a i32.const 2 i32.eq if @@ -240,11 +240,11 @@ end ) (func $loop-flow/whileThrow (result i32) - (local $0 i32) + (local $var$0 i32) loop $while-continue|0 i32.const 1 - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if i32.const 80 i32.const 32 @@ -257,11 +257,11 @@ unreachable ) (func $loop-flow/whileContinue (result i32) - (local $0 i32) + (local $var$0 i32) loop $while-continue|0 i32.const 1 - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if br $while-continue|0 end @@ -269,11 +269,11 @@ unreachable ) (func $loop-flow/forThrow (result i32) - (local $0 i32) + (local $var$0 i32) loop $for-loop|0 i32.const 1 - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if i32.const 80 i32.const 32 @@ -286,11 +286,11 @@ unreachable ) (func $loop-flow/forContinue (result i32) - (local $0 i32) + (local $var$0 i32) loop $for-loop|0 i32.const 1 - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if block $for-continue|0 br $for-continue|0 diff --git a/tests/compiler/loop-wrap.debug.wat b/tests/compiler/loop-wrap.debug.wat index 8e498bc3de..de07fa30ad 100644 --- a/tests/compiler/loop-wrap.debug.wat +++ b/tests/compiler/loop-wrap.debug.wat @@ -12,34 +12,34 @@ (export "testSubsequentWrapped" (func $loop-wrap/testSubsequentWrapped)) (export "memory" (memory $0)) (func $loop-wrap/testAlwaysWrapped - (local $0 i32) + (local $i i32) i32.const 0 - local.set $0 + local.set $i block $do-break|0 loop $do-loop|0 - local.get $0 + local.get $i i32.const 10 i32.eq if br $do-break|0 end - local.get $0 + local.get $i i32.const 1 i32.add i32.const 255 i32.and - local.tee $0 + local.tee $i br_if $do-loop|0 end end ) (func $loop-wrap/testFirstWrapped - (local $0 i32) + (local $i i32) i32.const 0 - local.set $0 + local.set $i block $do-break|1 loop $do-loop|1 - local.get $0 + local.get $i i32.const 255 i32.and i32.const 10 @@ -47,23 +47,23 @@ if br $do-break|1 end - local.get $0 + local.get $i i32.const 1 i32.add - local.tee $0 + local.tee $i i32.const 255 i32.and br_if $do-loop|1 end end ) - (func $loop-wrap/testSubsequentWrapped (param $0 i32) - (local $1 i32) - local.get $0 - local.set $1 + (func $loop-wrap/testSubsequentWrapped (param $a i32) + (local $i i32) + local.get $a + local.set $i block $do-break|0 loop $do-loop|0 - local.get $1 + local.get $i i32.const 255 i32.and i32.const 10 @@ -71,12 +71,12 @@ if br $do-break|0 end - local.get $1 + local.get $i i32.const 1 i32.add i32.const 255 i32.and - local.tee $1 + local.tee $i br_if $do-loop|0 end end diff --git a/tests/compiler/managed-cast.debug.wat b/tests/compiler/managed-cast.debug.wat index 51de7f43b6..eda69e77cd 100644 --- a/tests/compiler/managed-cast.debug.wat +++ b/tests/compiler/managed-cast.debug.wat @@ -54,50 +54,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -110,58 +110,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -178,12 +178,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -193,19 +193,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -216,27 +216,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -244,35 +244,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -282,15 +282,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -300,25 +300,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -326,33 +326,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -380,23 +380,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -408,15 +408,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -428,33 +428,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -462,21 +462,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -491,36 +491,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -528,67 +528,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -598,22 +598,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -623,12 +623,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -640,75 +640,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -720,38 +720,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -765,12 +765,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -781,38 +781,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -820,21 +820,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -849,101 +849,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -954,7 +954,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -965,26 +965,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -997,27 +997,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1031,11 +1031,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1046,66 +1046,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1115,10 +1115,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1129,13 +1129,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1146,109 +1146,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1256,7 +1256,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1273,23 +1273,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1301,54 +1301,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1369,30 +1369,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1402,9 +1402,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1414,8 +1414,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1423,43 +1423,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1471,17 +1471,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1495,7 +1495,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1513,7 +1513,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1523,12 +1523,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1550,7 +1550,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1570,14 +1570,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1590,8 +1590,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1602,37 +1602,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1640,16 +1640,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1657,21 +1657,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1686,12 +1686,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1699,49 +1699,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1751,90 +1751,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1843,22 +1843,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1867,27 +1867,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1902,69 +1902,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1979,29 +1979,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2014,13 +2014,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2031,25 +2031,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2064,10 +2064,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2085,107 +2085,107 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $managed-cast/Animal#tame (param $0 i32) + (func $managed-cast/Animal#tame (param $this i32) nop ) - (func $managed-cast/testUpcast (param $0 i32) - local.get $0 + (func $managed-cast/testUpcast (param $cat i32) + local.get $cat call $managed-cast/Animal#tame ) - (func $managed-cast/testUpcastToNullable (param $0 i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 + (func $managed-cast/testUpcastToNullable (param $cat i32) + (local $maybeAnimal i32) + local.get $cat + local.set $maybeAnimal + local.get $maybeAnimal if - local.get $1 + local.get $maybeAnimal call $managed-cast/Animal#tame end ) - (func $managed-cast/testUpcastFromToNullable (param $0 i32) - (local $1 i32) - local.get $0 - local.set $1 - local.get $1 + (func $managed-cast/testUpcastFromToNullable (param $cat i32) + (local $maybeAnimal i32) + local.get $cat + local.set $maybeAnimal + local.get $maybeAnimal if - local.get $1 + local.get $maybeAnimal call $managed-cast/Animal#tame end ) - (func $~lib/rt/__instanceof (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/__instanceof (param $ptr i32) (param $classId i32) (result i32) + (local $id i32) + (local $rttiBase i32) + local.get $ptr i32.const 20 i32.sub i32.load offset=12 - local.set $2 + local.set $id global.get $~lib/rt/__rtti_base - local.set $3 - local.get $2 - local.get $3 + local.set $rttiBase + local.get $id + local.get $rttiBase i32.load i32.le_u if loop $do-loop|0 - local.get $2 - local.get $1 + local.get $id + local.get $classId i32.eq if i32.const 1 return end - local.get $3 + local.get $rttiBase i32.const 4 i32.add - local.get $2 + local.get $id i32.const 8 i32.mul i32.add i32.load offset=4 - local.tee $2 + local.tee $id br_if $do-loop|0 end end i32.const 0 ) - (func $managed-cast/Cat#meow (param $0 i32) + (func $managed-cast/Cat#meow (param $this i32) nop ) - (func $managed-cast/testDowncastToNullable (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $managed-cast/testDowncastToNullable (param $animal i32) + (local $var$1 i32) + (local $maybeCat i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -2195,12 +2195,12 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - local.get $0 - local.tee $1 + local.get $animal + local.tee $var$1 i32.const 3 call $~lib/rt/__instanceof if (result i32) - local.get $1 + local.get $var$1 else i32.const 560 i32.const 496 @@ -2209,11 +2209,11 @@ call $~lib/builtins/abort unreachable end - local.tee $2 + local.tee $maybeCat i32.store - local.get $2 + local.get $maybeCat if - local.get $2 + local.get $maybeCat call $managed-cast/Cat#meow end global.get $~lib/memory/__stack_pointer @@ -2221,9 +2221,9 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $managed-cast/testDowncastFromToNullable (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $managed-cast/testDowncastFromToNullable (param $animal i32) + (local $var$1 i32) + (local $maybeCat i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -2233,14 +2233,14 @@ i32.const 0 i32.store global.get $~lib/memory/__stack_pointer - local.get $0 - local.tee $1 + local.get $animal + local.tee $var$1 if (result i32) - local.get $1 + local.get $var$1 i32.const 3 call $~lib/rt/__instanceof if (result i32) - local.get $1 + local.get $var$1 else i32.const 560 i32.const 496 @@ -2252,11 +2252,11 @@ else i32.const 0 end - local.tee $2 + local.tee $maybeCat i32.store - local.get $2 + local.get $maybeCat if - local.get $2 + local.get $maybeCat call $managed-cast/Cat#meow end global.get $~lib/memory/__stack_pointer @@ -2265,7 +2265,7 @@ global.set $~lib/memory/__stack_pointer ) (func $~lib/rt/itcms/__collect - (local $0 i32) + (local $var$0 i32) i32.const 0 drop global.get $~lib/rt/itcms/state @@ -2276,8 +2276,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -2291,8 +2291,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop diff --git a/tests/compiler/many-locals.debug.wat b/tests/compiler/many-locals.debug.wat index a39f64548f..ba8dacd54d 100644 --- a/tests/compiler/many-locals.debug.wat +++ b/tests/compiler/many-locals.debug.wat @@ -14,779 +14,779 @@ (export "testI8" (func $many-locals/testI8)) (export "memory" (memory $0)) (start $~start) - (func $many-locals/testI32 (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) - (local $21 i32) - (local $22 i32) - (local $23 i32) - (local $24 i32) - (local $25 i32) - (local $26 i32) - (local $27 i32) - (local $28 i32) - (local $29 i32) - (local $30 i32) - (local $31 i32) - (local $32 i32) - (local $33 i32) - (local $34 i32) - (local $35 i32) - (local $36 i32) - (local $37 i32) - (local $38 i32) - (local $39 i32) - (local $40 i32) - (local $41 i32) - (local $42 i32) - (local $43 i32) - (local $44 i32) - (local $45 i32) - (local $46 i32) - (local $47 i32) - (local $48 i32) - (local $49 i32) - (local $50 i32) - (local $51 i32) - (local $52 i32) - (local $53 i32) - (local $54 i32) - (local $55 i32) - (local $56 i32) - (local $57 i32) - (local $58 i32) - (local $59 i32) - (local $60 i32) - (local $61 i32) - (local $62 i32) - (local $63 i32) - (local $64 i32) - (local $65 i32) - (local $66 i32) - (local $67 i32) - (local $68 i32) - (local $69 i32) - (local $70 i32) - (local $71 i32) - (local $72 i32) - (local $73 i32) - (local $74 i32) - (local $75 i32) - (local $76 i32) - (local $77 i32) - (local $78 i32) - (local $79 i32) - (local $80 i32) - (local $81 i32) - (local $82 i32) - (local $83 i32) - (local $84 i32) - (local $85 i32) - (local $86 i32) - (local $87 i32) - (local $88 i32) - (local $89 i32) - (local $90 i32) - (local $91 i32) - (local $92 i32) - (local $93 i32) - (local $94 i32) - (local $95 i32) - (local $96 i32) - (local $97 i32) - (local $98 i32) - (local $99 i32) - (local $100 i32) - (local $101 i32) - (local $102 i32) - (local $103 i32) - (local $104 i32) - (local $105 i32) - (local $106 i32) - (local $107 i32) - (local $108 i32) - (local $109 i32) - (local $110 i32) - (local $111 i32) - (local $112 i32) - (local $113 i32) - (local $114 i32) - (local $115 i32) - (local $116 i32) - (local $117 i32) - (local $118 i32) - (local $119 i32) - (local $120 i32) - (local $121 i32) - (local $122 i32) - (local $123 i32) - (local $124 i32) - (local $125 i32) - (local $126 i32) - (local $127 i32) - (local $128 i32) - local.get $0 - local.set $1 - local.get $1 - local.set $2 - local.get $2 - local.set $3 - local.get $3 - local.set $4 - local.get $4 - local.set $5 - local.get $5 - local.set $6 - local.get $6 - local.set $7 - local.get $7 - local.set $8 - local.get $8 - local.set $9 - local.get $9 - local.set $10 - local.get $10 - local.set $11 - local.get $11 - local.set $12 - local.get $12 - local.set $13 - local.get $13 - local.set $14 - local.get $14 - local.set $15 - local.get $15 - local.set $16 - local.get $16 - local.set $17 - local.get $17 - local.set $18 - local.get $18 - local.set $19 - local.get $19 - local.set $20 - local.get $20 - local.set $21 - local.get $21 - local.set $22 - local.get $22 - local.set $23 - local.get $23 - local.set $24 - local.get $24 - local.set $25 - local.get $25 - local.set $26 - local.get $26 - local.set $27 - local.get $27 - local.set $28 - local.get $28 - local.set $29 - local.get $29 - local.set $30 - local.get $30 - local.set $31 - local.get $31 - local.set $32 - local.get $32 - local.set $33 - local.get $33 - local.set $34 - local.get $34 - local.set $35 - local.get $35 - local.set $36 - local.get $36 - local.set $37 - local.get $37 - local.set $38 - local.get $38 - local.set $39 - local.get $39 - local.set $40 - local.get $40 - local.set $41 - local.get $41 - local.set $42 - local.get $42 - local.set $43 - local.get $43 - local.set $44 - local.get $44 - local.set $45 - local.get $45 - local.set $46 - local.get $46 - local.set $47 - local.get $47 - local.set $48 - local.get $48 - local.set $49 - local.get $49 - local.set $50 - local.get $50 - local.set $51 - local.get $51 - local.set $52 - local.get $52 - local.set $53 - local.get $53 - local.set $54 - local.get $54 - local.set $55 - local.get $55 - local.set $56 - local.get $56 - local.set $57 - local.get $57 - local.set $58 - local.get $58 - local.set $59 - local.get $59 - local.set $60 - local.get $60 - local.set $61 - local.get $61 - local.set $62 - local.get $62 - local.set $63 - local.get $63 - local.set $64 - local.get $64 - local.set $65 - local.get $65 - local.set $66 - local.get $66 - local.set $67 - local.get $67 - local.set $68 - local.get $68 - local.set $69 - local.get $69 - local.set $70 - local.get $70 - local.set $71 - local.get $71 - local.set $72 - local.get $72 - local.set $73 - local.get $73 - local.set $74 - local.get $74 - local.set $75 - local.get $75 - local.set $76 - local.get $76 - local.set $77 - local.get $77 - local.set $78 - local.get $78 - local.set $79 - local.get $79 - local.set $80 - local.get $80 - local.set $81 - local.get $81 - local.set $82 - local.get $82 - local.set $83 - local.get $83 - local.set $84 - local.get $84 - local.set $85 - local.get $85 - local.set $86 - local.get $86 - local.set $87 - local.get $87 - local.set $88 - local.get $88 - local.set $89 - local.get $89 - local.set $90 - local.get $90 - local.set $91 - local.get $91 - local.set $92 - local.get $92 - local.set $93 - local.get $93 - local.set $94 - local.get $94 - local.set $95 - local.get $95 - local.set $96 - local.get $96 - local.set $97 - local.get $97 - local.set $98 - local.get $98 - local.set $99 - local.get $99 - local.set $100 - local.get $100 - local.set $101 - local.get $101 - local.set $102 - local.get $102 - local.set $103 - local.get $103 - local.set $104 - local.get $104 - local.set $105 - local.get $105 - local.set $106 - local.get $106 - local.set $107 - local.get $107 - local.set $108 - local.get $108 - local.set $109 - local.get $109 - local.set $110 - local.get $110 - local.set $111 - local.get $111 - local.set $112 - local.get $112 - local.set $113 - local.get $113 - local.set $114 - local.get $114 - local.set $115 - local.get $115 - local.set $116 - local.get $116 - local.set $117 - local.get $117 - local.set $118 - local.get $118 - local.set $119 - local.get $119 - local.set $120 - local.get $120 - local.set $121 - local.get $121 - local.set $122 - local.get $122 - local.set $123 - local.get $123 - local.set $124 - local.get $124 - local.set $125 - local.get $125 - local.set $126 - local.get $126 - local.set $127 - local.get $127 - local.set $128 - local.get $128 + (func $many-locals/testI32 (param $a i32) (result i32) + (local $a00 i32) + (local $a01 i32) + (local $a02 i32) + (local $a03 i32) + (local $a04 i32) + (local $a05 i32) + (local $a06 i32) + (local $a07 i32) + (local $a08 i32) + (local $a09 i32) + (local $a0A i32) + (local $a0B i32) + (local $a0C i32) + (local $a0D i32) + (local $a0E i32) + (local $a0F i32) + (local $a10 i32) + (local $a11 i32) + (local $a12 i32) + (local $a13 i32) + (local $a14 i32) + (local $a15 i32) + (local $a16 i32) + (local $a17 i32) + (local $a18 i32) + (local $a19 i32) + (local $a1A i32) + (local $a1B i32) + (local $a1C i32) + (local $a1D i32) + (local $a1E i32) + (local $a1F i32) + (local $a20 i32) + (local $a21 i32) + (local $a22 i32) + (local $a23 i32) + (local $a24 i32) + (local $a25 i32) + (local $a26 i32) + (local $a27 i32) + (local $a28 i32) + (local $a29 i32) + (local $a2A i32) + (local $a2B i32) + (local $a2C i32) + (local $a2D i32) + (local $a2E i32) + (local $a2F i32) + (local $a30 i32) + (local $a31 i32) + (local $a32 i32) + (local $a33 i32) + (local $a34 i32) + (local $a35 i32) + (local $a36 i32) + (local $a37 i32) + (local $a38 i32) + (local $a39 i32) + (local $a3A i32) + (local $a3B i32) + (local $a3C i32) + (local $a3D i32) + (local $a3E i32) + (local $a3F i32) + (local $a40 i32) + (local $a41 i32) + (local $a42 i32) + (local $a43 i32) + (local $a44 i32) + (local $a45 i32) + (local $a46 i32) + (local $a47 i32) + (local $a48 i32) + (local $a49 i32) + (local $a4A i32) + (local $a4B i32) + (local $a4C i32) + (local $a4D i32) + (local $a4E i32) + (local $a4F i32) + (local $a50 i32) + (local $a51 i32) + (local $a52 i32) + (local $a53 i32) + (local $a54 i32) + (local $a55 i32) + (local $a56 i32) + (local $a57 i32) + (local $a58 i32) + (local $a59 i32) + (local $a5A i32) + (local $a5B i32) + (local $a5C i32) + (local $a5D i32) + (local $a5E i32) + (local $a5F i32) + (local $a60 i32) + (local $a61 i32) + (local $a62 i32) + (local $a63 i32) + (local $a64 i32) + (local $a65 i32) + (local $a66 i32) + (local $a67 i32) + (local $a68 i32) + (local $a69 i32) + (local $a6A i32) + (local $a6B i32) + (local $a6C i32) + (local $a6D i32) + (local $a6E i32) + (local $a6F i32) + (local $a70 i32) + (local $a71 i32) + (local $a72 i32) + (local $a73 i32) + (local $a74 i32) + (local $a75 i32) + (local $a76 i32) + (local $a77 i32) + (local $a78 i32) + (local $a79 i32) + (local $a7A i32) + (local $a7B i32) + (local $a7C i32) + (local $a7D i32) + (local $a7E i32) + (local $a7F i32) + local.get $a + local.set $a00 + local.get $a00 + local.set $a01 + local.get $a01 + local.set $a02 + local.get $a02 + local.set $a03 + local.get $a03 + local.set $a04 + local.get $a04 + local.set $a05 + local.get $a05 + local.set $a06 + local.get $a06 + local.set $a07 + local.get $a07 + local.set $a08 + local.get $a08 + local.set $a09 + local.get $a09 + local.set $a0A + local.get $a0A + local.set $a0B + local.get $a0B + local.set $a0C + local.get $a0C + local.set $a0D + local.get $a0D + local.set $a0E + local.get $a0E + local.set $a0F + local.get $a0F + local.set $a10 + local.get $a10 + local.set $a11 + local.get $a11 + local.set $a12 + local.get $a12 + local.set $a13 + local.get $a13 + local.set $a14 + local.get $a14 + local.set $a15 + local.get $a15 + local.set $a16 + local.get $a16 + local.set $a17 + local.get $a17 + local.set $a18 + local.get $a18 + local.set $a19 + local.get $a19 + local.set $a1A + local.get $a1A + local.set $a1B + local.get $a1B + local.set $a1C + local.get $a1C + local.set $a1D + local.get $a1D + local.set $a1E + local.get $a1E + local.set $a1F + local.get $a1F + local.set $a20 + local.get $a20 + local.set $a21 + local.get $a21 + local.set $a22 + local.get $a22 + local.set $a23 + local.get $a23 + local.set $a24 + local.get $a24 + local.set $a25 + local.get $a25 + local.set $a26 + local.get $a26 + local.set $a27 + local.get $a27 + local.set $a28 + local.get $a28 + local.set $a29 + local.get $a29 + local.set $a2A + local.get $a2A + local.set $a2B + local.get $a2B + local.set $a2C + local.get $a2C + local.set $a2D + local.get $a2D + local.set $a2E + local.get $a2E + local.set $a2F + local.get $a2F + local.set $a30 + local.get $a30 + local.set $a31 + local.get $a31 + local.set $a32 + local.get $a32 + local.set $a33 + local.get $a33 + local.set $a34 + local.get $a34 + local.set $a35 + local.get $a35 + local.set $a36 + local.get $a36 + local.set $a37 + local.get $a37 + local.set $a38 + local.get $a38 + local.set $a39 + local.get $a39 + local.set $a3A + local.get $a3A + local.set $a3B + local.get $a3B + local.set $a3C + local.get $a3C + local.set $a3D + local.get $a3D + local.set $a3E + local.get $a3E + local.set $a3F + local.get $a3F + local.set $a40 + local.get $a40 + local.set $a41 + local.get $a41 + local.set $a42 + local.get $a42 + local.set $a43 + local.get $a43 + local.set $a44 + local.get $a44 + local.set $a45 + local.get $a45 + local.set $a46 + local.get $a46 + local.set $a47 + local.get $a47 + local.set $a48 + local.get $a48 + local.set $a49 + local.get $a49 + local.set $a4A + local.get $a4A + local.set $a4B + local.get $a4B + local.set $a4C + local.get $a4C + local.set $a4D + local.get $a4D + local.set $a4E + local.get $a4E + local.set $a4F + local.get $a4F + local.set $a50 + local.get $a50 + local.set $a51 + local.get $a51 + local.set $a52 + local.get $a52 + local.set $a53 + local.get $a53 + local.set $a54 + local.get $a54 + local.set $a55 + local.get $a55 + local.set $a56 + local.get $a56 + local.set $a57 + local.get $a57 + local.set $a58 + local.get $a58 + local.set $a59 + local.get $a59 + local.set $a5A + local.get $a5A + local.set $a5B + local.get $a5B + local.set $a5C + local.get $a5C + local.set $a5D + local.get $a5D + local.set $a5E + local.get $a5E + local.set $a5F + local.get $a5F + local.set $a60 + local.get $a60 + local.set $a61 + local.get $a61 + local.set $a62 + local.get $a62 + local.set $a63 + local.get $a63 + local.set $a64 + local.get $a64 + local.set $a65 + local.get $a65 + local.set $a66 + local.get $a66 + local.set $a67 + local.get $a67 + local.set $a68 + local.get $a68 + local.set $a69 + local.get $a69 + local.set $a6A + local.get $a6A + local.set $a6B + local.get $a6B + local.set $a6C + local.get $a6C + local.set $a6D + local.get $a6D + local.set $a6E + local.get $a6E + local.set $a6F + local.get $a6F + local.set $a70 + local.get $a70 + local.set $a71 + local.get $a71 + local.set $a72 + local.get $a72 + local.set $a73 + local.get $a73 + local.set $a74 + local.get $a74 + local.set $a75 + local.get $a75 + local.set $a76 + local.get $a76 + local.set $a77 + local.get $a77 + local.set $a78 + local.get $a78 + local.set $a79 + local.get $a79 + local.set $a7A + local.get $a7A + local.set $a7B + local.get $a7B + local.set $a7C + local.get $a7C + local.set $a7D + local.get $a7D + local.set $a7E + local.get $a7E + local.set $a7F + local.get $a7F ) - (func $many-locals/testI8 (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) - (local $21 i32) - (local $22 i32) - (local $23 i32) - (local $24 i32) - (local $25 i32) - (local $26 i32) - (local $27 i32) - (local $28 i32) - (local $29 i32) - (local $30 i32) - (local $31 i32) - (local $32 i32) - (local $33 i32) - (local $34 i32) - (local $35 i32) - (local $36 i32) - (local $37 i32) - (local $38 i32) - (local $39 i32) - (local $40 i32) - (local $41 i32) - (local $42 i32) - (local $43 i32) - (local $44 i32) - (local $45 i32) - (local $46 i32) - (local $47 i32) - (local $48 i32) - (local $49 i32) - (local $50 i32) - (local $51 i32) - (local $52 i32) - (local $53 i32) - (local $54 i32) - (local $55 i32) - (local $56 i32) - (local $57 i32) - (local $58 i32) - (local $59 i32) - (local $60 i32) - (local $61 i32) - (local $62 i32) - (local $63 i32) - (local $64 i32) - (local $65 i32) - (local $66 i32) - (local $67 i32) - (local $68 i32) - (local $69 i32) - (local $70 i32) - (local $71 i32) - (local $72 i32) - (local $73 i32) - (local $74 i32) - (local $75 i32) - (local $76 i32) - (local $77 i32) - (local $78 i32) - (local $79 i32) - (local $80 i32) - (local $81 i32) - (local $82 i32) - (local $83 i32) - (local $84 i32) - (local $85 i32) - (local $86 i32) - (local $87 i32) - (local $88 i32) - (local $89 i32) - (local $90 i32) - (local $91 i32) - (local $92 i32) - (local $93 i32) - (local $94 i32) - (local $95 i32) - (local $96 i32) - (local $97 i32) - (local $98 i32) - (local $99 i32) - (local $100 i32) - (local $101 i32) - (local $102 i32) - (local $103 i32) - (local $104 i32) - (local $105 i32) - (local $106 i32) - (local $107 i32) - (local $108 i32) - (local $109 i32) - (local $110 i32) - (local $111 i32) - (local $112 i32) - (local $113 i32) - (local $114 i32) - (local $115 i32) - (local $116 i32) - (local $117 i32) - (local $118 i32) - (local $119 i32) - (local $120 i32) - (local $121 i32) - (local $122 i32) - (local $123 i32) - (local $124 i32) - (local $125 i32) - (local $126 i32) - (local $127 i32) - (local $128 i32) - local.get $0 - local.set $1 - local.get $1 - local.set $2 - local.get $2 - local.set $3 - local.get $3 - local.set $4 - local.get $4 - local.set $5 - local.get $5 - local.set $6 - local.get $6 - local.set $7 - local.get $7 - local.set $8 - local.get $8 - local.set $9 - local.get $9 - local.set $10 - local.get $10 - local.set $11 - local.get $11 - local.set $12 - local.get $12 - local.set $13 - local.get $13 - local.set $14 - local.get $14 - local.set $15 - local.get $15 - local.set $16 - local.get $16 - local.set $17 - local.get $17 - local.set $18 - local.get $18 - local.set $19 - local.get $19 - local.set $20 - local.get $20 - local.set $21 - local.get $21 - local.set $22 - local.get $22 - local.set $23 - local.get $23 - local.set $24 - local.get $24 - local.set $25 - local.get $25 - local.set $26 - local.get $26 - local.set $27 - local.get $27 - local.set $28 - local.get $28 - local.set $29 - local.get $29 - local.set $30 - local.get $30 - local.set $31 - local.get $31 - local.set $32 - local.get $32 - local.set $33 - local.get $33 - local.set $34 - local.get $34 - local.set $35 - local.get $35 - local.set $36 - local.get $36 - local.set $37 - local.get $37 - local.set $38 - local.get $38 - local.set $39 - local.get $39 - local.set $40 - local.get $40 - local.set $41 - local.get $41 - local.set $42 - local.get $42 - local.set $43 - local.get $43 - local.set $44 - local.get $44 - local.set $45 - local.get $45 - local.set $46 - local.get $46 - local.set $47 - local.get $47 - local.set $48 - local.get $48 - local.set $49 - local.get $49 - local.set $50 - local.get $50 - local.set $51 - local.get $51 - local.set $52 - local.get $52 - local.set $53 - local.get $53 - local.set $54 - local.get $54 - local.set $55 - local.get $55 - local.set $56 - local.get $56 - local.set $57 - local.get $57 - local.set $58 - local.get $58 - local.set $59 - local.get $59 - local.set $60 - local.get $60 - local.set $61 - local.get $61 - local.set $62 - local.get $62 - local.set $63 - local.get $63 - local.set $64 - local.get $64 - local.set $65 - local.get $65 - local.set $66 - local.get $66 - local.set $67 - local.get $67 - local.set $68 - local.get $68 - local.set $69 - local.get $69 - local.set $70 - local.get $70 - local.set $71 - local.get $71 - local.set $72 - local.get $72 - local.set $73 - local.get $73 - local.set $74 - local.get $74 - local.set $75 - local.get $75 - local.set $76 - local.get $76 - local.set $77 - local.get $77 - local.set $78 - local.get $78 - local.set $79 - local.get $79 - local.set $80 - local.get $80 - local.set $81 - local.get $81 - local.set $82 - local.get $82 - local.set $83 - local.get $83 - local.set $84 - local.get $84 - local.set $85 - local.get $85 - local.set $86 - local.get $86 - local.set $87 - local.get $87 - local.set $88 - local.get $88 - local.set $89 - local.get $89 - local.set $90 - local.get $90 - local.set $91 - local.get $91 - local.set $92 - local.get $92 - local.set $93 - local.get $93 - local.set $94 - local.get $94 - local.set $95 - local.get $95 - local.set $96 - local.get $96 - local.set $97 - local.get $97 - local.set $98 - local.get $98 - local.set $99 - local.get $99 - local.set $100 - local.get $100 - local.set $101 - local.get $101 - local.set $102 - local.get $102 - local.set $103 - local.get $103 - local.set $104 - local.get $104 - local.set $105 - local.get $105 - local.set $106 - local.get $106 - local.set $107 - local.get $107 - local.set $108 - local.get $108 - local.set $109 - local.get $109 - local.set $110 - local.get $110 - local.set $111 - local.get $111 - local.set $112 - local.get $112 - local.set $113 - local.get $113 - local.set $114 - local.get $114 - local.set $115 - local.get $115 - local.set $116 - local.get $116 - local.set $117 - local.get $117 - local.set $118 - local.get $118 - local.set $119 - local.get $119 - local.set $120 - local.get $120 - local.set $121 - local.get $121 - local.set $122 - local.get $122 - local.set $123 - local.get $123 - local.set $124 - local.get $124 - local.set $125 - local.get $125 - local.set $126 - local.get $126 - local.set $127 - local.get $127 - local.set $128 - local.get $128 + (func $many-locals/testI8 (param $a i32) (result i32) + (local $a00 i32) + (local $a01 i32) + (local $a02 i32) + (local $a03 i32) + (local $a04 i32) + (local $a05 i32) + (local $a06 i32) + (local $a07 i32) + (local $a08 i32) + (local $a09 i32) + (local $a0A i32) + (local $a0B i32) + (local $a0C i32) + (local $a0D i32) + (local $a0E i32) + (local $a0F i32) + (local $a10 i32) + (local $a11 i32) + (local $a12 i32) + (local $a13 i32) + (local $a14 i32) + (local $a15 i32) + (local $a16 i32) + (local $a17 i32) + (local $a18 i32) + (local $a19 i32) + (local $a1A i32) + (local $a1B i32) + (local $a1C i32) + (local $a1D i32) + (local $a1E i32) + (local $a1F i32) + (local $a20 i32) + (local $a21 i32) + (local $a22 i32) + (local $a23 i32) + (local $a24 i32) + (local $a25 i32) + (local $a26 i32) + (local $a27 i32) + (local $a28 i32) + (local $a29 i32) + (local $a2A i32) + (local $a2B i32) + (local $a2C i32) + (local $a2D i32) + (local $a2E i32) + (local $a2F i32) + (local $a30 i32) + (local $a31 i32) + (local $a32 i32) + (local $a33 i32) + (local $a34 i32) + (local $a35 i32) + (local $a36 i32) + (local $a37 i32) + (local $a38 i32) + (local $a39 i32) + (local $a3A i32) + (local $a3B i32) + (local $a3C i32) + (local $a3D i32) + (local $a3E i32) + (local $a3F i32) + (local $a40 i32) + (local $a41 i32) + (local $a42 i32) + (local $a43 i32) + (local $a44 i32) + (local $a45 i32) + (local $a46 i32) + (local $a47 i32) + (local $a48 i32) + (local $a49 i32) + (local $a4A i32) + (local $a4B i32) + (local $a4C i32) + (local $a4D i32) + (local $a4E i32) + (local $a4F i32) + (local $a50 i32) + (local $a51 i32) + (local $a52 i32) + (local $a53 i32) + (local $a54 i32) + (local $a55 i32) + (local $a56 i32) + (local $a57 i32) + (local $a58 i32) + (local $a59 i32) + (local $a5A i32) + (local $a5B i32) + (local $a5C i32) + (local $a5D i32) + (local $a5E i32) + (local $a5F i32) + (local $a60 i32) + (local $a61 i32) + (local $a62 i32) + (local $a63 i32) + (local $a64 i32) + (local $a65 i32) + (local $a66 i32) + (local $a67 i32) + (local $a68 i32) + (local $a69 i32) + (local $a6A i32) + (local $a6B i32) + (local $a6C i32) + (local $a6D i32) + (local $a6E i32) + (local $a6F i32) + (local $a70 i32) + (local $a71 i32) + (local $a72 i32) + (local $a73 i32) + (local $a74 i32) + (local $a75 i32) + (local $a76 i32) + (local $a77 i32) + (local $a78 i32) + (local $a79 i32) + (local $a7A i32) + (local $a7B i32) + (local $a7C i32) + (local $a7D i32) + (local $a7E i32) + (local $a7F i32) + local.get $a + local.set $a00 + local.get $a00 + local.set $a01 + local.get $a01 + local.set $a02 + local.get $a02 + local.set $a03 + local.get $a03 + local.set $a04 + local.get $a04 + local.set $a05 + local.get $a05 + local.set $a06 + local.get $a06 + local.set $a07 + local.get $a07 + local.set $a08 + local.get $a08 + local.set $a09 + local.get $a09 + local.set $a0A + local.get $a0A + local.set $a0B + local.get $a0B + local.set $a0C + local.get $a0C + local.set $a0D + local.get $a0D + local.set $a0E + local.get $a0E + local.set $a0F + local.get $a0F + local.set $a10 + local.get $a10 + local.set $a11 + local.get $a11 + local.set $a12 + local.get $a12 + local.set $a13 + local.get $a13 + local.set $a14 + local.get $a14 + local.set $a15 + local.get $a15 + local.set $a16 + local.get $a16 + local.set $a17 + local.get $a17 + local.set $a18 + local.get $a18 + local.set $a19 + local.get $a19 + local.set $a1A + local.get $a1A + local.set $a1B + local.get $a1B + local.set $a1C + local.get $a1C + local.set $a1D + local.get $a1D + local.set $a1E + local.get $a1E + local.set $a1F + local.get $a1F + local.set $a20 + local.get $a20 + local.set $a21 + local.get $a21 + local.set $a22 + local.get $a22 + local.set $a23 + local.get $a23 + local.set $a24 + local.get $a24 + local.set $a25 + local.get $a25 + local.set $a26 + local.get $a26 + local.set $a27 + local.get $a27 + local.set $a28 + local.get $a28 + local.set $a29 + local.get $a29 + local.set $a2A + local.get $a2A + local.set $a2B + local.get $a2B + local.set $a2C + local.get $a2C + local.set $a2D + local.get $a2D + local.set $a2E + local.get $a2E + local.set $a2F + local.get $a2F + local.set $a30 + local.get $a30 + local.set $a31 + local.get $a31 + local.set $a32 + local.get $a32 + local.set $a33 + local.get $a33 + local.set $a34 + local.get $a34 + local.set $a35 + local.get $a35 + local.set $a36 + local.get $a36 + local.set $a37 + local.get $a37 + local.set $a38 + local.get $a38 + local.set $a39 + local.get $a39 + local.set $a3A + local.get $a3A + local.set $a3B + local.get $a3B + local.set $a3C + local.get $a3C + local.set $a3D + local.get $a3D + local.set $a3E + local.get $a3E + local.set $a3F + local.get $a3F + local.set $a40 + local.get $a40 + local.set $a41 + local.get $a41 + local.set $a42 + local.get $a42 + local.set $a43 + local.get $a43 + local.set $a44 + local.get $a44 + local.set $a45 + local.get $a45 + local.set $a46 + local.get $a46 + local.set $a47 + local.get $a47 + local.set $a48 + local.get $a48 + local.set $a49 + local.get $a49 + local.set $a4A + local.get $a4A + local.set $a4B + local.get $a4B + local.set $a4C + local.get $a4C + local.set $a4D + local.get $a4D + local.set $a4E + local.get $a4E + local.set $a4F + local.get $a4F + local.set $a50 + local.get $a50 + local.set $a51 + local.get $a51 + local.set $a52 + local.get $a52 + local.set $a53 + local.get $a53 + local.set $a54 + local.get $a54 + local.set $a55 + local.get $a55 + local.set $a56 + local.get $a56 + local.set $a57 + local.get $a57 + local.set $a58 + local.get $a58 + local.set $a59 + local.get $a59 + local.set $a5A + local.get $a5A + local.set $a5B + local.get $a5B + local.set $a5C + local.get $a5C + local.set $a5D + local.get $a5D + local.set $a5E + local.get $a5E + local.set $a5F + local.get $a5F + local.set $a60 + local.get $a60 + local.set $a61 + local.get $a61 + local.set $a62 + local.get $a62 + local.set $a63 + local.get $a63 + local.set $a64 + local.get $a64 + local.set $a65 + local.get $a65 + local.set $a66 + local.get $a66 + local.set $a67 + local.get $a67 + local.set $a68 + local.get $a68 + local.set $a69 + local.get $a69 + local.set $a6A + local.get $a6A + local.set $a6B + local.get $a6B + local.set $a6C + local.get $a6C + local.set $a6D + local.get $a6D + local.set $a6E + local.get $a6E + local.set $a6F + local.get $a6F + local.set $a70 + local.get $a70 + local.set $a71 + local.get $a71 + local.set $a72 + local.get $a72 + local.set $a73 + local.get $a73 + local.set $a74 + local.get $a74 + local.set $a75 + local.get $a75 + local.set $a76 + local.get $a76 + local.set $a77 + local.get $a77 + local.set $a78 + local.get $a78 + local.set $a79 + local.get $a79 + local.set $a7A + local.get $a7A + local.set $a7B + local.get $a7B + local.set $a7C + local.get $a7C + local.set $a7D + local.get $a7D + local.set $a7E + local.get $a7E + local.set $a7F + local.get $a7F i32.extend8_s ) (func $start:many-locals diff --git a/tests/compiler/memcpy.debug.wat b/tests/compiler/memcpy.debug.wat index 475fc11cbc..ae7d0e01ef 100644 --- a/tests/compiler/memcpy.debug.wat +++ b/tests/compiler/memcpy.debug.wat @@ -15,185 +15,185 @@ (export "memcpy" (func $memcpy/memcpy)) (export "memory" (memory $0)) (start $~start) - (func $memcpy/memcpy (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $0 - local.set $3 + (func $memcpy/memcpy (param $dest i32) (param $src i32) (param $n i32) (result i32) + (local $ret i32) + (local $w i32) + (local $x i32) + (local $var$6 i32) + (local $var$7 i32) + local.get $dest + local.set $ret loop $while-continue|0 - local.get $2 + local.get $n if (result i32) - local.get $1 + local.get $src i32.const 4 i32.rem_u else i32.const 0 end - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.tee $7 + local.get $dest + local.tee $var$7 i32.const 1 i32.add - local.set $0 - local.get $7 - local.get $1 - local.tee $7 + local.set $dest + local.get $var$7 + local.get $src + local.tee $var$7 i32.const 1 i32.add - local.set $1 - local.get $7 + local.set $src + local.get $var$7 i32.load8_u i32.store8 - local.get $2 + local.get $n i32.const 1 i32.sub - local.set $2 + local.set $n br $while-continue|0 end end - local.get $0 + local.get $dest i32.const 4 i32.rem_u i32.const 0 i32.eq if loop $while-continue|1 - local.get $2 + local.get $n i32.const 16 i32.ge_u - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $1 + local.get $dest + local.get $src i32.load i32.store - local.get $0 + local.get $dest i32.const 4 i32.add - local.get $1 + local.get $src i32.const 4 i32.add i32.load i32.store - local.get $0 + local.get $dest i32.const 8 i32.add - local.get $1 + local.get $src i32.const 8 i32.add i32.load i32.store - local.get $0 + local.get $dest i32.const 12 i32.add - local.get $1 + local.get $src i32.const 12 i32.add i32.load i32.store - local.get $1 + local.get $src i32.const 16 i32.add - local.set $1 - local.get $0 + local.set $src + local.get $dest i32.const 16 i32.add - local.set $0 - local.get $2 + local.set $dest + local.get $n i32.const 16 i32.sub - local.set $2 + local.set $n br $while-continue|1 end end - local.get $2 + local.get $n i32.const 8 i32.and if - local.get $0 - local.get $1 + local.get $dest + local.get $src i32.load i32.store - local.get $0 + local.get $dest i32.const 4 i32.add - local.get $1 + local.get $src i32.const 4 i32.add i32.load i32.store - local.get $0 + local.get $dest i32.const 8 i32.add - local.set $0 - local.get $1 + local.set $dest + local.get $src i32.const 8 i32.add - local.set $1 + local.set $src end - local.get $2 + local.get $n i32.const 4 i32.and if - local.get $0 - local.get $1 + local.get $dest + local.get $src i32.load i32.store - local.get $0 + local.get $dest i32.const 4 i32.add - local.set $0 - local.get $1 + local.set $dest + local.get $src i32.const 4 i32.add - local.set $1 + local.set $src end - local.get $2 + local.get $n i32.const 2 i32.and if - local.get $0 - local.get $1 + local.get $dest + local.get $src i32.load16_u i32.store16 - local.get $0 + local.get $dest i32.const 2 i32.add - local.set $0 - local.get $1 + local.set $dest + local.get $src i32.const 2 i32.add - local.set $1 + local.set $src end - local.get $2 + local.get $n i32.const 1 i32.and if - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 end - local.get $3 + local.get $ret return end - local.get $2 + local.get $n i32.const 32 i32.ge_u if @@ -201,848 +201,848 @@ block $case2|2 block $case1|2 block $case0|2 - local.get $0 + local.get $dest i32.const 4 i32.rem_u - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 i32.const 1 i32.eq br_if $case0|2 - local.get $6 + local.get $var$6 i32.const 2 i32.eq br_if $case1|2 - local.get $6 + local.get $var$6 i32.const 3 i32.eq br_if $case2|2 br $break|2 end - local.get $1 + local.get $src i32.load - local.set $4 - local.get $0 - local.tee $6 + local.set $w + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 - local.get $2 + local.get $n i32.const 3 i32.sub - local.set $2 + local.set $n loop $while-continue|3 - local.get $2 + local.get $n i32.const 17 i32.ge_u - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $1 + local.get $src i32.const 1 i32.add i32.load - local.set $5 - local.get $0 - local.get $4 + local.set $x + local.get $dest + local.get $w i32.const 24 i32.shr_u - local.get $5 + local.get $x i32.const 8 i32.shl i32.or i32.store - local.get $1 + local.get $src i32.const 5 i32.add i32.load - local.set $4 - local.get $0 + local.set $w + local.get $dest i32.const 4 i32.add - local.get $5 + local.get $x i32.const 24 i32.shr_u - local.get $4 + local.get $w i32.const 8 i32.shl i32.or i32.store - local.get $1 + local.get $src i32.const 9 i32.add i32.load - local.set $5 - local.get $0 + local.set $x + local.get $dest i32.const 8 i32.add - local.get $4 + local.get $w i32.const 24 i32.shr_u - local.get $5 + local.get $x i32.const 8 i32.shl i32.or i32.store - local.get $1 + local.get $src i32.const 13 i32.add i32.load - local.set $4 - local.get $0 + local.set $w + local.get $dest i32.const 12 i32.add - local.get $5 + local.get $x i32.const 24 i32.shr_u - local.get $4 + local.get $w i32.const 8 i32.shl i32.or i32.store - local.get $1 + local.get $src i32.const 16 i32.add - local.set $1 - local.get $0 + local.set $src + local.get $dest i32.const 16 i32.add - local.set $0 - local.get $2 + local.set $dest + local.get $n i32.const 16 i32.sub - local.set $2 + local.set $n br $while-continue|3 end end br $break|2 end - local.get $1 + local.get $src i32.load - local.set $4 - local.get $0 - local.tee $6 + local.set $w + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 - local.get $2 + local.get $n i32.const 2 i32.sub - local.set $2 + local.set $n loop $while-continue|4 - local.get $2 + local.get $n i32.const 18 i32.ge_u - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $1 + local.get $src i32.const 2 i32.add i32.load - local.set $5 - local.get $0 - local.get $4 + local.set $x + local.get $dest + local.get $w i32.const 16 i32.shr_u - local.get $5 + local.get $x i32.const 16 i32.shl i32.or i32.store - local.get $1 + local.get $src i32.const 6 i32.add i32.load - local.set $4 - local.get $0 + local.set $w + local.get $dest i32.const 4 i32.add - local.get $5 + local.get $x i32.const 16 i32.shr_u - local.get $4 + local.get $w i32.const 16 i32.shl i32.or i32.store - local.get $1 + local.get $src i32.const 10 i32.add i32.load - local.set $5 - local.get $0 + local.set $x + local.get $dest i32.const 8 i32.add - local.get $4 + local.get $w i32.const 16 i32.shr_u - local.get $5 + local.get $x i32.const 16 i32.shl i32.or i32.store - local.get $1 + local.get $src i32.const 14 i32.add i32.load - local.set $4 - local.get $0 + local.set $w + local.get $dest i32.const 12 i32.add - local.get $5 + local.get $x i32.const 16 i32.shr_u - local.get $4 + local.get $w i32.const 16 i32.shl i32.or i32.store - local.get $1 + local.get $src i32.const 16 i32.add - local.set $1 - local.get $0 + local.set $src + local.get $dest i32.const 16 i32.add - local.set $0 - local.get $2 + local.set $dest + local.get $n i32.const 16 i32.sub - local.set $2 + local.set $n br $while-continue|4 end end br $break|2 end - local.get $1 + local.get $src i32.load - local.set $4 - local.get $0 - local.tee $6 + local.set $w + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 - local.get $2 + local.get $n i32.const 1 i32.sub - local.set $2 + local.set $n loop $while-continue|5 - local.get $2 + local.get $n i32.const 19 i32.ge_u - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $1 + local.get $src i32.const 3 i32.add i32.load - local.set $5 - local.get $0 - local.get $4 + local.set $x + local.get $dest + local.get $w i32.const 8 i32.shr_u - local.get $5 + local.get $x i32.const 24 i32.shl i32.or i32.store - local.get $1 + local.get $src i32.const 7 i32.add i32.load - local.set $4 - local.get $0 + local.set $w + local.get $dest i32.const 4 i32.add - local.get $5 + local.get $x i32.const 8 i32.shr_u - local.get $4 + local.get $w i32.const 24 i32.shl i32.or i32.store - local.get $1 + local.get $src i32.const 11 i32.add i32.load - local.set $5 - local.get $0 + local.set $x + local.get $dest i32.const 8 i32.add - local.get $4 + local.get $w i32.const 8 i32.shr_u - local.get $5 + local.get $x i32.const 24 i32.shl i32.or i32.store - local.get $1 + local.get $src i32.const 15 i32.add i32.load - local.set $4 - local.get $0 + local.set $w + local.get $dest i32.const 12 i32.add - local.get $5 + local.get $x i32.const 8 i32.shr_u - local.get $4 + local.get $w i32.const 24 i32.shl i32.or i32.store - local.get $1 + local.get $src i32.const 16 i32.add - local.set $1 - local.get $0 + local.set $src + local.get $dest i32.const 16 i32.add - local.set $0 - local.get $2 + local.set $dest + local.get $n i32.const 16 i32.sub - local.set $2 + local.set $n br $while-continue|5 end end br $break|2 end end - local.get $2 + local.get $n i32.const 16 i32.and if - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 end - local.get $2 + local.get $n i32.const 8 i32.and if - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 end - local.get $2 + local.get $n i32.const 4 i32.and if - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 end - local.get $2 + local.get $n i32.const 2 i32.and if - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 end - local.get $2 + local.get $n i32.const 1 i32.and if - local.get $0 - local.tee $6 + local.get $dest + local.tee $var$6 i32.const 1 i32.add - local.set $0 - local.get $6 - local.get $1 - local.tee $6 + local.set $dest + local.get $var$6 + local.get $src + local.tee $var$6 i32.const 1 i32.add - local.set $1 - local.get $6 + local.set $src + local.get $var$6 i32.load8_u i32.store8 end - local.get $3 + local.get $ret ) (func $start:memcpy global.get $memcpy/base diff --git a/tests/compiler/memmove.debug.wat b/tests/compiler/memmove.debug.wat index 812f2223dd..8c1cf36a9c 100644 --- a/tests/compiler/memmove.debug.wat +++ b/tests/compiler/memmove.debug.wat @@ -14,150 +14,150 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (start $~start) - (func $memmove/memmove (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - local.set $3 - local.get $0 - local.get $1 + (func $memmove/memmove (param $dest i32) (param $src i32) (param $n i32) (result i32) + (local $ret i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $dest + local.set $ret + local.get $dest + local.get $src i32.eq if - local.get $3 + local.get $ret return end - local.get $0 - local.get $1 + local.get $dest + local.get $src i32.lt_u if - local.get $1 + local.get $src i32.const 8 i32.rem_u - local.get $0 + local.get $dest i32.const 8 i32.rem_u i32.eq if loop $while-continue|0 - local.get $0 + local.get $dest i32.const 8 i32.rem_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $n i32.eqz if - local.get $3 + local.get $ret return end - local.get $2 + local.get $n i32.const 1 i32.sub - local.set $2 - local.get $0 - local.tee $5 + local.set $n + local.get $dest + local.tee $var$5 i32.const 1 i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 + local.set $dest + local.get $var$5 + local.get $src + local.tee $var$5 i32.const 1 i32.add - local.set $1 - local.get $5 + local.set $src + local.get $var$5 i32.load8_u i32.store8 br $while-continue|0 end end loop $while-continue|1 - local.get $2 + local.get $n i32.const 8 i32.ge_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $0 - local.get $1 + local.get $dest + local.get $src i64.load i64.store - local.get $2 + local.get $n i32.const 8 i32.sub - local.set $2 - local.get $0 + local.set $n + local.get $dest i32.const 8 i32.add - local.set $0 - local.get $1 + local.set $dest + local.get $src i32.const 8 i32.add - local.set $1 + local.set $src br $while-continue|1 end end end loop $while-continue|2 - local.get $2 - local.set $4 - local.get $4 + local.get $n + local.set $var$4 + local.get $var$4 if - local.get $0 - local.tee $5 + local.get $dest + local.tee $var$5 i32.const 1 i32.add - local.set $0 - local.get $5 - local.get $1 - local.tee $5 + local.set $dest + local.get $var$5 + local.get $src + local.tee $var$5 i32.const 1 i32.add - local.set $1 - local.get $5 + local.set $src + local.get $var$5 i32.load8_u i32.store8 - local.get $2 + local.get $n i32.const 1 i32.sub - local.set $2 + local.set $n br $while-continue|2 end end else - local.get $1 + local.get $src i32.const 8 i32.rem_u - local.get $0 + local.get $dest i32.const 8 i32.rem_u i32.eq if loop $while-continue|3 - local.get $0 - local.get $2 + local.get $dest + local.get $n i32.add i32.const 8 i32.rem_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $n i32.eqz if - local.get $3 + local.get $ret return end - local.get $0 - local.get $2 + local.get $dest + local.get $n i32.const 1 i32.sub - local.tee $2 + local.tee $n i32.add - local.get $1 - local.get $2 + local.get $src + local.get $n i32.add i32.load8_u i32.store8 @@ -165,21 +165,21 @@ end end loop $while-continue|4 - local.get $2 + local.get $n i32.const 8 i32.ge_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $n i32.const 8 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $n + local.get $dest + local.get $n i32.add - local.get $1 - local.get $2 + local.get $src + local.get $n i32.add i64.load i64.store @@ -188,18 +188,18 @@ end end loop $while-continue|5 - local.get $2 - local.set $4 - local.get $4 + local.get $n + local.set $var$4 + local.get $var$4 if - local.get $0 - local.get $2 + local.get $dest + local.get $n i32.const 1 i32.sub - local.tee $2 + local.tee $n i32.add - local.get $1 - local.get $2 + local.get $src + local.get $n i32.add i32.load8_u i32.store8 @@ -207,7 +207,7 @@ end end end - local.get $3 + local.get $ret ) (func $start:memmove global.get $memmove/base diff --git a/tests/compiler/memory.debug.wat b/tests/compiler/memory.debug.wat index 51b0b98b6b..1e3b2be26e 100644 --- a/tests/compiler/memory.debug.wat +++ b/tests/compiler/memory.debug.wat @@ -38,16 +38,16 @@ (export "memory" (memory $0)) (start $~start) (func $memory/test (result i32) - (local $0 i32) + (local $value i32) i32.const 16 i32.load - local.set $0 + local.set $value i32.const 16 - local.get $0 + local.get $value i32.const 1 i32.add i32.store - local.get $0 + local.get $value ) (func $memory/testGeneric (result i32) i32.const 144 diff --git a/tests/compiler/memset.debug.wat b/tests/compiler/memset.debug.wat index facfd68adc..48a5ca3d78 100644 --- a/tests/compiler/memset.debug.wat +++ b/tests/compiler/memset.debug.wat @@ -13,268 +13,268 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (start $~start) - (func $memset/memset (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i64) - (local $7 i32) - local.get $0 - local.set $3 - local.get $2 + (func $memset/memset (param $dest i32) (param $c i32) (param $n i32) (result i32) + (local $ret i32) + (local $k i32) + (local $c32 i32) + (local $c64 i64) + (local $var$7 i32) + local.get $dest + local.set $ret + local.get $n i32.eqz if - local.get $3 + local.get $ret return end - local.get $0 - local.get $1 + local.get $dest + local.get $c i32.store8 - local.get $0 - local.get $2 + local.get $dest + local.get $n i32.add i32.const 1 i32.sub - local.get $1 + local.get $c i32.store8 - local.get $2 + local.get $n i32.const 2 i32.le_u if - local.get $3 + local.get $ret return end - local.get $0 + local.get $dest i32.const 1 i32.add - local.get $1 + local.get $c i32.store8 - local.get $0 + local.get $dest i32.const 2 i32.add - local.get $1 + local.get $c i32.store8 - local.get $0 - local.get $2 + local.get $dest + local.get $n i32.add i32.const 2 i32.sub - local.get $1 + local.get $c i32.store8 - local.get $0 - local.get $2 + local.get $dest + local.get $n i32.add i32.const 3 i32.sub - local.get $1 + local.get $c i32.store8 - local.get $2 + local.get $n i32.const 6 i32.le_u if - local.get $3 + local.get $ret return end - local.get $0 + local.get $dest i32.const 3 i32.add - local.get $1 + local.get $c i32.store8 - local.get $0 - local.get $2 + local.get $dest + local.get $n i32.add i32.const 4 i32.sub - local.get $1 + local.get $c i32.store8 - local.get $2 + local.get $n i32.const 8 i32.le_u if - local.get $3 + local.get $ret return end i32.const 0 - local.get $0 + local.get $dest i32.sub i32.const 3 i32.and - local.set $4 - local.get $0 - local.get $4 + local.set $k + local.get $dest + local.get $k i32.add - local.set $0 - local.get $2 - local.get $4 + local.set $dest + local.get $n + local.get $k i32.sub - local.set $2 - local.get $2 + local.set $n + local.get $n i32.const -4 i32.and - local.set $2 + local.set $n i32.const -1 i32.const 255 i32.div_u - local.get $1 + local.get $c i32.const 255 i32.and i32.mul - local.set $5 - local.get $0 - local.get $5 + local.set $c32 + local.get $dest + local.get $c32 i32.store - local.get $0 - local.get $2 + local.get $dest + local.get $n i32.add i32.const 4 i32.sub - local.get $5 + local.get $c32 i32.store - local.get $2 + local.get $n i32.const 8 i32.le_u if - local.get $3 + local.get $ret return end - local.get $0 + local.get $dest i32.const 4 i32.add - local.get $5 + local.get $c32 i32.store - local.get $0 + local.get $dest i32.const 8 i32.add - local.get $5 + local.get $c32 i32.store - local.get $0 - local.get $2 + local.get $dest + local.get $n i32.add i32.const 12 i32.sub - local.get $5 + local.get $c32 i32.store - local.get $0 - local.get $2 + local.get $dest + local.get $n i32.add i32.const 8 i32.sub - local.get $5 + local.get $c32 i32.store - local.get $2 + local.get $n i32.const 24 i32.le_u if - local.get $3 + local.get $ret return end - local.get $0 + local.get $dest i32.const 12 i32.add - local.get $5 + local.get $c32 i32.store - local.get $0 + local.get $dest i32.const 16 i32.add - local.get $5 + local.get $c32 i32.store - local.get $0 + local.get $dest i32.const 20 i32.add - local.get $5 + local.get $c32 i32.store - local.get $0 + local.get $dest i32.const 24 i32.add - local.get $5 + local.get $c32 i32.store - local.get $0 - local.get $2 + local.get $dest + local.get $n i32.add i32.const 28 i32.sub - local.get $5 + local.get $c32 i32.store - local.get $0 - local.get $2 + local.get $dest + local.get $n i32.add i32.const 24 i32.sub - local.get $5 + local.get $c32 i32.store - local.get $0 - local.get $2 + local.get $dest + local.get $n i32.add i32.const 20 i32.sub - local.get $5 + local.get $c32 i32.store - local.get $0 - local.get $2 + local.get $dest + local.get $n i32.add i32.const 16 i32.sub - local.get $5 + local.get $c32 i32.store i32.const 24 - local.get $0 + local.get $dest i32.const 4 i32.and i32.add - local.set $4 - local.get $0 - local.get $4 + local.set $k + local.get $dest + local.get $k i32.add - local.set $0 - local.get $2 - local.get $4 + local.set $dest + local.get $n + local.get $k i32.sub - local.set $2 - local.get $5 + local.set $n + local.get $c32 i64.extend_i32_u - local.get $5 + local.get $c32 i64.extend_i32_u i64.const 32 i64.shl i64.or - local.set $6 + local.set $c64 loop $while-continue|0 - local.get $2 + local.get $n i32.const 32 i32.ge_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $0 - local.get $6 + local.get $dest + local.get $c64 i64.store - local.get $0 + local.get $dest i32.const 8 i32.add - local.get $6 + local.get $c64 i64.store - local.get $0 + local.get $dest i32.const 16 i32.add - local.get $6 + local.get $c64 i64.store - local.get $0 + local.get $dest i32.const 24 i32.add - local.get $6 + local.get $c64 i64.store - local.get $2 + local.get $n i32.const 32 i32.sub - local.set $2 - local.get $0 + local.set $n + local.get $dest i32.const 32 i32.add - local.set $0 + local.set $dest br $while-continue|0 end end - local.get $3 + local.get $ret ) (func $start:memset global.get $~lib/memory/__heap_base diff --git a/tests/compiler/new.debug.wat b/tests/compiler/new.debug.wat index a06d166d75..90d613611f 100644 --- a/tests/compiler/new.debug.wat +++ b/tests/compiler/new.debug.wat @@ -57,50 +57,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -113,58 +113,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -181,12 +181,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -196,19 +196,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -219,27 +219,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -247,35 +247,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -285,15 +285,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -303,25 +303,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -329,33 +329,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -383,23 +383,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -411,15 +411,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -431,33 +431,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -465,21 +465,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -494,36 +494,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -531,67 +531,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -601,22 +601,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -626,12 +626,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -643,75 +643,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -723,38 +723,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -768,12 +768,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -784,38 +784,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -823,21 +823,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -852,101 +852,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -957,7 +957,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -968,26 +968,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1000,27 +1000,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1034,11 +1034,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1049,66 +1049,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1118,10 +1118,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1132,13 +1132,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1149,109 +1149,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1259,7 +1259,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1276,23 +1276,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1304,54 +1304,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1372,30 +1372,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1405,9 +1405,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1417,8 +1417,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1426,43 +1426,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1474,17 +1474,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1498,7 +1498,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1516,7 +1516,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1526,12 +1526,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1553,7 +1553,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1573,14 +1573,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1593,8 +1593,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1605,37 +1605,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1643,16 +1643,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1660,21 +1660,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1689,12 +1689,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1702,49 +1702,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1754,90 +1754,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1846,22 +1846,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1870,27 +1870,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1905,69 +1905,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1982,29 +1982,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2017,13 +2017,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2034,25 +2034,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2067,10 +2067,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2088,45 +2088,45 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $new/Ref#get:ref (param $0 i32) (result i32) - local.get $0 + (func $new/Ref#get:ref (param $this i32) (result i32) + local.get $this ) - (func $new/Gen#get:gen (param $0 i32) (result i32) - local.get $0 + (func $new/Gen#get:gen (param $this i32) (result i32) + local.get $this ) - (func $new/ns.Ref#get:ref (param $0 i32) (result i32) - local.get $0 + (func $new/ns.Ref#get:ref (param $this i32) (result i32) + local.get $this ) (func $~lib/rt/__visit_globals (param $0 i32) (local $1 i32) diff --git a/tests/compiler/number.debug.wat b/tests/compiler/number.debug.wat index 9d1d2822b8..b655731ba0 100644 --- a/tests/compiler/number.debug.wat +++ b/tests/compiler/number.debug.wat @@ -91,28 +91,28 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (start $~start) - (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) - local.get $0 + (func $~lib/util/number/decimalCount32 (param $value i32) (result i32) + local.get $value i32.const 100000 i32.lt_u if - local.get $0 + local.get $value i32.const 100 i32.lt_u if i32.const 1 - local.get $0 + local.get $value i32.const 10 i32.ge_u i32.add return else i32.const 3 - local.get $0 + local.get $value i32.const 10000 i32.ge_u i32.add - local.get $0 + local.get $value i32.const 1000 i32.ge_u i32.add @@ -120,23 +120,23 @@ end unreachable else - local.get $0 + local.get $value i32.const 10000000 i32.lt_u if i32.const 6 - local.get $0 + local.get $value i32.const 1000000 i32.ge_u i32.add return else i32.const 8 - local.get $0 + local.get $value i32.const 1000000000 i32.ge_u i32.add - local.get $0 + local.get $value i32.const 100000000 i32.ge_u i32.add @@ -156,50 +156,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -212,58 +212,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -280,12 +280,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -295,19 +295,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -318,27 +318,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -346,35 +346,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -384,15 +384,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -402,25 +402,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -428,33 +428,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -482,23 +482,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -510,15 +510,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -530,33 +530,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -564,21 +564,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -593,36 +593,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -630,67 +630,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -700,22 +700,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -725,12 +725,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -742,75 +742,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -822,38 +822,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -867,12 +867,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -883,38 +883,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -922,21 +922,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -951,101 +951,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -1056,7 +1056,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1067,26 +1067,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1099,27 +1099,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1133,11 +1133,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1148,66 +1148,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1217,10 +1217,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1231,13 +1231,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1248,109 +1248,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1358,7 +1358,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1375,23 +1375,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1403,54 +1403,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1471,30 +1471,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1504,9 +1504,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1516,8 +1516,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1525,43 +1525,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1573,17 +1573,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1597,7 +1597,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1615,7 +1615,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1625,12 +1625,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1652,7 +1652,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1672,14 +1672,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1692,8 +1692,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1704,37 +1704,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1742,16 +1742,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1759,21 +1759,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1788,12 +1788,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1801,49 +1801,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1853,90 +1853,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1945,22 +1945,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1969,27 +1969,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -2004,69 +2004,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2081,29 +2081,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2116,13 +2116,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2133,25 +2133,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2166,10 +2166,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2187,97 +2187,97 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/util/number/utoa32_dec_lut (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 i64) - (local $9 i64) - (local $10 i32) - (local $11 i32) + (func $~lib/util/number/utoa32_dec_lut (param $buffer i32) (param $num i32) (param $offset i32) + (local $var$3 i32) + (local $t i32) + (local $r i32) + (local $d1 i32) + (local $d2 i32) + (local $digits1 i64) + (local $digits2 i64) + (local $var$10 i32) + (local $var$11 i32) loop $while-continue|0 - local.get $1 + local.get $num i32.const 10000 i32.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $1 + local.get $num i32.const 10000 i32.div_u - local.set $4 - local.get $1 + local.set $t + local.get $num i32.const 10000 i32.rem_u - local.set $5 - local.get $4 - local.set $1 - local.get $5 + local.set $r + local.get $t + local.set $num + local.get $r i32.const 100 i32.div_u - local.set $6 - local.get $5 + local.set $d1 + local.get $r i32.const 100 i32.rem_u - local.set $7 + local.set $d2 i32.const 636 - local.get $6 + local.get $d1 i32.const 2 i32.shl i32.add i64.load32_u - local.set $8 + local.set $digits1 i32.const 636 - local.get $7 + local.get $d2 i32.const 2 i32.shl i32.add i64.load32_u - local.set $9 - local.get $2 + local.set $digits2 + local.get $offset i32.const 4 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $8 - local.get $9 + local.get $digits1 + local.get $digits2 i64.const 32 i64.shl i64.or @@ -2285,99 +2285,99 @@ br $while-continue|0 end end - local.get $1 + local.get $num i32.const 100 i32.ge_u if - local.get $1 + local.get $num i32.const 100 i32.div_u - local.set $3 - local.get $1 + local.set $var$3 + local.get $num i32.const 100 i32.rem_u - local.set $10 - local.get $3 - local.set $1 - local.get $2 + local.set $var$10 + local.get $var$3 + local.set $num + local.get $offset i32.const 2 i32.sub - local.set $2 + local.set $offset i32.const 636 - local.get $10 + local.get $var$10 i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store end - local.get $1 + local.get $num i32.const 10 i32.ge_u if - local.get $2 + local.get $offset i32.const 2 i32.sub - local.set $2 + local.set $offset i32.const 636 - local.get $1 + local.get $num i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store else - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 + local.set $offset i32.const 48 - local.get $1 + local.get $num i32.add - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store16 end ) - (func $~lib/util/number/utoa_hex_lut (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i32) + (func $~lib/util/number/utoa_hex_lut (param $buffer i32) (param $num i64) (param $offset i32) + (local $var$3 i32) loop $while-continue|0 - local.get $2 + local.get $offset i32.const 2 i32.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $2 + local.get $offset i32.const 2 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 1056 - local.get $1 + local.get $num i32.wrap_i64 i32.const 255 i32.and @@ -2386,20 +2386,20 @@ i32.add i32.load i32.store - local.get $1 + local.get $num i64.const 8 i64.shr_u - local.set $1 + local.set $num br $while-continue|0 end end - local.get $2 + local.get $offset i32.const 1 i32.and if - local.get $0 + local.get $buffer i32.const 1056 - local.get $1 + local.get $num i32.wrap_i64 i32.const 6 i32.shl @@ -2408,25 +2408,25 @@ i32.store16 end ) - (func $~lib/util/number/ulog_base (param $0 i64) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) - (local $4 i64) - (local $5 i32) - local.get $1 - local.set $2 - local.get $2 + (func $~lib/util/number/ulog_base (param $num i64) (param $base i32) (result i32) + (local $var$2 i32) + (local $b64 i64) + (local $b i64) + (local $e i32) + local.get $base + local.set $var$2 + local.get $var$2 i32.popcnt i32.const 1 i32.eq if i32.const 63 - local.get $0 + local.get $num i64.clz i32.wrap_i64 i32.sub i32.const 31 - local.get $1 + local.get $base i32.clz i32.sub i32.div_u @@ -2434,95 +2434,95 @@ i32.add return end - local.get $1 + local.get $base i64.extend_i32_s - local.set $3 - local.get $3 - local.set $4 + local.set $b64 + local.get $b64 + local.set $b i32.const 1 - local.set $5 + local.set $e loop $while-continue|0 - local.get $0 - local.get $4 + local.get $num + local.get $b i64.ge_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 - local.get $4 + local.get $num + local.get $b i64.div_u - local.set $0 - local.get $4 - local.get $4 + local.set $num + local.get $b + local.get $b i64.mul - local.set $4 - local.get $5 + local.set $b + local.get $e i32.const 1 i32.shl - local.set $5 + local.set $e br $while-continue|0 end end loop $while-continue|1 - local.get $0 + local.get $num i64.const 1 i64.ge_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 - local.get $3 + local.get $num + local.get $b64 i64.div_u - local.set $0 - local.get $5 + local.set $num + local.get $e i32.const 1 i32.add - local.set $5 + local.set $e br $while-continue|1 end end - local.get $5 + local.get $e i32.const 1 i32.sub ) - (func $~lib/util/number/utoa64_any_core (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i32) - (local $4 i64) - (local $5 i64) - (local $6 i64) - local.get $3 + (func $~lib/util/number/utoa64_any_core (param $buffer i32) (param $num i64) (param $offset i32) (param $radix i32) + (local $base i64) + (local $var$5 i64) + (local $q i64) + local.get $radix i64.extend_i32_s - local.set $4 - local.get $3 - local.get $3 + local.set $base + local.get $radix + local.get $radix i32.const 1 i32.sub i32.and i32.const 0 i32.eq if - local.get $3 + local.get $radix i32.ctz i32.const 7 i32.and i64.extend_i32_s - local.set $5 - local.get $4 + local.set $var$5 + local.get $base i64.const 1 i64.sub - local.set $6 + local.set $q loop $do-loop|0 - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 2112 - local.get $1 - local.get $6 + local.get $num + local.get $q i64.and i32.wrap_i64 i32.const 1 @@ -2530,34 +2530,34 @@ i32.add i32.load16_u i32.store16 - local.get $1 - local.get $5 + local.get $num + local.get $var$5 i64.shr_u - local.set $1 - local.get $1 + local.set $num + local.get $num i64.const 0 i64.ne br_if $do-loop|0 end else loop $do-loop|1 - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 - local.get $1 - local.get $4 + local.set $offset + local.get $num + local.get $base i64.div_u - local.set $6 - local.get $0 - local.get $2 + local.set $q + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 2112 - local.get $1 - local.get $6 - local.get $4 + local.get $num + local.get $q + local.get $base i64.mul i64.sub i32.wrap_i64 @@ -2566,58 +2566,58 @@ i32.add i32.load16_u i32.store16 - local.get $6 - local.set $1 - local.get $1 + local.get $q + local.set $num + local.get $num i64.const 0 i64.ne br_if $do-loop|1 end end ) - (func $~lib/number/I32#toString (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/number/I32#toString (param $this i32) (param $radix i32) (result i32) + local.get $this + local.get $radix call $~lib/util/number/itoa32 ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.get $1 + (func $~lib/util/string/compareImpl (param $str1 i32) (param $index1 i32) (param $str2 i32) (param $index2 i32) (param $len i32) (result i32) + (local $ptr1 i32) + (local $ptr2 i32) + (local $var$7 i32) + (local $a i32) + (local $b i32) + local.get $str1 + local.get $index1 i32.const 1 i32.shl i32.add - local.set $5 - local.get $2 - local.get $3 + local.set $ptr1 + local.get $str2 + local.get $index2 i32.const 1 i32.shl i32.add - local.set $6 + local.set $ptr2 i32.const 0 i32.const 2 i32.lt_s drop - local.get $4 + local.get $len i32.const 4 i32.ge_u if (result i32) - local.get $5 + local.get $ptr1 i32.const 7 i32.and - local.get $6 + local.get $ptr2 i32.const 7 i32.and i32.or @@ -2628,27 +2628,27 @@ if block $do-break|0 loop $do-loop|0 - local.get $5 + local.get $ptr1 i64.load - local.get $6 + local.get $ptr2 i64.load i64.ne if br $do-break|0 end - local.get $5 + local.get $ptr1 i32.const 8 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 8 i32.add - local.set $6 - local.get $4 + local.set $ptr2 + local.get $len i32.const 4 i32.sub - local.set $4 - local.get $4 + local.set $len + local.get $len i32.const 4 i32.ge_u br_if $do-loop|0 @@ -2656,59 +2656,59 @@ end end loop $while-continue|1 - local.get $4 - local.tee $7 + local.get $len + local.tee $var$7 i32.const 1 i32.sub - local.set $4 - local.get $7 - local.set $7 - local.get $7 + local.set $len + local.get $var$7 + local.set $var$7 + local.get $var$7 if - local.get $5 + local.get $ptr1 i32.load16_u - local.set $8 - local.get $6 + local.set $a + local.get $ptr2 i32.load16_u - local.set $9 - local.get $8 - local.get $9 + local.set $b + local.get $a + local.get $b i32.ne if - local.get $8 - local.get $9 + local.get $a + local.get $b i32.sub return end - local.get $5 + local.get $ptr1 i32.const 2 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 2 i32.add - local.set $6 + local.set $ptr2 br $while-continue|1 end end i32.const 0 ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__eq (param $left i32) (param $right i32) (result i32) + (local $leftLength i32) + local.get $left + local.get $right i32.eq if i32.const 1 return end - local.get $0 + local.get $left i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $1 + local.get $right i32.const 0 i32.eq end @@ -2716,85 +2716,85 @@ i32.const 0 return end - local.get $0 + local.get $left call $~lib/string/String#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $leftLength + local.get $leftLength + local.get $right call $~lib/string/String#get:length i32.ne if i32.const 0 return end - local.get $0 + local.get $left i32.const 0 - local.get $1 + local.get $right i32.const 0 - local.get $2 + local.get $leftLength call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i64) - (local $11 i32) - (local $12 i64) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i32) - (local $24 i32) - (local $25 i32) - (local $26 i32) - (local $27 i64) + (func $~lib/util/number/genDigits (param $buffer i32) (param $w_frc i64) (param $w_exp i32) (param $mp_frc i64) (param $mp_exp i32) (param $delta i64) (param $sign i32) (result i32) + (local $one_exp i32) + (local $one_frc i64) + (local $mask i64) + (local $wp_w_frc i64) + (local $p1 i32) + (local $p2 i64) + (local $kappa i32) + (local $len i32) + (local $var$15 i32) + (local $d i32) + (local $var$17 i32) + (local $tmp i64) + (local $var$19 i64) + (local $var$20 i64) + (local $var$21 i64) + (local $d_0 i64) + (local $var$23 i32) + (local $var$24 i32) + (local $var$25 i32) + (local $var$26 i32) + (local $var$27 i64) i32.const 0 - local.get $4 + local.get $mp_exp i32.sub - local.set $7 + local.set $one_exp i64.const 1 - local.get $7 + local.get $one_exp i64.extend_i32_s i64.shl - local.set $8 - local.get $8 + local.set $one_frc + local.get $one_frc i64.const 1 i64.sub - local.set $9 - local.get $3 - local.get $1 + local.set $mask + local.get $mp_frc + local.get $w_frc i64.sub - local.set $10 - local.get $3 - local.get $7 + local.set $wp_w_frc + local.get $mp_frc + local.get $one_exp i64.extend_i32_s i64.shr_u i32.wrap_i64 - local.set $11 - local.get $3 - local.get $9 + local.set $p1 + local.get $mp_frc + local.get $mask i64.and - local.set $12 - local.get $11 + local.set $p2 + local.get $p1 call $~lib/util/number/decimalCount32 - local.set $13 - local.get $6 - local.set $14 + local.set $kappa + local.get $sign + local.set $len loop $while-continue|0 - local.get $13 + local.get $kappa i32.const 0 i32.gt_s - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 if block $break|1 block $case10|1 @@ -2808,275 +2808,275 @@ block $case2|1 block $case1|1 block $case0|1 - local.get $13 - local.set $17 - local.get $17 + local.get $kappa + local.set $var$17 + local.get $var$17 i32.const 10 i32.eq br_if $case0|1 - local.get $17 + local.get $var$17 i32.const 9 i32.eq br_if $case1|1 - local.get $17 + local.get $var$17 i32.const 8 i32.eq br_if $case2|1 - local.get $17 + local.get $var$17 i32.const 7 i32.eq br_if $case3|1 - local.get $17 + local.get $var$17 i32.const 6 i32.eq br_if $case4|1 - local.get $17 + local.get $var$17 i32.const 5 i32.eq br_if $case5|1 - local.get $17 + local.get $var$17 i32.const 4 i32.eq br_if $case6|1 - local.get $17 + local.get $var$17 i32.const 3 i32.eq br_if $case7|1 - local.get $17 + local.get $var$17 i32.const 2 i32.eq br_if $case8|1 - local.get $17 + local.get $var$17 i32.const 1 i32.eq br_if $case9|1 br $case10|1 end - local.get $11 + local.get $p1 i32.const 1000000000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 1000000000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 100000000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 100000000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 10000000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 10000000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 1000000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 1000000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 100000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 100000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 10000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 10000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 1000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 1000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 100 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 100 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 10 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 10 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 - local.set $16 + local.get $p1 + local.set $d i32.const 0 - local.set $11 + local.set $p1 br $break|1 end i32.const 0 - local.set $16 + local.set $d br $break|1 end - local.get $16 - local.get $14 + local.get $d + local.get $len i32.or if - local.get $0 - local.get $14 - local.tee $17 + local.get $buffer + local.get $len + local.tee $var$17 i32.const 1 i32.add - local.set $14 - local.get $17 + local.set $len + local.get $var$17 i32.const 1 i32.shl i32.add i32.const 48 - local.get $16 + local.get $d i32.const 65535 i32.and i32.add i32.store16 end - local.get $13 + local.get $kappa i32.const 1 i32.sub - local.set $13 - local.get $11 + local.set $kappa + local.get $p1 i64.extend_i32_u - local.get $7 + local.get $one_exp i64.extend_i32_s i64.shl - local.get $12 + local.get $p2 i64.add - local.set $18 - local.get $18 - local.get $5 + local.set $tmp + local.get $tmp + local.get $delta i64.le_u if global.get $~lib/util/number/_K - local.get $13 + local.get $kappa i32.add global.set $~lib/util/number/_K - local.get $0 - local.set $23 - local.get $14 - local.set $17 - local.get $5 - local.set $22 - local.get $18 - local.set $21 + local.get $buffer + local.set $var$23 + local.get $len + local.set $var$17 + local.get $delta + local.set $d_0 + local.get $tmp + local.set $var$21 i32.const 3360 - local.get $13 + local.get $kappa i32.const 2 i32.shl i32.add i64.load32_u - local.get $7 + local.get $one_exp i64.extend_i32_s i64.shl - local.set $20 - local.get $10 - local.set $19 - local.get $23 - local.get $17 + local.set $var$20 + local.get $wp_w_frc + local.set $var$19 + local.get $var$23 + local.get $var$17 i32.const 1 i32.sub i32.const 1 i32.shl i32.add - local.set $24 - local.get $24 + local.set $var$24 + local.get $var$24 i32.load16_u - local.set $25 + local.set $var$25 loop $while-continue|3 - local.get $21 - local.get $19 + local.get $var$21 + local.get $var$19 i64.lt_u if (result i32) - local.get $22 - local.get $21 + local.get $d_0 + local.get $var$21 i64.sub - local.get $20 + local.get $var$20 i64.ge_u else i32.const 0 end if (result i32) - local.get $21 - local.get $20 + local.get $var$21 + local.get $var$20 i64.add - local.get $19 + local.get $var$19 i64.lt_u if (result i32) i32.const 1 else - local.get $19 - local.get $21 + local.get $var$19 + local.get $var$21 i64.sub - local.get $21 - local.get $20 + local.get $var$21 + local.get $var$20 i64.add - local.get $19 + local.get $var$19 i64.sub i64.gt_u end else i32.const 0 end - local.set $26 - local.get $26 + local.set $var$26 + local.get $var$26 if - local.get $25 + local.get $var$25 i32.const 1 i32.sub - local.set $25 - local.get $21 - local.get $20 + local.set $var$25 + local.get $var$21 + local.get $var$20 i64.add - local.set $21 + local.set $var$21 br $while-continue|3 end end - local.get $24 - local.get $25 + local.get $var$24 + local.get $var$25 i32.store16 - local.get $14 + local.get $len return end br $while-continue|0 @@ -3084,150 +3084,150 @@ end loop $while-continue|4 i32.const 1 - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 if - local.get $12 + local.get $p2 i64.const 10 i64.mul - local.set $12 - local.get $5 + local.set $p2 + local.get $delta i64.const 10 i64.mul - local.set $5 - local.get $12 - local.get $7 + local.set $delta + local.get $p2 + local.get $one_exp i64.extend_i32_s i64.shr_u - local.set $22 - local.get $22 - local.get $14 + local.set $d_0 + local.get $d_0 + local.get $len i64.extend_i32_s i64.or i64.const 0 i64.ne if - local.get $0 - local.get $14 - local.tee $25 + local.get $buffer + local.get $len + local.tee $var$25 i32.const 1 i32.add - local.set $14 - local.get $25 + local.set $len + local.get $var$25 i32.const 1 i32.shl i32.add i32.const 48 - local.get $22 + local.get $d_0 i32.wrap_i64 i32.const 65535 i32.and i32.add i32.store16 end - local.get $12 - local.get $9 + local.get $p2 + local.get $mask i64.and - local.set $12 - local.get $13 + local.set $p2 + local.get $kappa i32.const 1 i32.sub - local.set $13 - local.get $12 - local.get $5 + local.set $kappa + local.get $p2 + local.get $delta i64.lt_u if global.get $~lib/util/number/_K - local.get $13 + local.get $kappa i32.add global.set $~lib/util/number/_K - local.get $10 + local.get $wp_w_frc i32.const 3360 i32.const 0 - local.get $13 + local.get $kappa i32.sub i32.const 2 i32.shl i32.add i64.load32_u i64.mul - local.set $10 - local.get $0 - local.set $17 - local.get $14 - local.set $26 - local.get $5 - local.set $27 - local.get $12 - local.set $21 - local.get $8 - local.set $20 - local.get $10 - local.set $19 - local.get $17 - local.get $26 + local.set $wp_w_frc + local.get $buffer + local.set $var$17 + local.get $len + local.set $var$26 + local.get $delta + local.set $var$27 + local.get $p2 + local.set $var$21 + local.get $one_frc + local.set $var$20 + local.get $wp_w_frc + local.set $var$19 + local.get $var$17 + local.get $var$26 i32.const 1 i32.sub i32.const 1 i32.shl i32.add - local.set $25 - local.get $25 + local.set $var$25 + local.get $var$25 i32.load16_u - local.set $24 + local.set $var$24 loop $while-continue|6 - local.get $21 - local.get $19 + local.get $var$21 + local.get $var$19 i64.lt_u if (result i32) - local.get $27 - local.get $21 + local.get $var$27 + local.get $var$21 i64.sub - local.get $20 + local.get $var$20 i64.ge_u else i32.const 0 end if (result i32) - local.get $21 - local.get $20 + local.get $var$21 + local.get $var$20 i64.add - local.get $19 + local.get $var$19 i64.lt_u if (result i32) i32.const 1 else - local.get $19 - local.get $21 + local.get $var$19 + local.get $var$21 i64.sub - local.get $21 - local.get $20 + local.get $var$21 + local.get $var$20 i64.add - local.get $19 + local.get $var$19 i64.sub i64.gt_u end else i32.const 0 end - local.set $23 - local.get $23 + local.set $var$23 + local.get $var$23 if - local.get $24 + local.get $var$24 i32.const 1 i32.sub - local.set $24 - local.get $21 - local.get $20 + local.set $var$24 + local.get $var$21 + local.get $var$20 i64.add - local.set $21 + local.set $var$21 br $while-continue|6 end end - local.get $25 - local.get $24 + local.get $var$25 + local.get $var$24 i32.store16 - local.get $14 + local.get $len return end br $while-continue|4 @@ -3235,21 +3235,21 @@ end unreachable ) - (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $2 + (func $~lib/util/number/prettify (param $buffer i32) (param $length i32) (param $k i32) (result i32) + (local $kk i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $k i32.eqz if - local.get $0 - local.get $1 + local.get $buffer + local.get $length i32.const 1 i32.shl i32.add @@ -3259,51 +3259,51 @@ i32.shl i32.or i32.store - local.get $1 + local.get $length i32.const 2 i32.add return end - local.get $1 - local.get $2 + local.get $length + local.get $k i32.add - local.set $3 - local.get $1 - local.get $3 + local.set $kk + local.get $length + local.get $kk i32.le_s if (result i32) - local.get $3 + local.get $kk i32.const 21 i32.le_s else i32.const 0 end if - local.get $1 - local.set $4 + local.get $length + local.set $var$4 loop $for-loop|0 - local.get $4 - local.get $3 + local.get $var$4 + local.get $kk i32.lt_s - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $0 - local.get $4 + local.get $buffer + local.get $var$4 i32.const 1 i32.shl i32.add i32.const 48 i32.store16 - local.get $4 + local.get $var$4 i32.const 1 i32.add - local.set $4 + local.set $var$4 br $for-loop|0 end end - local.get $0 - local.get $3 + local.get $buffer + local.get $kk i32.const 1 i32.shl i32.add @@ -3313,55 +3313,55 @@ i32.shl i32.or i32.store - local.get $3 + local.get $kk i32.const 2 i32.add return else - local.get $3 + local.get $kk i32.const 0 i32.gt_s if (result i32) - local.get $3 + local.get $kk i32.const 21 i32.le_s else i32.const 0 end if - local.get $0 - local.get $3 + local.get $buffer + local.get $kk i32.const 1 i32.shl i32.add - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 i32.const 2 i32.add - local.get $4 + local.get $var$4 i32.const 0 - local.get $2 + local.get $k i32.sub i32.const 1 i32.shl memory.copy - local.get $0 - local.get $3 + local.get $buffer + local.get $kk i32.const 1 i32.shl i32.add i32.const 46 i32.store16 - local.get $1 + local.get $length i32.const 1 i32.add return else i32.const -6 - local.get $3 + local.get $kk i32.lt_s if (result i32) - local.get $3 + local.get $kk i32.const 0 i32.le_s else @@ -3369,20 +3369,20 @@ end if i32.const 2 - local.get $3 + local.get $kk i32.sub - local.set $4 - local.get $0 - local.get $4 + local.set $var$4 + local.get $buffer + local.get $var$4 i32.const 1 i32.shl i32.add - local.get $0 - local.get $1 + local.get $buffer + local.get $length i32.const 1 i32.shl memory.copy - local.get $0 + local.get $buffer i32.const 48 i32.const 46 i32.const 16 @@ -3390,164 +3390,164 @@ i32.or i32.store i32.const 2 - local.set $5 + local.set $var$5 loop $for-loop|1 - local.get $5 - local.get $4 + local.get $var$5 + local.get $var$4 i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $5 + local.get $buffer + local.get $var$5 i32.const 1 i32.shl i32.add i32.const 48 i32.store16 - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|1 end end - local.get $1 - local.get $4 + local.get $length + local.get $var$4 i32.add return else - local.get $1 + local.get $length i32.const 1 i32.eq if - local.get $0 + local.get $buffer i32.const 101 i32.store16 offset=2 - local.get $0 + local.get $buffer i32.const 4 i32.add - local.set $5 - local.get $3 + local.set $var$5 + local.get $kk i32.const 1 i32.sub - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 i32.const 0 i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if i32.const 0 - local.get $6 + local.get $var$6 i32.sub - local.set $6 + local.set $var$6 end - local.get $6 + local.get $var$6 call $~lib/util/number/decimalCount32 i32.const 1 i32.add - local.set $7 - local.get $5 - local.set $10 - local.get $6 - local.set $9 - local.get $7 - local.set $8 + local.set $var$7 + local.get $var$5 + local.set $var$10 + local.get $var$6 + local.set $var$9 + local.get $var$7 + local.set $var$8 i32.const 0 i32.const 1 i32.ge_s drop - local.get $10 - local.get $9 - local.get $8 + local.get $var$10 + local.get $var$9 + local.get $var$8 call $~lib/util/number/utoa32_dec_lut - local.get $5 + local.get $var$5 i32.const 45 i32.const 43 - local.get $4 + local.get $var$4 select i32.store16 - local.get $7 - local.set $1 - local.get $1 + local.get $var$7 + local.set $length + local.get $length i32.const 2 i32.add return else - local.get $1 + local.get $length i32.const 1 i32.shl - local.set $7 - local.get $0 + local.set $var$7 + local.get $buffer i32.const 4 i32.add - local.get $0 + local.get $buffer i32.const 2 i32.add - local.get $7 + local.get $var$7 i32.const 2 i32.sub memory.copy - local.get $0 + local.get $buffer i32.const 46 i32.store16 offset=2 - local.get $0 - local.get $7 + local.get $buffer + local.get $var$7 i32.add i32.const 101 i32.store16 offset=2 - local.get $1 - local.get $0 - local.get $7 + local.get $length + local.get $buffer + local.get $var$7 i32.add i32.const 4 i32.add - local.set $9 - local.get $3 + local.set $var$9 + local.get $kk i32.const 1 i32.sub - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 i32.const 0 i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if i32.const 0 - local.get $8 + local.get $var$8 i32.sub - local.set $8 + local.set $var$8 end - local.get $8 + local.get $var$8 call $~lib/util/number/decimalCount32 i32.const 1 i32.add - local.set $5 - local.get $9 - local.set $11 - local.get $8 - local.set $6 - local.get $5 - local.set $10 + local.set $var$5 + local.get $var$9 + local.set $var$11 + local.get $var$8 + local.set $var$6 + local.get $var$5 + local.set $var$10 i32.const 0 i32.const 1 i32.ge_s drop - local.get $11 - local.get $6 - local.get $10 + local.get $var$11 + local.get $var$6 + local.get $var$10 call $~lib/util/number/utoa32_dec_lut - local.get $9 + local.get $var$9 i32.const 45 i32.const 43 - local.get $4 + local.get $var$4 select i32.store16 - local.get $5 + local.get $var$5 i32.add - local.set $1 - local.get $1 + local.set $length + local.get $length i32.const 2 i32.add return @@ -3560,497 +3560,497 @@ end unreachable ) - (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f64) - (local $6 i64) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i32) - (local $11 i64) - (local $12 i64) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 f64) - (local $17 i64) - (local $18 i64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i64) - (local $24 i64) - (local $25 i64) - (local $26 i32) - (local $27 i64) - (local $28 i32) - local.get $1 + (func $~lib/util/number/dtoa_core (param $buffer i32) (param $value f64) (result i32) + (local $sign i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 f64) + (local $var$6 i64) + (local $var$7 i32) + (local $var$8 i64) + (local $var$9 i64) + (local $var$10 i32) + (local $var$11 i64) + (local $var$12 i64) + (local $var$13 i32) + (local $var$14 i32) + (local $var$15 i32) + (local $var$16 f64) + (local $var$17 i64) + (local $var$18 i64) + (local $var$19 i64) + (local $var$20 i64) + (local $var$21 i64) + (local $var$22 i64) + (local $var$23 i64) + (local $var$24 i64) + (local $var$25 i64) + (local $var$26 i32) + (local $var$27 i64) + (local $len i32) + local.get $value f64.const 0 f64.lt - local.set $2 - local.get $2 + local.set $sign + local.get $sign if - local.get $1 + local.get $value f64.neg - local.set $1 - local.get $0 + local.set $value + local.get $buffer i32.const 45 i32.store16 end - local.get $1 - local.set $5 - local.get $0 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.get $value + local.set $var$5 + local.get $buffer + local.set $var$4 + local.get $sign + local.set $var$3 + local.get $var$5 i64.reinterpret_f64 - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 i64.const 9218868437227405312 i64.and i64.const 52 i64.shr_u i32.wrap_i64 - local.set $7 - local.get $6 + local.set $var$7 + local.get $var$6 i64.const 4503599627370495 i64.and - local.set $8 - local.get $7 + local.set $var$8 + local.get $var$7 i32.const 0 i32.ne i64.extend_i32_u i64.const 52 i64.shl - local.get $8 + local.get $var$8 i64.add - local.set $9 - local.get $7 + local.set $var$9 + local.get $var$7 i32.const 1 - local.get $7 + local.get $var$7 select i32.const 1023 i32.const 52 i32.add i32.sub - local.set $7 - local.get $9 - local.set $11 - local.get $7 - local.set $10 - local.get $11 + local.set $var$7 + local.get $var$9 + local.set $var$11 + local.get $var$7 + local.set $var$10 + local.get $var$11 i64.const 1 i64.shl i64.const 1 i64.add - local.set $12 - local.get $10 + local.set $var$12 + local.get $var$10 i32.const 1 i32.sub - local.set $13 - local.get $12 + local.set $var$13 + local.get $var$12 i64.clz i32.wrap_i64 - local.set $14 - local.get $12 - local.get $14 + local.set $var$14 + local.get $var$12 + local.get $var$14 i64.extend_i32_s i64.shl - local.set $12 - local.get $13 - local.get $14 + local.set $var$12 + local.get $var$13 + local.get $var$14 i32.sub - local.set $13 + local.set $var$13 i32.const 1 - local.get $11 + local.get $var$11 i64.const 4503599627370496 i64.eq i32.add - local.set $15 - local.get $12 + local.set $var$15 + local.get $var$12 global.set $~lib/util/number/_frc_plus - local.get $11 - local.get $15 + local.get $var$11 + local.get $var$15 i64.extend_i32_s i64.shl i64.const 1 i64.sub - local.get $10 - local.get $15 + local.get $var$10 + local.get $var$15 i32.sub - local.get $13 + local.get $var$13 i32.sub i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_minus - local.get $13 + local.get $var$13 global.set $~lib/util/number/_exp global.get $~lib/util/number/_exp - local.set $10 + local.set $var$10 i32.const -61 - local.get $10 + local.get $var$10 i32.sub f64.convert_i32_s f64.const 0.30102999566398114 f64.mul f64.const 347 f64.add - local.set $16 - local.get $16 + local.set $var$16 + local.get $var$16 i32.trunc_sat_f64_s - local.set $15 - local.get $15 - local.get $15 + local.set $var$15 + local.get $var$15 + local.get $var$15 f64.convert_i32_s - local.get $16 + local.get $var$16 f64.ne i32.add - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 i32.const 3 i32.shr_s i32.const 1 i32.add - local.set $14 + local.set $var$14 i32.const 348 - local.get $14 + local.get $var$14 i32.const 3 i32.shl i32.sub global.set $~lib/util/number/_K i32.const 2488 - local.get $14 + local.get $var$14 i32.const 3 i32.shl i32.add i64.load global.set $~lib/util/number/_frc_pow i32.const 3184 - local.get $14 + local.get $var$14 i32.const 1 i32.shl i32.add i32.load16_s global.set $~lib/util/number/_exp_pow - local.get $9 + local.get $var$9 i64.clz i32.wrap_i64 - local.set $14 - local.get $9 - local.get $14 + local.set $var$14 + local.get $var$9 + local.get $var$14 i64.extend_i32_s i64.shl - local.set $9 - local.get $7 - local.get $14 + local.set $var$9 + local.get $var$7 + local.get $var$14 i32.sub - local.set $7 + local.set $var$7 global.get $~lib/util/number/_frc_pow - local.set $12 + local.set $var$12 global.get $~lib/util/number/_exp_pow - local.set $15 - local.get $9 - local.set $17 - local.get $12 - local.set $11 - local.get $17 + local.set $var$15 + local.get $var$9 + local.set $var$17 + local.get $var$12 + local.set $var$11 + local.get $var$17 i64.const 4294967295 i64.and - local.set $18 - local.get $11 + local.set $var$18 + local.get $var$11 i64.const 4294967295 i64.and - local.set $19 - local.get $17 + local.set $var$19 + local.get $var$17 i64.const 32 i64.shr_u - local.set $20 - local.get $11 + local.set $var$20 + local.get $var$11 i64.const 32 i64.shr_u - local.set $21 - local.get $18 - local.get $19 + local.set $var$21 + local.get $var$18 + local.get $var$19 i64.mul - local.set $22 - local.get $20 - local.get $19 + local.set $var$22 + local.get $var$20 + local.get $var$19 i64.mul - local.get $22 + local.get $var$22 i64.const 32 i64.shr_u i64.add - local.set $23 - local.get $18 - local.get $21 + local.set $var$23 + local.get $var$18 + local.get $var$21 i64.mul - local.get $23 + local.get $var$23 i64.const 4294967295 i64.and i64.add - local.set $24 - local.get $24 + local.set $var$24 + local.get $var$24 i64.const 2147483647 i64.add - local.set $24 - local.get $23 + local.set $var$24 + local.get $var$23 i64.const 32 i64.shr_u - local.set $23 - local.get $24 + local.set $var$23 + local.get $var$24 i64.const 32 i64.shr_u - local.set $24 - local.get $20 - local.get $21 + local.set $var$24 + local.get $var$20 + local.get $var$21 i64.mul - local.get $23 + local.get $var$23 i64.add - local.get $24 + local.get $var$24 i64.add - local.set $24 - local.get $7 - local.set $10 - local.get $15 - local.set $13 - local.get $10 - local.get $13 + local.set $var$24 + local.get $var$7 + local.set $var$10 + local.get $var$15 + local.set $var$13 + local.get $var$10 + local.get $var$13 i32.add i32.const 64 i32.add - local.set $10 + local.set $var$10 global.get $~lib/util/number/_frc_plus - local.set $17 - local.get $12 - local.set $11 - local.get $17 + local.set $var$17 + local.get $var$12 + local.set $var$11 + local.get $var$17 i64.const 4294967295 i64.and - local.set $23 - local.get $11 + local.set $var$23 + local.get $var$11 i64.const 4294967295 i64.and - local.set $22 - local.get $17 + local.set $var$22 + local.get $var$17 i64.const 32 i64.shr_u - local.set $21 - local.get $11 + local.set $var$21 + local.get $var$11 i64.const 32 i64.shr_u - local.set $20 - local.get $23 - local.get $22 + local.set $var$20 + local.get $var$23 + local.get $var$22 i64.mul - local.set $19 - local.get $21 - local.get $22 + local.set $var$19 + local.get $var$21 + local.get $var$22 i64.mul - local.get $19 + local.get $var$19 i64.const 32 i64.shr_u i64.add - local.set $18 - local.get $23 - local.get $20 + local.set $var$18 + local.get $var$23 + local.get $var$20 i64.mul - local.get $18 + local.get $var$18 i64.const 4294967295 i64.and i64.add - local.set $25 - local.get $25 + local.set $var$25 + local.get $var$25 i64.const 2147483647 i64.add - local.set $25 - local.get $18 + local.set $var$25 + local.get $var$18 i64.const 32 i64.shr_u - local.set $18 - local.get $25 + local.set $var$18 + local.get $var$25 i64.const 32 i64.shr_u - local.set $25 - local.get $21 - local.get $20 + local.set $var$25 + local.get $var$21 + local.get $var$20 i64.mul - local.get $18 + local.get $var$18 i64.add - local.get $25 + local.get $var$25 i64.add i64.const 1 i64.sub - local.set $25 + local.set $var$25 global.get $~lib/util/number/_exp - local.set $26 - local.get $15 - local.set $13 - local.get $26 - local.get $13 + local.set $var$26 + local.get $var$15 + local.set $var$13 + local.get $var$26 + local.get $var$13 i32.add i32.const 64 i32.add - local.set $26 + local.set $var$26 global.get $~lib/util/number/_frc_minus - local.set $17 - local.get $12 - local.set $11 - local.get $17 + local.set $var$17 + local.get $var$12 + local.set $var$11 + local.get $var$17 i64.const 4294967295 i64.and - local.set $18 - local.get $11 + local.set $var$18 + local.get $var$11 i64.const 4294967295 i64.and - local.set $19 - local.get $17 + local.set $var$19 + local.get $var$17 i64.const 32 i64.shr_u - local.set $20 - local.get $11 + local.set $var$20 + local.get $var$11 i64.const 32 i64.shr_u - local.set $21 - local.get $18 - local.get $19 + local.set $var$21 + local.get $var$18 + local.get $var$19 i64.mul - local.set $22 - local.get $20 - local.get $19 + local.set $var$22 + local.get $var$20 + local.get $var$19 i64.mul - local.get $22 + local.get $var$22 i64.const 32 i64.shr_u i64.add - local.set $23 - local.get $18 - local.get $21 + local.set $var$23 + local.get $var$18 + local.get $var$21 i64.mul - local.get $23 + local.get $var$23 i64.const 4294967295 i64.and i64.add - local.set $27 - local.get $27 + local.set $var$27 + local.get $var$27 i64.const 2147483647 i64.add - local.set $27 - local.get $23 + local.set $var$27 + local.get $var$23 i64.const 32 i64.shr_u - local.set $23 - local.get $27 + local.set $var$23 + local.get $var$27 i64.const 32 i64.shr_u - local.set $27 - local.get $20 - local.get $21 + local.set $var$27 + local.get $var$20 + local.get $var$21 i64.mul - local.get $23 + local.get $var$23 i64.add - local.get $27 + local.get $var$27 i64.add i64.const 1 i64.add - local.set $27 - local.get $25 - local.get $27 + local.set $var$27 + local.get $var$25 + local.get $var$27 i64.sub - local.set $23 - local.get $4 - local.get $24 - local.get $10 - local.get $25 - local.get $26 - local.get $23 - local.get $3 + local.set $var$23 + local.get $var$4 + local.get $var$24 + local.get $var$10 + local.get $var$25 + local.get $var$26 + local.get $var$23 + local.get $var$3 call $~lib/util/number/genDigits - local.set $28 - local.get $0 - local.get $2 + local.set $len + local.get $buffer + local.get $sign i32.const 1 i32.shl i32.add - local.get $28 - local.get $2 + local.get $len + local.get $sign i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.set $28 - local.get $28 - local.get $2 + local.set $len + local.get $len + local.get $sign i32.add ) - (func $~lib/number/F64#toString (param $0 f64) (param $1 i32) (result i32) - local.get $0 + (func $~lib/number/F64#toString (param $this f64) (param $radix i32) (result i32) + local.get $this call $~lib/util/number/dtoa ) - (func $~lib/number/Bool#toString (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/number/Bool#toString (param $this i32) (param $radix i32) (result i32) + local.get $this if (result i32) i32.const 3584 else i32.const 3616 end ) - (func $~lib/number/F32.isSafeInteger (param $0 f32) (result i32) - local.get $0 + (func $~lib/number/F32.isSafeInteger (param $value f32) (result i32) + local.get $value f32.abs global.get $~lib/builtins/f32.MAX_SAFE_INTEGER f32.le if (result i32) - local.get $0 + local.get $value f32.trunc - local.get $0 + local.get $value f32.eq else i32.const 0 end ) - (func $~lib/number/F32.isInteger (param $0 f32) (result i32) - local.get $0 - local.get $0 + (func $~lib/number/F32.isInteger (param $value f32) (result i32) + local.get $value + local.get $value f32.sub f32.const 0 f32.eq if (result i32) - local.get $0 + local.get $value f32.trunc - local.get $0 + local.get $value f32.eq else i32.const 0 end ) - (func $~lib/number/F64.isSafeInteger (param $0 f64) (result i32) - local.get $0 + (func $~lib/number/F64.isSafeInteger (param $value f64) (result i32) + local.get $value f64.abs global.get $~lib/builtins/f64.MAX_SAFE_INTEGER f64.le if (result i32) - local.get $0 + local.get $value f64.trunc - local.get $0 + local.get $value f64.eq else i32.const 0 end ) - (func $~lib/number/F64.isInteger (param $0 f64) (result i32) - local.get $0 - local.get $0 + (func $~lib/number/F64.isInteger (param $value f64) (result i32) + local.get $value + local.get $value f64.sub f64.const 0 f64.eq if (result i32) - local.get $0 + local.get $value f64.trunc - local.get $0 + local.get $value f64.eq else i32.const 0 diff --git a/tests/compiler/object-literal.debug.wat b/tests/compiler/object-literal.debug.wat index 7eeda3a924..37933e0d8b 100644 --- a/tests/compiler/object-literal.debug.wat +++ b/tests/compiler/object-literal.debug.wat @@ -58,14 +58,14 @@ local.get $1 i32.store ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 @@ -82,34 +82,34 @@ local.get $1 i32.store offset=4 ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -126,12 +126,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -141,28 +141,28 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -173,27 +173,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -201,35 +201,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -239,15 +239,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -257,18 +257,18 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32) + (local $child i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $childPtr i32.eqz if return end i32.const 1 drop - local.get $0 + local.get $parentPtr i32.eqz if i32.const 0 @@ -278,37 +278,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $childPtr i32.const 20 i32.sub - local.set $3 - local.get $3 + local.set $child + local.get $child call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $0 + local.get $parentPtr i32.const 20 i32.sub - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 call $~lib/rt/itcms/Object#get:color - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $2 + local.get $expectMultiple if - local.get $4 + local.get $var$4 call $~lib/rt/itcms/Object#makeGray else - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end else - local.get $5 + local.get $var$5 i32.const 3 i32.eq if (result i32) @@ -319,7 +319,7 @@ i32.const 0 end if - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end end @@ -334,27 +334,27 @@ i32.const 0 call $~lib/rt/itcms/__link ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -367,49 +367,49 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -417,33 +417,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -471,23 +471,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -499,15 +499,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -519,33 +519,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -553,21 +553,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -582,36 +582,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -619,67 +619,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -689,22 +689,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -714,12 +714,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -731,75 +731,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -811,38 +811,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -856,12 +856,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -872,38 +872,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -911,21 +911,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -940,101 +940,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -1045,7 +1045,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1056,26 +1056,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1088,27 +1088,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1122,11 +1122,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1137,66 +1137,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1206,10 +1206,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1220,13 +1220,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1237,109 +1237,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1347,7 +1347,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1364,23 +1364,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1392,54 +1392,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1460,30 +1460,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1493,9 +1493,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1505,8 +1505,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1514,43 +1514,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1562,17 +1562,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1586,7 +1586,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1604,7 +1604,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1614,12 +1614,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1641,7 +1641,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1661,14 +1661,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1681,8 +1681,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1693,37 +1693,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1731,16 +1731,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1748,21 +1748,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1777,12 +1777,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1790,49 +1790,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1842,90 +1842,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1934,22 +1934,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1958,27 +1958,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1993,69 +1993,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2070,29 +2070,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2105,13 +2105,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2122,25 +2122,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2155,10 +2155,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2176,75 +2176,75 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.get $1 + (func $~lib/util/string/compareImpl (param $str1 i32) (param $index1 i32) (param $str2 i32) (param $index2 i32) (param $len i32) (result i32) + (local $ptr1 i32) + (local $ptr2 i32) + (local $var$7 i32) + (local $a i32) + (local $b i32) + local.get $str1 + local.get $index1 i32.const 1 i32.shl i32.add - local.set $5 - local.get $2 - local.get $3 + local.set $ptr1 + local.get $str2 + local.get $index2 i32.const 1 i32.shl i32.add - local.set $6 + local.set $ptr2 i32.const 0 i32.const 2 i32.lt_s drop - local.get $4 + local.get $len i32.const 4 i32.ge_u if (result i32) - local.get $5 + local.get $ptr1 i32.const 7 i32.and - local.get $6 + local.get $ptr2 i32.const 7 i32.and i32.or @@ -2255,27 +2255,27 @@ if block $do-break|0 loop $do-loop|0 - local.get $5 + local.get $ptr1 i64.load - local.get $6 + local.get $ptr2 i64.load i64.ne if br $do-break|0 end - local.get $5 + local.get $ptr1 i32.const 8 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 8 i32.add - local.set $6 - local.get $4 + local.set $ptr2 + local.get $len i32.const 4 i32.sub - local.set $4 - local.get $4 + local.set $len + local.get $len i32.const 4 i32.ge_u br_if $do-loop|0 @@ -2283,59 +2283,59 @@ end end loop $while-continue|1 - local.get $4 - local.tee $7 + local.get $len + local.tee $var$7 i32.const 1 i32.sub - local.set $4 - local.get $7 - local.set $7 - local.get $7 + local.set $len + local.get $var$7 + local.set $var$7 + local.get $var$7 if - local.get $5 + local.get $ptr1 i32.load16_u - local.set $8 - local.get $6 + local.set $a + local.get $ptr2 i32.load16_u - local.set $9 - local.get $8 - local.get $9 + local.set $b + local.get $a + local.get $b i32.ne if - local.get $8 - local.get $9 + local.get $a + local.get $b i32.sub return end - local.get $5 + local.get $ptr1 i32.const 2 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 2 i32.add - local.set $6 + local.set $ptr2 br $while-continue|1 end end i32.const 0 ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__eq (param $left i32) (param $right i32) (result i32) + (local $leftLength i32) + local.get $left + local.get $right i32.eq if i32.const 1 return end - local.get $0 + local.get $left i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $1 + local.get $right i32.const 0 i32.eq end @@ -2343,22 +2343,22 @@ i32.const 0 return end - local.get $0 + local.get $left call $~lib/string/String#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $leftLength + local.get $leftLength + local.get $right call $~lib/string/String#get:length i32.ne if i32.const 0 return end - local.get $0 + local.get $left i32.const 0 - local.get $1 + local.get $right i32.const 0 - local.get $2 + local.get $leftLength call $~lib/util/string/compareImpl i32.eqz ) @@ -2372,21 +2372,21 @@ local.get $1 i32.store offset=4 ) - (func $object-literal/Unmanaged#constructor (param $0 i32) (result i32) - local.get $0 + (func $object-literal/Unmanaged#constructor (param $this i32) (result i32) + local.get $this i32.eqz if i32.const 8 call $~lib/rt/tlsf/__alloc - local.set $0 + local.set $this end - local.get $0 + local.get $this i32.const 0 call $object-literal/Unmanaged#set:bar - local.get $0 + local.get $this i32.const 0 call $object-literal/Unmanaged#set:baz - local.get $0 + local.get $this ) (func $object-literal/OmittedTypes#set:int32 (param $0 i32) (param $1 i32) local.get $0 @@ -2458,8 +2458,8 @@ local.get $1 i32.store8 offset=64 ) - (func $object-literal/testOmittedTypes (param $0 i32) - local.get $0 + (func $object-literal/testOmittedTypes (param $omitted i32) + local.get $omitted i32.load i32.const 0 i32.eq @@ -2472,7 +2472,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $omitted i32.load offset=4 i32.const 0 i32.eq @@ -2485,7 +2485,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $omitted i64.load offset=8 i64.const 0 i64.eq @@ -2498,7 +2498,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $omitted i64.load offset=16 i64.const 0 i64.eq @@ -2511,7 +2511,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $omitted f32.load offset=24 f32.const 0 f32.eq @@ -2524,7 +2524,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $omitted f64.load offset=32 f64.const 0 f64.eq @@ -2537,7 +2537,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $omitted i32.load8_s offset=40 i32.const 0 i32.eq @@ -2550,7 +2550,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $omitted i32.load8_u offset=41 i32.const 0 i32.eq @@ -2563,7 +2563,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $omitted i32.load16_s offset=42 i32.const 0 i32.eq @@ -2576,7 +2576,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $omitted i32.load16_u offset=44 i32.const 0 i32.eq @@ -2589,7 +2589,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $omitted i32.load offset=48 i32.const 0 i32.eq @@ -2602,7 +2602,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $omitted i32.load offset=52 i32.const 0 i32.eq @@ -2615,7 +2615,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $omitted f64.load offset=56 f64.const 0 f64.eq @@ -2628,7 +2628,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $omitted i32.load8_u offset=64 i32.const 0 i32.ne @@ -2746,7 +2746,7 @@ i32.store offset=36 ) (func $~lib/rt/itcms/__collect - (local $0 i32) + (local $var$0 i32) i32.const 0 drop global.get $~lib/rt/itcms/state @@ -2757,8 +2757,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -2772,8 +2772,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop diff --git a/tests/compiler/optional-typeparameters.debug.wat b/tests/compiler/optional-typeparameters.debug.wat index b9bfe6b091..efbf0b9585 100644 --- a/tests/compiler/optional-typeparameters.debug.wat +++ b/tests/compiler/optional-typeparameters.debug.wat @@ -44,11 +44,11 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (start $~start) - (func $optional-typeparameters/testConcrete (param $0 i32) (result i32) - local.get $0 + (func $optional-typeparameters/testConcrete (param $a i32) (result i32) + local.get $a ) - (func $optional-typeparameters/testDerived (param $0 i32) (result i32) - local.get $0 + (func $optional-typeparameters/testDerived (param $a i32) (result i32) + local.get $a ) (func $~lib/rt/itcms/Object#set:nextWithColor (param $0 i32) (param $1 i32) local.get $0 @@ -60,50 +60,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -116,58 +116,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -184,12 +184,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -199,19 +199,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -222,27 +222,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -250,35 +250,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -288,15 +288,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -306,25 +306,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -332,33 +332,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -386,23 +386,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -414,15 +414,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -434,33 +434,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -468,21 +468,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -497,36 +497,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -534,67 +534,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -604,22 +604,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -629,12 +629,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -646,75 +646,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -726,38 +726,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -771,12 +771,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -787,38 +787,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -826,21 +826,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -855,101 +855,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -960,7 +960,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -971,26 +971,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1003,27 +1003,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1037,11 +1037,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1052,66 +1052,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1121,10 +1121,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1135,13 +1135,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1152,109 +1152,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1262,7 +1262,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1279,23 +1279,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1307,54 +1307,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1375,30 +1375,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1408,9 +1408,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1420,8 +1420,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1429,43 +1429,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1477,17 +1477,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1501,7 +1501,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1519,7 +1519,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1529,12 +1529,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1556,7 +1556,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1576,14 +1576,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1596,8 +1596,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1608,37 +1608,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1646,16 +1646,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1663,21 +1663,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1692,12 +1692,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1705,49 +1705,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1757,90 +1757,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1849,22 +1849,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1873,27 +1873,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1908,69 +1908,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1985,29 +1985,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2020,13 +2020,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2037,25 +2037,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2070,10 +2070,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2091,45 +2091,45 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $optional-typeparameters/TestConcrete#test (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $1 - local.get $2 + (func $optional-typeparameters/TestConcrete#test (param $this i32) (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.add ) - (func $optional-typeparameters/TestDerived#test (param $0 i32) (param $1 f64) (param $2 f64) (result f64) - local.get $1 - local.get $2 + (func $optional-typeparameters/TestDerived#test (param $this i32) (param $a f64) (param $b f64) (result f64) + local.get $a + local.get $b f64.add ) (func $~lib/rt/__visit_globals (param $0 i32) diff --git a/tests/compiler/overflow.debug.wat b/tests/compiler/overflow.debug.wat index b13af7f7b7..2f931254db 100644 --- a/tests/compiler/overflow.debug.wat +++ b/tests/compiler/overflow.debug.wat @@ -12,16 +12,16 @@ (export "memory" (memory $0)) (start $~start) (func $start:overflow - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $var$0 i32) + (local $var$1 i32) + (local $var$2 i32) i32.const 127 - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 i32.const 1 i32.add - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 i32.extend8_s i32.const -128 i32.eq @@ -34,11 +34,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $var$0 i32.const 1 i32.sub - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 i32.extend8_s i32.const 127 i32.eq @@ -51,14 +51,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.tee $2 + local.get $var$0 + local.tee $var$2 i32.const 1 i32.add - local.set $0 - local.get $2 - local.set $1 - local.get $0 + local.set $var$0 + local.get $var$2 + local.set $var$1 + local.get $var$0 i32.extend8_s i32.const -128 i32.eq @@ -71,14 +71,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.tee $2 + local.get $var$0 + local.tee $var$2 i32.const 1 i32.sub - local.set $0 - local.get $2 - local.set $1 - local.get $0 + local.set $var$0 + local.get $var$2 + local.set $var$1 + local.get $var$0 i32.extend8_s i32.const 127 i32.eq @@ -91,11 +91,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $var$0 i32.const 1 i32.add - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 i32.extend8_s i32.const -128 i32.eq @@ -108,11 +108,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $var$0 i32.const 1 i32.sub - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 i32.extend8_s i32.const 127 i32.eq @@ -125,12 +125,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $var$0 i32.const 1 i32.add - local.tee $0 - local.set $1 - local.get $0 + local.tee $var$0 + local.set $var$1 + local.get $var$0 i32.extend8_s i32.const -128 i32.eq @@ -143,12 +143,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $var$0 i32.const 1 i32.sub - local.tee $0 - local.set $1 - local.get $0 + local.tee $var$0 + local.set $var$1 + local.get $var$0 i32.extend8_s i32.const 127 i32.eq @@ -161,7 +161,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $var$0 i32.const 1 i32.add i32.extend8_s @@ -177,12 +177,12 @@ unreachable end i32.const 32767 - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 1 i32.add - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.extend16_s i32.const -32768 i32.eq @@ -195,11 +195,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i32.const 1 i32.sub - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.extend16_s i32.const 32767 i32.eq @@ -212,14 +212,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.tee $2 + local.get $var$1 + local.tee $var$2 i32.const 1 i32.add - local.set $1 - local.get $2 - local.set $0 - local.get $1 + local.set $var$1 + local.get $var$2 + local.set $var$0 + local.get $var$1 i32.extend16_s i32.const -32768 i32.eq @@ -232,14 +232,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.tee $2 + local.get $var$1 + local.tee $var$2 i32.const 1 i32.sub - local.set $1 - local.get $2 - local.set $0 - local.get $1 + local.set $var$1 + local.get $var$2 + local.set $var$0 + local.get $var$1 i32.extend16_s i32.const 32767 i32.eq @@ -252,11 +252,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i32.const 1 i32.add - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.extend16_s i32.const -32768 i32.eq @@ -269,11 +269,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i32.const 1 i32.sub - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.extend16_s i32.const 32767 i32.eq @@ -286,12 +286,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i32.const 1 i32.add - local.tee $1 - local.set $0 - local.get $1 + local.tee $var$1 + local.set $var$0 + local.get $var$1 i32.extend16_s i32.const -32768 i32.eq @@ -304,12 +304,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i32.const 1 i32.sub - local.tee $1 - local.set $0 - local.get $1 + local.tee $var$1 + local.set $var$0 + local.get $var$1 i32.extend16_s i32.const 32767 i32.eq @@ -322,7 +322,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i32.const 1 i32.add i32.extend16_s @@ -338,12 +338,12 @@ unreachable end i32.const 0 - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 i32.const 1 i32.sub - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 i32.const 255 i32.and i32.const 255 @@ -357,11 +357,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $var$0 i32.const 1 i32.add - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 i32.const 255 i32.and i32.const 0 @@ -375,14 +375,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.tee $2 + local.get $var$0 + local.tee $var$2 i32.const 1 i32.sub - local.set $0 - local.get $2 - local.set $1 - local.get $0 + local.set $var$0 + local.get $var$2 + local.set $var$1 + local.get $var$0 i32.const 255 i32.and i32.const 255 @@ -396,14 +396,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.tee $2 + local.get $var$0 + local.tee $var$2 i32.const 1 i32.add - local.set $0 - local.get $2 - local.set $1 - local.get $0 + local.set $var$0 + local.get $var$2 + local.set $var$1 + local.get $var$0 i32.const 255 i32.and i32.const 0 @@ -417,11 +417,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $var$0 i32.const 1 i32.sub - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 i32.const 255 i32.and i32.const 255 @@ -435,11 +435,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $var$0 i32.const 1 i32.add - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 i32.const 255 i32.and i32.const 0 @@ -453,12 +453,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $var$0 i32.const 1 i32.sub - local.tee $0 - local.set $1 - local.get $0 + local.tee $var$0 + local.set $var$1 + local.get $var$0 i32.const 255 i32.and i32.const 255 @@ -472,12 +472,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $var$0 i32.const 1 i32.add - local.tee $0 - local.set $1 - local.get $0 + local.tee $var$0 + local.set $var$1 + local.get $var$0 i32.const 255 i32.and i32.const 0 @@ -491,7 +491,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $var$0 i32.const 1 i32.sub i32.const 255 @@ -508,12 +508,12 @@ unreachable end i32.const 0 - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 1 i32.sub - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 65535 i32.and i32.const 65535 @@ -527,11 +527,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i32.const 1 i32.add - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 65535 i32.and i32.const 0 @@ -545,14 +545,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.tee $2 + local.get $var$1 + local.tee $var$2 i32.const 1 i32.sub - local.set $1 - local.get $2 - local.set $0 - local.get $1 + local.set $var$1 + local.get $var$2 + local.set $var$0 + local.get $var$1 i32.const 65535 i32.and i32.const 65535 @@ -566,14 +566,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.tee $2 + local.get $var$1 + local.tee $var$2 i32.const 1 i32.add - local.set $1 - local.get $2 - local.set $0 - local.get $1 + local.set $var$1 + local.get $var$2 + local.set $var$0 + local.get $var$1 i32.const 65535 i32.and i32.const 0 @@ -587,11 +587,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i32.const 1 i32.sub - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 65535 i32.and i32.const 65535 @@ -605,11 +605,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i32.const 1 i32.add - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 65535 i32.and i32.const 0 @@ -623,12 +623,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i32.const 1 i32.sub - local.tee $1 - local.set $0 - local.get $1 + local.tee $var$1 + local.set $var$0 + local.get $var$1 i32.const 65535 i32.and i32.const 65535 @@ -642,12 +642,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i32.const 1 i32.add - local.tee $1 - local.set $0 - local.get $1 + local.tee $var$1 + local.set $var$0 + local.get $var$1 i32.const 65535 i32.and i32.const 0 @@ -661,7 +661,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i32.const 1 i32.sub i32.const 65535 @@ -690,8 +690,8 @@ i32.eq drop i32.const 2 - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 i32.const 0 i32.ne i32.const 1 @@ -706,8 +706,8 @@ unreachable end i32.const -1 - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.ne i32.const 1 @@ -722,8 +722,8 @@ unreachable end i32.const 0 - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const 0 i32.eq i32.eqz @@ -748,8 +748,8 @@ i32.const 65535 i32.and i32.add - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const 65597 i32.eq i32.eqz diff --git a/tests/compiler/possibly-null.debug.wat b/tests/compiler/possibly-null.debug.wat index d97c2aeb73..26bb047484 100644 --- a/tests/compiler/possibly-null.debug.wat +++ b/tests/compiler/possibly-null.debug.wat @@ -30,15 +30,15 @@ (export "testLogicalOrMulti" (func $export:possibly-null/testLogicalOrMulti)) (export "testAssign" (func $export:possibly-null/testAssign)) (export "testNeverNull" (func $export:possibly-null/testNeverNull)) - (func $possibly-null/testTrue (param $0 i32) - local.get $0 + (func $possibly-null/testTrue (param $a i32) + local.get $a if i32.const 0 drop end ) - (func $possibly-null/testFalseElse (param $0 i32) - local.get $0 + (func $possibly-null/testFalseElse (param $a i32) + local.get $a i32.eqz if return @@ -47,8 +47,8 @@ drop end ) - (func $possibly-null/testFalseContinuation (param $0 i32) - local.get $0 + (func $possibly-null/testFalseContinuation (param $a i32) + local.get $a i32.eqz if return @@ -56,8 +56,8 @@ i32.const 0 drop ) - (func $possibly-null/testNeNull (param $0 i32) - local.get $0 + (func $possibly-null/testNeNull (param $a i32) + local.get $a i32.const 0 i32.ne if @@ -65,8 +65,8 @@ drop end ) - (func $possibly-null/testEqNullElse (param $0 i32) - local.get $0 + (func $possibly-null/testEqNullElse (param $a i32) + local.get $a i32.const 0 i32.eq if @@ -76,8 +76,8 @@ drop end ) - (func $possibly-null/testEqNullContinuation (param $0 i32) - local.get $0 + (func $possibly-null/testEqNullContinuation (param $a i32) + local.get $a i32.const 0 i32.eq if @@ -86,8 +86,8 @@ i32.const 0 drop ) - (func $possibly-null/testNotEqNull (param $0 i32) - local.get $0 + (func $possibly-null/testNotEqNull (param $a i32) + local.get $a i32.const 0 i32.eq i32.eqz @@ -96,8 +96,8 @@ drop end ) - (func $possibly-null/testNotNeNullElse (param $0 i32) - local.get $0 + (func $possibly-null/testNotNeNullElse (param $a i32) + local.get $a i32.const 0 i32.ne i32.eqz @@ -108,8 +108,8 @@ drop end ) - (func $possibly-null/testNotNeNullContinuation (param $0 i32) - local.get $0 + (func $possibly-null/testNotNeNullContinuation (param $a i32) + local.get $a i32.const 0 i32.ne i32.eqz @@ -119,17 +119,17 @@ i32.const 0 drop ) - (func $possibly-null/testWhile (param $0 i32) - (local $1 i32) + (func $possibly-null/testWhile (param $a i32) + (local $var$1 i32) loop $while-continue|0 - local.get $0 - local.set $1 - local.get $1 + local.get $a + local.set $var$1 + local.get $var$1 if i32.const 0 drop i32.const 0 - local.set $0 + local.set $a i32.const 1 i32.eqz drop @@ -137,17 +137,17 @@ end end ) - (func $possibly-null/testWhile2 (param $0 i32) (param $1 i32) - (local $2 i32) + (func $possibly-null/testWhile2 (param $a i32) (param $b i32) + (local $var$2 i32) loop $while-continue|0 - local.get $0 - local.set $2 - local.get $2 + local.get $a + local.set $var$2 + local.get $var$2 if i32.const 0 drop - local.get $1 - local.set $0 + local.get $b + local.set $a i32.const 1 i32.eqz drop @@ -155,19 +155,19 @@ end end ) - (func $possibly-null/testWhile3 (param $0 i32) (param $1 i32) - (local $2 i32) + (func $possibly-null/testWhile3 (param $a i32) (param $b i32) + (local $var$2 i32) loop $while-continue|0 - local.get $0 - local.set $2 - local.get $2 + local.get $a + local.set $var$2 + local.get $var$2 if i32.const 0 drop - local.get $1 + local.get $b if - local.get $1 - local.set $0 + local.get $b + local.set $a i32.const 0 drop end @@ -175,36 +175,36 @@ end end ) - (func $possibly-null/requireNonNull (param $0 i32) (result i32) - local.get $0 + (func $possibly-null/requireNonNull (param $a i32) (result i32) + local.get $a ) - (func $possibly-null/testLogicalAnd (param $0 i32) - local.get $0 + (func $possibly-null/testLogicalAnd (param $a i32) + local.get $a if (result i32) - local.get $0 + local.get $a call $possibly-null/requireNonNull else i32.const 0 end drop ) - (func $possibly-null/testLogicalOr (param $0 i32) - local.get $0 + (func $possibly-null/testLogicalOr (param $a i32) + local.get $a i32.eqz if (result i32) i32.const 1 else - local.get $0 + local.get $a call $possibly-null/requireNonNull i32.const 0 i32.ne end drop ) - (func $possibly-null/testLogicalAndMulti (param $0 i32) (param $1 i32) - local.get $0 + (func $possibly-null/testLogicalAndMulti (param $a i32) (param $b i32) + local.get $a if (result i32) - local.get $1 + local.get $b else i32.const 0 end @@ -222,13 +222,13 @@ drop end ) - (func $possibly-null/testLogicalOrMulti (param $0 i32) (param $1 i32) - local.get $0 + (func $possibly-null/testLogicalOrMulti (param $a i32) (param $b i32) + local.get $a i32.eqz if (result i32) i32.const 1 else - local.get $1 + local.get $b i32.eqz end if @@ -245,16 +245,16 @@ drop end ) - (func $possibly-null/testAssign (param $0 i32) (param $1 i32) - local.get $1 - local.set $0 + (func $possibly-null/testAssign (param $a i32) (param $b i32) + local.get $b + local.set $a i32.const 0 drop ) - (func $possibly-null/testNeverNull (param $0 i32) - local.get $0 + (func $possibly-null/testNeverNull (param $a i32) + local.get $a if - local.get $0 + local.get $a drop end ) diff --git a/tests/compiler/recursive.debug.wat b/tests/compiler/recursive.debug.wat index d9a7757ecc..7ca7cb2e68 100644 --- a/tests/compiler/recursive.debug.wat +++ b/tests/compiler/recursive.debug.wat @@ -8,19 +8,19 @@ (elem $0 (i32.const 1)) (export "fib" (func $recursive/fib)) (export "memory" (memory $0)) - (func $recursive/fib (param $0 i32) (result i32) - local.get $0 + (func $recursive/fib (param $n i32) (result i32) + local.get $n i32.const 1 i32.le_s if i32.const 1 return end - local.get $0 + local.get $n i32.const 1 i32.sub call $recursive/fib - local.get $0 + local.get $n i32.const 2 i32.sub call $recursive/fib diff --git a/tests/compiler/reexport.debug.wat b/tests/compiler/reexport.debug.wat index a66be8165a..be0ffca431 100644 --- a/tests/compiler/reexport.debug.wat +++ b/tests/compiler/reexport.debug.wat @@ -65,19 +65,19 @@ (export "renamed_default" (func $export-default/theDefault)) (export "memory" (memory $0)) (start $~start) - (func $export/add (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $export/add (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.add ) - (func $export/mul (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $export/mul (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.mul ) - (func $exports/add (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $exports/add (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.add ) (func $exports/Car#set:doors (param $0 i32) (param $1 i32) @@ -95,50 +95,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -151,58 +151,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -219,12 +219,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -234,19 +234,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -257,27 +257,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -285,35 +285,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -323,15 +323,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -341,25 +341,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -367,33 +367,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -421,23 +421,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -449,15 +449,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -469,33 +469,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -503,21 +503,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -532,36 +532,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -569,67 +569,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -639,22 +639,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -664,12 +664,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -681,75 +681,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -761,38 +761,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -806,12 +806,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -822,38 +822,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -861,21 +861,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -890,101 +890,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -995,7 +995,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1006,26 +1006,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1038,27 +1038,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1072,11 +1072,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1087,66 +1087,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1156,10 +1156,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1170,13 +1170,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1187,109 +1187,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1297,7 +1297,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1314,23 +1314,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1342,54 +1342,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1410,30 +1410,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1443,9 +1443,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1455,8 +1455,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1464,43 +1464,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1512,17 +1512,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1536,7 +1536,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1554,7 +1554,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1564,12 +1564,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1591,7 +1591,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1611,14 +1611,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1631,8 +1631,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1643,37 +1643,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1681,16 +1681,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1698,21 +1698,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1727,12 +1727,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1740,49 +1740,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1792,90 +1792,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1884,22 +1884,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1908,27 +1908,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1943,69 +1943,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2020,29 +2020,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2055,13 +2055,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2072,25 +2072,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2105,10 +2105,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2126,44 +2126,44 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $exports/Car#get:numDoors (param $0 i32) (result i32) - local.get $0 + (func $exports/Car#get:numDoors (param $this i32) (result i32) + local.get $this i32.load ) - (func $export/sub (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $export/sub (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.sub ) (func $export-default/theDefault diff --git a/tests/compiler/rereexport.debug.wat b/tests/compiler/rereexport.debug.wat index a53b8415a1..49dad5d1cd 100644 --- a/tests/compiler/rereexport.debug.wat +++ b/tests/compiler/rereexport.debug.wat @@ -58,19 +58,19 @@ (export "renamed_default" (func $export-default/theDefault)) (export "memory" (memory $0)) (start $~start) - (func $export/add (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $export/add (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.add ) - (func $export/mul (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $export/mul (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.mul ) - (func $exports/add (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $exports/add (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.add ) (func $exports/Car#set:doors (param $0 i32) (param $1 i32) @@ -88,50 +88,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -144,58 +144,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -212,12 +212,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -227,19 +227,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -250,27 +250,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -278,35 +278,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -316,15 +316,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -334,25 +334,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -360,33 +360,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -414,23 +414,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -442,15 +442,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -462,33 +462,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -496,21 +496,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -525,36 +525,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -562,67 +562,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -632,22 +632,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -657,12 +657,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -674,75 +674,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -754,38 +754,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -799,12 +799,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -815,38 +815,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -854,21 +854,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -883,101 +883,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -988,7 +988,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -999,26 +999,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1031,27 +1031,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1065,11 +1065,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1080,66 +1080,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1149,10 +1149,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1163,13 +1163,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1180,109 +1180,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1290,7 +1290,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1307,23 +1307,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1335,54 +1335,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1403,30 +1403,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1436,9 +1436,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1448,8 +1448,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1457,43 +1457,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1505,17 +1505,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1529,7 +1529,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1547,7 +1547,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1557,12 +1557,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1584,7 +1584,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1604,14 +1604,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1624,8 +1624,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1636,37 +1636,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1674,16 +1674,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1691,21 +1691,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1720,12 +1720,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1733,49 +1733,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1785,90 +1785,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1877,22 +1877,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1901,27 +1901,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1936,69 +1936,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2013,29 +2013,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2048,13 +2048,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2065,25 +2065,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2098,10 +2098,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2119,39 +2119,39 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $exports/Car#get:numDoors (param $0 i32) (result i32) - local.get $0 + (func $exports/Car#get:numDoors (param $this i32) (result i32) + local.get $this i32.load ) (func $export-default/theDefault diff --git a/tests/compiler/resolve-access.debug.wat b/tests/compiler/resolve-access.debug.wat index f1b06b427c..8b78a702e6 100644 --- a/tests/compiler/resolve-access.debug.wat +++ b/tests/compiler/resolve-access.debug.wat @@ -71,50 +71,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -127,58 +127,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -195,12 +195,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -210,19 +210,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -233,27 +233,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -261,35 +261,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -299,15 +299,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -317,25 +317,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -343,33 +343,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -397,23 +397,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -425,15 +425,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -445,33 +445,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -479,21 +479,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -508,36 +508,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -545,67 +545,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -615,22 +615,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -640,12 +640,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -657,75 +657,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -737,38 +737,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -782,12 +782,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -798,38 +798,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -837,21 +837,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -866,101 +866,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -971,7 +971,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -982,26 +982,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1014,27 +1014,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1048,11 +1048,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1063,66 +1063,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1132,10 +1132,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1146,13 +1146,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1163,109 +1163,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1273,7 +1273,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1290,23 +1290,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1318,54 +1318,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1386,30 +1386,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1419,9 +1419,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1431,8 +1431,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1440,43 +1440,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1488,17 +1488,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1512,7 +1512,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1530,7 +1530,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1540,12 +1540,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1567,7 +1567,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1587,14 +1587,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1607,8 +1607,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1619,37 +1619,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1657,16 +1657,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1674,21 +1674,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1703,12 +1703,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1716,49 +1716,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1768,90 +1768,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1860,22 +1860,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1884,27 +1884,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1919,69 +1919,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1996,29 +1996,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2031,13 +2031,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2048,25 +2048,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2081,10 +2081,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2102,64 +2102,64 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/rt/__newBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - local.get $1 + (func $~lib/rt/__newBuffer (param $size i32) (param $id i32) (param $data i32) (result i32) + (local $buffer i32) + local.get $size + local.get $id call $~lib/rt/itcms/__new - local.set $3 - local.get $2 + local.set $buffer + local.get $data if - local.get $3 - local.get $2 - local.get $0 + local.get $buffer + local.get $data + local.get $size memory.copy end - local.get $3 + local.get $buffer ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32) + (local $child i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $childPtr i32.eqz if return end i32.const 1 drop - local.get $0 + local.get $parentPtr i32.eqz if i32.const 0 @@ -2169,37 +2169,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $childPtr i32.const 20 i32.sub - local.set $3 - local.get $3 + local.set $child + local.get $child call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $0 + local.get $parentPtr i32.const 20 i32.sub - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 call $~lib/rt/itcms/Object#get:color - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $2 + local.get $expectMultiple if - local.get $4 + local.get $var$4 call $~lib/rt/itcms/Object#makeGray else - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end else - local.get $5 + local.get $var$5 i32.const 3 i32.eq if (result i32) @@ -2210,16 +2210,16 @@ i32.const 0 end if - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end end end ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i64) - (local $2 i64) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i64) + (local $value i64) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -2230,40 +2230,40 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add i64.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) - (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) - local.get $0 + (func $~lib/util/number/decimalCount32 (param $value i32) (result i32) + local.get $value i32.const 100000 i32.lt_u if - local.get $0 + local.get $value i32.const 100 i32.lt_u if i32.const 1 - local.get $0 + local.get $value i32.const 10 i32.ge_u i32.add return else i32.const 3 - local.get $0 + local.get $value i32.const 10000 i32.ge_u i32.add - local.get $0 + local.get $value i32.const 1000 i32.ge_u i32.add @@ -2271,23 +2271,23 @@ end unreachable else - local.get $0 + local.get $value i32.const 10000000 i32.lt_u if i32.const 6 - local.get $0 + local.get $value i32.const 1000000 i32.ge_u i32.add return else i32.const 8 - local.get $0 + local.get $value i32.const 1000000000 i32.ge_u i32.add - local.get $0 + local.get $value i32.const 100000000 i32.ge_u i32.add @@ -2297,66 +2297,66 @@ end unreachable ) - (func $~lib/util/number/utoa32_dec_lut (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 i64) - (local $9 i64) - (local $10 i32) - (local $11 i32) + (func $~lib/util/number/utoa32_dec_lut (param $buffer i32) (param $num i32) (param $offset i32) + (local $var$3 i32) + (local $t i32) + (local $r i32) + (local $d1 i32) + (local $d2 i32) + (local $digits1 i64) + (local $digits2 i64) + (local $var$10 i32) + (local $var$11 i32) loop $while-continue|0 - local.get $1 + local.get $num i32.const 10000 i32.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $1 + local.get $num i32.const 10000 i32.div_u - local.set $4 - local.get $1 + local.set $t + local.get $num i32.const 10000 i32.rem_u - local.set $5 - local.get $4 - local.set $1 - local.get $5 + local.set $r + local.get $t + local.set $num + local.get $r i32.const 100 i32.div_u - local.set $6 - local.get $5 + local.set $d1 + local.get $r i32.const 100 i32.rem_u - local.set $7 + local.set $d2 i32.const 716 - local.get $6 + local.get $d1 i32.const 2 i32.shl i32.add i64.load32_u - local.set $8 + local.set $digits1 i32.const 716 - local.get $7 + local.get $d2 i32.const 2 i32.shl i32.add i64.load32_u - local.set $9 - local.get $2 + local.set $digits2 + local.get $offset i32.const 4 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $8 - local.get $9 + local.get $digits1 + local.get $digits2 i64.const 32 i64.shl i64.or @@ -2364,105 +2364,105 @@ br $while-continue|0 end end - local.get $1 + local.get $num i32.const 100 i32.ge_u if - local.get $1 + local.get $num i32.const 100 i32.div_u - local.set $3 - local.get $1 + local.set $var$3 + local.get $num i32.const 100 i32.rem_u - local.set $10 - local.get $3 - local.set $1 - local.get $2 + local.set $var$10 + local.get $var$3 + local.set $num + local.get $offset i32.const 2 i32.sub - local.set $2 + local.set $offset i32.const 716 - local.get $10 + local.get $var$10 i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store end - local.get $1 + local.get $num i32.const 10 i32.ge_u if - local.get $2 + local.get $offset i32.const 2 i32.sub - local.set $2 + local.set $offset i32.const 716 - local.get $1 + local.get $num i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store else - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 + local.set $offset i32.const 48 - local.get $1 + local.get $num i32.add - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store16 end ) - (func $~lib/util/number/decimalCount64High (param $0 i64) (result i32) - local.get $0 + (func $~lib/util/number/decimalCount64High (param $value i64) (result i32) + local.get $value i64.const 1000000000000000 i64.lt_u if - local.get $0 + local.get $value i64.const 1000000000000 i64.lt_u if i32.const 10 - local.get $0 + local.get $value i64.const 100000000000 i64.ge_u i32.add - local.get $0 + local.get $value i64.const 10000000000 i64.ge_u i32.add return else i32.const 13 - local.get $0 + local.get $value i64.const 100000000000000 i64.ge_u i32.add - local.get $0 + local.get $value i64.const 10000000000000 i64.ge_u i32.add @@ -2470,23 +2470,23 @@ end unreachable else - local.get $0 + local.get $value i64.const 100000000000000000 i64.lt_u if i32.const 16 - local.get $0 + local.get $value i64.const 10000000000000000 i64.ge_u i32.add return else i32.const 18 - local.get $0 + local.get $value i64.const -8446744073709551616 i64.ge_u i32.add - local.get $0 + local.get $value i64.const 1000000000000000000 i64.ge_u i32.add @@ -2496,116 +2496,116 @@ end unreachable ) - (func $~lib/util/number/utoa64_dec_lut (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i32) - (local $4 i64) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i64) - (local $13 i64) + (func $~lib/util/number/utoa64_dec_lut (param $buffer i32) (param $num i64) (param $offset i32) + (local $var$3 i32) + (local $t i64) + (local $r i32) + (local $b i32) + (local $c i32) + (local $b1 i32) + (local $b2 i32) + (local $c1 i32) + (local $c2 i32) + (local $digits1 i64) + (local $digits2 i64) loop $while-continue|0 - local.get $1 + local.get $num i64.const 100000000 i64.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $1 + local.get $num i64.const 100000000 i64.div_u - local.set $4 - local.get $1 - local.get $4 + local.set $t + local.get $num + local.get $t i64.const 100000000 i64.mul i64.sub i32.wrap_i64 - local.set $5 - local.get $4 - local.set $1 - local.get $5 + local.set $r + local.get $t + local.set $num + local.get $r i32.const 10000 i32.div_u - local.set $6 - local.get $5 + local.set $b + local.get $r i32.const 10000 i32.rem_u - local.set $7 - local.get $6 + local.set $c + local.get $b i32.const 100 i32.div_u - local.set $8 - local.get $6 + local.set $b1 + local.get $b i32.const 100 i32.rem_u - local.set $9 - local.get $7 + local.set $b2 + local.get $c i32.const 100 i32.div_u - local.set $10 - local.get $7 + local.set $c1 + local.get $c i32.const 100 i32.rem_u - local.set $11 + local.set $c2 i32.const 716 - local.get $10 + local.get $c1 i32.const 2 i32.shl i32.add i64.load32_u - local.set $12 + local.set $digits1 i32.const 716 - local.get $11 + local.get $c2 i32.const 2 i32.shl i32.add i64.load32_u - local.set $13 - local.get $2 + local.set $digits2 + local.get $offset i32.const 4 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $12 - local.get $13 + local.get $digits1 + local.get $digits2 i64.const 32 i64.shl i64.or i64.store i32.const 716 - local.get $8 + local.get $b1 i32.const 2 i32.shl i32.add i64.load32_u - local.set $12 + local.set $digits1 i32.const 716 - local.get $9 + local.get $b2 i32.const 2 i32.shl i32.add i64.load32_u - local.set $13 - local.get $2 + local.set $digits2 + local.get $offset i32.const 4 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $12 - local.get $13 + local.get $digits1 + local.get $digits2 i64.const 32 i64.shl i64.or @@ -2613,32 +2613,32 @@ br $while-continue|0 end end - local.get $0 - local.get $1 + local.get $buffer + local.get $num i32.wrap_i64 - local.get $2 + local.get $offset call $~lib/util/number/utoa32_dec_lut ) - (func $~lib/util/number/utoa_hex_lut (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i32) + (func $~lib/util/number/utoa_hex_lut (param $buffer i32) (param $num i64) (param $offset i32) + (local $var$3 i32) loop $while-continue|0 - local.get $2 + local.get $offset i32.const 2 i32.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $2 + local.get $offset i32.const 2 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 1136 - local.get $1 + local.get $num i32.wrap_i64 i32.const 255 i32.and @@ -2647,20 +2647,20 @@ i32.add i32.load i32.store - local.get $1 + local.get $num i64.const 8 i64.shr_u - local.set $1 + local.set $num br $while-continue|0 end end - local.get $2 + local.get $offset i32.const 1 i32.and if - local.get $0 + local.get $buffer i32.const 1136 - local.get $1 + local.get $num i32.wrap_i64 i32.const 6 i32.shl @@ -2669,25 +2669,25 @@ i32.store16 end ) - (func $~lib/util/number/ulog_base (param $0 i64) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) - (local $4 i64) - (local $5 i32) - local.get $1 - local.set $2 - local.get $2 + (func $~lib/util/number/ulog_base (param $num i64) (param $base i32) (result i32) + (local $var$2 i32) + (local $b64 i64) + (local $b i64) + (local $e i32) + local.get $base + local.set $var$2 + local.get $var$2 i32.popcnt i32.const 1 i32.eq if i32.const 63 - local.get $0 + local.get $num i64.clz i32.wrap_i64 i32.sub i32.const 31 - local.get $1 + local.get $base i32.clz i32.sub i32.div_u @@ -2695,95 +2695,95 @@ i32.add return end - local.get $1 + local.get $base i64.extend_i32_s - local.set $3 - local.get $3 - local.set $4 + local.set $b64 + local.get $b64 + local.set $b i32.const 1 - local.set $5 + local.set $e loop $while-continue|0 - local.get $0 - local.get $4 + local.get $num + local.get $b i64.ge_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 - local.get $4 + local.get $num + local.get $b i64.div_u - local.set $0 - local.get $4 - local.get $4 + local.set $num + local.get $b + local.get $b i64.mul - local.set $4 - local.get $5 + local.set $b + local.get $e i32.const 1 i32.shl - local.set $5 + local.set $e br $while-continue|0 end end loop $while-continue|1 - local.get $0 + local.get $num i64.const 1 i64.ge_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 - local.get $3 + local.get $num + local.get $b64 i64.div_u - local.set $0 - local.get $5 + local.set $num + local.get $e i32.const 1 i32.add - local.set $5 + local.set $e br $while-continue|1 end end - local.get $5 + local.get $e i32.const 1 i32.sub ) - (func $~lib/util/number/utoa64_any_core (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i32) - (local $4 i64) - (local $5 i64) - (local $6 i64) - local.get $3 + (func $~lib/util/number/utoa64_any_core (param $buffer i32) (param $num i64) (param $offset i32) (param $radix i32) + (local $base i64) + (local $var$5 i64) + (local $q i64) + local.get $radix i64.extend_i32_s - local.set $4 - local.get $3 - local.get $3 + local.set $base + local.get $radix + local.get $radix i32.const 1 i32.sub i32.and i32.const 0 i32.eq if - local.get $3 + local.get $radix i32.ctz i32.const 7 i32.and i64.extend_i32_s - local.set $5 - local.get $4 + local.set $var$5 + local.get $base i64.const 1 i64.sub - local.set $6 + local.set $q loop $do-loop|0 - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 2192 - local.get $1 - local.get $6 + local.get $num + local.get $q i64.and i32.wrap_i64 i32.const 1 @@ -2791,34 +2791,34 @@ i32.add i32.load16_u i32.store16 - local.get $1 - local.get $5 + local.get $num + local.get $var$5 i64.shr_u - local.set $1 - local.get $1 + local.set $num + local.get $num i64.const 0 i64.ne br_if $do-loop|0 end else loop $do-loop|1 - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 - local.get $1 - local.get $4 + local.set $offset + local.get $num + local.get $base i64.div_u - local.set $6 - local.get $0 - local.get $2 + local.set $q + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 2192 - local.get $1 - local.get $6 - local.get $4 + local.get $num + local.get $q + local.get $base i64.mul i64.sub i32.wrap_i64 @@ -2827,18 +2827,18 @@ i32.add i32.load16_u i32.store16 - local.get $6 - local.set $1 - local.get $1 + local.get $q + local.set $num + local.get $num i64.const 0 i64.ne br_if $do-loop|1 end end ) - (func $~lib/number/U64#toString (param $0 i64) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/number/U64#toString (param $this i64) (param $radix i32) (result i32) + local.get $this + local.get $radix call $~lib/util/number/utoa64 ) (func $resolve-access/Container#set:foo (param $0 i32) (param $1 i64) @@ -2846,14 +2846,14 @@ local.get $1 i64.store ) - (func $resolve-access/Container#toU32 (param $0 i32) (result i32) - local.get $0 + (func $resolve-access/Container#toU32 (param $this i32) (result i32) + local.get $this i64.load i32.wrap_i64 ) - (func $~lib/number/U32#toString (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/number/U32#toString (param $this i32) (param $radix i32) (result i32) + local.get $this + local.get $radix call $~lib/util/number/utoa32 ) (func $~lib/rt/__visit_globals (param $0 i32) @@ -2882,12 +2882,12 @@ call $~lib/rt/itcms/__visit end ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -2895,12 +2895,12 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) diff --git a/tests/compiler/resolve-binary.debug.wat b/tests/compiler/resolve-binary.debug.wat index 2928bbed33..ce7597db0e 100644 --- a/tests/compiler/resolve-binary.debug.wat +++ b/tests/compiler/resolve-binary.debug.wat @@ -101,52 +101,52 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (start $~start) - (func $~lib/number/Bool#toString (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/number/Bool#toString (param $this i32) (param $radix i32) (result i32) + local.get $this if (result i32) i32.const 32 else i32.const 64 end ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.get $1 + (func $~lib/util/string/compareImpl (param $str1 i32) (param $index1 i32) (param $str2 i32) (param $index2 i32) (param $len i32) (result i32) + (local $ptr1 i32) + (local $ptr2 i32) + (local $var$7 i32) + (local $a i32) + (local $b i32) + local.get $str1 + local.get $index1 i32.const 1 i32.shl i32.add - local.set $5 - local.get $2 - local.get $3 + local.set $ptr1 + local.get $str2 + local.get $index2 i32.const 1 i32.shl i32.add - local.set $6 + local.set $ptr2 i32.const 0 i32.const 2 i32.lt_s drop - local.get $4 + local.get $len i32.const 4 i32.ge_u if (result i32) - local.get $5 + local.get $ptr1 i32.const 7 i32.and - local.get $6 + local.get $ptr2 i32.const 7 i32.and i32.or @@ -157,27 +157,27 @@ if block $do-break|0 loop $do-loop|0 - local.get $5 + local.get $ptr1 i64.load - local.get $6 + local.get $ptr2 i64.load i64.ne if br $do-break|0 end - local.get $5 + local.get $ptr1 i32.const 8 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 8 i32.add - local.set $6 - local.get $4 + local.set $ptr2 + local.get $len i32.const 4 i32.sub - local.set $4 - local.get $4 + local.set $len + local.get $len i32.const 4 i32.ge_u br_if $do-loop|0 @@ -185,59 +185,59 @@ end end loop $while-continue|1 - local.get $4 - local.tee $7 + local.get $len + local.tee $var$7 i32.const 1 i32.sub - local.set $4 - local.get $7 - local.set $7 - local.get $7 + local.set $len + local.get $var$7 + local.set $var$7 + local.get $var$7 if - local.get $5 + local.get $ptr1 i32.load16_u - local.set $8 - local.get $6 + local.set $a + local.get $ptr2 i32.load16_u - local.set $9 - local.get $8 - local.get $9 + local.set $b + local.get $a + local.get $b i32.ne if - local.get $8 - local.get $9 + local.get $a + local.get $b i32.sub return end - local.get $5 + local.get $ptr1 i32.const 2 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 2 i32.add - local.set $6 + local.set $ptr2 br $while-continue|1 end end i32.const 0 ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__eq (param $left i32) (param $right i32) (result i32) + (local $leftLength i32) + local.get $left + local.get $right i32.eq if i32.const 1 return end - local.get $0 + local.get $left i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $1 + local.get $right i32.const 0 i32.eq end @@ -245,47 +245,47 @@ i32.const 0 return end - local.get $0 + local.get $left call $~lib/string/String#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $leftLength + local.get $leftLength + local.get $right call $~lib/string/String#get:length i32.ne if i32.const 0 return end - local.get $0 + local.get $left i32.const 0 - local.get $1 + local.get $right i32.const 0 - local.get $2 + local.get $leftLength call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) - local.get $0 + (func $~lib/util/number/decimalCount32 (param $value i32) (result i32) + local.get $value i32.const 100000 i32.lt_u if - local.get $0 + local.get $value i32.const 100 i32.lt_u if i32.const 1 - local.get $0 + local.get $value i32.const 10 i32.ge_u i32.add return else i32.const 3 - local.get $0 + local.get $value i32.const 10000 i32.ge_u i32.add - local.get $0 + local.get $value i32.const 1000 i32.ge_u i32.add @@ -293,23 +293,23 @@ end unreachable else - local.get $0 + local.get $value i32.const 10000000 i32.lt_u if i32.const 6 - local.get $0 + local.get $value i32.const 1000000 i32.ge_u i32.add return else i32.const 8 - local.get $0 + local.get $value i32.const 1000000000 i32.ge_u i32.add - local.get $0 + local.get $value i32.const 100000000 i32.ge_u i32.add @@ -329,50 +329,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -385,58 +385,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -453,12 +453,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -468,19 +468,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -491,27 +491,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -519,35 +519,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -557,15 +557,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -575,25 +575,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -601,33 +601,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -655,23 +655,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -683,15 +683,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -703,33 +703,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -737,21 +737,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -766,36 +766,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -803,67 +803,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -873,22 +873,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -898,12 +898,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -915,75 +915,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -995,38 +995,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -1040,12 +1040,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -1056,38 +1056,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1095,21 +1095,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -1124,101 +1124,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -1229,7 +1229,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1240,26 +1240,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1272,27 +1272,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1306,11 +1306,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1321,66 +1321,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1390,10 +1390,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1404,13 +1404,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1421,109 +1421,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1531,7 +1531,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1548,23 +1548,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1576,54 +1576,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1644,30 +1644,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1677,9 +1677,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1689,8 +1689,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1698,43 +1698,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1746,17 +1746,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1770,7 +1770,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1788,7 +1788,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1798,12 +1798,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1825,7 +1825,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1845,14 +1845,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1865,8 +1865,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1877,37 +1877,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1915,16 +1915,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1932,21 +1932,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1961,12 +1961,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1974,49 +1974,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -2026,90 +2026,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -2118,22 +2118,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -2142,27 +2142,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -2177,69 +2177,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2254,29 +2254,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2289,13 +2289,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2306,25 +2306,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2339,10 +2339,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2360,97 +2360,97 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/util/number/utoa32_dec_lut (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 i64) - (local $9 i64) - (local $10 i32) - (local $11 i32) + (func $~lib/util/number/utoa32_dec_lut (param $buffer i32) (param $num i32) (param $offset i32) + (local $var$3 i32) + (local $t i32) + (local $r i32) + (local $d1 i32) + (local $d2 i32) + (local $digits1 i64) + (local $digits2 i64) + (local $var$10 i32) + (local $var$11 i32) loop $while-continue|0 - local.get $1 + local.get $num i32.const 10000 i32.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $1 + local.get $num i32.const 10000 i32.div_u - local.set $4 - local.get $1 + local.set $t + local.get $num i32.const 10000 i32.rem_u - local.set $5 - local.get $4 - local.set $1 - local.get $5 + local.set $r + local.get $t + local.set $num + local.get $r i32.const 100 i32.div_u - local.set $6 - local.get $5 + local.set $d1 + local.get $r i32.const 100 i32.rem_u - local.set $7 + local.set $d2 i32.const 764 - local.get $6 + local.get $d1 i32.const 2 i32.shl i32.add i64.load32_u - local.set $8 + local.set $digits1 i32.const 764 - local.get $7 + local.get $d2 i32.const 2 i32.shl i32.add i64.load32_u - local.set $9 - local.get $2 + local.set $digits2 + local.get $offset i32.const 4 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $8 - local.get $9 + local.get $digits1 + local.get $digits2 i64.const 32 i64.shl i64.or @@ -2458,99 +2458,99 @@ br $while-continue|0 end end - local.get $1 + local.get $num i32.const 100 i32.ge_u if - local.get $1 + local.get $num i32.const 100 i32.div_u - local.set $3 - local.get $1 + local.set $var$3 + local.get $num i32.const 100 i32.rem_u - local.set $10 - local.get $3 - local.set $1 - local.get $2 + local.set $var$10 + local.get $var$3 + local.set $num + local.get $offset i32.const 2 i32.sub - local.set $2 + local.set $offset i32.const 764 - local.get $10 + local.get $var$10 i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store end - local.get $1 + local.get $num i32.const 10 i32.ge_u if - local.get $2 + local.get $offset i32.const 2 i32.sub - local.set $2 + local.set $offset i32.const 764 - local.get $1 + local.get $num i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store else - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 + local.set $offset i32.const 48 - local.get $1 + local.get $num i32.add - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store16 end ) - (func $~lib/util/number/utoa_hex_lut (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i32) + (func $~lib/util/number/utoa_hex_lut (param $buffer i32) (param $num i64) (param $offset i32) + (local $var$3 i32) loop $while-continue|0 - local.get $2 + local.get $offset i32.const 2 i32.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $2 + local.get $offset i32.const 2 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 1184 - local.get $1 + local.get $num i32.wrap_i64 i32.const 255 i32.and @@ -2559,20 +2559,20 @@ i32.add i32.load i32.store - local.get $1 + local.get $num i64.const 8 i64.shr_u - local.set $1 + local.set $num br $while-continue|0 end end - local.get $2 + local.get $offset i32.const 1 i32.and if - local.get $0 + local.get $buffer i32.const 1184 - local.get $1 + local.get $num i32.wrap_i64 i32.const 6 i32.shl @@ -2581,25 +2581,25 @@ i32.store16 end ) - (func $~lib/util/number/ulog_base (param $0 i64) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) - (local $4 i64) - (local $5 i32) - local.get $1 - local.set $2 - local.get $2 + (func $~lib/util/number/ulog_base (param $num i64) (param $base i32) (result i32) + (local $var$2 i32) + (local $b64 i64) + (local $b i64) + (local $e i32) + local.get $base + local.set $var$2 + local.get $var$2 i32.popcnt i32.const 1 i32.eq if i32.const 63 - local.get $0 + local.get $num i64.clz i32.wrap_i64 i32.sub i32.const 31 - local.get $1 + local.get $base i32.clz i32.sub i32.div_u @@ -2607,95 +2607,95 @@ i32.add return end - local.get $1 + local.get $base i64.extend_i32_s - local.set $3 - local.get $3 - local.set $4 + local.set $b64 + local.get $b64 + local.set $b i32.const 1 - local.set $5 + local.set $e loop $while-continue|0 - local.get $0 - local.get $4 + local.get $num + local.get $b i64.ge_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 - local.get $4 + local.get $num + local.get $b i64.div_u - local.set $0 - local.get $4 - local.get $4 + local.set $num + local.get $b + local.get $b i64.mul - local.set $4 - local.get $5 + local.set $b + local.get $e i32.const 1 i32.shl - local.set $5 + local.set $e br $while-continue|0 end end loop $while-continue|1 - local.get $0 + local.get $num i64.const 1 i64.ge_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 - local.get $3 + local.get $num + local.get $b64 i64.div_u - local.set $0 - local.get $5 + local.set $num + local.get $e i32.const 1 i32.add - local.set $5 + local.set $e br $while-continue|1 end end - local.get $5 + local.get $e i32.const 1 i32.sub ) - (func $~lib/util/number/utoa64_any_core (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i32) - (local $4 i64) - (local $5 i64) - (local $6 i64) - local.get $3 + (func $~lib/util/number/utoa64_any_core (param $buffer i32) (param $num i64) (param $offset i32) (param $radix i32) + (local $base i64) + (local $var$5 i64) + (local $q i64) + local.get $radix i64.extend_i32_s - local.set $4 - local.get $3 - local.get $3 + local.set $base + local.get $radix + local.get $radix i32.const 1 i32.sub i32.and i32.const 0 i32.eq if - local.get $3 + local.get $radix i32.ctz i32.const 7 i32.and i64.extend_i32_s - local.set $5 - local.get $4 + local.set $var$5 + local.get $base i64.const 1 i64.sub - local.set $6 + local.set $q loop $do-loop|0 - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 2240 - local.get $1 - local.get $6 + local.get $num + local.get $q i64.and i32.wrap_i64 i32.const 1 @@ -2703,34 +2703,34 @@ i32.add i32.load16_u i32.store16 - local.get $1 - local.get $5 + local.get $num + local.get $var$5 i64.shr_u - local.set $1 - local.get $1 + local.set $num + local.get $num i64.const 0 i64.ne br_if $do-loop|0 end else loop $do-loop|1 - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 - local.get $1 - local.get $4 + local.set $offset + local.get $num + local.get $base i64.div_u - local.set $6 - local.get $0 - local.get $2 + local.set $q + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 2240 - local.get $1 - local.get $6 - local.get $4 + local.get $num + local.get $q + local.get $base i64.mul i64.sub i32.wrap_i64 @@ -2739,110 +2739,110 @@ i32.add i32.load16_u i32.store16 - local.get $6 - local.set $1 - local.get $1 + local.get $q + local.set $num + local.get $num i64.const 0 i64.ne br_if $do-loop|1 end end ) - (func $~lib/number/I32#toString (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/number/I32#toString (param $this i32) (param $radix i32) (result i32) + local.get $this + local.get $radix call $~lib/util/number/itoa32 ) - (func $~lib/math/NativeMath.pow (param $0 f64) (param $1 f64) (result f64) - (local $2 f64) - (local $3 f64) - (local $4 i32) - (local $5 i64) - (local $6 i64) - (local $7 i64) - (local $8 i64) - (local $9 i64) - (local $10 f64) - (local $11 i64) - (local $12 i32) - (local $13 i64) - (local $14 i64) - (local $15 f64) - (local $16 f64) - (local $17 f64) - (local $18 f64) - (local $19 f64) - (local $20 f64) - (local $21 f64) - (local $22 f64) - (local $23 f64) - (local $24 f64) - (local $25 f64) - (local $26 f64) - (local $27 f64) - (local $28 f64) - (local $29 f64) - (local $30 f64) - (local $31 f64) - (local $32 f64) - (local $33 f64) - (local $34 f64) - (local $35 f64) - (local $36 f64) - (local $37 f64) - (local $38 f64) - (local $39 i32) - (local $40 i32) - (local $41 i32) - (local $42 i32) - (local $43 i64) - (local $44 i64) - local.get $1 + (func $~lib/math/NativeMath.pow (param $x f64) (param $y f64) (result f64) + (local $var$2 f64) + (local $var$3 f64) + (local $var$4 i32) + (local $var$5 i64) + (local $var$6 i64) + (local $var$7 i64) + (local $var$8 i64) + (local $var$9 i64) + (local $var$10 f64) + (local $var$11 i64) + (local $var$12 i32) + (local $var$13 i64) + (local $var$14 i64) + (local $var$15 f64) + (local $var$16 f64) + (local $var$17 f64) + (local $var$18 f64) + (local $var$19 f64) + (local $var$20 f64) + (local $var$21 f64) + (local $var$22 f64) + (local $var$23 f64) + (local $var$24 f64) + (local $var$25 f64) + (local $var$26 f64) + (local $var$27 f64) + (local $var$28 f64) + (local $var$29 f64) + (local $var$30 f64) + (local $var$31 f64) + (local $var$32 f64) + (local $var$33 f64) + (local $var$34 f64) + (local $var$35 f64) + (local $var$36 f64) + (local $var$37 f64) + (local $var$38 f64) + (local $var$39 i32) + (local $var$40 i32) + (local $var$41 i32) + (local $var$42 i32) + (local $var$43 i64) + (local $var$44 i64) + local.get $y f64.abs f64.const 2 f64.le if - local.get $1 + local.get $y f64.const 2 f64.eq if - local.get $0 - local.get $0 + local.get $x + local.get $x f64.mul return end - local.get $1 + local.get $y f64.const 0.5 f64.eq if - local.get $0 + local.get $x f64.sqrt f64.abs f64.const inf - local.get $0 + local.get $x f64.const inf f64.neg f64.ne select return end - local.get $1 + local.get $y f64.const -1 f64.eq if f64.const 1 - local.get $0 + local.get $x f64.div return end - local.get $1 + local.get $y f64.const 1 f64.eq if - local.get $0 + local.get $x return end - local.get $1 + local.get $y f64.const 0 f64.eq if @@ -2855,27 +2855,27 @@ i32.lt_s drop block $~lib/util/math/pow_lut|inlined.0 (result f64) - local.get $0 - local.set $3 - local.get $1 - local.set $2 + local.get $x + local.set $var$3 + local.get $y + local.set $var$2 i32.const 0 - local.set $4 - local.get $3 + local.set $var$4 + local.get $var$3 i64.reinterpret_f64 - local.set $5 - local.get $2 + local.set $var$5 + local.get $var$2 i64.reinterpret_f64 - local.set $6 - local.get $5 + local.set $var$6 + local.get $var$5 i64.const 52 i64.shr_u - local.set $7 - local.get $6 + local.set $var$7 + local.get $var$6 i64.const 52 i64.shr_u - local.set $8 - local.get $7 + local.set $var$8 + local.get $var$7 i64.const 1 i64.sub i64.const 2047 @@ -2885,7 +2885,7 @@ if (result i32) i32.const 1 else - local.get $8 + local.get $var$8 i64.const 2047 i64.and i64.const 958 @@ -2896,9 +2896,9 @@ i64.ge_u end if - local.get $6 - local.set $9 - local.get $9 + local.get $var$6 + local.set $var$9 + local.get $var$9 i64.const 1 i64.shl i64.const 1 @@ -2908,7 +2908,7 @@ i64.sub i64.ge_u if - local.get $6 + local.get $var$6 i64.const 1 i64.shl i64.const 0 @@ -2917,14 +2917,14 @@ f64.const 1 br $~lib/util/math/pow_lut|inlined.0 end - local.get $5 + local.get $var$5 i64.const 4607182418800017408 i64.eq if f64.const nan:0x8000000000000 br $~lib/util/math/pow_lut|inlined.0 end - local.get $5 + local.get $var$5 i64.const 1 i64.shl i64.const -9007199254740992 @@ -2932,19 +2932,19 @@ if (result i32) i32.const 1 else - local.get $6 + local.get $var$6 i64.const 1 i64.shl i64.const -9007199254740992 i64.gt_u end if - local.get $3 - local.get $2 + local.get $var$3 + local.get $var$2 f64.add br $~lib/util/math/pow_lut|inlined.0 end - local.get $5 + local.get $var$5 i64.const 1 i64.shl i64.const 9214364837600034816 @@ -2953,12 +2953,12 @@ f64.const nan:0x8000000000000 br $~lib/util/math/pow_lut|inlined.0 end - local.get $5 + local.get $var$5 i64.const 1 i64.shl i64.const 9214364837600034816 i64.lt_u - local.get $6 + local.get $var$6 i64.const 63 i64.shr_u i64.const 0 @@ -2969,14 +2969,14 @@ f64.const 0 br $~lib/util/math/pow_lut|inlined.0 end - local.get $2 - local.get $2 + local.get $var$2 + local.get $var$2 f64.mul br $~lib/util/math/pow_lut|inlined.0 end - local.get $5 - local.set $9 - local.get $9 + local.get $var$5 + local.set $var$9 + local.get $var$9 i64.const 1 i64.shl i64.const 1 @@ -2986,32 +2986,32 @@ i64.sub i64.ge_u if - local.get $3 - local.get $3 + local.get $var$3 + local.get $var$3 f64.mul - local.set $10 - local.get $5 + local.set $var$10 + local.get $var$5 i64.const 63 i64.shr_u i32.wrap_i64 if (result i32) block $~lib/util/math/checkint|inlined.0 (result i32) - local.get $6 - local.set $9 - local.get $9 + local.get $var$6 + local.set $var$9 + local.get $var$9 i64.const 52 i64.shr_u i64.const 2047 i64.and - local.set $11 - local.get $11 + local.set $var$11 + local.get $var$11 i64.const 1023 i64.lt_u if i32.const 0 br $~lib/util/math/checkint|inlined.0 end - local.get $11 + local.get $var$11 i64.const 1023 i64.const 52 i64.add @@ -3024,12 +3024,12 @@ i64.const 1023 i64.const 52 i64.add - local.get $11 + local.get $var$11 i64.sub i64.shl - local.set $11 - local.get $9 - local.get $11 + local.set $var$11 + local.get $var$9 + local.get $var$11 i64.const 1 i64.sub i64.and @@ -3039,8 +3039,8 @@ i32.const 0 br $~lib/util/math/checkint|inlined.0 end - local.get $9 - local.get $11 + local.get $var$9 + local.get $var$11 i64.and i64.const 0 i64.ne @@ -3056,43 +3056,43 @@ i32.const 0 end if - local.get $10 + local.get $var$10 f64.neg - local.set $10 + local.set $var$10 end - local.get $6 + local.get $var$6 i64.const 0 i64.lt_s if (result f64) f64.const 1 - local.get $10 + local.get $var$10 f64.div else - local.get $10 + local.get $var$10 end br $~lib/util/math/pow_lut|inlined.0 end - local.get $5 + local.get $var$5 i64.const 0 i64.lt_s if block $~lib/util/math/checkint|inlined.1 (result i32) - local.get $6 - local.set $9 - local.get $9 + local.get $var$6 + local.set $var$9 + local.get $var$9 i64.const 52 i64.shr_u i64.const 2047 i64.and - local.set $11 - local.get $11 + local.set $var$11 + local.get $var$11 i64.const 1023 i64.lt_u if i32.const 0 br $~lib/util/math/checkint|inlined.1 end - local.get $11 + local.get $var$11 i64.const 1023 i64.const 52 i64.add @@ -3105,12 +3105,12 @@ i64.const 1023 i64.const 52 i64.add - local.get $11 + local.get $var$11 i64.sub i64.shl - local.set $11 - local.get $9 - local.get $11 + local.set $var$11 + local.get $var$9 + local.get $var$11 i64.const 1 i64.sub i64.and @@ -3120,8 +3120,8 @@ i32.const 0 br $~lib/util/math/checkint|inlined.1 end - local.get $9 - local.get $11 + local.get $var$9 + local.get $var$11 i64.and i64.const 0 i64.ne @@ -3131,37 +3131,37 @@ end i32.const 2 end - local.set $12 - local.get $12 + local.set $var$12 + local.get $var$12 i32.const 0 i32.eq if - local.get $3 - local.get $3 + local.get $var$3 + local.get $var$3 f64.sub - local.get $3 - local.get $3 + local.get $var$3 + local.get $var$3 f64.sub f64.div br $~lib/util/math/pow_lut|inlined.0 end - local.get $12 + local.get $var$12 i32.const 1 i32.eq if i32.const 262144 - local.set $4 + local.set $var$4 end - local.get $5 + local.get $var$5 i64.const 9223372036854775807 i64.and - local.set $5 - local.get $7 + local.set $var$5 + local.get $var$7 i64.const 2047 i64.and - local.set $7 + local.set $var$7 end - local.get $8 + local.get $var$8 i64.const 2047 i64.and i64.const 958 @@ -3171,14 +3171,14 @@ i64.sub i64.ge_u if - local.get $5 + local.get $var$5 i64.const 4607182418800017408 i64.eq if f64.const 1 br $~lib/util/math/pow_lut|inlined.0 end - local.get $8 + local.get $var$8 i64.const 2047 i64.and i64.const 958 @@ -3187,10 +3187,10 @@ f64.const 1 br $~lib/util/math/pow_lut|inlined.0 end - local.get $5 + local.get $var$5 i64.const 4607182418800017408 i64.gt_u - local.get $8 + local.get $var$8 i64.const 2048 i64.lt_u i32.eq @@ -3201,34 +3201,34 @@ end br $~lib/util/math/pow_lut|inlined.0 end - local.get $7 + local.get $var$7 i64.const 0 i64.eq if - local.get $3 + local.get $var$3 f64.const 4503599627370496 f64.mul i64.reinterpret_f64 - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i64.const 9223372036854775807 i64.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i64.const 52 i64.const 52 i64.shl i64.sub - local.set $5 + local.set $var$5 end end - local.get $5 - local.set $9 - local.get $9 + local.get $var$5 + local.set $var$9 + local.get $var$9 i64.const 4604531861337669632 i64.sub - local.set $11 - local.get $11 + local.set $var$11 + local.get $var$11 i64.const 52 i32.const 7 i64.extend_i32_s @@ -3238,150 +3238,150 @@ i64.extend_i32_s i64.and i32.wrap_i64 - local.set $12 - local.get $11 + local.set $var$12 + local.get $var$11 i64.const 52 i64.shr_s - local.set $13 - local.get $9 - local.get $11 + local.set $var$13 + local.get $var$9 + local.get $var$11 i64.const 4095 i64.const 52 i64.shl i64.and i64.sub - local.set $14 - local.get $14 + local.set $var$14 + local.get $var$14 f64.reinterpret_i64 - local.set $10 - local.get $13 + local.set $var$10 + local.get $var$13 f64.convert_i64_s - local.set $15 + local.set $var$15 i32.const 2384 - local.get $12 + local.get $var$12 i32.const 2 i32.const 3 i32.add i32.shl i32.add f64.load - local.set $16 + local.set $var$16 i32.const 2384 - local.get $12 + local.get $var$12 i32.const 2 i32.const 3 i32.add i32.shl i32.add f64.load offset=16 - local.set $17 + local.set $var$17 i32.const 2384 - local.get $12 + local.get $var$12 i32.const 2 i32.const 3 i32.add i32.shl i32.add f64.load offset=24 - local.set $18 - local.get $14 + local.set $var$18 + local.get $var$14 i64.const 2147483648 i64.add i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $19 - local.get $10 - local.get $19 + local.set $var$19 + local.get $var$10 + local.get $var$19 f64.sub - local.set $20 - local.get $19 - local.get $16 + local.set $var$20 + local.get $var$19 + local.get $var$16 f64.mul f64.const 1 f64.sub - local.set $21 - local.get $20 - local.get $16 + local.set $var$21 + local.get $var$20 + local.get $var$16 f64.mul - local.set $22 - local.get $21 - local.get $22 + local.set $var$22 + local.get $var$21 + local.get $var$22 f64.add - local.set $23 - local.get $15 + local.set $var$23 + local.get $var$15 f64.const 0.6931471805598903 f64.mul - local.get $17 + local.get $var$17 f64.add - local.set $24 - local.get $24 - local.get $23 + local.set $var$24 + local.get $var$24 + local.get $var$23 f64.add - local.set $25 - local.get $15 + local.set $var$25 + local.get $var$15 f64.const 5.497923018708371e-14 f64.mul - local.get $18 + local.get $var$18 f64.add - local.set $26 - local.get $24 - local.get $25 + local.set $var$26 + local.get $var$24 + local.get $var$25 f64.sub - local.get $23 + local.get $var$23 f64.add - local.set $27 + local.set $var$27 f64.const -0.5 - local.get $23 + local.get $var$23 f64.mul - local.set $28 - local.get $23 - local.get $28 + local.set $var$28 + local.get $var$23 + local.get $var$28 f64.mul - local.set $29 - local.get $23 - local.get $29 + local.set $var$29 + local.get $var$23 + local.get $var$29 f64.mul - local.set $30 + local.set $var$30 f64.const -0.5 - local.get $21 + local.get $var$21 f64.mul - local.set $31 - local.get $21 - local.get $31 + local.set $var$31 + local.get $var$21 + local.get $var$31 f64.mul - local.set $32 - local.get $25 - local.get $32 + local.set $var$32 + local.get $var$25 + local.get $var$32 f64.add - local.set $33 - local.get $22 - local.get $28 - local.get $31 + local.set $var$33 + local.get $var$22 + local.get $var$28 + local.get $var$31 f64.add f64.mul - local.set $34 - local.get $25 - local.get $33 + local.set $var$34 + local.get $var$25 + local.get $var$33 f64.sub - local.get $32 + local.get $var$32 f64.add - local.set $35 - local.get $30 + local.set $var$35 + local.get $var$30 f64.const -0.6666666666666679 - local.get $23 + local.get $var$23 f64.const 0.5000000000000007 f64.mul f64.add - local.get $29 + local.get $var$29 f64.const 0.7999999995323976 - local.get $23 + local.get $var$23 f64.const -0.6666666663487739 f64.mul f64.add - local.get $29 + local.get $var$29 f64.const -1.142909628459501 - local.get $23 + local.get $var$23 f64.const 1.0000415263675542 f64.mul f64.add @@ -3390,88 +3390,88 @@ f64.mul f64.add f64.mul - local.set $36 - local.get $26 - local.get $27 + local.set $var$36 + local.get $var$26 + local.get $var$27 f64.add - local.get $34 + local.get $var$34 f64.add - local.get $35 + local.get $var$35 f64.add - local.get $36 + local.get $var$36 f64.add - local.set $37 - local.get $33 - local.get $37 + local.set $var$37 + local.get $var$33 + local.get $var$37 f64.add - local.set $38 - local.get $33 - local.get $38 + local.set $var$38 + local.get $var$33 + local.get $var$38 f64.sub - local.get $37 + local.get $var$37 f64.add global.set $~lib/util/math/log_tail - local.get $38 - local.set $38 + local.get $var$38 + local.set $var$38 global.get $~lib/util/math/log_tail - local.set $37 - local.get $6 + local.set $var$37 + local.get $var$6 i64.const -134217728 i64.and f64.reinterpret_i64 - local.set $34 - local.get $2 - local.get $34 + local.set $var$34 + local.get $var$2 + local.get $var$34 f64.sub - local.set $33 - local.get $38 + local.set $var$33 + local.get $var$38 i64.reinterpret_f64 i64.const -134217728 i64.and f64.reinterpret_i64 - local.set $32 - local.get $38 - local.get $32 + local.set $var$32 + local.get $var$38 + local.get $var$32 f64.sub - local.get $37 + local.get $var$37 f64.add - local.set $31 - local.get $34 - local.get $32 + local.set $var$31 + local.get $var$34 + local.get $var$32 f64.mul - local.set $36 - local.get $33 - local.get $32 + local.set $var$36 + local.get $var$33 + local.get $var$32 f64.mul - local.get $2 - local.get $31 + local.get $var$2 + local.get $var$31 f64.mul f64.add - local.set $35 + local.set $var$35 block $~lib/util/math/exp_inline|inlined.0 (result f64) - local.get $36 - local.set $15 - local.get $35 - local.set $10 - local.get $4 - local.set $12 - local.get $15 + local.get $var$36 + local.set $var$15 + local.get $var$35 + local.set $var$10 + local.get $var$4 + local.set $var$12 + local.get $var$15 i64.reinterpret_f64 - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 i64.const 52 i64.shr_u i32.wrap_i64 i32.const 2047 i32.and - local.set $39 - local.get $39 + local.set $var$39 + local.get $var$39 i32.const 969 i32.sub i32.const 63 i32.ge_u if - local.get $39 + local.get $var$39 i32.const 969 i32.sub i32.const -2147483648 @@ -3479,92 +3479,92 @@ if f64.const -1 f64.const 1 - local.get $12 + local.get $var$12 select br $~lib/util/math/exp_inline|inlined.0 end - local.get $39 + local.get $var$39 i32.const 1033 i32.ge_u if - local.get $9 + local.get $var$9 i64.const 0 i64.lt_s if (result f64) - local.get $12 - local.set $41 - local.get $41 - local.set $42 + local.get $var$12 + local.set $var$41 + local.get $var$41 + local.set $var$42 i64.const 1152921504606846976 f64.reinterpret_i64 - local.set $16 - local.get $16 + local.set $var$16 + local.get $var$16 f64.neg - local.get $16 - local.get $42 + local.get $var$16 + local.get $var$42 select - local.get $16 + local.get $var$16 f64.mul else - local.get $12 - local.set $42 - local.get $42 - local.set $41 + local.get $var$12 + local.set $var$42 + local.get $var$42 + local.set $var$41 i64.const 8070450532247928832 f64.reinterpret_i64 - local.set $17 - local.get $17 + local.set $var$17 + local.get $var$17 f64.neg - local.get $17 - local.get $41 + local.get $var$17 + local.get $var$41 select - local.get $17 + local.get $var$17 f64.mul end br $~lib/util/math/exp_inline|inlined.0 end i32.const 0 - local.set $39 + local.set $var$39 end f64.const 184.6649652337873 - local.get $15 + local.get $var$15 f64.mul - local.set $29 - local.get $29 + local.set $var$29 + local.get $var$29 f64.const 6755399441055744 f64.add - local.set $30 - local.get $30 + local.set $var$30 + local.get $var$30 i64.reinterpret_f64 - local.set $14 - local.get $30 + local.set $var$14 + local.get $var$30 f64.const 6755399441055744 f64.sub - local.set $30 - local.get $15 - local.get $30 + local.set $var$30 + local.get $var$15 + local.get $var$30 f64.const -0.005415212348111709 f64.mul f64.add - local.get $30 + local.get $var$30 f64.const -1.2864023111638346e-14 f64.mul f64.add - local.set $28 - local.get $28 - local.get $10 + local.set $var$28 + local.get $var$28 + local.get $var$10 f64.add - local.set $28 - local.get $14 + local.set $var$28 + local.get $var$14 i32.const 127 i64.extend_i32_s i64.and i64.const 1 i64.shl i32.wrap_i64 - local.set $40 - local.get $14 - local.get $12 + local.set $var$40 + local.get $var$14 + local.get $var$12 i64.extend_i32_u i64.add i64.const 52 @@ -3572,225 +3572,225 @@ i64.extend_i32_s i64.sub i64.shl - local.set $13 + local.set $var$13 i32.const 6480 - local.get $40 + local.get $var$40 i32.const 3 i32.shl i32.add i64.load f64.reinterpret_i64 - local.set $25 + local.set $var$25 i32.const 6480 - local.get $40 + local.get $var$40 i32.const 3 i32.shl i32.add i64.load offset=8 - local.get $13 + local.get $var$13 i64.add - local.set $11 - local.get $28 - local.get $28 + local.set $var$11 + local.get $var$28 + local.get $var$28 f64.mul - local.set $27 - local.get $25 - local.get $28 + local.set $var$27 + local.get $var$25 + local.get $var$28 f64.add - local.get $27 + local.get $var$27 f64.const 0.49999999999996786 - local.get $28 + local.get $var$28 f64.const 0.16666666666665886 f64.mul f64.add f64.mul f64.add - local.get $27 - local.get $27 + local.get $var$27 + local.get $var$27 f64.mul f64.const 0.0416666808410674 - local.get $28 + local.get $var$28 f64.const 0.008333335853059549 f64.mul f64.add f64.mul f64.add - local.set $24 - local.get $39 + local.set $var$24 + local.get $var$39 i32.const 0 i32.eq if block $~lib/util/math/specialcase|inlined.0 (result f64) - local.get $24 - local.set $18 - local.get $11 - local.set $44 - local.get $14 - local.set $43 - local.get $43 + local.get $var$24 + local.set $var$18 + local.get $var$11 + local.set $var$44 + local.get $var$14 + local.set $var$43 + local.get $var$43 i64.const 2147483648 i64.and i64.const 0 i64.ne i32.eqz if - local.get $44 + local.get $var$44 i64.const 1009 i64.const 52 i64.shl i64.sub - local.set $44 - local.get $44 + local.set $var$44 + local.get $var$44 f64.reinterpret_i64 - local.set $17 + local.set $var$17 f64.const 5486124068793688683255936e279 - local.get $17 - local.get $17 - local.get $18 + local.get $var$17 + local.get $var$17 + local.get $var$18 f64.mul f64.add f64.mul br $~lib/util/math/specialcase|inlined.0 end - local.get $44 + local.get $var$44 i64.const 1022 i64.const 52 i64.shl i64.add - local.set $44 - local.get $44 + local.set $var$44 + local.get $var$44 f64.reinterpret_i64 - local.set $17 - local.get $17 - local.get $17 - local.get $18 + local.set $var$17 + local.get $var$17 + local.get $var$17 + local.get $var$18 f64.mul f64.add - local.set $16 - local.get $16 + local.set $var$16 + local.get $var$16 f64.abs f64.const 1 f64.lt if f64.const 1 - local.get $16 + local.get $var$16 f64.copysign - local.set $23 - local.get $17 - local.get $16 + local.set $var$23 + local.get $var$17 + local.get $var$16 f64.sub - local.get $17 - local.get $18 + local.get $var$17 + local.get $var$18 f64.mul f64.add - local.set $22 - local.get $23 - local.get $16 + local.set $var$22 + local.get $var$23 + local.get $var$16 f64.add - local.set $21 - local.get $23 - local.get $21 + local.set $var$21 + local.get $var$23 + local.get $var$21 f64.sub - local.get $16 + local.get $var$16 f64.add - local.get $22 + local.get $var$22 f64.add - local.set $22 - local.get $21 - local.get $22 + local.set $var$22 + local.get $var$21 + local.get $var$22 f64.add - local.get $23 + local.get $var$23 f64.sub - local.set $16 - local.get $16 + local.set $var$16 + local.get $var$16 f64.const 0 f64.eq if - local.get $44 + local.get $var$44 i64.const -9223372036854775808 i64.and f64.reinterpret_i64 - local.set $16 + local.set $var$16 end end - local.get $16 + local.get $var$16 f64.const 2.2250738585072014e-308 f64.mul end br $~lib/util/math/exp_inline|inlined.0 end - local.get $11 + local.get $var$11 f64.reinterpret_i64 - local.set $26 - local.get $26 - local.get $26 - local.get $24 + local.set $var$26 + local.get $var$26 + local.get $var$26 + local.get $var$24 f64.mul f64.add end end return ) - (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i64) - (local $11 i32) - (local $12 i64) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i32) - (local $24 i32) - (local $25 i32) - (local $26 i32) - (local $27 i64) + (func $~lib/util/number/genDigits (param $buffer i32) (param $w_frc i64) (param $w_exp i32) (param $mp_frc i64) (param $mp_exp i32) (param $delta i64) (param $sign i32) (result i32) + (local $one_exp i32) + (local $one_frc i64) + (local $mask i64) + (local $wp_w_frc i64) + (local $p1 i32) + (local $p2 i64) + (local $kappa i32) + (local $len i32) + (local $var$15 i32) + (local $d i32) + (local $var$17 i32) + (local $tmp i64) + (local $var$19 i64) + (local $var$20 i64) + (local $var$21 i64) + (local $d_0 i64) + (local $var$23 i32) + (local $var$24 i32) + (local $var$25 i32) + (local $var$26 i32) + (local $var$27 i64) i32.const 0 - local.get $4 + local.get $mp_exp i32.sub - local.set $7 + local.set $one_exp i64.const 1 - local.get $7 + local.get $one_exp i64.extend_i32_s i64.shl - local.set $8 - local.get $8 + local.set $one_frc + local.get $one_frc i64.const 1 i64.sub - local.set $9 - local.get $3 - local.get $1 + local.set $mask + local.get $mp_frc + local.get $w_frc i64.sub - local.set $10 - local.get $3 - local.get $7 + local.set $wp_w_frc + local.get $mp_frc + local.get $one_exp i64.extend_i32_s i64.shr_u i32.wrap_i64 - local.set $11 - local.get $3 - local.get $9 + local.set $p1 + local.get $mp_frc + local.get $mask i64.and - local.set $12 - local.get $11 + local.set $p2 + local.get $p1 call $~lib/util/number/decimalCount32 - local.set $13 - local.get $6 - local.set $14 + local.set $kappa + local.get $sign + local.set $len loop $while-continue|0 - local.get $13 + local.get $kappa i32.const 0 i32.gt_s - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 if block $break|1 block $case10|1 @@ -3804,275 +3804,275 @@ block $case2|1 block $case1|1 block $case0|1 - local.get $13 - local.set $17 - local.get $17 + local.get $kappa + local.set $var$17 + local.get $var$17 i32.const 10 i32.eq br_if $case0|1 - local.get $17 + local.get $var$17 i32.const 9 i32.eq br_if $case1|1 - local.get $17 + local.get $var$17 i32.const 8 i32.eq br_if $case2|1 - local.get $17 + local.get $var$17 i32.const 7 i32.eq br_if $case3|1 - local.get $17 + local.get $var$17 i32.const 6 i32.eq br_if $case4|1 - local.get $17 + local.get $var$17 i32.const 5 i32.eq br_if $case5|1 - local.get $17 + local.get $var$17 i32.const 4 i32.eq br_if $case6|1 - local.get $17 + local.get $var$17 i32.const 3 i32.eq br_if $case7|1 - local.get $17 + local.get $var$17 i32.const 2 i32.eq br_if $case8|1 - local.get $17 + local.get $var$17 i32.const 1 i32.eq br_if $case9|1 br $case10|1 end - local.get $11 + local.get $p1 i32.const 1000000000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 1000000000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 100000000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 100000000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 10000000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 10000000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 1000000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 1000000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 100000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 100000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 10000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 10000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 1000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 1000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 100 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 100 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 10 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 10 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 - local.set $16 + local.get $p1 + local.set $d i32.const 0 - local.set $11 + local.set $p1 br $break|1 end i32.const 0 - local.set $16 + local.set $d br $break|1 end - local.get $16 - local.get $14 + local.get $d + local.get $len i32.or if - local.get $0 - local.get $14 - local.tee $17 + local.get $buffer + local.get $len + local.tee $var$17 i32.const 1 i32.add - local.set $14 - local.get $17 + local.set $len + local.get $var$17 i32.const 1 i32.shl i32.add i32.const 48 - local.get $16 + local.get $d i32.const 65535 i32.and i32.add i32.store16 end - local.get $13 + local.get $kappa i32.const 1 i32.sub - local.set $13 - local.get $11 + local.set $kappa + local.get $p1 i64.extend_i32_u - local.get $7 + local.get $one_exp i64.extend_i32_s i64.shl - local.get $12 + local.get $p2 i64.add - local.set $18 - local.get $18 - local.get $5 + local.set $tmp + local.get $tmp + local.get $delta i64.le_u if global.get $~lib/util/number/_K - local.get $13 + local.get $kappa i32.add global.set $~lib/util/number/_K - local.get $0 - local.set $23 - local.get $14 - local.set $17 - local.get $5 - local.set $22 - local.get $18 - local.set $21 + local.get $buffer + local.set $var$23 + local.get $len + local.set $var$17 + local.get $delta + local.set $d_0 + local.get $tmp + local.set $var$21 i32.const 9632 - local.get $13 + local.get $kappa i32.const 2 i32.shl i32.add i64.load32_u - local.get $7 + local.get $one_exp i64.extend_i32_s i64.shl - local.set $20 - local.get $10 - local.set $19 - local.get $23 - local.get $17 + local.set $var$20 + local.get $wp_w_frc + local.set $var$19 + local.get $var$23 + local.get $var$17 i32.const 1 i32.sub i32.const 1 i32.shl i32.add - local.set $24 - local.get $24 + local.set $var$24 + local.get $var$24 i32.load16_u - local.set $25 + local.set $var$25 loop $while-continue|3 - local.get $21 - local.get $19 + local.get $var$21 + local.get $var$19 i64.lt_u if (result i32) - local.get $22 - local.get $21 + local.get $d_0 + local.get $var$21 i64.sub - local.get $20 + local.get $var$20 i64.ge_u else i32.const 0 end if (result i32) - local.get $21 - local.get $20 + local.get $var$21 + local.get $var$20 i64.add - local.get $19 + local.get $var$19 i64.lt_u if (result i32) i32.const 1 else - local.get $19 - local.get $21 + local.get $var$19 + local.get $var$21 i64.sub - local.get $21 - local.get $20 + local.get $var$21 + local.get $var$20 i64.add - local.get $19 + local.get $var$19 i64.sub i64.gt_u end else i32.const 0 end - local.set $26 - local.get $26 + local.set $var$26 + local.get $var$26 if - local.get $25 + local.get $var$25 i32.const 1 i32.sub - local.set $25 - local.get $21 - local.get $20 + local.set $var$25 + local.get $var$21 + local.get $var$20 i64.add - local.set $21 + local.set $var$21 br $while-continue|3 end end - local.get $24 - local.get $25 + local.get $var$24 + local.get $var$25 i32.store16 - local.get $14 + local.get $len return end br $while-continue|0 @@ -4080,150 +4080,150 @@ end loop $while-continue|4 i32.const 1 - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 if - local.get $12 + local.get $p2 i64.const 10 i64.mul - local.set $12 - local.get $5 + local.set $p2 + local.get $delta i64.const 10 i64.mul - local.set $5 - local.get $12 - local.get $7 + local.set $delta + local.get $p2 + local.get $one_exp i64.extend_i32_s i64.shr_u - local.set $22 - local.get $22 - local.get $14 + local.set $d_0 + local.get $d_0 + local.get $len i64.extend_i32_s i64.or i64.const 0 i64.ne if - local.get $0 - local.get $14 - local.tee $25 + local.get $buffer + local.get $len + local.tee $var$25 i32.const 1 i32.add - local.set $14 - local.get $25 + local.set $len + local.get $var$25 i32.const 1 i32.shl i32.add i32.const 48 - local.get $22 + local.get $d_0 i32.wrap_i64 i32.const 65535 i32.and i32.add i32.store16 end - local.get $12 - local.get $9 + local.get $p2 + local.get $mask i64.and - local.set $12 - local.get $13 + local.set $p2 + local.get $kappa i32.const 1 i32.sub - local.set $13 - local.get $12 - local.get $5 + local.set $kappa + local.get $p2 + local.get $delta i64.lt_u if global.get $~lib/util/number/_K - local.get $13 + local.get $kappa i32.add global.set $~lib/util/number/_K - local.get $10 + local.get $wp_w_frc i32.const 9632 i32.const 0 - local.get $13 + local.get $kappa i32.sub i32.const 2 i32.shl i32.add i64.load32_u i64.mul - local.set $10 - local.get $0 - local.set $17 - local.get $14 - local.set $26 - local.get $5 - local.set $27 - local.get $12 - local.set $21 - local.get $8 - local.set $20 - local.get $10 - local.set $19 - local.get $17 - local.get $26 + local.set $wp_w_frc + local.get $buffer + local.set $var$17 + local.get $len + local.set $var$26 + local.get $delta + local.set $var$27 + local.get $p2 + local.set $var$21 + local.get $one_frc + local.set $var$20 + local.get $wp_w_frc + local.set $var$19 + local.get $var$17 + local.get $var$26 i32.const 1 i32.sub i32.const 1 i32.shl i32.add - local.set $25 - local.get $25 + local.set $var$25 + local.get $var$25 i32.load16_u - local.set $24 + local.set $var$24 loop $while-continue|6 - local.get $21 - local.get $19 + local.get $var$21 + local.get $var$19 i64.lt_u if (result i32) - local.get $27 - local.get $21 + local.get $var$27 + local.get $var$21 i64.sub - local.get $20 + local.get $var$20 i64.ge_u else i32.const 0 end if (result i32) - local.get $21 - local.get $20 + local.get $var$21 + local.get $var$20 i64.add - local.get $19 + local.get $var$19 i64.lt_u if (result i32) i32.const 1 else - local.get $19 - local.get $21 + local.get $var$19 + local.get $var$21 i64.sub - local.get $21 - local.get $20 + local.get $var$21 + local.get $var$20 i64.add - local.get $19 + local.get $var$19 i64.sub i64.gt_u end else i32.const 0 end - local.set $23 - local.get $23 + local.set $var$23 + local.get $var$23 if - local.get $24 + local.get $var$24 i32.const 1 i32.sub - local.set $24 - local.get $21 - local.get $20 + local.set $var$24 + local.get $var$21 + local.get $var$20 i64.add - local.set $21 + local.set $var$21 br $while-continue|6 end end - local.get $25 - local.get $24 + local.get $var$25 + local.get $var$24 i32.store16 - local.get $14 + local.get $len return end br $while-continue|4 @@ -4231,21 +4231,21 @@ end unreachable ) - (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $2 + (func $~lib/util/number/prettify (param $buffer i32) (param $length i32) (param $k i32) (result i32) + (local $kk i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $k i32.eqz if - local.get $0 - local.get $1 + local.get $buffer + local.get $length i32.const 1 i32.shl i32.add @@ -4255,51 +4255,51 @@ i32.shl i32.or i32.store - local.get $1 + local.get $length i32.const 2 i32.add return end - local.get $1 - local.get $2 + local.get $length + local.get $k i32.add - local.set $3 - local.get $1 - local.get $3 + local.set $kk + local.get $length + local.get $kk i32.le_s if (result i32) - local.get $3 + local.get $kk i32.const 21 i32.le_s else i32.const 0 end if - local.get $1 - local.set $4 + local.get $length + local.set $var$4 loop $for-loop|0 - local.get $4 - local.get $3 + local.get $var$4 + local.get $kk i32.lt_s - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $0 - local.get $4 + local.get $buffer + local.get $var$4 i32.const 1 i32.shl i32.add i32.const 48 i32.store16 - local.get $4 + local.get $var$4 i32.const 1 i32.add - local.set $4 + local.set $var$4 br $for-loop|0 end end - local.get $0 - local.get $3 + local.get $buffer + local.get $kk i32.const 1 i32.shl i32.add @@ -4309,55 +4309,55 @@ i32.shl i32.or i32.store - local.get $3 + local.get $kk i32.const 2 i32.add return else - local.get $3 + local.get $kk i32.const 0 i32.gt_s if (result i32) - local.get $3 + local.get $kk i32.const 21 i32.le_s else i32.const 0 end if - local.get $0 - local.get $3 + local.get $buffer + local.get $kk i32.const 1 i32.shl i32.add - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 i32.const 2 i32.add - local.get $4 + local.get $var$4 i32.const 0 - local.get $2 + local.get $k i32.sub i32.const 1 i32.shl memory.copy - local.get $0 - local.get $3 + local.get $buffer + local.get $kk i32.const 1 i32.shl i32.add i32.const 46 i32.store16 - local.get $1 + local.get $length i32.const 1 i32.add return else i32.const -6 - local.get $3 + local.get $kk i32.lt_s if (result i32) - local.get $3 + local.get $kk i32.const 0 i32.le_s else @@ -4365,20 +4365,20 @@ end if i32.const 2 - local.get $3 + local.get $kk i32.sub - local.set $4 - local.get $0 - local.get $4 + local.set $var$4 + local.get $buffer + local.get $var$4 i32.const 1 i32.shl i32.add - local.get $0 - local.get $1 + local.get $buffer + local.get $length i32.const 1 i32.shl memory.copy - local.get $0 + local.get $buffer i32.const 48 i32.const 46 i32.const 16 @@ -4386,164 +4386,164 @@ i32.or i32.store i32.const 2 - local.set $5 + local.set $var$5 loop $for-loop|1 - local.get $5 - local.get $4 + local.get $var$5 + local.get $var$4 i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $5 + local.get $buffer + local.get $var$5 i32.const 1 i32.shl i32.add i32.const 48 i32.store16 - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|1 end end - local.get $1 - local.get $4 + local.get $length + local.get $var$4 i32.add return else - local.get $1 + local.get $length i32.const 1 i32.eq if - local.get $0 + local.get $buffer i32.const 101 i32.store16 offset=2 - local.get $0 + local.get $buffer i32.const 4 i32.add - local.set $5 - local.get $3 + local.set $var$5 + local.get $kk i32.const 1 i32.sub - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 i32.const 0 i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if i32.const 0 - local.get $6 + local.get $var$6 i32.sub - local.set $6 + local.set $var$6 end - local.get $6 + local.get $var$6 call $~lib/util/number/decimalCount32 i32.const 1 i32.add - local.set $7 - local.get $5 - local.set $10 - local.get $6 - local.set $9 - local.get $7 - local.set $8 + local.set $var$7 + local.get $var$5 + local.set $var$10 + local.get $var$6 + local.set $var$9 + local.get $var$7 + local.set $var$8 i32.const 0 i32.const 1 i32.ge_s drop - local.get $10 - local.get $9 - local.get $8 + local.get $var$10 + local.get $var$9 + local.get $var$8 call $~lib/util/number/utoa32_dec_lut - local.get $5 + local.get $var$5 i32.const 45 i32.const 43 - local.get $4 + local.get $var$4 select i32.store16 - local.get $7 - local.set $1 - local.get $1 + local.get $var$7 + local.set $length + local.get $length i32.const 2 i32.add return else - local.get $1 + local.get $length i32.const 1 i32.shl - local.set $7 - local.get $0 + local.set $var$7 + local.get $buffer i32.const 4 i32.add - local.get $0 + local.get $buffer i32.const 2 i32.add - local.get $7 + local.get $var$7 i32.const 2 i32.sub memory.copy - local.get $0 + local.get $buffer i32.const 46 i32.store16 offset=2 - local.get $0 - local.get $7 + local.get $buffer + local.get $var$7 i32.add i32.const 101 i32.store16 offset=2 - local.get $1 - local.get $0 - local.get $7 + local.get $length + local.get $buffer + local.get $var$7 i32.add i32.const 4 i32.add - local.set $9 - local.get $3 + local.set $var$9 + local.get $kk i32.const 1 i32.sub - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 i32.const 0 i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if i32.const 0 - local.get $8 + local.get $var$8 i32.sub - local.set $8 + local.set $var$8 end - local.get $8 + local.get $var$8 call $~lib/util/number/decimalCount32 i32.const 1 i32.add - local.set $5 - local.get $9 - local.set $11 - local.get $8 - local.set $6 - local.get $5 - local.set $10 + local.set $var$5 + local.get $var$9 + local.set $var$11 + local.get $var$8 + local.set $var$6 + local.get $var$5 + local.set $var$10 i32.const 0 i32.const 1 i32.ge_s drop - local.get $11 - local.get $6 - local.get $10 + local.get $var$11 + local.get $var$6 + local.get $var$10 call $~lib/util/number/utoa32_dec_lut - local.get $9 + local.get $var$9 i32.const 45 i32.const 43 - local.get $4 + local.get $var$4 select i32.store16 - local.get $5 + local.get $var$5 i32.add - local.set $1 - local.get $1 + local.set $length + local.get $length i32.const 2 i32.add return @@ -4556,711 +4556,711 @@ end unreachable ) - (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f64) - (local $6 i64) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i32) - (local $11 i64) - (local $12 i64) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 f64) - (local $17 i64) - (local $18 i64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i64) - (local $24 i64) - (local $25 i64) - (local $26 i32) - (local $27 i64) - (local $28 i32) - local.get $1 + (func $~lib/util/number/dtoa_core (param $buffer i32) (param $value f64) (result i32) + (local $sign i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 f64) + (local $var$6 i64) + (local $var$7 i32) + (local $var$8 i64) + (local $var$9 i64) + (local $var$10 i32) + (local $var$11 i64) + (local $var$12 i64) + (local $var$13 i32) + (local $var$14 i32) + (local $var$15 i32) + (local $var$16 f64) + (local $var$17 i64) + (local $var$18 i64) + (local $var$19 i64) + (local $var$20 i64) + (local $var$21 i64) + (local $var$22 i64) + (local $var$23 i64) + (local $var$24 i64) + (local $var$25 i64) + (local $var$26 i32) + (local $var$27 i64) + (local $len i32) + local.get $value f64.const 0 f64.lt - local.set $2 - local.get $2 + local.set $sign + local.get $sign if - local.get $1 + local.get $value f64.neg - local.set $1 - local.get $0 + local.set $value + local.get $buffer i32.const 45 i32.store16 end - local.get $1 - local.set $5 - local.get $0 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.get $value + local.set $var$5 + local.get $buffer + local.set $var$4 + local.get $sign + local.set $var$3 + local.get $var$5 i64.reinterpret_f64 - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 i64.const 9218868437227405312 i64.and i64.const 52 i64.shr_u i32.wrap_i64 - local.set $7 - local.get $6 + local.set $var$7 + local.get $var$6 i64.const 4503599627370495 i64.and - local.set $8 - local.get $7 + local.set $var$8 + local.get $var$7 i32.const 0 i32.ne i64.extend_i32_u i64.const 52 i64.shl - local.get $8 + local.get $var$8 i64.add - local.set $9 - local.get $7 + local.set $var$9 + local.get $var$7 i32.const 1 - local.get $7 + local.get $var$7 select i32.const 1023 i32.const 52 i32.add i32.sub - local.set $7 - local.get $9 - local.set $11 - local.get $7 - local.set $10 - local.get $11 + local.set $var$7 + local.get $var$9 + local.set $var$11 + local.get $var$7 + local.set $var$10 + local.get $var$11 i64.const 1 i64.shl i64.const 1 i64.add - local.set $12 - local.get $10 + local.set $var$12 + local.get $var$10 i32.const 1 i32.sub - local.set $13 - local.get $12 + local.set $var$13 + local.get $var$12 i64.clz i32.wrap_i64 - local.set $14 - local.get $12 - local.get $14 + local.set $var$14 + local.get $var$12 + local.get $var$14 i64.extend_i32_s i64.shl - local.set $12 - local.get $13 - local.get $14 + local.set $var$12 + local.get $var$13 + local.get $var$14 i32.sub - local.set $13 + local.set $var$13 i32.const 1 - local.get $11 + local.get $var$11 i64.const 4503599627370496 i64.eq i32.add - local.set $15 - local.get $12 + local.set $var$15 + local.get $var$12 global.set $~lib/util/number/_frc_plus - local.get $11 - local.get $15 + local.get $var$11 + local.get $var$15 i64.extend_i32_s i64.shl i64.const 1 i64.sub - local.get $10 - local.get $15 + local.get $var$10 + local.get $var$15 i32.sub - local.get $13 + local.get $var$13 i32.sub i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_minus - local.get $13 + local.get $var$13 global.set $~lib/util/number/_exp global.get $~lib/util/number/_exp - local.set $10 + local.set $var$10 i32.const -61 - local.get $10 + local.get $var$10 i32.sub f64.convert_i32_s f64.const 0.30102999566398114 f64.mul f64.const 347 f64.add - local.set $16 - local.get $16 + local.set $var$16 + local.get $var$16 i32.trunc_sat_f64_s - local.set $15 - local.get $15 - local.get $15 + local.set $var$15 + local.get $var$15 + local.get $var$15 f64.convert_i32_s - local.get $16 + local.get $var$16 f64.ne i32.add - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 i32.const 3 i32.shr_s i32.const 1 i32.add - local.set $14 + local.set $var$14 i32.const 348 - local.get $14 + local.get $var$14 i32.const 3 i32.shl i32.sub global.set $~lib/util/number/_K i32.const 8760 - local.get $14 + local.get $var$14 i32.const 3 i32.shl i32.add i64.load global.set $~lib/util/number/_frc_pow i32.const 9456 - local.get $14 + local.get $var$14 i32.const 1 i32.shl i32.add i32.load16_s global.set $~lib/util/number/_exp_pow - local.get $9 + local.get $var$9 i64.clz i32.wrap_i64 - local.set $14 - local.get $9 - local.get $14 + local.set $var$14 + local.get $var$9 + local.get $var$14 i64.extend_i32_s i64.shl - local.set $9 - local.get $7 - local.get $14 + local.set $var$9 + local.get $var$7 + local.get $var$14 i32.sub - local.set $7 + local.set $var$7 global.get $~lib/util/number/_frc_pow - local.set $12 + local.set $var$12 global.get $~lib/util/number/_exp_pow - local.set $15 - local.get $9 - local.set $17 - local.get $12 - local.set $11 - local.get $17 + local.set $var$15 + local.get $var$9 + local.set $var$17 + local.get $var$12 + local.set $var$11 + local.get $var$17 i64.const 4294967295 i64.and - local.set $18 - local.get $11 + local.set $var$18 + local.get $var$11 i64.const 4294967295 i64.and - local.set $19 - local.get $17 + local.set $var$19 + local.get $var$17 i64.const 32 i64.shr_u - local.set $20 - local.get $11 + local.set $var$20 + local.get $var$11 i64.const 32 i64.shr_u - local.set $21 - local.get $18 - local.get $19 + local.set $var$21 + local.get $var$18 + local.get $var$19 i64.mul - local.set $22 - local.get $20 - local.get $19 + local.set $var$22 + local.get $var$20 + local.get $var$19 i64.mul - local.get $22 + local.get $var$22 i64.const 32 i64.shr_u i64.add - local.set $23 - local.get $18 - local.get $21 + local.set $var$23 + local.get $var$18 + local.get $var$21 i64.mul - local.get $23 + local.get $var$23 i64.const 4294967295 i64.and i64.add - local.set $24 - local.get $24 + local.set $var$24 + local.get $var$24 i64.const 2147483647 i64.add - local.set $24 - local.get $23 + local.set $var$24 + local.get $var$23 i64.const 32 i64.shr_u - local.set $23 - local.get $24 + local.set $var$23 + local.get $var$24 i64.const 32 i64.shr_u - local.set $24 - local.get $20 - local.get $21 + local.set $var$24 + local.get $var$20 + local.get $var$21 i64.mul - local.get $23 + local.get $var$23 i64.add - local.get $24 + local.get $var$24 i64.add - local.set $24 - local.get $7 - local.set $10 - local.get $15 - local.set $13 - local.get $10 - local.get $13 + local.set $var$24 + local.get $var$7 + local.set $var$10 + local.get $var$15 + local.set $var$13 + local.get $var$10 + local.get $var$13 i32.add i32.const 64 i32.add - local.set $10 + local.set $var$10 global.get $~lib/util/number/_frc_plus - local.set $17 - local.get $12 - local.set $11 - local.get $17 + local.set $var$17 + local.get $var$12 + local.set $var$11 + local.get $var$17 i64.const 4294967295 i64.and - local.set $23 - local.get $11 + local.set $var$23 + local.get $var$11 i64.const 4294967295 i64.and - local.set $22 - local.get $17 + local.set $var$22 + local.get $var$17 i64.const 32 i64.shr_u - local.set $21 - local.get $11 + local.set $var$21 + local.get $var$11 i64.const 32 i64.shr_u - local.set $20 - local.get $23 - local.get $22 + local.set $var$20 + local.get $var$23 + local.get $var$22 i64.mul - local.set $19 - local.get $21 - local.get $22 + local.set $var$19 + local.get $var$21 + local.get $var$22 i64.mul - local.get $19 + local.get $var$19 i64.const 32 i64.shr_u i64.add - local.set $18 - local.get $23 - local.get $20 + local.set $var$18 + local.get $var$23 + local.get $var$20 i64.mul - local.get $18 + local.get $var$18 i64.const 4294967295 i64.and i64.add - local.set $25 - local.get $25 + local.set $var$25 + local.get $var$25 i64.const 2147483647 i64.add - local.set $25 - local.get $18 + local.set $var$25 + local.get $var$18 i64.const 32 i64.shr_u - local.set $18 - local.get $25 + local.set $var$18 + local.get $var$25 i64.const 32 i64.shr_u - local.set $25 - local.get $21 - local.get $20 + local.set $var$25 + local.get $var$21 + local.get $var$20 i64.mul - local.get $18 + local.get $var$18 i64.add - local.get $25 + local.get $var$25 i64.add i64.const 1 i64.sub - local.set $25 + local.set $var$25 global.get $~lib/util/number/_exp - local.set $26 - local.get $15 - local.set $13 - local.get $26 - local.get $13 + local.set $var$26 + local.get $var$15 + local.set $var$13 + local.get $var$26 + local.get $var$13 i32.add i32.const 64 i32.add - local.set $26 + local.set $var$26 global.get $~lib/util/number/_frc_minus - local.set $17 - local.get $12 - local.set $11 - local.get $17 + local.set $var$17 + local.get $var$12 + local.set $var$11 + local.get $var$17 i64.const 4294967295 i64.and - local.set $18 - local.get $11 + local.set $var$18 + local.get $var$11 i64.const 4294967295 i64.and - local.set $19 - local.get $17 + local.set $var$19 + local.get $var$17 i64.const 32 i64.shr_u - local.set $20 - local.get $11 + local.set $var$20 + local.get $var$11 i64.const 32 i64.shr_u - local.set $21 - local.get $18 - local.get $19 + local.set $var$21 + local.get $var$18 + local.get $var$19 i64.mul - local.set $22 - local.get $20 - local.get $19 + local.set $var$22 + local.get $var$20 + local.get $var$19 i64.mul - local.get $22 + local.get $var$22 i64.const 32 i64.shr_u i64.add - local.set $23 - local.get $18 - local.get $21 + local.set $var$23 + local.get $var$18 + local.get $var$21 i64.mul - local.get $23 + local.get $var$23 i64.const 4294967295 i64.and i64.add - local.set $27 - local.get $27 + local.set $var$27 + local.get $var$27 i64.const 2147483647 i64.add - local.set $27 - local.get $23 + local.set $var$27 + local.get $var$23 i64.const 32 i64.shr_u - local.set $23 - local.get $27 + local.set $var$23 + local.get $var$27 i64.const 32 i64.shr_u - local.set $27 - local.get $20 - local.get $21 + local.set $var$27 + local.get $var$20 + local.get $var$21 i64.mul - local.get $23 + local.get $var$23 i64.add - local.get $27 + local.get $var$27 i64.add i64.const 1 i64.add - local.set $27 - local.get $25 - local.get $27 + local.set $var$27 + local.get $var$25 + local.get $var$27 i64.sub - local.set $23 - local.get $4 - local.get $24 - local.get $10 - local.get $25 - local.get $26 - local.get $23 - local.get $3 + local.set $var$23 + local.get $var$4 + local.get $var$24 + local.get $var$10 + local.get $var$25 + local.get $var$26 + local.get $var$23 + local.get $var$3 call $~lib/util/number/genDigits - local.set $28 - local.get $0 - local.get $2 + local.set $len + local.get $buffer + local.get $sign i32.const 1 i32.shl i32.add - local.get $28 - local.get $2 + local.get $len + local.get $sign i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.set $28 - local.get $28 - local.get $2 + local.set $len + local.get $len + local.get $sign i32.add ) - (func $~lib/number/F64#toString (param $0 f64) (param $1 i32) (result i32) - local.get $0 + (func $~lib/number/F64#toString (param $this f64) (param $radix i32) (result i32) + local.get $this call $~lib/util/number/dtoa ) - (func $~lib/math/ipow32 (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (func $~lib/math/ipow32 (param $x i32) (param $e i32) (result i32) + (local $out i32) + (local $var$3 i32) + (local $var$4 i32) i32.const 1 - local.set $2 + local.set $out i32.const 0 i32.const 1 i32.lt_s drop - local.get $0 + local.get $x i32.const 2 i32.eq if i32.const 1 - local.get $1 + local.get $e i32.shl i32.const 0 - local.get $1 + local.get $e i32.const 32 i32.lt_u select return end - local.get $1 + local.get $e i32.const 0 i32.le_s if - local.get $0 + local.get $x i32.const -1 i32.eq if i32.const -1 i32.const 1 - local.get $1 + local.get $e i32.const 1 i32.and select return end - local.get $1 + local.get $e i32.const 0 i32.eq - local.get $0 + local.get $x i32.const 1 i32.eq i32.or return else - local.get $1 + local.get $e i32.const 1 i32.eq if - local.get $0 + local.get $x return else - local.get $1 + local.get $e i32.const 2 i32.eq if - local.get $0 - local.get $0 + local.get $x + local.get $x i32.mul return else - local.get $1 + local.get $e i32.const 32 i32.lt_s if i32.const 32 - local.get $1 + local.get $e i32.clz i32.sub - local.set $3 + local.set $var$3 block $break|0 block $case4|0 block $case3|0 block $case2|0 block $case1|0 block $case0|0 - local.get $3 - local.set $4 - local.get $4 + local.get $var$3 + local.set $var$4 + local.get $var$4 i32.const 5 i32.eq br_if $case0|0 - local.get $4 + local.get $var$4 i32.const 4 i32.eq br_if $case1|0 - local.get $4 + local.get $var$4 i32.const 3 i32.eq br_if $case2|0 - local.get $4 + local.get $var$4 i32.const 2 i32.eq br_if $case3|0 - local.get $4 + local.get $var$4 i32.const 1 i32.eq br_if $case4|0 br $break|0 end - local.get $1 + local.get $e i32.const 1 i32.and if - local.get $2 - local.get $0 + local.get $out + local.get $x i32.mul - local.set $2 + local.set $out end - local.get $1 + local.get $e i32.const 1 i32.shr_u - local.set $1 - local.get $0 - local.get $0 + local.set $e + local.get $x + local.get $x i32.mul - local.set $0 + local.set $x end - local.get $1 + local.get $e i32.const 1 i32.and if - local.get $2 - local.get $0 + local.get $out + local.get $x i32.mul - local.set $2 + local.set $out end - local.get $1 + local.get $e i32.const 1 i32.shr_u - local.set $1 - local.get $0 - local.get $0 + local.set $e + local.get $x + local.get $x i32.mul - local.set $0 + local.set $x end - local.get $1 + local.get $e i32.const 1 i32.and if - local.get $2 - local.get $0 + local.get $out + local.get $x i32.mul - local.set $2 + local.set $out end - local.get $1 + local.get $e i32.const 1 i32.shr_u - local.set $1 - local.get $0 - local.get $0 + local.set $e + local.get $x + local.get $x i32.mul - local.set $0 + local.set $x end - local.get $1 + local.get $e i32.const 1 i32.and if - local.get $2 - local.get $0 + local.get $out + local.get $x i32.mul - local.set $2 + local.set $out end - local.get $1 + local.get $e i32.const 1 i32.shr_u - local.set $1 - local.get $0 - local.get $0 + local.set $e + local.get $x + local.get $x i32.mul - local.set $0 + local.set $x end - local.get $1 + local.get $e i32.const 1 i32.and if - local.get $2 - local.get $0 + local.get $out + local.get $x i32.mul - local.set $2 + local.set $out end end - local.get $2 + local.get $out return end end end end loop $while-continue|1 - local.get $1 - local.set $3 - local.get $3 + local.get $e + local.set $var$3 + local.get $var$3 if - local.get $1 + local.get $e i32.const 1 i32.and if - local.get $2 - local.get $0 + local.get $out + local.get $x i32.mul - local.set $2 + local.set $out end - local.get $1 + local.get $e i32.const 1 i32.shr_u - local.set $1 - local.get $0 - local.get $0 + local.set $e + local.get $x + local.get $x i32.mul - local.set $0 + local.set $x br $while-continue|1 end end - local.get $2 + local.get $out ) - (func $resolve-binary/Foo#lt (param $0 i32) (param $1 i32) (result i32) + (func $resolve-binary/Foo#lt (param $this i32) (param $other i32) (result i32) i32.const 9824 ) - (func $~lib/string/String#toString (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#toString (param $this i32) (result i32) + local.get $this ) - (func $resolve-binary/Foo#gt (param $0 i32) (param $1 i32) (result i32) + (func $resolve-binary/Foo#gt (param $this i32) (param $other i32) (result i32) i32.const 9856 ) - (func $resolve-binary/Foo#le (param $0 i32) (param $1 i32) (result i32) + (func $resolve-binary/Foo#le (param $this i32) (param $other i32) (result i32) i32.const 9888 ) - (func $resolve-binary/Foo#ge (param $0 i32) (param $1 i32) (result i32) + (func $resolve-binary/Foo#ge (param $this i32) (param $other i32) (result i32) i32.const 9920 ) - (func $resolve-binary/Foo#eq (param $0 i32) (param $1 i32) (result i32) + (func $resolve-binary/Foo#eq (param $this i32) (param $other i32) (result i32) i32.const 9952 ) - (func $resolve-binary/Foo#ne (param $0 i32) (param $1 i32) (result i32) + (func $resolve-binary/Foo#ne (param $this i32) (param $other i32) (result i32) i32.const 9984 ) - (func $resolve-binary/Foo#add (param $0 i32) (param $1 i32) (result i32) + (func $resolve-binary/Foo#add (param $this i32) (param $other i32) (result i32) i32.const 10016 ) - (func $resolve-binary/Foo.sub (param $0 i32) (param $1 i32) (result i32) + (func $resolve-binary/Foo.sub (param $a i32) (param $b i32) (result i32) i32.const 10048 ) - (func $resolve-binary/Foo#mul (param $0 i32) (param $1 i32) (result i32) + (func $resolve-binary/Foo#mul (param $this i32) (param $other i32) (result i32) i32.const 10080 ) - (func $resolve-binary/Foo#div (param $0 i32) (param $1 i32) (result i32) + (func $resolve-binary/Foo#div (param $this i32) (param $other i32) (result i32) i32.const 10112 ) - (func $resolve-binary/Foo#rem (param $0 i32) (param $1 i32) (result i32) + (func $resolve-binary/Foo#rem (param $this i32) (param $other i32) (result i32) i32.const 10144 ) - (func $resolve-binary/Foo#pow (param $0 i32) (param $1 i32) (result i32) + (func $resolve-binary/Foo#pow (param $this i32) (param $other i32) (result i32) i32.const 10176 ) - (func $resolve-binary/Bar#add (param $0 i32) (param $1 i32) (result i32) - local.get $1 + (func $resolve-binary/Bar#add (param $this i32) (param $other i32) (result i32) + local.get $other ) - (func $resolve-binary/Bar#self (param $0 i32) (result i32) - local.get $0 + (func $resolve-binary/Bar#self (param $this i32) (result i32) + local.get $this ) - (func $resolve-binary/Baz#add (param $0 i32) (param $1 i32) (result i32) - local.get $1 + (func $resolve-binary/Baz#add (param $this i32) (param $other i32) (result i32) + local.get $other ) - (func $resolve-binary/Baz#sub (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $resolve-binary/Baz#sub (param $this i32) (param $other i32) (result i32) + local.get $this ) - (func $resolve-binary/Baz.mul (param $0 i32) (param $1 i32) (result i32) - local.get $1 + (func $resolve-binary/Baz.mul (param $left i32) (param $right i32) (result i32) + local.get $right ) - (func $resolve-binary/Baz.div (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $resolve-binary/Baz.div (param $left i32) (param $right i32) (result i32) + local.get $left ) (func $~lib/rt/__visit_globals (param $0 i32) (local $1 i32) diff --git a/tests/compiler/resolve-elementaccess.debug.wat b/tests/compiler/resolve-elementaccess.debug.wat index 3648f91ad1..5f4e945d74 100644 --- a/tests/compiler/resolve-elementaccess.debug.wat +++ b/tests/compiler/resolve-elementaccess.debug.wat @@ -95,50 +95,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -151,58 +151,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -219,12 +219,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -234,19 +234,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -257,27 +257,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -285,35 +285,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -323,15 +323,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -341,25 +341,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -367,33 +367,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -421,23 +421,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -449,15 +449,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -469,33 +469,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -503,21 +503,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -532,36 +532,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -569,67 +569,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -639,22 +639,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -664,12 +664,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -681,75 +681,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -761,38 +761,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -806,12 +806,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -822,38 +822,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -861,21 +861,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -890,101 +890,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -995,7 +995,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1006,26 +1006,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1038,27 +1038,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1072,11 +1072,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1087,66 +1087,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1156,10 +1156,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1170,13 +1170,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1187,109 +1187,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1297,7 +1297,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1314,23 +1314,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1342,54 +1342,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1410,30 +1410,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1443,9 +1443,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1455,8 +1455,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1464,43 +1464,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1512,17 +1512,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1536,7 +1536,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1554,7 +1554,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1564,12 +1564,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1591,7 +1591,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1611,14 +1611,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1631,8 +1631,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1643,37 +1643,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1681,16 +1681,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1698,21 +1698,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1727,12 +1727,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1740,49 +1740,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1792,90 +1792,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1884,22 +1884,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1908,27 +1908,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1943,69 +1943,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2020,29 +2020,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2055,13 +2055,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2072,25 +2072,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2105,10 +2105,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2126,49 +2126,49 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32) + (local $child i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $childPtr i32.eqz if return end i32.const 1 drop - local.get $0 + local.get $parentPtr i32.eqz if i32.const 0 @@ -2178,37 +2178,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $childPtr i32.const 20 i32.sub - local.set $3 - local.get $3 + local.set $child + local.get $child call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $0 + local.get $parentPtr i32.const 20 i32.sub - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 call $~lib/rt/itcms/Object#get:color - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $2 + local.get $expectMultiple if - local.get $4 + local.get $var$4 call $~lib/rt/itcms/Object#makeGray else - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end else - local.get $5 + local.get $var$5 i32.const 3 i32.eq if (result i32) @@ -2219,7 +2219,7 @@ i32.const 0 end if - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end end @@ -2244,9 +2244,9 @@ local.get $1 i32.store offset=8 ) - (func $~lib/typedarray/Float32Array#__set (param $0 i32) (param $1 i32) (param $2 f32) - local.get $1 - local.get $0 + (func $~lib/typedarray/Float32Array#__set (param $this i32) (param $index i32) (param $value f32) + local.get $index + local.get $this i32.load offset=8 i32.const 2 i32.shr_u @@ -2259,18 +2259,18 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value f32.store ) - (func $~lib/typedarray/Float32Array#__get (param $0 i32) (param $1 i32) (result f32) - local.get $1 - local.get $0 + (func $~lib/typedarray/Float32Array#__get (param $this i32) (param $index i32) (result f32) + local.get $index + local.get $this i32.load offset=8 i32.const 2 i32.shr_u @@ -2283,36 +2283,36 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add f32.load ) - (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) - local.get $0 + (func $~lib/util/number/decimalCount32 (param $value i32) (result i32) + local.get $value i32.const 100000 i32.lt_u if - local.get $0 + local.get $value i32.const 100 i32.lt_u if i32.const 1 - local.get $0 + local.get $value i32.const 10 i32.ge_u i32.add return else i32.const 3 - local.get $0 + local.get $value i32.const 10000 i32.ge_u i32.add - local.get $0 + local.get $value i32.const 1000 i32.ge_u i32.add @@ -2320,23 +2320,23 @@ end unreachable else - local.get $0 + local.get $value i32.const 10000000 i32.lt_u if i32.const 6 - local.get $0 + local.get $value i32.const 1000000 i32.ge_u i32.add return else i32.const 8 - local.get $0 + local.get $value i32.const 1000000000 i32.ge_u i32.add - local.get $0 + local.get $value i32.const 100000000 i32.ge_u i32.add @@ -2346,66 +2346,66 @@ end unreachable ) - (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i64) - (local $11 i32) - (local $12 i64) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i32) - (local $24 i32) - (local $25 i32) - (local $26 i32) - (local $27 i64) + (func $~lib/util/number/genDigits (param $buffer i32) (param $w_frc i64) (param $w_exp i32) (param $mp_frc i64) (param $mp_exp i32) (param $delta i64) (param $sign i32) (result i32) + (local $one_exp i32) + (local $one_frc i64) + (local $mask i64) + (local $wp_w_frc i64) + (local $p1 i32) + (local $p2 i64) + (local $kappa i32) + (local $len i32) + (local $var$15 i32) + (local $d i32) + (local $var$17 i32) + (local $tmp i64) + (local $var$19 i64) + (local $var$20 i64) + (local $var$21 i64) + (local $d_0 i64) + (local $var$23 i32) + (local $var$24 i32) + (local $var$25 i32) + (local $var$26 i32) + (local $var$27 i64) i32.const 0 - local.get $4 + local.get $mp_exp i32.sub - local.set $7 + local.set $one_exp i64.const 1 - local.get $7 + local.get $one_exp i64.extend_i32_s i64.shl - local.set $8 - local.get $8 + local.set $one_frc + local.get $one_frc i64.const 1 i64.sub - local.set $9 - local.get $3 - local.get $1 + local.set $mask + local.get $mp_frc + local.get $w_frc i64.sub - local.set $10 - local.get $3 - local.get $7 + local.set $wp_w_frc + local.get $mp_frc + local.get $one_exp i64.extend_i32_s i64.shr_u i32.wrap_i64 - local.set $11 - local.get $3 - local.get $9 + local.set $p1 + local.get $mp_frc + local.get $mask i64.and - local.set $12 - local.get $11 + local.set $p2 + local.get $p1 call $~lib/util/number/decimalCount32 - local.set $13 - local.get $6 - local.set $14 + local.set $kappa + local.get $sign + local.set $len loop $while-continue|0 - local.get $13 + local.get $kappa i32.const 0 i32.gt_s - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 if block $break|1 block $case10|1 @@ -2419,275 +2419,275 @@ block $case2|1 block $case1|1 block $case0|1 - local.get $13 - local.set $17 - local.get $17 + local.get $kappa + local.set $var$17 + local.get $var$17 i32.const 10 i32.eq br_if $case0|1 - local.get $17 + local.get $var$17 i32.const 9 i32.eq br_if $case1|1 - local.get $17 + local.get $var$17 i32.const 8 i32.eq br_if $case2|1 - local.get $17 + local.get $var$17 i32.const 7 i32.eq br_if $case3|1 - local.get $17 + local.get $var$17 i32.const 6 i32.eq br_if $case4|1 - local.get $17 + local.get $var$17 i32.const 5 i32.eq br_if $case5|1 - local.get $17 + local.get $var$17 i32.const 4 i32.eq br_if $case6|1 - local.get $17 + local.get $var$17 i32.const 3 i32.eq br_if $case7|1 - local.get $17 + local.get $var$17 i32.const 2 i32.eq br_if $case8|1 - local.get $17 + local.get $var$17 i32.const 1 i32.eq br_if $case9|1 br $case10|1 end - local.get $11 + local.get $p1 i32.const 1000000000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 1000000000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 100000000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 100000000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 10000000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 10000000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 1000000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 1000000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 100000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 100000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 10000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 10000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 1000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 1000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 100 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 100 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 10 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 10 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 - local.set $16 + local.get $p1 + local.set $d i32.const 0 - local.set $11 + local.set $p1 br $break|1 end i32.const 0 - local.set $16 + local.set $d br $break|1 end - local.get $16 - local.get $14 + local.get $d + local.get $len i32.or if - local.get $0 - local.get $14 - local.tee $17 + local.get $buffer + local.get $len + local.tee $var$17 i32.const 1 i32.add - local.set $14 - local.get $17 + local.set $len + local.get $var$17 i32.const 1 i32.shl i32.add i32.const 48 - local.get $16 + local.get $d i32.const 65535 i32.and i32.add i32.store16 end - local.get $13 + local.get $kappa i32.const 1 i32.sub - local.set $13 - local.get $11 + local.set $kappa + local.get $p1 i64.extend_i32_u - local.get $7 + local.get $one_exp i64.extend_i32_s i64.shl - local.get $12 + local.get $p2 i64.add - local.set $18 - local.get $18 - local.get $5 + local.set $tmp + local.get $tmp + local.get $delta i64.le_u if global.get $~lib/util/number/_K - local.get $13 + local.get $kappa i32.add global.set $~lib/util/number/_K - local.get $0 - local.set $23 - local.get $14 - local.set $17 - local.get $5 - local.set $22 - local.get $18 - local.set $21 + local.get $buffer + local.set $var$23 + local.get $len + local.set $var$17 + local.get $delta + local.set $d_0 + local.get $tmp + local.set $var$21 i32.const 1680 - local.get $13 + local.get $kappa i32.const 2 i32.shl i32.add i64.load32_u - local.get $7 + local.get $one_exp i64.extend_i32_s i64.shl - local.set $20 - local.get $10 - local.set $19 - local.get $23 - local.get $17 + local.set $var$20 + local.get $wp_w_frc + local.set $var$19 + local.get $var$23 + local.get $var$17 i32.const 1 i32.sub i32.const 1 i32.shl i32.add - local.set $24 - local.get $24 + local.set $var$24 + local.get $var$24 i32.load16_u - local.set $25 + local.set $var$25 loop $while-continue|3 - local.get $21 - local.get $19 + local.get $var$21 + local.get $var$19 i64.lt_u if (result i32) - local.get $22 - local.get $21 + local.get $d_0 + local.get $var$21 i64.sub - local.get $20 + local.get $var$20 i64.ge_u else i32.const 0 end if (result i32) - local.get $21 - local.get $20 + local.get $var$21 + local.get $var$20 i64.add - local.get $19 + local.get $var$19 i64.lt_u if (result i32) i32.const 1 else - local.get $19 - local.get $21 + local.get $var$19 + local.get $var$21 i64.sub - local.get $21 - local.get $20 + local.get $var$21 + local.get $var$20 i64.add - local.get $19 + local.get $var$19 i64.sub i64.gt_u end else i32.const 0 end - local.set $26 - local.get $26 + local.set $var$26 + local.get $var$26 if - local.get $25 + local.get $var$25 i32.const 1 i32.sub - local.set $25 - local.get $21 - local.get $20 + local.set $var$25 + local.get $var$21 + local.get $var$20 i64.add - local.set $21 + local.set $var$21 br $while-continue|3 end end - local.get $24 - local.get $25 + local.get $var$24 + local.get $var$25 i32.store16 - local.get $14 + local.get $len return end br $while-continue|0 @@ -2695,150 +2695,150 @@ end loop $while-continue|4 i32.const 1 - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 if - local.get $12 + local.get $p2 i64.const 10 i64.mul - local.set $12 - local.get $5 + local.set $p2 + local.get $delta i64.const 10 i64.mul - local.set $5 - local.get $12 - local.get $7 + local.set $delta + local.get $p2 + local.get $one_exp i64.extend_i32_s i64.shr_u - local.set $22 - local.get $22 - local.get $14 + local.set $d_0 + local.get $d_0 + local.get $len i64.extend_i32_s i64.or i64.const 0 i64.ne if - local.get $0 - local.get $14 - local.tee $25 + local.get $buffer + local.get $len + local.tee $var$25 i32.const 1 i32.add - local.set $14 - local.get $25 + local.set $len + local.get $var$25 i32.const 1 i32.shl i32.add i32.const 48 - local.get $22 + local.get $d_0 i32.wrap_i64 i32.const 65535 i32.and i32.add i32.store16 end - local.get $12 - local.get $9 + local.get $p2 + local.get $mask i64.and - local.set $12 - local.get $13 + local.set $p2 + local.get $kappa i32.const 1 i32.sub - local.set $13 - local.get $12 - local.get $5 + local.set $kappa + local.get $p2 + local.get $delta i64.lt_u if global.get $~lib/util/number/_K - local.get $13 + local.get $kappa i32.add global.set $~lib/util/number/_K - local.get $10 + local.get $wp_w_frc i32.const 1680 i32.const 0 - local.get $13 + local.get $kappa i32.sub i32.const 2 i32.shl i32.add i64.load32_u i64.mul - local.set $10 - local.get $0 - local.set $17 - local.get $14 - local.set $26 - local.get $5 - local.set $27 - local.get $12 - local.set $21 - local.get $8 - local.set $20 - local.get $10 - local.set $19 - local.get $17 - local.get $26 + local.set $wp_w_frc + local.get $buffer + local.set $var$17 + local.get $len + local.set $var$26 + local.get $delta + local.set $var$27 + local.get $p2 + local.set $var$21 + local.get $one_frc + local.set $var$20 + local.get $wp_w_frc + local.set $var$19 + local.get $var$17 + local.get $var$26 i32.const 1 i32.sub i32.const 1 i32.shl i32.add - local.set $25 - local.get $25 + local.set $var$25 + local.get $var$25 i32.load16_u - local.set $24 + local.set $var$24 loop $while-continue|6 - local.get $21 - local.get $19 + local.get $var$21 + local.get $var$19 i64.lt_u if (result i32) - local.get $27 - local.get $21 + local.get $var$27 + local.get $var$21 i64.sub - local.get $20 + local.get $var$20 i64.ge_u else i32.const 0 end if (result i32) - local.get $21 - local.get $20 + local.get $var$21 + local.get $var$20 i64.add - local.get $19 + local.get $var$19 i64.lt_u if (result i32) i32.const 1 else - local.get $19 - local.get $21 + local.get $var$19 + local.get $var$21 i64.sub - local.get $21 - local.get $20 + local.get $var$21 + local.get $var$20 i64.add - local.get $19 + local.get $var$19 i64.sub i64.gt_u end else i32.const 0 end - local.set $23 - local.get $23 + local.set $var$23 + local.get $var$23 if - local.get $24 + local.get $var$24 i32.const 1 i32.sub - local.set $24 - local.get $21 - local.get $20 + local.set $var$24 + local.get $var$21 + local.get $var$20 i64.add - local.set $21 + local.set $var$21 br $while-continue|6 end end - local.get $25 - local.get $24 + local.get $var$25 + local.get $var$24 i32.store16 - local.get $14 + local.get $len return end br $while-continue|4 @@ -2846,66 +2846,66 @@ end unreachable ) - (func $~lib/util/number/utoa32_dec_lut (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 i64) - (local $9 i64) - (local $10 i32) - (local $11 i32) + (func $~lib/util/number/utoa32_dec_lut (param $buffer i32) (param $num i32) (param $offset i32) + (local $var$3 i32) + (local $t i32) + (local $r i32) + (local $d1 i32) + (local $d2 i32) + (local $digits1 i64) + (local $digits2 i64) + (local $var$10 i32) + (local $var$11 i32) loop $while-continue|0 - local.get $1 + local.get $num i32.const 10000 i32.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $1 + local.get $num i32.const 10000 i32.div_u - local.set $4 - local.get $1 + local.set $t + local.get $num i32.const 10000 i32.rem_u - local.set $5 - local.get $4 - local.set $1 - local.get $5 + local.set $r + local.get $t + local.set $num + local.get $r i32.const 100 i32.div_u - local.set $6 - local.get $5 + local.set $d1 + local.get $r i32.const 100 i32.rem_u - local.set $7 + local.set $d2 i32.const 1720 - local.get $6 + local.get $d1 i32.const 2 i32.shl i32.add i64.load32_u - local.set $8 + local.set $digits1 i32.const 1720 - local.get $7 + local.get $d2 i32.const 2 i32.shl i32.add i64.load32_u - local.set $9 - local.get $2 + local.set $digits2 + local.get $offset i32.const 4 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $8 - local.get $9 + local.get $digits1 + local.get $digits2 i64.const 32 i64.shl i64.or @@ -2913,94 +2913,94 @@ br $while-continue|0 end end - local.get $1 + local.get $num i32.const 100 i32.ge_u if - local.get $1 + local.get $num i32.const 100 i32.div_u - local.set $3 - local.get $1 + local.set $var$3 + local.get $num i32.const 100 i32.rem_u - local.set $10 - local.get $3 - local.set $1 - local.get $2 + local.set $var$10 + local.get $var$3 + local.set $num + local.get $offset i32.const 2 i32.sub - local.set $2 + local.set $offset i32.const 1720 - local.get $10 + local.get $var$10 i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store end - local.get $1 + local.get $num i32.const 10 i32.ge_u if - local.get $2 + local.get $offset i32.const 2 i32.sub - local.set $2 + local.set $offset i32.const 1720 - local.get $1 + local.get $num i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store else - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 + local.set $offset i32.const 48 - local.get $1 + local.get $num i32.add - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store16 end ) - (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $2 + (func $~lib/util/number/prettify (param $buffer i32) (param $length i32) (param $k i32) (result i32) + (local $kk i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $k i32.eqz if - local.get $0 - local.get $1 + local.get $buffer + local.get $length i32.const 1 i32.shl i32.add @@ -3010,51 +3010,51 @@ i32.shl i32.or i32.store - local.get $1 + local.get $length i32.const 2 i32.add return end - local.get $1 - local.get $2 + local.get $length + local.get $k i32.add - local.set $3 - local.get $1 - local.get $3 + local.set $kk + local.get $length + local.get $kk i32.le_s if (result i32) - local.get $3 + local.get $kk i32.const 21 i32.le_s else i32.const 0 end if - local.get $1 - local.set $4 + local.get $length + local.set $var$4 loop $for-loop|0 - local.get $4 - local.get $3 + local.get $var$4 + local.get $kk i32.lt_s - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $0 - local.get $4 + local.get $buffer + local.get $var$4 i32.const 1 i32.shl i32.add i32.const 48 i32.store16 - local.get $4 + local.get $var$4 i32.const 1 i32.add - local.set $4 + local.set $var$4 br $for-loop|0 end end - local.get $0 - local.get $3 + local.get $buffer + local.get $kk i32.const 1 i32.shl i32.add @@ -3064,55 +3064,55 @@ i32.shl i32.or i32.store - local.get $3 + local.get $kk i32.const 2 i32.add return else - local.get $3 + local.get $kk i32.const 0 i32.gt_s if (result i32) - local.get $3 + local.get $kk i32.const 21 i32.le_s else i32.const 0 end if - local.get $0 - local.get $3 + local.get $buffer + local.get $kk i32.const 1 i32.shl i32.add - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 i32.const 2 i32.add - local.get $4 + local.get $var$4 i32.const 0 - local.get $2 + local.get $k i32.sub i32.const 1 i32.shl memory.copy - local.get $0 - local.get $3 + local.get $buffer + local.get $kk i32.const 1 i32.shl i32.add i32.const 46 i32.store16 - local.get $1 + local.get $length i32.const 1 i32.add return else i32.const -6 - local.get $3 + local.get $kk i32.lt_s if (result i32) - local.get $3 + local.get $kk i32.const 0 i32.le_s else @@ -3120,20 +3120,20 @@ end if i32.const 2 - local.get $3 + local.get $kk i32.sub - local.set $4 - local.get $0 - local.get $4 + local.set $var$4 + local.get $buffer + local.get $var$4 i32.const 1 i32.shl i32.add - local.get $0 - local.get $1 + local.get $buffer + local.get $length i32.const 1 i32.shl memory.copy - local.get $0 + local.get $buffer i32.const 48 i32.const 46 i32.const 16 @@ -3141,164 +3141,164 @@ i32.or i32.store i32.const 2 - local.set $5 + local.set $var$5 loop $for-loop|1 - local.get $5 - local.get $4 + local.get $var$5 + local.get $var$4 i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $5 + local.get $buffer + local.get $var$5 i32.const 1 i32.shl i32.add i32.const 48 i32.store16 - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|1 end end - local.get $1 - local.get $4 + local.get $length + local.get $var$4 i32.add return else - local.get $1 + local.get $length i32.const 1 i32.eq if - local.get $0 + local.get $buffer i32.const 101 i32.store16 offset=2 - local.get $0 + local.get $buffer i32.const 4 i32.add - local.set $5 - local.get $3 + local.set $var$5 + local.get $kk i32.const 1 i32.sub - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 i32.const 0 i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if i32.const 0 - local.get $6 + local.get $var$6 i32.sub - local.set $6 + local.set $var$6 end - local.get $6 + local.get $var$6 call $~lib/util/number/decimalCount32 i32.const 1 i32.add - local.set $7 - local.get $5 - local.set $10 - local.get $6 - local.set $9 - local.get $7 - local.set $8 + local.set $var$7 + local.get $var$5 + local.set $var$10 + local.get $var$6 + local.set $var$9 + local.get $var$7 + local.set $var$8 i32.const 0 i32.const 1 i32.ge_s drop - local.get $10 - local.get $9 - local.get $8 + local.get $var$10 + local.get $var$9 + local.get $var$8 call $~lib/util/number/utoa32_dec_lut - local.get $5 + local.get $var$5 i32.const 45 i32.const 43 - local.get $4 + local.get $var$4 select i32.store16 - local.get $7 - local.set $1 - local.get $1 + local.get $var$7 + local.set $length + local.get $length i32.const 2 i32.add return else - local.get $1 + local.get $length i32.const 1 i32.shl - local.set $7 - local.get $0 + local.set $var$7 + local.get $buffer i32.const 4 i32.add - local.get $0 + local.get $buffer i32.const 2 i32.add - local.get $7 + local.get $var$7 i32.const 2 i32.sub memory.copy - local.get $0 + local.get $buffer i32.const 46 i32.store16 offset=2 - local.get $0 - local.get $7 + local.get $buffer + local.get $var$7 i32.add i32.const 101 i32.store16 offset=2 - local.get $1 - local.get $0 - local.get $7 + local.get $length + local.get $buffer + local.get $var$7 i32.add i32.const 4 i32.add - local.set $9 - local.get $3 + local.set $var$9 + local.get $kk i32.const 1 i32.sub - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 i32.const 0 i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if i32.const 0 - local.get $8 + local.get $var$8 i32.sub - local.set $8 + local.set $var$8 end - local.get $8 + local.get $var$8 call $~lib/util/number/decimalCount32 i32.const 1 i32.add - local.set $5 - local.get $9 - local.set $11 - local.get $8 - local.set $6 - local.get $5 - local.set $10 + local.set $var$5 + local.get $var$9 + local.set $var$11 + local.get $var$8 + local.set $var$6 + local.get $var$5 + local.set $var$10 i32.const 0 i32.const 1 i32.ge_s drop - local.get $11 - local.get $6 - local.get $10 + local.get $var$11 + local.get $var$6 + local.get $var$10 call $~lib/util/number/utoa32_dec_lut - local.get $9 + local.get $var$9 i32.const 45 i32.const 43 - local.get $4 + local.get $var$4 select i32.store16 - local.get $5 + local.get $var$5 i32.add - local.set $1 - local.get $1 + local.set $length + local.get $length i32.const 2 i32.add return @@ -3311,475 +3311,475 @@ end unreachable ) - (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f64) - (local $6 i64) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i32) - (local $11 i64) - (local $12 i64) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 f64) - (local $17 i64) - (local $18 i64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i64) - (local $24 i64) - (local $25 i64) - (local $26 i32) - (local $27 i64) - (local $28 i32) - local.get $1 + (func $~lib/util/number/dtoa_core (param $buffer i32) (param $value f64) (result i32) + (local $sign i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 f64) + (local $var$6 i64) + (local $var$7 i32) + (local $var$8 i64) + (local $var$9 i64) + (local $var$10 i32) + (local $var$11 i64) + (local $var$12 i64) + (local $var$13 i32) + (local $var$14 i32) + (local $var$15 i32) + (local $var$16 f64) + (local $var$17 i64) + (local $var$18 i64) + (local $var$19 i64) + (local $var$20 i64) + (local $var$21 i64) + (local $var$22 i64) + (local $var$23 i64) + (local $var$24 i64) + (local $var$25 i64) + (local $var$26 i32) + (local $var$27 i64) + (local $len i32) + local.get $value f64.const 0 f64.lt - local.set $2 - local.get $2 + local.set $sign + local.get $sign if - local.get $1 + local.get $value f64.neg - local.set $1 - local.get $0 + local.set $value + local.get $buffer i32.const 45 i32.store16 end - local.get $1 - local.set $5 - local.get $0 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.get $value + local.set $var$5 + local.get $buffer + local.set $var$4 + local.get $sign + local.set $var$3 + local.get $var$5 i64.reinterpret_f64 - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 i64.const 9218868437227405312 i64.and i64.const 52 i64.shr_u i32.wrap_i64 - local.set $7 - local.get $6 + local.set $var$7 + local.get $var$6 i64.const 4503599627370495 i64.and - local.set $8 - local.get $7 + local.set $var$8 + local.get $var$7 i32.const 0 i32.ne i64.extend_i32_u i64.const 52 i64.shl - local.get $8 + local.get $var$8 i64.add - local.set $9 - local.get $7 + local.set $var$9 + local.get $var$7 i32.const 1 - local.get $7 + local.get $var$7 select i32.const 1023 i32.const 52 i32.add i32.sub - local.set $7 - local.get $9 - local.set $11 - local.get $7 - local.set $10 - local.get $11 + local.set $var$7 + local.get $var$9 + local.set $var$11 + local.get $var$7 + local.set $var$10 + local.get $var$11 i64.const 1 i64.shl i64.const 1 i64.add - local.set $12 - local.get $10 + local.set $var$12 + local.get $var$10 i32.const 1 i32.sub - local.set $13 - local.get $12 + local.set $var$13 + local.get $var$12 i64.clz i32.wrap_i64 - local.set $14 - local.get $12 - local.get $14 + local.set $var$14 + local.get $var$12 + local.get $var$14 i64.extend_i32_s i64.shl - local.set $12 - local.get $13 - local.get $14 + local.set $var$12 + local.get $var$13 + local.get $var$14 i32.sub - local.set $13 + local.set $var$13 i32.const 1 - local.get $11 + local.get $var$11 i64.const 4503599627370496 i64.eq i32.add - local.set $15 - local.get $12 + local.set $var$15 + local.get $var$12 global.set $~lib/util/number/_frc_plus - local.get $11 - local.get $15 + local.get $var$11 + local.get $var$15 i64.extend_i32_s i64.shl i64.const 1 i64.sub - local.get $10 - local.get $15 + local.get $var$10 + local.get $var$15 i32.sub - local.get $13 + local.get $var$13 i32.sub i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_minus - local.get $13 + local.get $var$13 global.set $~lib/util/number/_exp global.get $~lib/util/number/_exp - local.set $10 + local.set $var$10 i32.const -61 - local.get $10 + local.get $var$10 i32.sub f64.convert_i32_s f64.const 0.30102999566398114 f64.mul f64.const 347 f64.add - local.set $16 - local.get $16 + local.set $var$16 + local.get $var$16 i32.trunc_sat_f64_s - local.set $15 - local.get $15 - local.get $15 + local.set $var$15 + local.get $var$15 + local.get $var$15 f64.convert_i32_s - local.get $16 + local.get $var$16 f64.ne i32.add - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 i32.const 3 i32.shr_s i32.const 1 i32.add - local.set $14 + local.set $var$14 i32.const 348 - local.get $14 + local.get $var$14 i32.const 3 i32.shl i32.sub global.set $~lib/util/number/_K i32.const 808 - local.get $14 + local.get $var$14 i32.const 3 i32.shl i32.add i64.load global.set $~lib/util/number/_frc_pow i32.const 1504 - local.get $14 + local.get $var$14 i32.const 1 i32.shl i32.add i32.load16_s global.set $~lib/util/number/_exp_pow - local.get $9 + local.get $var$9 i64.clz i32.wrap_i64 - local.set $14 - local.get $9 - local.get $14 + local.set $var$14 + local.get $var$9 + local.get $var$14 i64.extend_i32_s i64.shl - local.set $9 - local.get $7 - local.get $14 + local.set $var$9 + local.get $var$7 + local.get $var$14 i32.sub - local.set $7 + local.set $var$7 global.get $~lib/util/number/_frc_pow - local.set $12 + local.set $var$12 global.get $~lib/util/number/_exp_pow - local.set $15 - local.get $9 - local.set $17 - local.get $12 - local.set $11 - local.get $17 + local.set $var$15 + local.get $var$9 + local.set $var$17 + local.get $var$12 + local.set $var$11 + local.get $var$17 i64.const 4294967295 i64.and - local.set $18 - local.get $11 + local.set $var$18 + local.get $var$11 i64.const 4294967295 i64.and - local.set $19 - local.get $17 + local.set $var$19 + local.get $var$17 i64.const 32 i64.shr_u - local.set $20 - local.get $11 + local.set $var$20 + local.get $var$11 i64.const 32 i64.shr_u - local.set $21 - local.get $18 - local.get $19 + local.set $var$21 + local.get $var$18 + local.get $var$19 i64.mul - local.set $22 - local.get $20 - local.get $19 + local.set $var$22 + local.get $var$20 + local.get $var$19 i64.mul - local.get $22 + local.get $var$22 i64.const 32 i64.shr_u i64.add - local.set $23 - local.get $18 - local.get $21 + local.set $var$23 + local.get $var$18 + local.get $var$21 i64.mul - local.get $23 + local.get $var$23 i64.const 4294967295 i64.and i64.add - local.set $24 - local.get $24 + local.set $var$24 + local.get $var$24 i64.const 2147483647 i64.add - local.set $24 - local.get $23 + local.set $var$24 + local.get $var$23 i64.const 32 i64.shr_u - local.set $23 - local.get $24 + local.set $var$23 + local.get $var$24 i64.const 32 i64.shr_u - local.set $24 - local.get $20 - local.get $21 + local.set $var$24 + local.get $var$20 + local.get $var$21 i64.mul - local.get $23 + local.get $var$23 i64.add - local.get $24 + local.get $var$24 i64.add - local.set $24 - local.get $7 - local.set $10 - local.get $15 - local.set $13 - local.get $10 - local.get $13 + local.set $var$24 + local.get $var$7 + local.set $var$10 + local.get $var$15 + local.set $var$13 + local.get $var$10 + local.get $var$13 i32.add i32.const 64 i32.add - local.set $10 + local.set $var$10 global.get $~lib/util/number/_frc_plus - local.set $17 - local.get $12 - local.set $11 - local.get $17 + local.set $var$17 + local.get $var$12 + local.set $var$11 + local.get $var$17 i64.const 4294967295 i64.and - local.set $23 - local.get $11 + local.set $var$23 + local.get $var$11 i64.const 4294967295 i64.and - local.set $22 - local.get $17 + local.set $var$22 + local.get $var$17 i64.const 32 i64.shr_u - local.set $21 - local.get $11 + local.set $var$21 + local.get $var$11 i64.const 32 i64.shr_u - local.set $20 - local.get $23 - local.get $22 + local.set $var$20 + local.get $var$23 + local.get $var$22 i64.mul - local.set $19 - local.get $21 - local.get $22 + local.set $var$19 + local.get $var$21 + local.get $var$22 i64.mul - local.get $19 + local.get $var$19 i64.const 32 i64.shr_u i64.add - local.set $18 - local.get $23 - local.get $20 + local.set $var$18 + local.get $var$23 + local.get $var$20 i64.mul - local.get $18 + local.get $var$18 i64.const 4294967295 i64.and i64.add - local.set $25 - local.get $25 + local.set $var$25 + local.get $var$25 i64.const 2147483647 i64.add - local.set $25 - local.get $18 + local.set $var$25 + local.get $var$18 i64.const 32 i64.shr_u - local.set $18 - local.get $25 + local.set $var$18 + local.get $var$25 i64.const 32 i64.shr_u - local.set $25 - local.get $21 - local.get $20 + local.set $var$25 + local.get $var$21 + local.get $var$20 i64.mul - local.get $18 + local.get $var$18 i64.add - local.get $25 + local.get $var$25 i64.add i64.const 1 i64.sub - local.set $25 + local.set $var$25 global.get $~lib/util/number/_exp - local.set $26 - local.get $15 - local.set $13 - local.get $26 - local.get $13 + local.set $var$26 + local.get $var$15 + local.set $var$13 + local.get $var$26 + local.get $var$13 i32.add i32.const 64 i32.add - local.set $26 + local.set $var$26 global.get $~lib/util/number/_frc_minus - local.set $17 - local.get $12 - local.set $11 - local.get $17 + local.set $var$17 + local.get $var$12 + local.set $var$11 + local.get $var$17 i64.const 4294967295 i64.and - local.set $18 - local.get $11 + local.set $var$18 + local.get $var$11 i64.const 4294967295 i64.and - local.set $19 - local.get $17 + local.set $var$19 + local.get $var$17 i64.const 32 i64.shr_u - local.set $20 - local.get $11 + local.set $var$20 + local.get $var$11 i64.const 32 i64.shr_u - local.set $21 - local.get $18 - local.get $19 + local.set $var$21 + local.get $var$18 + local.get $var$19 i64.mul - local.set $22 - local.get $20 - local.get $19 + local.set $var$22 + local.get $var$20 + local.get $var$19 i64.mul - local.get $22 + local.get $var$22 i64.const 32 i64.shr_u i64.add - local.set $23 - local.get $18 - local.get $21 + local.set $var$23 + local.get $var$18 + local.get $var$21 i64.mul - local.get $23 + local.get $var$23 i64.const 4294967295 i64.and i64.add - local.set $27 - local.get $27 + local.set $var$27 + local.get $var$27 i64.const 2147483647 i64.add - local.set $27 - local.get $23 + local.set $var$27 + local.get $var$23 i64.const 32 i64.shr_u - local.set $23 - local.get $27 + local.set $var$23 + local.get $var$27 i64.const 32 i64.shr_u - local.set $27 - local.get $20 - local.get $21 + local.set $var$27 + local.get $var$20 + local.get $var$21 i64.mul - local.get $23 + local.get $var$23 i64.add - local.get $27 + local.get $var$27 i64.add i64.const 1 i64.add - local.set $27 - local.get $25 - local.get $27 + local.set $var$27 + local.get $var$25 + local.get $var$27 i64.sub - local.set $23 - local.get $4 - local.get $24 - local.get $10 - local.get $25 - local.get $26 - local.get $23 - local.get $3 + local.set $var$23 + local.get $var$4 + local.get $var$24 + local.get $var$10 + local.get $var$25 + local.get $var$26 + local.get $var$23 + local.get $var$3 call $~lib/util/number/genDigits - local.set $28 - local.get $0 - local.get $2 + local.set $len + local.get $buffer + local.get $sign i32.const 1 i32.shl i32.add - local.get $28 - local.get $2 + local.get $len + local.get $sign i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.set $28 - local.get $28 - local.get $2 + local.set $len + local.get $len + local.get $sign i32.add ) - (func $~lib/number/F32#toString (param $0 f32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/number/F32#toString (param $this f32) (param $radix i32) (result i32) + local.get $this f64.promote_f32 call $~lib/util/number/dtoa ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.get $1 + (func $~lib/util/string/compareImpl (param $str1 i32) (param $index1 i32) (param $str2 i32) (param $index2 i32) (param $len i32) (result i32) + (local $ptr1 i32) + (local $ptr2 i32) + (local $var$7 i32) + (local $a i32) + (local $b i32) + local.get $str1 + local.get $index1 i32.const 1 i32.shl i32.add - local.set $5 - local.get $2 - local.get $3 + local.set $ptr1 + local.get $str2 + local.get $index2 i32.const 1 i32.shl i32.add - local.set $6 + local.set $ptr2 i32.const 0 i32.const 2 i32.lt_s drop - local.get $4 + local.get $len i32.const 4 i32.ge_u if (result i32) - local.get $5 + local.get $ptr1 i32.const 7 i32.and - local.get $6 + local.get $ptr2 i32.const 7 i32.and i32.or @@ -3790,27 +3790,27 @@ if block $do-break|0 loop $do-loop|0 - local.get $5 + local.get $ptr1 i64.load - local.get $6 + local.get $ptr2 i64.load i64.ne if br $do-break|0 end - local.get $5 + local.get $ptr1 i32.const 8 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 8 i32.add - local.set $6 - local.get $4 + local.set $ptr2 + local.get $len i32.const 4 i32.sub - local.set $4 - local.get $4 + local.set $len + local.get $len i32.const 4 i32.ge_u br_if $do-loop|0 @@ -3818,59 +3818,59 @@ end end loop $while-continue|1 - local.get $4 - local.tee $7 + local.get $len + local.tee $var$7 i32.const 1 i32.sub - local.set $4 - local.get $7 - local.set $7 - local.get $7 + local.set $len + local.get $var$7 + local.set $var$7 + local.get $var$7 if - local.get $5 + local.get $ptr1 i32.load16_u - local.set $8 - local.get $6 + local.set $a + local.get $ptr2 i32.load16_u - local.set $9 - local.get $8 - local.get $9 + local.set $b + local.get $a + local.get $b i32.ne if - local.get $8 - local.get $9 + local.get $a + local.get $b i32.sub return end - local.get $5 + local.get $ptr1 i32.const 2 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 2 i32.add - local.set $6 + local.set $ptr2 br $while-continue|1 end end i32.const 0 ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__eq (param $left i32) (param $right i32) (result i32) + (local $leftLength i32) + local.get $left + local.get $right i32.eq if i32.const 1 return end - local.get $0 + local.get $left i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $1 + local.get $right i32.const 0 i32.eq end @@ -3878,28 +3878,28 @@ i32.const 0 return end - local.get $0 + local.get $left call $~lib/string/String#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $leftLength + local.get $leftLength + local.get $right call $~lib/string/String#get:length i32.ne if i32.const 0 return end - local.get $0 + local.get $left i32.const 0 - local.get $1 + local.get $right i32.const 0 - local.get $2 + local.get $leftLength call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/typedarray/Uint8Array#__set (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - local.get $0 + (func $~lib/typedarray/Uint8Array#__set (param $this i32) (param $index i32) (param $value i32) + local.get $index + local.get $this i32.load offset=8 i32.ge_u if @@ -3910,16 +3910,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.add - local.get $2 + local.get $value i32.store8 ) - (func $~lib/typedarray/Uint8Array#__get (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 + (func $~lib/typedarray/Uint8Array#__get (param $this i32) (param $index i32) (result i32) + local.get $index + local.get $this i32.load offset=8 i32.ge_u if @@ -3930,32 +3930,32 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.add i32.load8_u ) - (func $~lib/util/number/utoa_hex_lut (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i32) + (func $~lib/util/number/utoa_hex_lut (param $buffer i32) (param $num i64) (param $offset i32) + (local $var$3 i32) loop $while-continue|0 - local.get $2 + local.get $offset i32.const 2 i32.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $2 + local.get $offset i32.const 2 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 2544 - local.get $1 + local.get $num i32.wrap_i64 i32.const 255 i32.and @@ -3964,20 +3964,20 @@ i32.add i32.load i32.store - local.get $1 + local.get $num i64.const 8 i64.shr_u - local.set $1 + local.set $num br $while-continue|0 end end - local.get $2 + local.get $offset i32.const 1 i32.and if - local.get $0 + local.get $buffer i32.const 2544 - local.get $1 + local.get $num i32.wrap_i64 i32.const 6 i32.shl @@ -3986,25 +3986,25 @@ i32.store16 end ) - (func $~lib/util/number/ulog_base (param $0 i64) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) - (local $4 i64) - (local $5 i32) - local.get $1 - local.set $2 - local.get $2 + (func $~lib/util/number/ulog_base (param $num i64) (param $base i32) (result i32) + (local $var$2 i32) + (local $b64 i64) + (local $b i64) + (local $e i32) + local.get $base + local.set $var$2 + local.get $var$2 i32.popcnt i32.const 1 i32.eq if i32.const 63 - local.get $0 + local.get $num i64.clz i32.wrap_i64 i32.sub i32.const 31 - local.get $1 + local.get $base i32.clz i32.sub i32.div_u @@ -4012,95 +4012,95 @@ i32.add return end - local.get $1 + local.get $base i64.extend_i32_s - local.set $3 - local.get $3 - local.set $4 + local.set $b64 + local.get $b64 + local.set $b i32.const 1 - local.set $5 + local.set $e loop $while-continue|0 - local.get $0 - local.get $4 + local.get $num + local.get $b i64.ge_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 - local.get $4 + local.get $num + local.get $b i64.div_u - local.set $0 - local.get $4 - local.get $4 + local.set $num + local.get $b + local.get $b i64.mul - local.set $4 - local.get $5 + local.set $b + local.get $e i32.const 1 i32.shl - local.set $5 + local.set $e br $while-continue|0 end end loop $while-continue|1 - local.get $0 + local.get $num i64.const 1 i64.ge_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 - local.get $3 + local.get $num + local.get $b64 i64.div_u - local.set $0 - local.get $5 + local.set $num + local.get $e i32.const 1 i32.add - local.set $5 + local.set $e br $while-continue|1 end end - local.get $5 + local.get $e i32.const 1 i32.sub ) - (func $~lib/util/number/utoa64_any_core (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i32) - (local $4 i64) - (local $5 i64) - (local $6 i64) - local.get $3 + (func $~lib/util/number/utoa64_any_core (param $buffer i32) (param $num i64) (param $offset i32) (param $radix i32) + (local $base i64) + (local $var$5 i64) + (local $q i64) + local.get $radix i64.extend_i32_s - local.set $4 - local.get $3 - local.get $3 + local.set $base + local.get $radix + local.get $radix i32.const 1 i32.sub i32.and i32.const 0 i32.eq if - local.get $3 + local.get $radix i32.ctz i32.const 7 i32.and i64.extend_i32_s - local.set $5 - local.get $4 + local.set $var$5 + local.get $base i64.const 1 i64.sub - local.set $6 + local.set $q loop $do-loop|0 - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 3600 - local.get $1 - local.get $6 + local.get $num + local.get $q i64.and i32.wrap_i64 i32.const 1 @@ -4108,34 +4108,34 @@ i32.add i32.load16_u i32.store16 - local.get $1 - local.get $5 + local.get $num + local.get $var$5 i64.shr_u - local.set $1 - local.get $1 + local.set $num + local.get $num i64.const 0 i64.ne br_if $do-loop|0 end else loop $do-loop|1 - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 - local.get $1 - local.get $4 + local.set $offset + local.get $num + local.get $base i64.div_u - local.set $6 - local.get $0 - local.get $2 + local.set $q + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 3600 - local.get $1 - local.get $6 - local.get $4 + local.get $num + local.get $q + local.get $base i64.mul i64.sub i32.wrap_i64 @@ -4144,20 +4144,20 @@ i32.add i32.load16_u i32.store16 - local.get $6 - local.set $1 - local.get $1 + local.get $q + local.set $num + local.get $num i64.const 0 i64.ne br_if $do-loop|1 end end ) - (func $~lib/number/U8#toString (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/number/U8#toString (param $this i32) (param $radix i32) (result i32) + local.get $this i32.const 255 i32.and - local.get $1 + local.get $radix call $~lib/util/number/utoa32 ) (func $~lib/rt/__visit_globals (param $0 i32) diff --git a/tests/compiler/resolve-function-expression.debug.wat b/tests/compiler/resolve-function-expression.debug.wat index 26fbe38eed..ffdff06395 100644 --- a/tests/compiler/resolve-function-expression.debug.wat +++ b/tests/compiler/resolve-function-expression.debug.wat @@ -58,43 +58,43 @@ (elem $0 (i32.const 1) $start:resolve-function-expression~anonymous|0 $start:resolve-function-expression~anonymous|1 $start:resolve-function-expression~anonymous|2) (export "memory" (memory $0)) (start $~start) - (func $start:resolve-function-expression~anonymous|0 (param $0 i32) (result i32) - local.get $0 + (func $start:resolve-function-expression~anonymous|0 (param $a i32) (result i32) + local.get $a i32.const 40 i32.add ) - (func $start:resolve-function-expression~anonymous|1 (param $0 i32) (result i32) - local.get $0 + (func $start:resolve-function-expression~anonymous|1 (param $a i32) (result i32) + local.get $a i32.const 41 i32.add ) - (func $start:resolve-function-expression~anonymous|2 (param $0 i32) (result i32) - local.get $0 + (func $start:resolve-function-expression~anonymous|2 (param $a i32) (result i32) + local.get $a i32.const 42 i32.add ) - (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) - local.get $0 + (func $~lib/util/number/decimalCount32 (param $value i32) (result i32) + local.get $value i32.const 100000 i32.lt_u if - local.get $0 + local.get $value i32.const 100 i32.lt_u if i32.const 1 - local.get $0 + local.get $value i32.const 10 i32.ge_u i32.add return else i32.const 3 - local.get $0 + local.get $value i32.const 10000 i32.ge_u i32.add - local.get $0 + local.get $value i32.const 1000 i32.ge_u i32.add @@ -102,23 +102,23 @@ end unreachable else - local.get $0 + local.get $value i32.const 10000000 i32.lt_u if i32.const 6 - local.get $0 + local.get $value i32.const 1000000 i32.ge_u i32.add return else i32.const 8 - local.get $0 + local.get $value i32.const 1000000000 i32.ge_u i32.add - local.get $0 + local.get $value i32.const 100000000 i32.ge_u i32.add @@ -138,50 +138,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -194,58 +194,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -262,12 +262,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -277,19 +277,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -300,27 +300,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -328,35 +328,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -366,15 +366,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -384,25 +384,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -410,33 +410,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -464,23 +464,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -492,15 +492,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -512,33 +512,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -546,21 +546,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -575,36 +575,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -612,67 +612,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -682,22 +682,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -707,12 +707,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -724,75 +724,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -804,38 +804,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -849,12 +849,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -865,38 +865,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -904,21 +904,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -933,101 +933,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -1038,7 +1038,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1049,26 +1049,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1081,27 +1081,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1115,11 +1115,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1130,66 +1130,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1199,10 +1199,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1213,13 +1213,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1230,109 +1230,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1340,7 +1340,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1357,23 +1357,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1385,54 +1385,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1453,30 +1453,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1486,9 +1486,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1498,8 +1498,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1507,43 +1507,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1555,17 +1555,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1579,7 +1579,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1597,7 +1597,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1607,12 +1607,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1634,7 +1634,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1654,14 +1654,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1674,8 +1674,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1686,37 +1686,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1724,16 +1724,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1741,21 +1741,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1770,12 +1770,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1783,49 +1783,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1835,90 +1835,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1927,22 +1927,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1951,27 +1951,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1986,69 +1986,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2063,29 +2063,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2098,13 +2098,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2115,25 +2115,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2148,10 +2148,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2169,97 +2169,97 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/util/number/utoa32_dec_lut (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 i64) - (local $9 i64) - (local $10 i32) - (local $11 i32) + (func $~lib/util/number/utoa32_dec_lut (param $buffer i32) (param $num i32) (param $offset i32) + (local $var$3 i32) + (local $t i32) + (local $r i32) + (local $d1 i32) + (local $d2 i32) + (local $digits1 i64) + (local $digits2 i64) + (local $var$10 i32) + (local $var$11 i32) loop $while-continue|0 - local.get $1 + local.get $num i32.const 10000 i32.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $1 + local.get $num i32.const 10000 i32.div_u - local.set $4 - local.get $1 + local.set $t + local.get $num i32.const 10000 i32.rem_u - local.set $5 - local.get $4 - local.set $1 - local.get $5 + local.set $r + local.get $t + local.set $num + local.get $r i32.const 100 i32.div_u - local.set $6 - local.get $5 + local.set $d1 + local.get $r i32.const 100 i32.rem_u - local.set $7 + local.set $d2 i32.const 812 - local.get $6 + local.get $d1 i32.const 2 i32.shl i32.add i64.load32_u - local.set $8 + local.set $digits1 i32.const 812 - local.get $7 + local.get $d2 i32.const 2 i32.shl i32.add i64.load32_u - local.set $9 - local.get $2 + local.set $digits2 + local.get $offset i32.const 4 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $8 - local.get $9 + local.get $digits1 + local.get $digits2 i64.const 32 i64.shl i64.or @@ -2267,99 +2267,99 @@ br $while-continue|0 end end - local.get $1 + local.get $num i32.const 100 i32.ge_u if - local.get $1 + local.get $num i32.const 100 i32.div_u - local.set $3 - local.get $1 + local.set $var$3 + local.get $num i32.const 100 i32.rem_u - local.set $10 - local.get $3 - local.set $1 - local.get $2 + local.set $var$10 + local.get $var$3 + local.set $num + local.get $offset i32.const 2 i32.sub - local.set $2 + local.set $offset i32.const 812 - local.get $10 + local.get $var$10 i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store end - local.get $1 + local.get $num i32.const 10 i32.ge_u if - local.get $2 + local.get $offset i32.const 2 i32.sub - local.set $2 + local.set $offset i32.const 812 - local.get $1 + local.get $num i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store else - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 + local.set $offset i32.const 48 - local.get $1 + local.get $num i32.add - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store16 end ) - (func $~lib/util/number/utoa_hex_lut (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i32) + (func $~lib/util/number/utoa_hex_lut (param $buffer i32) (param $num i64) (param $offset i32) + (local $var$3 i32) loop $while-continue|0 - local.get $2 + local.get $offset i32.const 2 i32.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $2 + local.get $offset i32.const 2 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 1232 - local.get $1 + local.get $num i32.wrap_i64 i32.const 255 i32.and @@ -2368,20 +2368,20 @@ i32.add i32.load i32.store - local.get $1 + local.get $num i64.const 8 i64.shr_u - local.set $1 + local.set $num br $while-continue|0 end end - local.get $2 + local.get $offset i32.const 1 i32.and if - local.get $0 + local.get $buffer i32.const 1232 - local.get $1 + local.get $num i32.wrap_i64 i32.const 6 i32.shl @@ -2390,25 +2390,25 @@ i32.store16 end ) - (func $~lib/util/number/ulog_base (param $0 i64) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) - (local $4 i64) - (local $5 i32) - local.get $1 - local.set $2 - local.get $2 + (func $~lib/util/number/ulog_base (param $num i64) (param $base i32) (result i32) + (local $var$2 i32) + (local $b64 i64) + (local $b i64) + (local $e i32) + local.get $base + local.set $var$2 + local.get $var$2 i32.popcnt i32.const 1 i32.eq if i32.const 63 - local.get $0 + local.get $num i64.clz i32.wrap_i64 i32.sub i32.const 31 - local.get $1 + local.get $base i32.clz i32.sub i32.div_u @@ -2416,95 +2416,95 @@ i32.add return end - local.get $1 + local.get $base i64.extend_i32_s - local.set $3 - local.get $3 - local.set $4 + local.set $b64 + local.get $b64 + local.set $b i32.const 1 - local.set $5 + local.set $e loop $while-continue|0 - local.get $0 - local.get $4 + local.get $num + local.get $b i64.ge_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 - local.get $4 + local.get $num + local.get $b i64.div_u - local.set $0 - local.get $4 - local.get $4 + local.set $num + local.get $b + local.get $b i64.mul - local.set $4 - local.get $5 + local.set $b + local.get $e i32.const 1 i32.shl - local.set $5 + local.set $e br $while-continue|0 end end loop $while-continue|1 - local.get $0 + local.get $num i64.const 1 i64.ge_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 - local.get $3 + local.get $num + local.get $b64 i64.div_u - local.set $0 - local.get $5 + local.set $num + local.get $e i32.const 1 i32.add - local.set $5 + local.set $e br $while-continue|1 end end - local.get $5 + local.get $e i32.const 1 i32.sub ) - (func $~lib/util/number/utoa64_any_core (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i32) - (local $4 i64) - (local $5 i64) - (local $6 i64) - local.get $3 + (func $~lib/util/number/utoa64_any_core (param $buffer i32) (param $num i64) (param $offset i32) (param $radix i32) + (local $base i64) + (local $var$5 i64) + (local $q i64) + local.get $radix i64.extend_i32_s - local.set $4 - local.get $3 - local.get $3 + local.set $base + local.get $radix + local.get $radix i32.const 1 i32.sub i32.and i32.const 0 i32.eq if - local.get $3 + local.get $radix i32.ctz i32.const 7 i32.and i64.extend_i32_s - local.set $5 - local.get $4 + local.set $var$5 + local.get $base i64.const 1 i64.sub - local.set $6 + local.set $q loop $do-loop|0 - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 2288 - local.get $1 - local.get $6 + local.get $num + local.get $q i64.and i32.wrap_i64 i32.const 1 @@ -2512,34 +2512,34 @@ i32.add i32.load16_u i32.store16 - local.get $1 - local.get $5 + local.get $num + local.get $var$5 i64.shr_u - local.set $1 - local.get $1 + local.set $num + local.get $num i64.const 0 i64.ne br_if $do-loop|0 end else loop $do-loop|1 - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 - local.get $1 - local.get $4 + local.set $offset + local.get $num + local.get $base i64.div_u - local.set $6 - local.get $0 - local.get $2 + local.set $q + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 2288 - local.get $1 - local.get $6 - local.get $4 + local.get $num + local.get $q + local.get $base i64.mul i64.sub i32.wrap_i64 @@ -2548,58 +2548,58 @@ i32.add i32.load16_u i32.store16 - local.get $6 - local.set $1 - local.get $1 + local.get $q + local.set $num + local.get $num i64.const 0 i64.ne br_if $do-loop|1 end end ) - (func $~lib/number/I32#toString (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/number/I32#toString (param $this i32) (param $radix i32) (result i32) + local.get $this + local.get $radix call $~lib/util/number/itoa32 ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.get $1 + (func $~lib/util/string/compareImpl (param $str1 i32) (param $index1 i32) (param $str2 i32) (param $index2 i32) (param $len i32) (result i32) + (local $ptr1 i32) + (local $ptr2 i32) + (local $var$7 i32) + (local $a i32) + (local $b i32) + local.get $str1 + local.get $index1 i32.const 1 i32.shl i32.add - local.set $5 - local.get $2 - local.get $3 + local.set $ptr1 + local.get $str2 + local.get $index2 i32.const 1 i32.shl i32.add - local.set $6 + local.set $ptr2 i32.const 0 i32.const 2 i32.lt_s drop - local.get $4 + local.get $len i32.const 4 i32.ge_u if (result i32) - local.get $5 + local.get $ptr1 i32.const 7 i32.and - local.get $6 + local.get $ptr2 i32.const 7 i32.and i32.or @@ -2610,27 +2610,27 @@ if block $do-break|0 loop $do-loop|0 - local.get $5 + local.get $ptr1 i64.load - local.get $6 + local.get $ptr2 i64.load i64.ne if br $do-break|0 end - local.get $5 + local.get $ptr1 i32.const 8 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 8 i32.add - local.set $6 - local.get $4 + local.set $ptr2 + local.get $len i32.const 4 i32.sub - local.set $4 - local.get $4 + local.set $len + local.get $len i32.const 4 i32.ge_u br_if $do-loop|0 @@ -2638,59 +2638,59 @@ end end loop $while-continue|1 - local.get $4 - local.tee $7 + local.get $len + local.tee $var$7 i32.const 1 i32.sub - local.set $4 - local.get $7 - local.set $7 - local.get $7 + local.set $len + local.get $var$7 + local.set $var$7 + local.get $var$7 if - local.get $5 + local.get $ptr1 i32.load16_u - local.set $8 - local.get $6 + local.set $a + local.get $ptr2 i32.load16_u - local.set $9 - local.get $8 - local.get $9 + local.set $b + local.get $a + local.get $b i32.ne if - local.get $8 - local.get $9 + local.get $a + local.get $b i32.sub return end - local.get $5 + local.get $ptr1 i32.const 2 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 2 i32.add - local.set $6 + local.set $ptr2 br $while-continue|1 end end i32.const 0 ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__eq (param $left i32) (param $right i32) (result i32) + (local $leftLength i32) + local.get $left + local.get $right i32.eq if i32.const 1 return end - local.get $0 + local.get $left i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $1 + local.get $right i32.const 0 i32.eq end @@ -2698,22 +2698,22 @@ i32.const 0 return end - local.get $0 + local.get $left call $~lib/string/String#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $leftLength + local.get $leftLength + local.get $right call $~lib/string/String#get:length i32.ne if i32.const 0 return end - local.get $0 + local.get $left i32.const 0 - local.get $1 + local.get $right i32.const 0 - local.get $2 + local.get $leftLength call $~lib/util/string/compareImpl i32.eqz ) @@ -2743,10 +2743,10 @@ call $~lib/rt/itcms/__visit end ) - (func $~lib/function/Function<%28i32%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i32%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i32%29=>i32>~visit (param $0 i32) (param $1 i32) diff --git a/tests/compiler/resolve-localortype.debug.wat b/tests/compiler/resolve-localortype.debug.wat index 4bfc4ad8d3..1cad74fcb1 100644 --- a/tests/compiler/resolve-localortype.debug.wat +++ b/tests/compiler/resolve-localortype.debug.wat @@ -11,11 +11,11 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (export "test" (func $export:resolve-localortype/test)) - (func $resolve-localortype/foo<~lib/string/String> (param $0 i32) (result i32) - local.get $0 + (func $resolve-localortype/foo<~lib/string/String> (param $s i32) (result i32) + local.get $s ) - (func $resolve-localortype/test (param $0 i32) (result i32) - local.get $0 + (func $resolve-localortype/test (param $string i32) (result i32) + local.get $string call $resolve-localortype/foo<~lib/string/String> ) (func $~stack_check diff --git a/tests/compiler/resolve-nested.debug.wat b/tests/compiler/resolve-nested.debug.wat index 2cec54a266..8998183872 100644 --- a/tests/compiler/resolve-nested.debug.wat +++ b/tests/compiler/resolve-nested.debug.wat @@ -25,7 +25,7 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (export "outer" (func $export:resolve-nested/outer)) - (func $resolve-nested/outer (param $0 i32) (param $1 i32) (param $2 i32) + (func $resolve-nested/outer (param $a i32) (param $b i32) (param $c i32) nop ) (func $~stack_check diff --git a/tests/compiler/resolve-new.debug.wat b/tests/compiler/resolve-new.debug.wat index b912a487d1..7ea6e3a12c 100644 --- a/tests/compiler/resolve-new.debug.wat +++ b/tests/compiler/resolve-new.debug.wat @@ -52,50 +52,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -108,58 +108,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -176,12 +176,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -191,19 +191,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -214,27 +214,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -242,35 +242,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -280,15 +280,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -298,25 +298,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -324,33 +324,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -378,23 +378,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -406,15 +406,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -426,33 +426,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -460,21 +460,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -489,36 +489,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -526,67 +526,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -596,22 +596,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -621,12 +621,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -638,75 +638,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -718,38 +718,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -763,12 +763,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -779,38 +779,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -818,21 +818,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -847,101 +847,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -952,7 +952,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -963,26 +963,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -995,27 +995,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1029,11 +1029,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1044,66 +1044,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1113,10 +1113,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1127,13 +1127,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1144,109 +1144,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1254,7 +1254,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1271,23 +1271,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1299,54 +1299,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1367,30 +1367,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1400,9 +1400,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1412,8 +1412,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1421,43 +1421,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1469,17 +1469,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1493,7 +1493,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1511,7 +1511,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1521,12 +1521,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1548,7 +1548,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1568,14 +1568,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1588,8 +1588,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1600,37 +1600,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1638,16 +1638,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1655,21 +1655,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1684,12 +1684,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1697,49 +1697,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1749,90 +1749,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1841,22 +1841,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1865,27 +1865,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1900,69 +1900,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1977,29 +1977,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2012,13 +2012,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2029,25 +2029,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2062,10 +2062,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2083,38 +2083,38 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $resolve-new/Foo#bar (param $0 i32) + (func $resolve-new/Foo#bar (param $this i32) nop ) (func $~lib/rt/__visit_globals (param $0 i32) diff --git a/tests/compiler/resolve-propertyaccess.debug.wat b/tests/compiler/resolve-propertyaccess.debug.wat index 9e2d350d7d..ab4e7d92d0 100644 --- a/tests/compiler/resolve-propertyaccess.debug.wat +++ b/tests/compiler/resolve-propertyaccess.debug.wat @@ -74,28 +74,28 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (start $~start) - (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) - local.get $0 + (func $~lib/util/number/decimalCount32 (param $value i32) (result i32) + local.get $value i32.const 100000 i32.lt_u if - local.get $0 + local.get $value i32.const 100 i32.lt_u if i32.const 1 - local.get $0 + local.get $value i32.const 10 i32.ge_u i32.add return else i32.const 3 - local.get $0 + local.get $value i32.const 10000 i32.ge_u i32.add - local.get $0 + local.get $value i32.const 1000 i32.ge_u i32.add @@ -103,23 +103,23 @@ end unreachable else - local.get $0 + local.get $value i32.const 10000000 i32.lt_u if i32.const 6 - local.get $0 + local.get $value i32.const 1000000 i32.ge_u i32.add return else i32.const 8 - local.get $0 + local.get $value i32.const 1000000000 i32.ge_u i32.add - local.get $0 + local.get $value i32.const 100000000 i32.ge_u i32.add @@ -139,50 +139,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -195,58 +195,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -263,12 +263,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -278,19 +278,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -301,27 +301,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -329,35 +329,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -367,15 +367,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -385,25 +385,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -411,33 +411,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -465,23 +465,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -493,15 +493,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -513,33 +513,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -547,21 +547,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -576,36 +576,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -613,67 +613,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -683,22 +683,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -708,12 +708,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -725,75 +725,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -805,38 +805,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -850,12 +850,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -866,38 +866,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -905,21 +905,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -934,101 +934,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -1039,7 +1039,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1050,26 +1050,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1082,27 +1082,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1116,11 +1116,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1131,66 +1131,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1200,10 +1200,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1214,13 +1214,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1231,109 +1231,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1341,7 +1341,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1358,23 +1358,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1386,54 +1386,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1454,30 +1454,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1487,9 +1487,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1499,8 +1499,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1508,43 +1508,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1556,17 +1556,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1580,7 +1580,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1598,7 +1598,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1608,12 +1608,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1635,7 +1635,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1655,14 +1655,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1675,8 +1675,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1687,37 +1687,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1725,16 +1725,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1742,21 +1742,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1771,12 +1771,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1784,49 +1784,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1836,90 +1836,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1928,22 +1928,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1952,27 +1952,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1987,69 +1987,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2064,29 +2064,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2099,13 +2099,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2116,25 +2116,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2149,10 +2149,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2170,97 +2170,97 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/util/number/utoa32_dec_lut (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 i64) - (local $9 i64) - (local $10 i32) - (local $11 i32) + (func $~lib/util/number/utoa32_dec_lut (param $buffer i32) (param $num i32) (param $offset i32) + (local $var$3 i32) + (local $t i32) + (local $r i32) + (local $d1 i32) + (local $d2 i32) + (local $digits1 i64) + (local $digits2 i64) + (local $var$10 i32) + (local $var$11 i32) loop $while-continue|0 - local.get $1 + local.get $num i32.const 10000 i32.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $1 + local.get $num i32.const 10000 i32.div_u - local.set $4 - local.get $1 + local.set $t + local.get $num i32.const 10000 i32.rem_u - local.set $5 - local.get $4 - local.set $1 - local.get $5 + local.set $r + local.get $t + local.set $num + local.get $r i32.const 100 i32.div_u - local.set $6 - local.get $5 + local.set $d1 + local.get $r i32.const 100 i32.rem_u - local.set $7 + local.set $d2 i32.const 636 - local.get $6 + local.get $d1 i32.const 2 i32.shl i32.add i64.load32_u - local.set $8 + local.set $digits1 i32.const 636 - local.get $7 + local.get $d2 i32.const 2 i32.shl i32.add i64.load32_u - local.set $9 - local.get $2 + local.set $digits2 + local.get $offset i32.const 4 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $8 - local.get $9 + local.get $digits1 + local.get $digits2 i64.const 32 i64.shl i64.or @@ -2268,99 +2268,99 @@ br $while-continue|0 end end - local.get $1 + local.get $num i32.const 100 i32.ge_u if - local.get $1 + local.get $num i32.const 100 i32.div_u - local.set $3 - local.get $1 + local.set $var$3 + local.get $num i32.const 100 i32.rem_u - local.set $10 - local.get $3 - local.set $1 - local.get $2 + local.set $var$10 + local.get $var$3 + local.set $num + local.get $offset i32.const 2 i32.sub - local.set $2 + local.set $offset i32.const 636 - local.get $10 + local.get $var$10 i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store end - local.get $1 + local.get $num i32.const 10 i32.ge_u if - local.get $2 + local.get $offset i32.const 2 i32.sub - local.set $2 + local.set $offset i32.const 636 - local.get $1 + local.get $num i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store else - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 + local.set $offset i32.const 48 - local.get $1 + local.get $num i32.add - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store16 end ) - (func $~lib/util/number/utoa_hex_lut (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i32) + (func $~lib/util/number/utoa_hex_lut (param $buffer i32) (param $num i64) (param $offset i32) + (local $var$3 i32) loop $while-continue|0 - local.get $2 + local.get $offset i32.const 2 i32.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $2 + local.get $offset i32.const 2 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 1056 - local.get $1 + local.get $num i32.wrap_i64 i32.const 255 i32.and @@ -2369,20 +2369,20 @@ i32.add i32.load i32.store - local.get $1 + local.get $num i64.const 8 i64.shr_u - local.set $1 + local.set $num br $while-continue|0 end end - local.get $2 + local.get $offset i32.const 1 i32.and if - local.get $0 + local.get $buffer i32.const 1056 - local.get $1 + local.get $num i32.wrap_i64 i32.const 6 i32.shl @@ -2391,25 +2391,25 @@ i32.store16 end ) - (func $~lib/util/number/ulog_base (param $0 i64) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) - (local $4 i64) - (local $5 i32) - local.get $1 - local.set $2 - local.get $2 + (func $~lib/util/number/ulog_base (param $num i64) (param $base i32) (result i32) + (local $var$2 i32) + (local $b64 i64) + (local $b i64) + (local $e i32) + local.get $base + local.set $var$2 + local.get $var$2 i32.popcnt i32.const 1 i32.eq if i32.const 63 - local.get $0 + local.get $num i64.clz i32.wrap_i64 i32.sub i32.const 31 - local.get $1 + local.get $base i32.clz i32.sub i32.div_u @@ -2417,95 +2417,95 @@ i32.add return end - local.get $1 + local.get $base i64.extend_i32_s - local.set $3 - local.get $3 - local.set $4 + local.set $b64 + local.get $b64 + local.set $b i32.const 1 - local.set $5 + local.set $e loop $while-continue|0 - local.get $0 - local.get $4 + local.get $num + local.get $b i64.ge_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 - local.get $4 + local.get $num + local.get $b i64.div_u - local.set $0 - local.get $4 - local.get $4 + local.set $num + local.get $b + local.get $b i64.mul - local.set $4 - local.get $5 + local.set $b + local.get $e i32.const 1 i32.shl - local.set $5 + local.set $e br $while-continue|0 end end loop $while-continue|1 - local.get $0 + local.get $num i64.const 1 i64.ge_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 - local.get $3 + local.get $num + local.get $b64 i64.div_u - local.set $0 - local.get $5 + local.set $num + local.get $e i32.const 1 i32.add - local.set $5 + local.set $e br $while-continue|1 end end - local.get $5 + local.get $e i32.const 1 i32.sub ) - (func $~lib/util/number/utoa64_any_core (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i32) - (local $4 i64) - (local $5 i64) - (local $6 i64) - local.get $3 + (func $~lib/util/number/utoa64_any_core (param $buffer i32) (param $num i64) (param $offset i32) (param $radix i32) + (local $base i64) + (local $var$5 i64) + (local $q i64) + local.get $radix i64.extend_i32_s - local.set $4 - local.get $3 - local.get $3 + local.set $base + local.get $radix + local.get $radix i32.const 1 i32.sub i32.and i32.const 0 i32.eq if - local.get $3 + local.get $radix i32.ctz i32.const 7 i32.and i64.extend_i32_s - local.set $5 - local.get $4 + local.set $var$5 + local.get $base i64.const 1 i64.sub - local.set $6 + local.set $q loop $do-loop|0 - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 2112 - local.get $1 - local.get $6 + local.get $num + local.get $q i64.and i32.wrap_i64 i32.const 1 @@ -2513,34 +2513,34 @@ i32.add i32.load16_u i32.store16 - local.get $1 - local.get $5 + local.get $num + local.get $var$5 i64.shr_u - local.set $1 - local.get $1 + local.set $num + local.get $num i64.const 0 i64.ne br_if $do-loop|0 end else loop $do-loop|1 - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 - local.get $1 - local.get $4 + local.set $offset + local.get $num + local.get $base i64.div_u - local.set $6 - local.get $0 - local.get $2 + local.set $q + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 2112 - local.get $1 - local.get $6 - local.get $4 + local.get $num + local.get $q + local.get $base i64.mul i64.sub i32.wrap_i64 @@ -2549,58 +2549,58 @@ i32.add i32.load16_u i32.store16 - local.get $6 - local.set $1 - local.get $1 + local.get $q + local.set $num + local.get $num i64.const 0 i64.ne br_if $do-loop|1 end end ) - (func $~lib/number/I32#toString (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/number/I32#toString (param $this i32) (param $radix i32) (result i32) + local.get $this + local.get $radix call $~lib/util/number/itoa32 ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.get $1 + (func $~lib/util/string/compareImpl (param $str1 i32) (param $index1 i32) (param $str2 i32) (param $index2 i32) (param $len i32) (result i32) + (local $ptr1 i32) + (local $ptr2 i32) + (local $var$7 i32) + (local $a i32) + (local $b i32) + local.get $str1 + local.get $index1 i32.const 1 i32.shl i32.add - local.set $5 - local.get $2 - local.get $3 + local.set $ptr1 + local.get $str2 + local.get $index2 i32.const 1 i32.shl i32.add - local.set $6 + local.set $ptr2 i32.const 0 i32.const 2 i32.lt_s drop - local.get $4 + local.get $len i32.const 4 i32.ge_u if (result i32) - local.get $5 + local.get $ptr1 i32.const 7 i32.and - local.get $6 + local.get $ptr2 i32.const 7 i32.and i32.or @@ -2611,27 +2611,27 @@ if block $do-break|0 loop $do-loop|0 - local.get $5 + local.get $ptr1 i64.load - local.get $6 + local.get $ptr2 i64.load i64.ne if br $do-break|0 end - local.get $5 + local.get $ptr1 i32.const 8 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 8 i32.add - local.set $6 - local.get $4 + local.set $ptr2 + local.get $len i32.const 4 i32.sub - local.set $4 - local.get $4 + local.set $len + local.get $len i32.const 4 i32.ge_u br_if $do-loop|0 @@ -2639,59 +2639,59 @@ end end loop $while-continue|1 - local.get $4 - local.tee $7 + local.get $len + local.tee $var$7 i32.const 1 i32.sub - local.set $4 - local.get $7 - local.set $7 - local.get $7 + local.set $len + local.get $var$7 + local.set $var$7 + local.get $var$7 if - local.get $5 + local.get $ptr1 i32.load16_u - local.set $8 - local.get $6 + local.set $a + local.get $ptr2 i32.load16_u - local.set $9 - local.get $8 - local.get $9 + local.set $b + local.get $a + local.get $b i32.ne if - local.get $8 - local.get $9 + local.get $a + local.get $b i32.sub return end - local.get $5 + local.get $ptr1 i32.const 2 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 2 i32.add - local.set $6 + local.set $ptr2 br $while-continue|1 end end i32.const 0 ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__eq (param $left i32) (param $right i32) (result i32) + (local $leftLength i32) + local.get $left + local.get $right i32.eq if i32.const 1 return end - local.get $0 + local.get $left i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $1 + local.get $right i32.const 0 i32.eq end @@ -2699,22 +2699,22 @@ i32.const 0 return end - local.get $0 + local.get $left call $~lib/string/String#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $leftLength + local.get $leftLength + local.get $right call $~lib/string/String#get:length i32.ne if i32.const 0 return end - local.get $0 + local.get $left i32.const 0 - local.get $1 + local.get $right i32.const 0 - local.get $2 + local.get $leftLength call $~lib/util/string/compareImpl i32.eqz ) @@ -2726,7 +2726,7 @@ local.get $1 i32.store ) - (func $resolve-propertyaccess/Class#get:instanceProperty (param $0 i32) (result i32) + (func $resolve-propertyaccess/Class#get:instanceProperty (param $this i32) (result i32) i32.const 8 ) (func $~lib/rt/__visit_globals (param $0 i32) diff --git a/tests/compiler/resolve-ternary.debug.wat b/tests/compiler/resolve-ternary.debug.wat index 768f6c1c02..df9161c574 100644 --- a/tests/compiler/resolve-ternary.debug.wat +++ b/tests/compiler/resolve-ternary.debug.wat @@ -81,28 +81,28 @@ (elem $0 (i32.const 1) $start:resolve-ternary~anonymous|0 $start:resolve-ternary~anonymous|1 $resolve-ternary/g1 $resolve-ternary/g2) (export "memory" (memory $0)) (start $~start) - (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) - local.get $0 + (func $~lib/util/number/decimalCount32 (param $value i32) (result i32) + local.get $value i32.const 100000 i32.lt_u if - local.get $0 + local.get $value i32.const 100 i32.lt_u if i32.const 1 - local.get $0 + local.get $value i32.const 10 i32.ge_u i32.add return else i32.const 3 - local.get $0 + local.get $value i32.const 10000 i32.ge_u i32.add - local.get $0 + local.get $value i32.const 1000 i32.ge_u i32.add @@ -110,23 +110,23 @@ end unreachable else - local.get $0 + local.get $value i32.const 10000000 i32.lt_u if i32.const 6 - local.get $0 + local.get $value i32.const 1000000 i32.ge_u i32.add return else i32.const 8 - local.get $0 + local.get $value i32.const 1000000000 i32.ge_u i32.add - local.get $0 + local.get $value i32.const 100000000 i32.ge_u i32.add @@ -146,50 +146,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -202,58 +202,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -270,12 +270,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -285,19 +285,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -308,27 +308,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -336,35 +336,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -374,15 +374,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -392,25 +392,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -418,33 +418,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -472,23 +472,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -500,15 +500,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -520,33 +520,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -554,21 +554,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -583,36 +583,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -620,67 +620,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -690,22 +690,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -715,12 +715,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -732,75 +732,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -812,38 +812,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -857,12 +857,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -873,38 +873,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -912,21 +912,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -941,101 +941,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -1046,7 +1046,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1057,26 +1057,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1089,27 +1089,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1123,11 +1123,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1138,66 +1138,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1207,10 +1207,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1221,13 +1221,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1238,109 +1238,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1348,7 +1348,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1365,23 +1365,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1393,54 +1393,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1461,30 +1461,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1494,9 +1494,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1506,8 +1506,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1515,43 +1515,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1563,17 +1563,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1587,7 +1587,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1605,7 +1605,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1615,12 +1615,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1642,7 +1642,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1662,14 +1662,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1682,8 +1682,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1694,37 +1694,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1732,16 +1732,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1749,21 +1749,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1778,12 +1778,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1791,49 +1791,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1843,90 +1843,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1935,22 +1935,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1959,27 +1959,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1994,69 +1994,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2071,29 +2071,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2106,13 +2106,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2123,25 +2123,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2156,10 +2156,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2177,97 +2177,97 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/util/number/utoa32_dec_lut (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 i64) - (local $9 i64) - (local $10 i32) - (local $11 i32) + (func $~lib/util/number/utoa32_dec_lut (param $buffer i32) (param $num i32) (param $offset i32) + (local $var$3 i32) + (local $t i32) + (local $r i32) + (local $d1 i32) + (local $d2 i32) + (local $digits1 i64) + (local $digits2 i64) + (local $var$10 i32) + (local $var$11 i32) loop $while-continue|0 - local.get $1 + local.get $num i32.const 10000 i32.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $1 + local.get $num i32.const 10000 i32.div_u - local.set $4 - local.get $1 + local.set $t + local.get $num i32.const 10000 i32.rem_u - local.set $5 - local.get $4 - local.set $1 - local.get $5 + local.set $r + local.get $t + local.set $num + local.get $r i32.const 100 i32.div_u - local.set $6 - local.get $5 + local.set $d1 + local.get $r i32.const 100 i32.rem_u - local.set $7 + local.set $d2 i32.const 636 - local.get $6 + local.get $d1 i32.const 2 i32.shl i32.add i64.load32_u - local.set $8 + local.set $digits1 i32.const 636 - local.get $7 + local.get $d2 i32.const 2 i32.shl i32.add i64.load32_u - local.set $9 - local.get $2 + local.set $digits2 + local.get $offset i32.const 4 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $8 - local.get $9 + local.get $digits1 + local.get $digits2 i64.const 32 i64.shl i64.or @@ -2275,99 +2275,99 @@ br $while-continue|0 end end - local.get $1 + local.get $num i32.const 100 i32.ge_u if - local.get $1 + local.get $num i32.const 100 i32.div_u - local.set $3 - local.get $1 + local.set $var$3 + local.get $num i32.const 100 i32.rem_u - local.set $10 - local.get $3 - local.set $1 - local.get $2 + local.set $var$10 + local.get $var$3 + local.set $num + local.get $offset i32.const 2 i32.sub - local.set $2 + local.set $offset i32.const 636 - local.get $10 + local.get $var$10 i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store end - local.get $1 + local.get $num i32.const 10 i32.ge_u if - local.get $2 + local.get $offset i32.const 2 i32.sub - local.set $2 + local.set $offset i32.const 636 - local.get $1 + local.get $num i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store else - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 + local.set $offset i32.const 48 - local.get $1 + local.get $num i32.add - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store16 end ) - (func $~lib/util/number/utoa_hex_lut (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i32) + (func $~lib/util/number/utoa_hex_lut (param $buffer i32) (param $num i64) (param $offset i32) + (local $var$3 i32) loop $while-continue|0 - local.get $2 + local.get $offset i32.const 2 i32.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $2 + local.get $offset i32.const 2 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 1056 - local.get $1 + local.get $num i32.wrap_i64 i32.const 255 i32.and @@ -2376,20 +2376,20 @@ i32.add i32.load i32.store - local.get $1 + local.get $num i64.const 8 i64.shr_u - local.set $1 + local.set $num br $while-continue|0 end end - local.get $2 + local.get $offset i32.const 1 i32.and if - local.get $0 + local.get $buffer i32.const 1056 - local.get $1 + local.get $num i32.wrap_i64 i32.const 6 i32.shl @@ -2398,25 +2398,25 @@ i32.store16 end ) - (func $~lib/util/number/ulog_base (param $0 i64) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) - (local $4 i64) - (local $5 i32) - local.get $1 - local.set $2 - local.get $2 + (func $~lib/util/number/ulog_base (param $num i64) (param $base i32) (result i32) + (local $var$2 i32) + (local $b64 i64) + (local $b i64) + (local $e i32) + local.get $base + local.set $var$2 + local.get $var$2 i32.popcnt i32.const 1 i32.eq if i32.const 63 - local.get $0 + local.get $num i64.clz i32.wrap_i64 i32.sub i32.const 31 - local.get $1 + local.get $base i32.clz i32.sub i32.div_u @@ -2424,95 +2424,95 @@ i32.add return end - local.get $1 + local.get $base i64.extend_i32_s - local.set $3 - local.get $3 - local.set $4 + local.set $b64 + local.get $b64 + local.set $b i32.const 1 - local.set $5 + local.set $e loop $while-continue|0 - local.get $0 - local.get $4 + local.get $num + local.get $b i64.ge_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 - local.get $4 + local.get $num + local.get $b i64.div_u - local.set $0 - local.get $4 - local.get $4 + local.set $num + local.get $b + local.get $b i64.mul - local.set $4 - local.get $5 + local.set $b + local.get $e i32.const 1 i32.shl - local.set $5 + local.set $e br $while-continue|0 end end loop $while-continue|1 - local.get $0 + local.get $num i64.const 1 i64.ge_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 - local.get $3 + local.get $num + local.get $b64 i64.div_u - local.set $0 - local.get $5 + local.set $num + local.get $e i32.const 1 i32.add - local.set $5 + local.set $e br $while-continue|1 end end - local.get $5 + local.get $e i32.const 1 i32.sub ) - (func $~lib/util/number/utoa64_any_core (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i32) - (local $4 i64) - (local $5 i64) - (local $6 i64) - local.get $3 + (func $~lib/util/number/utoa64_any_core (param $buffer i32) (param $num i64) (param $offset i32) (param $radix i32) + (local $base i64) + (local $var$5 i64) + (local $q i64) + local.get $radix i64.extend_i32_s - local.set $4 - local.get $3 - local.get $3 + local.set $base + local.get $radix + local.get $radix i32.const 1 i32.sub i32.and i32.const 0 i32.eq if - local.get $3 + local.get $radix i32.ctz i32.const 7 i32.and i64.extend_i32_s - local.set $5 - local.get $4 + local.set $var$5 + local.get $base i64.const 1 i64.sub - local.set $6 + local.set $q loop $do-loop|0 - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 2112 - local.get $1 - local.get $6 + local.get $num + local.get $q i64.and i32.wrap_i64 i32.const 1 @@ -2520,34 +2520,34 @@ i32.add i32.load16_u i32.store16 - local.get $1 - local.get $5 + local.get $num + local.get $var$5 i64.shr_u - local.set $1 - local.get $1 + local.set $num + local.get $num i64.const 0 i64.ne br_if $do-loop|0 end else loop $do-loop|1 - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 - local.get $1 - local.get $4 + local.set $offset + local.get $num + local.get $base i64.div_u - local.set $6 - local.get $0 - local.get $2 + local.set $q + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 2112 - local.get $1 - local.get $6 - local.get $4 + local.get $num + local.get $q + local.get $base i64.mul i64.sub i32.wrap_i64 @@ -2556,58 +2556,58 @@ i32.add i32.load16_u i32.store16 - local.get $6 - local.set $1 - local.get $1 + local.get $q + local.set $num + local.get $num i64.const 0 i64.ne br_if $do-loop|1 end end ) - (func $~lib/number/I32#toString (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/number/I32#toString (param $this i32) (param $radix i32) (result i32) + local.get $this + local.get $radix call $~lib/util/number/itoa32 ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.get $1 + (func $~lib/util/string/compareImpl (param $str1 i32) (param $index1 i32) (param $str2 i32) (param $index2 i32) (param $len i32) (result i32) + (local $ptr1 i32) + (local $ptr2 i32) + (local $var$7 i32) + (local $a i32) + (local $b i32) + local.get $str1 + local.get $index1 i32.const 1 i32.shl i32.add - local.set $5 - local.get $2 - local.get $3 + local.set $ptr1 + local.get $str2 + local.get $index2 i32.const 1 i32.shl i32.add - local.set $6 + local.set $ptr2 i32.const 0 i32.const 2 i32.lt_s drop - local.get $4 + local.get $len i32.const 4 i32.ge_u if (result i32) - local.get $5 + local.get $ptr1 i32.const 7 i32.and - local.get $6 + local.get $ptr2 i32.const 7 i32.and i32.or @@ -2618,27 +2618,27 @@ if block $do-break|0 loop $do-loop|0 - local.get $5 + local.get $ptr1 i64.load - local.get $6 + local.get $ptr2 i64.load i64.ne if br $do-break|0 end - local.get $5 + local.get $ptr1 i32.const 8 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 8 i32.add - local.set $6 - local.get $4 + local.set $ptr2 + local.get $len i32.const 4 i32.sub - local.set $4 - local.get $4 + local.set $len + local.get $len i32.const 4 i32.ge_u br_if $do-loop|0 @@ -2646,59 +2646,59 @@ end end loop $while-continue|1 - local.get $4 - local.tee $7 + local.get $len + local.tee $var$7 i32.const 1 i32.sub - local.set $4 - local.get $7 - local.set $7 - local.get $7 + local.set $len + local.get $var$7 + local.set $var$7 + local.get $var$7 if - local.get $5 + local.get $ptr1 i32.load16_u - local.set $8 - local.get $6 + local.set $a + local.get $ptr2 i32.load16_u - local.set $9 - local.get $8 - local.get $9 + local.set $b + local.get $a + local.get $b i32.ne if - local.get $8 - local.get $9 + local.get $a + local.get $b i32.sub return end - local.get $5 + local.get $ptr1 i32.const 2 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 2 i32.add - local.set $6 + local.set $ptr2 br $while-continue|1 end end i32.const 0 ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__eq (param $left i32) (param $right i32) (result i32) + (local $leftLength i32) + local.get $left + local.get $right i32.eq if i32.const 1 return end - local.get $0 + local.get $left i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $1 + local.get $right i32.const 0 i32.eq end @@ -2706,85 +2706,85 @@ i32.const 0 return end - local.get $0 + local.get $left call $~lib/string/String#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $leftLength + local.get $leftLength + local.get $right call $~lib/string/String#get:length i32.ne if i32.const 0 return end - local.get $0 + local.get $left i32.const 0 - local.get $1 + local.get $right i32.const 0 - local.get $2 + local.get $leftLength call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i64) - (local $11 i32) - (local $12 i64) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i32) - (local $24 i32) - (local $25 i32) - (local $26 i32) - (local $27 i64) + (func $~lib/util/number/genDigits (param $buffer i32) (param $w_frc i64) (param $w_exp i32) (param $mp_frc i64) (param $mp_exp i32) (param $delta i64) (param $sign i32) (result i32) + (local $one_exp i32) + (local $one_frc i64) + (local $mask i64) + (local $wp_w_frc i64) + (local $p1 i32) + (local $p2 i64) + (local $kappa i32) + (local $len i32) + (local $var$15 i32) + (local $d i32) + (local $var$17 i32) + (local $tmp i64) + (local $var$19 i64) + (local $var$20 i64) + (local $var$21 i64) + (local $d_0 i64) + (local $var$23 i32) + (local $var$24 i32) + (local $var$25 i32) + (local $var$26 i32) + (local $var$27 i64) i32.const 0 - local.get $4 + local.get $mp_exp i32.sub - local.set $7 + local.set $one_exp i64.const 1 - local.get $7 + local.get $one_exp i64.extend_i32_s i64.shl - local.set $8 - local.get $8 + local.set $one_frc + local.get $one_frc i64.const 1 i64.sub - local.set $9 - local.get $3 - local.get $1 + local.set $mask + local.get $mp_frc + local.get $w_frc i64.sub - local.set $10 - local.get $3 - local.get $7 + local.set $wp_w_frc + local.get $mp_frc + local.get $one_exp i64.extend_i32_s i64.shr_u i32.wrap_i64 - local.set $11 - local.get $3 - local.get $9 + local.set $p1 + local.get $mp_frc + local.get $mask i64.and - local.set $12 - local.get $11 + local.set $p2 + local.get $p1 call $~lib/util/number/decimalCount32 - local.set $13 - local.get $6 - local.set $14 + local.set $kappa + local.get $sign + local.set $len loop $while-continue|0 - local.get $13 + local.get $kappa i32.const 0 i32.gt_s - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 if block $break|1 block $case10|1 @@ -2798,275 +2798,275 @@ block $case2|1 block $case1|1 block $case0|1 - local.get $13 - local.set $17 - local.get $17 + local.get $kappa + local.set $var$17 + local.get $var$17 i32.const 10 i32.eq br_if $case0|1 - local.get $17 + local.get $var$17 i32.const 9 i32.eq br_if $case1|1 - local.get $17 + local.get $var$17 i32.const 8 i32.eq br_if $case2|1 - local.get $17 + local.get $var$17 i32.const 7 i32.eq br_if $case3|1 - local.get $17 + local.get $var$17 i32.const 6 i32.eq br_if $case4|1 - local.get $17 + local.get $var$17 i32.const 5 i32.eq br_if $case5|1 - local.get $17 + local.get $var$17 i32.const 4 i32.eq br_if $case6|1 - local.get $17 + local.get $var$17 i32.const 3 i32.eq br_if $case7|1 - local.get $17 + local.get $var$17 i32.const 2 i32.eq br_if $case8|1 - local.get $17 + local.get $var$17 i32.const 1 i32.eq br_if $case9|1 br $case10|1 end - local.get $11 + local.get $p1 i32.const 1000000000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 1000000000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 100000000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 100000000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 10000000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 10000000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 1000000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 1000000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 100000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 100000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 10000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 10000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 1000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 1000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 100 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 100 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 10 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 10 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 - local.set $16 + local.get $p1 + local.set $d i32.const 0 - local.set $11 + local.set $p1 br $break|1 end i32.const 0 - local.set $16 + local.set $d br $break|1 end - local.get $16 - local.get $14 + local.get $d + local.get $len i32.or if - local.get $0 - local.get $14 - local.tee $17 + local.get $buffer + local.get $len + local.tee $var$17 i32.const 1 i32.add - local.set $14 - local.get $17 + local.set $len + local.get $var$17 i32.const 1 i32.shl i32.add i32.const 48 - local.get $16 + local.get $d i32.const 65535 i32.and i32.add i32.store16 end - local.get $13 + local.get $kappa i32.const 1 i32.sub - local.set $13 - local.get $11 + local.set $kappa + local.get $p1 i64.extend_i32_u - local.get $7 + local.get $one_exp i64.extend_i32_s i64.shl - local.get $12 + local.get $p2 i64.add - local.set $18 - local.get $18 - local.get $5 + local.set $tmp + local.get $tmp + local.get $delta i64.le_u if global.get $~lib/util/number/_K - local.get $13 + local.get $kappa i32.add global.set $~lib/util/number/_K - local.get $0 - local.set $23 - local.get $14 - local.set $17 - local.get $5 - local.set $22 - local.get $18 - local.set $21 + local.get $buffer + local.set $var$23 + local.get $len + local.set $var$17 + local.get $delta + local.set $d_0 + local.get $tmp + local.set $var$21 i32.const 3376 - local.get $13 + local.get $kappa i32.const 2 i32.shl i32.add i64.load32_u - local.get $7 + local.get $one_exp i64.extend_i32_s i64.shl - local.set $20 - local.get $10 - local.set $19 - local.get $23 - local.get $17 + local.set $var$20 + local.get $wp_w_frc + local.set $var$19 + local.get $var$23 + local.get $var$17 i32.const 1 i32.sub i32.const 1 i32.shl i32.add - local.set $24 - local.get $24 + local.set $var$24 + local.get $var$24 i32.load16_u - local.set $25 + local.set $var$25 loop $while-continue|3 - local.get $21 - local.get $19 + local.get $var$21 + local.get $var$19 i64.lt_u if (result i32) - local.get $22 - local.get $21 + local.get $d_0 + local.get $var$21 i64.sub - local.get $20 + local.get $var$20 i64.ge_u else i32.const 0 end if (result i32) - local.get $21 - local.get $20 + local.get $var$21 + local.get $var$20 i64.add - local.get $19 + local.get $var$19 i64.lt_u if (result i32) i32.const 1 else - local.get $19 - local.get $21 + local.get $var$19 + local.get $var$21 i64.sub - local.get $21 - local.get $20 + local.get $var$21 + local.get $var$20 i64.add - local.get $19 + local.get $var$19 i64.sub i64.gt_u end else i32.const 0 end - local.set $26 - local.get $26 + local.set $var$26 + local.get $var$26 if - local.get $25 + local.get $var$25 i32.const 1 i32.sub - local.set $25 - local.get $21 - local.get $20 + local.set $var$25 + local.get $var$21 + local.get $var$20 i64.add - local.set $21 + local.set $var$21 br $while-continue|3 end end - local.get $24 - local.get $25 + local.get $var$24 + local.get $var$25 i32.store16 - local.get $14 + local.get $len return end br $while-continue|0 @@ -3074,150 +3074,150 @@ end loop $while-continue|4 i32.const 1 - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 if - local.get $12 + local.get $p2 i64.const 10 i64.mul - local.set $12 - local.get $5 + local.set $p2 + local.get $delta i64.const 10 i64.mul - local.set $5 - local.get $12 - local.get $7 + local.set $delta + local.get $p2 + local.get $one_exp i64.extend_i32_s i64.shr_u - local.set $22 - local.get $22 - local.get $14 + local.set $d_0 + local.get $d_0 + local.get $len i64.extend_i32_s i64.or i64.const 0 i64.ne if - local.get $0 - local.get $14 - local.tee $25 + local.get $buffer + local.get $len + local.tee $var$25 i32.const 1 i32.add - local.set $14 - local.get $25 + local.set $len + local.get $var$25 i32.const 1 i32.shl i32.add i32.const 48 - local.get $22 + local.get $d_0 i32.wrap_i64 i32.const 65535 i32.and i32.add i32.store16 end - local.get $12 - local.get $9 + local.get $p2 + local.get $mask i64.and - local.set $12 - local.get $13 + local.set $p2 + local.get $kappa i32.const 1 i32.sub - local.set $13 - local.get $12 - local.get $5 + local.set $kappa + local.get $p2 + local.get $delta i64.lt_u if global.get $~lib/util/number/_K - local.get $13 + local.get $kappa i32.add global.set $~lib/util/number/_K - local.get $10 + local.get $wp_w_frc i32.const 3376 i32.const 0 - local.get $13 + local.get $kappa i32.sub i32.const 2 i32.shl i32.add i64.load32_u i64.mul - local.set $10 - local.get $0 - local.set $17 - local.get $14 - local.set $26 - local.get $5 - local.set $27 - local.get $12 - local.set $21 - local.get $8 - local.set $20 - local.get $10 - local.set $19 - local.get $17 - local.get $26 + local.set $wp_w_frc + local.get $buffer + local.set $var$17 + local.get $len + local.set $var$26 + local.get $delta + local.set $var$27 + local.get $p2 + local.set $var$21 + local.get $one_frc + local.set $var$20 + local.get $wp_w_frc + local.set $var$19 + local.get $var$17 + local.get $var$26 i32.const 1 i32.sub i32.const 1 i32.shl i32.add - local.set $25 - local.get $25 + local.set $var$25 + local.get $var$25 i32.load16_u - local.set $24 + local.set $var$24 loop $while-continue|6 - local.get $21 - local.get $19 + local.get $var$21 + local.get $var$19 i64.lt_u if (result i32) - local.get $27 - local.get $21 + local.get $var$27 + local.get $var$21 i64.sub - local.get $20 + local.get $var$20 i64.ge_u else i32.const 0 end if (result i32) - local.get $21 - local.get $20 + local.get $var$21 + local.get $var$20 i64.add - local.get $19 + local.get $var$19 i64.lt_u if (result i32) i32.const 1 else - local.get $19 - local.get $21 + local.get $var$19 + local.get $var$21 i64.sub - local.get $21 - local.get $20 + local.get $var$21 + local.get $var$20 i64.add - local.get $19 + local.get $var$19 i64.sub i64.gt_u end else i32.const 0 end - local.set $23 - local.get $23 + local.set $var$23 + local.get $var$23 if - local.get $24 + local.get $var$24 i32.const 1 i32.sub - local.set $24 - local.get $21 - local.get $20 + local.set $var$24 + local.get $var$21 + local.get $var$20 i64.add - local.set $21 + local.set $var$21 br $while-continue|6 end end - local.get $25 - local.get $24 + local.get $var$25 + local.get $var$24 i32.store16 - local.get $14 + local.get $len return end br $while-continue|4 @@ -3225,21 +3225,21 @@ end unreachable ) - (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $2 + (func $~lib/util/number/prettify (param $buffer i32) (param $length i32) (param $k i32) (result i32) + (local $kk i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $k i32.eqz if - local.get $0 - local.get $1 + local.get $buffer + local.get $length i32.const 1 i32.shl i32.add @@ -3249,51 +3249,51 @@ i32.shl i32.or i32.store - local.get $1 + local.get $length i32.const 2 i32.add return end - local.get $1 - local.get $2 + local.get $length + local.get $k i32.add - local.set $3 - local.get $1 - local.get $3 + local.set $kk + local.get $length + local.get $kk i32.le_s if (result i32) - local.get $3 + local.get $kk i32.const 21 i32.le_s else i32.const 0 end if - local.get $1 - local.set $4 + local.get $length + local.set $var$4 loop $for-loop|0 - local.get $4 - local.get $3 + local.get $var$4 + local.get $kk i32.lt_s - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $0 - local.get $4 + local.get $buffer + local.get $var$4 i32.const 1 i32.shl i32.add i32.const 48 i32.store16 - local.get $4 + local.get $var$4 i32.const 1 i32.add - local.set $4 + local.set $var$4 br $for-loop|0 end end - local.get $0 - local.get $3 + local.get $buffer + local.get $kk i32.const 1 i32.shl i32.add @@ -3303,55 +3303,55 @@ i32.shl i32.or i32.store - local.get $3 + local.get $kk i32.const 2 i32.add return else - local.get $3 + local.get $kk i32.const 0 i32.gt_s if (result i32) - local.get $3 + local.get $kk i32.const 21 i32.le_s else i32.const 0 end if - local.get $0 - local.get $3 + local.get $buffer + local.get $kk i32.const 1 i32.shl i32.add - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 i32.const 2 i32.add - local.get $4 + local.get $var$4 i32.const 0 - local.get $2 + local.get $k i32.sub i32.const 1 i32.shl memory.copy - local.get $0 - local.get $3 + local.get $buffer + local.get $kk i32.const 1 i32.shl i32.add i32.const 46 i32.store16 - local.get $1 + local.get $length i32.const 1 i32.add return else i32.const -6 - local.get $3 + local.get $kk i32.lt_s if (result i32) - local.get $3 + local.get $kk i32.const 0 i32.le_s else @@ -3359,20 +3359,20 @@ end if i32.const 2 - local.get $3 + local.get $kk i32.sub - local.set $4 - local.get $0 - local.get $4 + local.set $var$4 + local.get $buffer + local.get $var$4 i32.const 1 i32.shl i32.add - local.get $0 - local.get $1 + local.get $buffer + local.get $length i32.const 1 i32.shl memory.copy - local.get $0 + local.get $buffer i32.const 48 i32.const 46 i32.const 16 @@ -3380,164 +3380,164 @@ i32.or i32.store i32.const 2 - local.set $5 + local.set $var$5 loop $for-loop|1 - local.get $5 - local.get $4 + local.get $var$5 + local.get $var$4 i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $5 + local.get $buffer + local.get $var$5 i32.const 1 i32.shl i32.add i32.const 48 i32.store16 - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|1 end end - local.get $1 - local.get $4 + local.get $length + local.get $var$4 i32.add return else - local.get $1 + local.get $length i32.const 1 i32.eq if - local.get $0 + local.get $buffer i32.const 101 i32.store16 offset=2 - local.get $0 + local.get $buffer i32.const 4 i32.add - local.set $5 - local.get $3 + local.set $var$5 + local.get $kk i32.const 1 i32.sub - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 i32.const 0 i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if i32.const 0 - local.get $6 + local.get $var$6 i32.sub - local.set $6 + local.set $var$6 end - local.get $6 + local.get $var$6 call $~lib/util/number/decimalCount32 i32.const 1 i32.add - local.set $7 - local.get $5 - local.set $10 - local.get $6 - local.set $9 - local.get $7 - local.set $8 + local.set $var$7 + local.get $var$5 + local.set $var$10 + local.get $var$6 + local.set $var$9 + local.get $var$7 + local.set $var$8 i32.const 0 i32.const 1 i32.ge_s drop - local.get $10 - local.get $9 - local.get $8 + local.get $var$10 + local.get $var$9 + local.get $var$8 call $~lib/util/number/utoa32_dec_lut - local.get $5 + local.get $var$5 i32.const 45 i32.const 43 - local.get $4 + local.get $var$4 select i32.store16 - local.get $7 - local.set $1 - local.get $1 + local.get $var$7 + local.set $length + local.get $length i32.const 2 i32.add return else - local.get $1 + local.get $length i32.const 1 i32.shl - local.set $7 - local.get $0 + local.set $var$7 + local.get $buffer i32.const 4 i32.add - local.get $0 + local.get $buffer i32.const 2 i32.add - local.get $7 + local.get $var$7 i32.const 2 i32.sub memory.copy - local.get $0 + local.get $buffer i32.const 46 i32.store16 offset=2 - local.get $0 - local.get $7 + local.get $buffer + local.get $var$7 i32.add i32.const 101 i32.store16 offset=2 - local.get $1 - local.get $0 - local.get $7 + local.get $length + local.get $buffer + local.get $var$7 i32.add i32.const 4 i32.add - local.set $9 - local.get $3 + local.set $var$9 + local.get $kk i32.const 1 i32.sub - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 i32.const 0 i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if i32.const 0 - local.get $8 + local.get $var$8 i32.sub - local.set $8 + local.set $var$8 end - local.get $8 + local.get $var$8 call $~lib/util/number/decimalCount32 i32.const 1 i32.add - local.set $5 - local.get $9 - local.set $11 - local.get $8 - local.set $6 - local.get $5 - local.set $10 + local.set $var$5 + local.get $var$9 + local.set $var$11 + local.get $var$8 + local.set $var$6 + local.get $var$5 + local.set $var$10 i32.const 0 i32.const 1 i32.ge_s drop - local.get $11 - local.get $6 - local.get $10 + local.get $var$11 + local.get $var$6 + local.get $var$10 call $~lib/util/number/utoa32_dec_lut - local.get $9 + local.get $var$9 i32.const 45 i32.const 43 - local.get $4 + local.get $var$4 select i32.store16 - local.get $5 + local.get $var$5 i32.add - local.set $1 - local.get $1 + local.set $length + local.get $length i32.const 2 i32.add return @@ -3550,453 +3550,453 @@ end unreachable ) - (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f64) - (local $6 i64) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i32) - (local $11 i64) - (local $12 i64) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 f64) - (local $17 i64) - (local $18 i64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i64) - (local $24 i64) - (local $25 i64) - (local $26 i32) - (local $27 i64) - (local $28 i32) - local.get $1 + (func $~lib/util/number/dtoa_core (param $buffer i32) (param $value f64) (result i32) + (local $sign i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 f64) + (local $var$6 i64) + (local $var$7 i32) + (local $var$8 i64) + (local $var$9 i64) + (local $var$10 i32) + (local $var$11 i64) + (local $var$12 i64) + (local $var$13 i32) + (local $var$14 i32) + (local $var$15 i32) + (local $var$16 f64) + (local $var$17 i64) + (local $var$18 i64) + (local $var$19 i64) + (local $var$20 i64) + (local $var$21 i64) + (local $var$22 i64) + (local $var$23 i64) + (local $var$24 i64) + (local $var$25 i64) + (local $var$26 i32) + (local $var$27 i64) + (local $len i32) + local.get $value f64.const 0 f64.lt - local.set $2 - local.get $2 + local.set $sign + local.get $sign if - local.get $1 + local.get $value f64.neg - local.set $1 - local.get $0 + local.set $value + local.get $buffer i32.const 45 i32.store16 end - local.get $1 - local.set $5 - local.get $0 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.get $value + local.set $var$5 + local.get $buffer + local.set $var$4 + local.get $sign + local.set $var$3 + local.get $var$5 i64.reinterpret_f64 - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 i64.const 9218868437227405312 i64.and i64.const 52 i64.shr_u i32.wrap_i64 - local.set $7 - local.get $6 + local.set $var$7 + local.get $var$6 i64.const 4503599627370495 i64.and - local.set $8 - local.get $7 + local.set $var$8 + local.get $var$7 i32.const 0 i32.ne i64.extend_i32_u i64.const 52 i64.shl - local.get $8 + local.get $var$8 i64.add - local.set $9 - local.get $7 + local.set $var$9 + local.get $var$7 i32.const 1 - local.get $7 + local.get $var$7 select i32.const 1023 i32.const 52 i32.add i32.sub - local.set $7 - local.get $9 - local.set $11 - local.get $7 - local.set $10 - local.get $11 + local.set $var$7 + local.get $var$9 + local.set $var$11 + local.get $var$7 + local.set $var$10 + local.get $var$11 i64.const 1 i64.shl i64.const 1 i64.add - local.set $12 - local.get $10 + local.set $var$12 + local.get $var$10 i32.const 1 i32.sub - local.set $13 - local.get $12 + local.set $var$13 + local.get $var$12 i64.clz i32.wrap_i64 - local.set $14 - local.get $12 - local.get $14 + local.set $var$14 + local.get $var$12 + local.get $var$14 i64.extend_i32_s i64.shl - local.set $12 - local.get $13 - local.get $14 + local.set $var$12 + local.get $var$13 + local.get $var$14 i32.sub - local.set $13 + local.set $var$13 i32.const 1 - local.get $11 + local.get $var$11 i64.const 4503599627370496 i64.eq i32.add - local.set $15 - local.get $12 + local.set $var$15 + local.get $var$12 global.set $~lib/util/number/_frc_plus - local.get $11 - local.get $15 + local.get $var$11 + local.get $var$15 i64.extend_i32_s i64.shl i64.const 1 i64.sub - local.get $10 - local.get $15 + local.get $var$10 + local.get $var$15 i32.sub - local.get $13 + local.get $var$13 i32.sub i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_minus - local.get $13 + local.get $var$13 global.set $~lib/util/number/_exp global.get $~lib/util/number/_exp - local.set $10 + local.set $var$10 i32.const -61 - local.get $10 + local.get $var$10 i32.sub f64.convert_i32_s f64.const 0.30102999566398114 f64.mul f64.const 347 f64.add - local.set $16 - local.get $16 + local.set $var$16 + local.get $var$16 i32.trunc_sat_f64_s - local.set $15 - local.get $15 - local.get $15 + local.set $var$15 + local.get $var$15 + local.get $var$15 f64.convert_i32_s - local.get $16 + local.get $var$16 f64.ne i32.add - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 i32.const 3 i32.shr_s i32.const 1 i32.add - local.set $14 + local.set $var$14 i32.const 348 - local.get $14 + local.get $var$14 i32.const 3 i32.shl i32.sub global.set $~lib/util/number/_K i32.const 2504 - local.get $14 + local.get $var$14 i32.const 3 i32.shl i32.add i64.load global.set $~lib/util/number/_frc_pow i32.const 3200 - local.get $14 + local.get $var$14 i32.const 1 i32.shl i32.add i32.load16_s global.set $~lib/util/number/_exp_pow - local.get $9 + local.get $var$9 i64.clz i32.wrap_i64 - local.set $14 - local.get $9 - local.get $14 + local.set $var$14 + local.get $var$9 + local.get $var$14 i64.extend_i32_s i64.shl - local.set $9 - local.get $7 - local.get $14 + local.set $var$9 + local.get $var$7 + local.get $var$14 i32.sub - local.set $7 + local.set $var$7 global.get $~lib/util/number/_frc_pow - local.set $12 + local.set $var$12 global.get $~lib/util/number/_exp_pow - local.set $15 - local.get $9 - local.set $17 - local.get $12 - local.set $11 - local.get $17 + local.set $var$15 + local.get $var$9 + local.set $var$17 + local.get $var$12 + local.set $var$11 + local.get $var$17 i64.const 4294967295 i64.and - local.set $18 - local.get $11 + local.set $var$18 + local.get $var$11 i64.const 4294967295 i64.and - local.set $19 - local.get $17 + local.set $var$19 + local.get $var$17 i64.const 32 i64.shr_u - local.set $20 - local.get $11 + local.set $var$20 + local.get $var$11 i64.const 32 i64.shr_u - local.set $21 - local.get $18 - local.get $19 + local.set $var$21 + local.get $var$18 + local.get $var$19 i64.mul - local.set $22 - local.get $20 - local.get $19 + local.set $var$22 + local.get $var$20 + local.get $var$19 i64.mul - local.get $22 + local.get $var$22 i64.const 32 i64.shr_u i64.add - local.set $23 - local.get $18 - local.get $21 + local.set $var$23 + local.get $var$18 + local.get $var$21 i64.mul - local.get $23 + local.get $var$23 i64.const 4294967295 i64.and i64.add - local.set $24 - local.get $24 + local.set $var$24 + local.get $var$24 i64.const 2147483647 i64.add - local.set $24 - local.get $23 + local.set $var$24 + local.get $var$23 i64.const 32 i64.shr_u - local.set $23 - local.get $24 + local.set $var$23 + local.get $var$24 i64.const 32 i64.shr_u - local.set $24 - local.get $20 - local.get $21 + local.set $var$24 + local.get $var$20 + local.get $var$21 i64.mul - local.get $23 + local.get $var$23 i64.add - local.get $24 + local.get $var$24 i64.add - local.set $24 - local.get $7 - local.set $10 - local.get $15 - local.set $13 - local.get $10 - local.get $13 + local.set $var$24 + local.get $var$7 + local.set $var$10 + local.get $var$15 + local.set $var$13 + local.get $var$10 + local.get $var$13 i32.add i32.const 64 i32.add - local.set $10 + local.set $var$10 global.get $~lib/util/number/_frc_plus - local.set $17 - local.get $12 - local.set $11 - local.get $17 + local.set $var$17 + local.get $var$12 + local.set $var$11 + local.get $var$17 i64.const 4294967295 i64.and - local.set $23 - local.get $11 + local.set $var$23 + local.get $var$11 i64.const 4294967295 i64.and - local.set $22 - local.get $17 + local.set $var$22 + local.get $var$17 i64.const 32 i64.shr_u - local.set $21 - local.get $11 + local.set $var$21 + local.get $var$11 i64.const 32 i64.shr_u - local.set $20 - local.get $23 - local.get $22 + local.set $var$20 + local.get $var$23 + local.get $var$22 i64.mul - local.set $19 - local.get $21 - local.get $22 + local.set $var$19 + local.get $var$21 + local.get $var$22 i64.mul - local.get $19 + local.get $var$19 i64.const 32 i64.shr_u i64.add - local.set $18 - local.get $23 - local.get $20 + local.set $var$18 + local.get $var$23 + local.get $var$20 i64.mul - local.get $18 + local.get $var$18 i64.const 4294967295 i64.and i64.add - local.set $25 - local.get $25 + local.set $var$25 + local.get $var$25 i64.const 2147483647 i64.add - local.set $25 - local.get $18 + local.set $var$25 + local.get $var$18 i64.const 32 i64.shr_u - local.set $18 - local.get $25 + local.set $var$18 + local.get $var$25 i64.const 32 i64.shr_u - local.set $25 - local.get $21 - local.get $20 + local.set $var$25 + local.get $var$21 + local.get $var$20 i64.mul - local.get $18 + local.get $var$18 i64.add - local.get $25 + local.get $var$25 i64.add i64.const 1 i64.sub - local.set $25 + local.set $var$25 global.get $~lib/util/number/_exp - local.set $26 - local.get $15 - local.set $13 - local.get $26 - local.get $13 + local.set $var$26 + local.get $var$15 + local.set $var$13 + local.get $var$26 + local.get $var$13 i32.add i32.const 64 i32.add - local.set $26 + local.set $var$26 global.get $~lib/util/number/_frc_minus - local.set $17 - local.get $12 - local.set $11 - local.get $17 + local.set $var$17 + local.get $var$12 + local.set $var$11 + local.get $var$17 i64.const 4294967295 i64.and - local.set $18 - local.get $11 + local.set $var$18 + local.get $var$11 i64.const 4294967295 i64.and - local.set $19 - local.get $17 + local.set $var$19 + local.get $var$17 i64.const 32 i64.shr_u - local.set $20 - local.get $11 + local.set $var$20 + local.get $var$11 i64.const 32 i64.shr_u - local.set $21 - local.get $18 - local.get $19 + local.set $var$21 + local.get $var$18 + local.get $var$19 i64.mul - local.set $22 - local.get $20 - local.get $19 + local.set $var$22 + local.get $var$20 + local.get $var$19 i64.mul - local.get $22 + local.get $var$22 i64.const 32 i64.shr_u i64.add - local.set $23 - local.get $18 - local.get $21 + local.set $var$23 + local.get $var$18 + local.get $var$21 i64.mul - local.get $23 + local.get $var$23 i64.const 4294967295 i64.and i64.add - local.set $27 - local.get $27 + local.set $var$27 + local.get $var$27 i64.const 2147483647 i64.add - local.set $27 - local.get $23 + local.set $var$27 + local.get $var$23 i64.const 32 i64.shr_u - local.set $23 - local.get $27 + local.set $var$23 + local.get $var$27 i64.const 32 i64.shr_u - local.set $27 - local.get $20 - local.get $21 + local.set $var$27 + local.get $var$20 + local.get $var$21 i64.mul - local.get $23 + local.get $var$23 i64.add - local.get $27 + local.get $var$27 i64.add i64.const 1 i64.add - local.set $27 - local.get $25 - local.get $27 + local.set $var$27 + local.get $var$25 + local.get $var$27 i64.sub - local.set $23 - local.get $4 - local.get $24 - local.get $10 - local.get $25 - local.get $26 - local.get $23 - local.get $3 + local.set $var$23 + local.get $var$4 + local.get $var$24 + local.get $var$10 + local.get $var$25 + local.get $var$26 + local.get $var$23 + local.get $var$3 call $~lib/util/number/genDigits - local.set $28 - local.get $0 - local.get $2 + local.set $len + local.get $buffer + local.get $sign i32.const 1 i32.shl i32.add - local.get $28 - local.get $2 + local.get $len + local.get $sign i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.set $28 - local.get $28 - local.get $2 + local.set $len + local.get $len + local.get $sign i32.add ) - (func $~lib/number/F64#toString (param $0 f64) (param $1 i32) (result i32) - local.get $0 + (func $~lib/number/F64#toString (param $this f64) (param $radix i32) (result i32) + local.get $this call $~lib/util/number/dtoa ) - (func $start:resolve-ternary~anonymous|0 (param $0 i32) (result i32) - local.get $0 + (func $start:resolve-ternary~anonymous|0 (param $x i32) (result i32) + local.get $x i32.const 1 i32.add ) - (func $start:resolve-ternary~anonymous|1 (param $0 i32) (result i32) - local.get $0 + (func $start:resolve-ternary~anonymous|1 (param $x i32) (result i32) + local.get $x i32.const 2 i32.add ) - (func $resolve-ternary/g1 (param $0 i32) (result i32) - local.get $0 + (func $resolve-ternary/g1 (param $x i32) (result i32) + local.get $x i32.const 3 i32.add ) - (func $resolve-ternary/g2 (param $0 i32) (result i32) - local.get $0 + (func $resolve-ternary/g2 (param $x i32) (result i32) + local.get $x i32.const 4 i32.add ) @@ -4026,10 +4026,10 @@ call $~lib/rt/itcms/__visit end ) - (func $~lib/function/Function<%28i32%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i32%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i32%29=>i32>~visit (param $0 i32) (param $1 i32) diff --git a/tests/compiler/resolve-unary.debug.wat b/tests/compiler/resolve-unary.debug.wat index 84f4f86a2d..d0ddecc8dd 100644 --- a/tests/compiler/resolve-unary.debug.wat +++ b/tests/compiler/resolve-unary.debug.wat @@ -74,28 +74,28 @@ (elem $0 (i32.const 1) $start:resolve-unary~anonymous|0) (export "memory" (memory $0)) (start $~start) - (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) - local.get $0 + (func $~lib/util/number/decimalCount32 (param $value i32) (result i32) + local.get $value i32.const 100000 i32.lt_u if - local.get $0 + local.get $value i32.const 100 i32.lt_u if i32.const 1 - local.get $0 + local.get $value i32.const 10 i32.ge_u i32.add return else i32.const 3 - local.get $0 + local.get $value i32.const 10000 i32.ge_u i32.add - local.get $0 + local.get $value i32.const 1000 i32.ge_u i32.add @@ -103,23 +103,23 @@ end unreachable else - local.get $0 + local.get $value i32.const 10000000 i32.lt_u if i32.const 6 - local.get $0 + local.get $value i32.const 1000000 i32.ge_u i32.add return else i32.const 8 - local.get $0 + local.get $value i32.const 1000000000 i32.ge_u i32.add - local.get $0 + local.get $value i32.const 100000000 i32.ge_u i32.add @@ -139,50 +139,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -195,58 +195,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -263,12 +263,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -278,19 +278,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -301,27 +301,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -329,35 +329,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -367,15 +367,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -385,25 +385,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -411,33 +411,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -465,23 +465,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -493,15 +493,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -513,33 +513,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -547,21 +547,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -576,36 +576,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -613,67 +613,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -683,22 +683,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -708,12 +708,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -725,75 +725,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -805,38 +805,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -850,12 +850,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -866,38 +866,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -905,21 +905,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -934,101 +934,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -1039,7 +1039,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1050,26 +1050,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1082,27 +1082,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1116,11 +1116,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1131,66 +1131,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1200,10 +1200,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1214,13 +1214,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1231,109 +1231,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1341,7 +1341,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1358,23 +1358,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1386,54 +1386,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1454,30 +1454,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1487,9 +1487,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1499,8 +1499,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1508,43 +1508,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1556,17 +1556,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1580,7 +1580,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1598,7 +1598,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1608,12 +1608,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1635,7 +1635,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1655,14 +1655,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1675,8 +1675,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1687,37 +1687,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1725,16 +1725,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1742,21 +1742,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1771,12 +1771,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1784,49 +1784,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1836,90 +1836,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1928,22 +1928,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1952,27 +1952,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1987,69 +1987,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2064,29 +2064,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2099,13 +2099,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2116,25 +2116,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2149,10 +2149,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2170,97 +2170,97 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 - ) - (func $~lib/util/number/utoa32_dec_lut (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 i64) - (local $9 i64) - (local $10 i32) - (local $11 i32) + local.get $ptr + ) + (func $~lib/util/number/utoa32_dec_lut (param $buffer i32) (param $num i32) (param $offset i32) + (local $var$3 i32) + (local $t i32) + (local $r i32) + (local $d1 i32) + (local $d2 i32) + (local $digits1 i64) + (local $digits2 i64) + (local $var$10 i32) + (local $var$11 i32) loop $while-continue|0 - local.get $1 + local.get $num i32.const 10000 i32.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $1 + local.get $num i32.const 10000 i32.div_u - local.set $4 - local.get $1 + local.set $t + local.get $num i32.const 10000 i32.rem_u - local.set $5 - local.get $4 - local.set $1 - local.get $5 + local.set $r + local.get $t + local.set $num + local.get $r i32.const 100 i32.div_u - local.set $6 - local.get $5 + local.set $d1 + local.get $r i32.const 100 i32.rem_u - local.set $7 + local.set $d2 i32.const 636 - local.get $6 + local.get $d1 i32.const 2 i32.shl i32.add i64.load32_u - local.set $8 + local.set $digits1 i32.const 636 - local.get $7 + local.get $d2 i32.const 2 i32.shl i32.add i64.load32_u - local.set $9 - local.get $2 + local.set $digits2 + local.get $offset i32.const 4 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $8 - local.get $9 + local.get $digits1 + local.get $digits2 i64.const 32 i64.shl i64.or @@ -2268,99 +2268,99 @@ br $while-continue|0 end end - local.get $1 + local.get $num i32.const 100 i32.ge_u if - local.get $1 + local.get $num i32.const 100 i32.div_u - local.set $3 - local.get $1 + local.set $var$3 + local.get $num i32.const 100 i32.rem_u - local.set $10 - local.get $3 - local.set $1 - local.get $2 + local.set $var$10 + local.get $var$3 + local.set $num + local.get $offset i32.const 2 i32.sub - local.set $2 + local.set $offset i32.const 636 - local.get $10 + local.get $var$10 i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store end - local.get $1 + local.get $num i32.const 10 i32.ge_u if - local.get $2 + local.get $offset i32.const 2 i32.sub - local.set $2 + local.set $offset i32.const 636 - local.get $1 + local.get $num i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store else - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 + local.set $offset i32.const 48 - local.get $1 + local.get $num i32.add - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store16 end ) - (func $~lib/util/number/utoa_hex_lut (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i32) + (func $~lib/util/number/utoa_hex_lut (param $buffer i32) (param $num i64) (param $offset i32) + (local $var$3 i32) loop $while-continue|0 - local.get $2 + local.get $offset i32.const 2 i32.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $2 + local.get $offset i32.const 2 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 1056 - local.get $1 + local.get $num i32.wrap_i64 i32.const 255 i32.and @@ -2369,20 +2369,20 @@ i32.add i32.load i32.store - local.get $1 + local.get $num i64.const 8 i64.shr_u - local.set $1 + local.set $num br $while-continue|0 end end - local.get $2 + local.get $offset i32.const 1 i32.and if - local.get $0 + local.get $buffer i32.const 1056 - local.get $1 + local.get $num i32.wrap_i64 i32.const 6 i32.shl @@ -2391,25 +2391,25 @@ i32.store16 end ) - (func $~lib/util/number/ulog_base (param $0 i64) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) - (local $4 i64) - (local $5 i32) - local.get $1 - local.set $2 - local.get $2 + (func $~lib/util/number/ulog_base (param $num i64) (param $base i32) (result i32) + (local $var$2 i32) + (local $b64 i64) + (local $b i64) + (local $e i32) + local.get $base + local.set $var$2 + local.get $var$2 i32.popcnt i32.const 1 i32.eq if i32.const 63 - local.get $0 + local.get $num i64.clz i32.wrap_i64 i32.sub i32.const 31 - local.get $1 + local.get $base i32.clz i32.sub i32.div_u @@ -2417,95 +2417,95 @@ i32.add return end - local.get $1 + local.get $base i64.extend_i32_s - local.set $3 - local.get $3 - local.set $4 + local.set $b64 + local.get $b64 + local.set $b i32.const 1 - local.set $5 + local.set $e loop $while-continue|0 - local.get $0 - local.get $4 + local.get $num + local.get $b i64.ge_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 - local.get $4 + local.get $num + local.get $b i64.div_u - local.set $0 - local.get $4 - local.get $4 + local.set $num + local.get $b + local.get $b i64.mul - local.set $4 - local.get $5 + local.set $b + local.get $e i32.const 1 i32.shl - local.set $5 + local.set $e br $while-continue|0 end end loop $while-continue|1 - local.get $0 + local.get $num i64.const 1 i64.ge_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 - local.get $3 + local.get $num + local.get $b64 i64.div_u - local.set $0 - local.get $5 + local.set $num + local.get $e i32.const 1 i32.add - local.set $5 + local.set $e br $while-continue|1 end end - local.get $5 + local.get $e i32.const 1 i32.sub ) - (func $~lib/util/number/utoa64_any_core (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i32) - (local $4 i64) - (local $5 i64) - (local $6 i64) - local.get $3 + (func $~lib/util/number/utoa64_any_core (param $buffer i32) (param $num i64) (param $offset i32) (param $radix i32) + (local $base i64) + (local $var$5 i64) + (local $q i64) + local.get $radix i64.extend_i32_s - local.set $4 - local.get $3 - local.get $3 + local.set $base + local.get $radix + local.get $radix i32.const 1 i32.sub i32.and i32.const 0 i32.eq if - local.get $3 + local.get $radix i32.ctz i32.const 7 i32.and i64.extend_i32_s - local.set $5 - local.get $4 + local.set $var$5 + local.get $base i64.const 1 i64.sub - local.set $6 + local.set $q loop $do-loop|0 - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 2112 - local.get $1 - local.get $6 + local.get $num + local.get $q i64.and i32.wrap_i64 i32.const 1 @@ -2513,34 +2513,34 @@ i32.add i32.load16_u i32.store16 - local.get $1 - local.get $5 + local.get $num + local.get $var$5 i64.shr_u - local.set $1 - local.get $1 + local.set $num + local.get $num i64.const 0 i64.ne br_if $do-loop|0 end else loop $do-loop|1 - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 - local.get $1 - local.get $4 + local.set $offset + local.get $num + local.get $base i64.div_u - local.set $6 - local.get $0 - local.get $2 + local.set $q + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 2112 - local.get $1 - local.get $6 - local.get $4 + local.get $num + local.get $q + local.get $base i64.mul i64.sub i32.wrap_i64 @@ -2549,58 +2549,58 @@ i32.add i32.load16_u i32.store16 - local.get $6 - local.set $1 - local.get $1 + local.get $q + local.set $num + local.get $num i64.const 0 i64.ne br_if $do-loop|1 end end ) - (func $~lib/number/I32#toString (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/number/I32#toString (param $this i32) (param $radix i32) (result i32) + local.get $this + local.get $radix call $~lib/util/number/itoa32 ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.get $1 + (func $~lib/util/string/compareImpl (param $str1 i32) (param $index1 i32) (param $str2 i32) (param $index2 i32) (param $len i32) (result i32) + (local $ptr1 i32) + (local $ptr2 i32) + (local $var$7 i32) + (local $a i32) + (local $b i32) + local.get $str1 + local.get $index1 i32.const 1 i32.shl i32.add - local.set $5 - local.get $2 - local.get $3 + local.set $ptr1 + local.get $str2 + local.get $index2 i32.const 1 i32.shl i32.add - local.set $6 + local.set $ptr2 i32.const 0 i32.const 2 i32.lt_s drop - local.get $4 + local.get $len i32.const 4 i32.ge_u if (result i32) - local.get $5 + local.get $ptr1 i32.const 7 i32.and - local.get $6 + local.get $ptr2 i32.const 7 i32.and i32.or @@ -2611,27 +2611,27 @@ if block $do-break|0 loop $do-loop|0 - local.get $5 + local.get $ptr1 i64.load - local.get $6 + local.get $ptr2 i64.load i64.ne if br $do-break|0 end - local.get $5 + local.get $ptr1 i32.const 8 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 8 i32.add - local.set $6 - local.get $4 + local.set $ptr2 + local.get $len i32.const 4 i32.sub - local.set $4 - local.get $4 + local.set $len + local.get $len i32.const 4 i32.ge_u br_if $do-loop|0 @@ -2639,59 +2639,59 @@ end end loop $while-continue|1 - local.get $4 - local.tee $7 + local.get $len + local.tee $var$7 i32.const 1 i32.sub - local.set $4 - local.get $7 - local.set $7 - local.get $7 + local.set $len + local.get $var$7 + local.set $var$7 + local.get $var$7 if - local.get $5 + local.get $ptr1 i32.load16_u - local.set $8 - local.get $6 + local.set $a + local.get $ptr2 i32.load16_u - local.set $9 - local.get $8 - local.get $9 + local.set $b + local.get $a + local.get $b i32.ne if - local.get $8 - local.get $9 + local.get $a + local.get $b i32.sub return end - local.get $5 + local.get $ptr1 i32.const 2 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 2 i32.add - local.set $6 + local.set $ptr2 br $while-continue|1 end end i32.const 0 ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__eq (param $left i32) (param $right i32) (result i32) + (local $leftLength i32) + local.get $left + local.get $right i32.eq if i32.const 1 return end - local.get $0 + local.get $left i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $1 + local.get $right i32.const 0 i32.eq end @@ -2699,79 +2699,79 @@ i32.const 0 return end - local.get $0 + local.get $left call $~lib/string/String#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $leftLength + local.get $leftLength + local.get $right call $~lib/string/String#get:length i32.ne if i32.const 0 return end - local.get $0 + local.get $left i32.const 0 - local.get $1 + local.get $right i32.const 0 - local.get $2 + local.get $leftLength call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/number/Bool#toString (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/number/Bool#toString (param $this i32) (param $radix i32) (result i32) + local.get $this if (result i32) i32.const 2368 else i32.const 2400 end ) - (func $resolve-unary/Foo#plus (param $0 i32) (result i32) + (func $resolve-unary/Foo#plus (param $this i32) (result i32) i32.const 2464 ) - (func $~lib/string/String#toString (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#toString (param $this i32) (result i32) + local.get $this ) - (func $resolve-unary/Foo#minus (param $0 i32) (result i32) + (func $resolve-unary/Foo#minus (param $this i32) (result i32) i32.const 2496 ) - (func $resolve-unary/Foo#prefix_inc (param $0 i32) (result i32) - local.get $0 + (func $resolve-unary/Foo#prefix_inc (param $this i32) (result i32) + local.get $this ) - (func $resolve-unary/Foo#self (param $0 i32) (result i32) - local.get $0 + (func $resolve-unary/Foo#self (param $this i32) (result i32) + local.get $this ) - (func $resolve-unary/Foo#prefix_dec (param $0 i32) (result i32) - local.get $0 + (func $resolve-unary/Foo#prefix_dec (param $this i32) (result i32) + local.get $this ) - (func $resolve-unary/Foo#not (param $0 i32) (result i32) + (func $resolve-unary/Foo#not (param $this i32) (result i32) i32.const 2528 ) - (func $resolve-unary/Foo#bitwise_not (param $0 i32) (result i32) + (func $resolve-unary/Foo#bitwise_not (param $this i32) (result i32) i32.const 2560 ) - (func $resolve-unary/Foo#postfix_inc (param $0 i32) (result i32) - local.get $0 + (func $resolve-unary/Foo#postfix_inc (param $this i32) (result i32) + local.get $this ) - (func $resolve-unary/Foo#postfix_dec (param $0 i32) (result i32) - local.get $0 + (func $resolve-unary/Foo#postfix_dec (param $this i32) (result i32) + local.get $this ) - (func $resolve-unary/Bar.prefix_inc (param $0 i32) (result i32) + (func $resolve-unary/Bar.prefix_inc (param $a i32) (result i32) i32.const 2592 ) - (func $resolve-unary/Bar.prefix_dec (param $0 i32) (result i32) + (func $resolve-unary/Bar.prefix_dec (param $a i32) (result i32) i32.const 2624 ) - (func $resolve-unary/Bar.postfix_inc (param $0 i32) (result i32) + (func $resolve-unary/Bar.postfix_inc (param $a i32) (result i32) i32.const 2656 ) - (func $resolve-unary/Bar.postfix_dec (param $0 i32) (result i32) + (func $resolve-unary/Bar.postfix_dec (param $a i32) (result i32) i32.const 2688 ) (func $start:resolve-unary~anonymous|0 nop ) - (func $resolve-unary/generic<~lib/string/String> (param $0 i32) + (func $resolve-unary/generic<~lib/string/String> (param $v i32) nop ) (func $~lib/rt/__visit_globals (param $0 i32) @@ -2814,10 +2814,10 @@ call $~lib/rt/itcms/__visit end ) - (func $~lib/function/Function<%28%29=>void>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28%29=>void>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28%29=>void>~visit (param $0 i32) (param $1 i32) diff --git a/tests/compiler/retain-i32.debug.wat b/tests/compiler/retain-i32.debug.wat index ea785ecad7..5bba2f7654 100644 --- a/tests/compiler/retain-i32.debug.wat +++ b/tests/compiler/retain-i32.debug.wat @@ -24,13 +24,13 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (start $~start) - (func $retain-i32/test (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 + (func $retain-i32/test (param $a i32) (param $b i32) + local.get $a + local.get $b i32.add i32.extend8_s - local.get $0 - local.get $1 + local.get $a + local.get $b i32.add i32.extend8_s i32.eq @@ -43,12 +43,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $a + local.get $b i32.sub i32.extend8_s - local.get $0 - local.get $1 + local.get $a + local.get $b i32.sub i32.extend8_s i32.eq @@ -61,12 +61,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $a + local.get $b i32.mul i32.extend8_s - local.get $0 - local.get $1 + local.get $a + local.get $b i32.mul i32.extend8_s i32.eq @@ -79,12 +79,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $a + local.get $b i32.and i32.extend8_s - local.get $0 - local.get $1 + local.get $a + local.get $b i32.and i32.extend8_s i32.eq @@ -97,12 +97,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $a + local.get $b i32.or i32.extend8_s - local.get $0 - local.get $1 + local.get $a + local.get $b i32.or i32.extend8_s i32.eq @@ -115,12 +115,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $a + local.get $b i32.xor i32.extend8_s - local.get $0 - local.get $1 + local.get $a + local.get $b i32.xor i32.extend8_s i32.eq @@ -133,14 +133,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $a + local.get $b i32.const 7 i32.and i32.shl i32.extend8_s - local.get $0 - local.get $1 + local.get $a + local.get $b i32.const 7 i32.and i32.shl @@ -155,13 +155,13 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $a + local.get $b i32.add i32.const 255 i32.and - local.get $0 - local.get $1 + local.get $a + local.get $b i32.add i32.const 255 i32.and @@ -175,13 +175,13 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $a + local.get $b i32.sub i32.const 255 i32.and - local.get $0 - local.get $1 + local.get $a + local.get $b i32.sub i32.const 255 i32.and @@ -195,13 +195,13 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $a + local.get $b i32.mul i32.const 255 i32.and - local.get $0 - local.get $1 + local.get $a + local.get $b i32.mul i32.const 255 i32.and @@ -215,13 +215,13 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $a + local.get $b i32.and i32.const 255 i32.and - local.get $0 - local.get $1 + local.get $a + local.get $b i32.and i32.const 255 i32.and @@ -235,13 +235,13 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $a + local.get $b i32.or i32.const 255 i32.and - local.get $0 - local.get $1 + local.get $a + local.get $b i32.or i32.const 255 i32.and @@ -255,13 +255,13 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $a + local.get $b i32.xor i32.const 255 i32.and - local.get $0 - local.get $1 + local.get $a + local.get $b i32.xor i32.const 255 i32.and @@ -275,15 +275,15 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $a + local.get $b i32.const 7 i32.and i32.shl i32.const 255 i32.and - local.get $0 - local.get $1 + local.get $a + local.get $b i32.const 7 i32.and i32.shl @@ -301,16 +301,16 @@ end ) (func $retain-i32/testLocalRetain - (local $0 i32) + (local $ri i32) i32.const 0 i32.load8_s - local.set $0 + local.set $ri i32.const 1 drop ) (func $start:retain-i32 - (local $0 i32) - (local $1 i32) + (local $i i32) + (local $var$1 i32) i32.const 0 global.get $~lib/builtins/i8.MAX_VALUE call $retain-i32/test @@ -381,54 +381,54 @@ global.get $~lib/builtins/u8.MAX_VALUE call $retain-i32/test global.get $~lib/builtins/i8.MIN_VALUE - local.set $0 + local.set $i loop $for-loop|0 - local.get $0 + local.get $i global.get $~lib/builtins/u8.MAX_VALUE i32.le_s - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 if i32.const 0 - local.get $0 + local.get $i call $retain-i32/test i32.const 1 - local.get $0 + local.get $i call $retain-i32/test i32.const -1 - local.get $0 + local.get $i call $retain-i32/test global.get $~lib/builtins/i8.MIN_VALUE - local.get $0 + local.get $i call $retain-i32/test global.get $~lib/builtins/i8.MAX_VALUE - local.get $0 + local.get $i call $retain-i32/test global.get $~lib/builtins/u8.MAX_VALUE - local.get $0 + local.get $i call $retain-i32/test global.get $~lib/builtins/i16.MIN_VALUE - local.get $0 + local.get $i call $retain-i32/test global.get $~lib/builtins/i16.MAX_VALUE - local.get $0 + local.get $i call $retain-i32/test global.get $~lib/builtins/u16.MAX_VALUE - local.get $0 + local.get $i call $retain-i32/test global.get $~lib/builtins/i32.MAX_VALUE - local.get $0 + local.get $i call $retain-i32/test global.get $~lib/builtins/i32.MIN_VALUE - local.get $0 + local.get $i call $retain-i32/test global.get $~lib/builtins/u32.MAX_VALUE - local.get $0 + local.get $i call $retain-i32/test - local.get $0 + local.get $i i32.const 1 i32.add - local.set $0 + local.set $i br $for-loop|0 end end diff --git a/tests/compiler/return-unreachable.debug.wat b/tests/compiler/return-unreachable.debug.wat index b4c7b0f2d8..15a1c4ea49 100644 --- a/tests/compiler/return-unreachable.debug.wat +++ b/tests/compiler/return-unreachable.debug.wat @@ -55,50 +55,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -111,58 +111,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -179,12 +179,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -194,19 +194,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -217,27 +217,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -245,35 +245,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -283,15 +283,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -301,25 +301,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -327,33 +327,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -381,23 +381,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -409,15 +409,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -429,33 +429,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -463,21 +463,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -492,36 +492,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -529,67 +529,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -599,22 +599,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -624,12 +624,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -641,75 +641,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -721,38 +721,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -766,12 +766,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -782,38 +782,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -821,21 +821,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -850,101 +850,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -955,7 +955,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -966,26 +966,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -998,27 +998,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1032,11 +1032,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1047,66 +1047,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1116,10 +1116,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1130,13 +1130,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1147,109 +1147,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1257,7 +1257,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1274,23 +1274,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1302,54 +1302,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1370,30 +1370,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1403,9 +1403,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1415,8 +1415,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1424,43 +1424,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1472,17 +1472,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1496,7 +1496,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1514,7 +1514,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1524,12 +1524,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1551,7 +1551,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1571,14 +1571,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1591,8 +1591,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1603,37 +1603,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1641,16 +1641,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1658,21 +1658,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1687,12 +1687,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1700,49 +1700,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1752,90 +1752,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1844,22 +1844,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1868,27 +1868,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1903,69 +1903,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1980,29 +1980,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2015,13 +2015,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2032,25 +2032,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2065,10 +2065,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2086,49 +2086,49 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32) + (local $child i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $childPtr i32.eqz if return end i32.const 1 drop - local.get $0 + local.get $parentPtr i32.eqz if i32.const 0 @@ -2138,37 +2138,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $childPtr i32.const 20 i32.sub - local.set $3 - local.get $3 + local.set $child + local.get $child call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $0 + local.get $parentPtr i32.const 20 i32.sub - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 call $~lib/rt/itcms/Object#get:color - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $2 + local.get $expectMultiple if - local.get $4 + local.get $var$4 call $~lib/rt/itcms/Object#makeGray else - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end else - local.get $5 + local.get $var$5 i32.const 3 i32.eq if (result i32) @@ -2179,7 +2179,7 @@ i32.const 0 end if - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end end @@ -2209,8 +2209,8 @@ local.get $1 i32.store offset=12 ) - (func $return-unreachable/test (param $0 i32) (result i32) - (local $1 i32) + (func $return-unreachable/test (param $a i32) (result i32) + (local $str i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -2223,7 +2223,7 @@ i32.const 0 i32.const 100 call $~lib/array/Array#constructor - local.tee $1 + local.tee $str i32.store unreachable ) @@ -2250,12 +2250,12 @@ call $~lib/rt/itcms/__visit end ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) diff --git a/tests/compiler/return.debug.wat b/tests/compiler/return.debug.wat index 5bccc3ab64..0cb508f087 100644 --- a/tests/compiler/return.debug.wat +++ b/tests/compiler/return.debug.wat @@ -22,24 +22,24 @@ (func $start:return~anonymous|0 call $return/nop ) - (func $return/testVoidReturnFunction (param $0 i32) (param $1 i32) - local.get $0 + (func $return/testVoidReturnFunction (param $cond i32) (param $fn i32) + local.get $cond if i32.const 0 global.set $~argumentsLength - local.get $1 + local.get $fn i32.load call_indirect $0 (type $none_=>_none) return end i32.const 0 global.set $~argumentsLength - local.get $1 + local.get $fn i32.load call_indirect $0 (type $none_=>_none) ) - (func $return/testVoidReturn (param $0 i32) - local.get $0 + (func $return/testVoidReturn (param $cond i32) + local.get $cond if call $return/nop return diff --git a/tests/compiler/rt/finalize.debug.wat b/tests/compiler/rt/finalize.debug.wat index 3cb847cdda..88c0277348 100644 --- a/tests/compiler/rt/finalize.debug.wat +++ b/tests/compiler/rt/finalize.debug.wat @@ -55,50 +55,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -111,58 +111,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -179,12 +179,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -194,19 +194,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -217,27 +217,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -245,35 +245,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -283,15 +283,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -301,25 +301,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -327,33 +327,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -361,8 +361,8 @@ i32.and i32.add ) - (func $rt/finalize/__finalize (param $0 i32) - local.get $0 + (func $rt/finalize/__finalize (param $ptr i32) + local.get $ptr global.get $rt/finalize/expect i32.eq i32.eqz @@ -397,23 +397,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -425,15 +425,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -445,33 +445,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -479,21 +479,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -508,36 +508,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -545,67 +545,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -615,22 +615,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -640,12 +640,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -657,75 +657,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -737,38 +737,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -782,12 +782,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -798,38 +798,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -837,21 +837,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -866,101 +866,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -971,7 +971,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -982,26 +982,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1014,27 +1014,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1048,11 +1048,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1063,66 +1063,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1132,10 +1132,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1146,13 +1146,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1163,109 +1163,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1273,7 +1273,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1290,23 +1290,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1318,58 +1318,58 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 1 drop - local.get $0 + local.get $obj i32.const 20 i32.add call $rt/finalize/__finalize - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1390,30 +1390,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1423,9 +1423,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1435,8 +1435,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1444,43 +1444,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1492,17 +1492,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1516,7 +1516,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1534,7 +1534,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1544,12 +1544,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1571,7 +1571,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1591,14 +1591,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1611,8 +1611,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1623,37 +1623,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1661,16 +1661,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1678,21 +1678,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1707,12 +1707,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1720,49 +1720,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1772,90 +1772,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1864,22 +1864,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1888,27 +1888,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1923,69 +1923,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2000,29 +2000,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2035,13 +2035,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2052,25 +2052,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2085,10 +2085,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2106,39 +2106,39 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) (func $~lib/rt/itcms/__collect - (local $0 i32) + (local $var$0 i32) i32.const 0 drop global.get $~lib/rt/itcms/state @@ -2149,8 +2149,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -2164,8 +2164,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop diff --git a/tests/compiler/rt/flags.debug.wat b/tests/compiler/rt/flags.debug.wat index 7d2ec3a0ca..044f5f9ced 100644 --- a/tests/compiler/rt/flags.debug.wat +++ b/tests/compiler/rt/flags.debug.wat @@ -22,12 +22,12 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -38,19 +38,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $rt/flags/test<~lib/typedarray/Int8Array> (param $0 i32) + (func $rt/flags/test<~lib/typedarray/Int8Array> (param $flags i32) i32.const 3 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -62,10 +62,10 @@ unreachable end ) - (func $rt/flags/test<~lib/typedarray/Uint8Array> (param $0 i32) + (func $rt/flags/test<~lib/typedarray/Uint8Array> (param $flags i32) i32.const 4 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -77,10 +77,10 @@ unreachable end ) - (func $rt/flags/test<~lib/typedarray/Uint8ClampedArray> (param $0 i32) + (func $rt/flags/test<~lib/typedarray/Uint8ClampedArray> (param $flags i32) i32.const 5 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -92,10 +92,10 @@ unreachable end ) - (func $rt/flags/test<~lib/typedarray/Int16Array> (param $0 i32) + (func $rt/flags/test<~lib/typedarray/Int16Array> (param $flags i32) i32.const 6 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -107,10 +107,10 @@ unreachable end ) - (func $rt/flags/test<~lib/typedarray/Uint16Array> (param $0 i32) + (func $rt/flags/test<~lib/typedarray/Uint16Array> (param $flags i32) i32.const 7 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -122,10 +122,10 @@ unreachable end ) - (func $rt/flags/test<~lib/typedarray/Int32Array> (param $0 i32) + (func $rt/flags/test<~lib/typedarray/Int32Array> (param $flags i32) i32.const 8 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -137,10 +137,10 @@ unreachable end ) - (func $rt/flags/test<~lib/typedarray/Uint32Array> (param $0 i32) + (func $rt/flags/test<~lib/typedarray/Uint32Array> (param $flags i32) i32.const 9 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -152,10 +152,10 @@ unreachable end ) - (func $rt/flags/test<~lib/typedarray/Int64Array> (param $0 i32) + (func $rt/flags/test<~lib/typedarray/Int64Array> (param $flags i32) i32.const 10 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -167,10 +167,10 @@ unreachable end ) - (func $rt/flags/test<~lib/typedarray/Uint64Array> (param $0 i32) + (func $rt/flags/test<~lib/typedarray/Uint64Array> (param $flags i32) i32.const 11 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -182,10 +182,10 @@ unreachable end ) - (func $rt/flags/test<~lib/typedarray/Float32Array> (param $0 i32) + (func $rt/flags/test<~lib/typedarray/Float32Array> (param $flags i32) i32.const 12 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -197,10 +197,10 @@ unreachable end ) - (func $rt/flags/test<~lib/typedarray/Float64Array> (param $0 i32) + (func $rt/flags/test<~lib/typedarray/Float64Array> (param $flags i32) i32.const 13 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -212,10 +212,10 @@ unreachable end ) - (func $rt/flags/test<~lib/array/Array> (param $0 i32) + (func $rt/flags/test<~lib/array/Array> (param $flags i32) i32.const 14 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -227,10 +227,10 @@ unreachable end ) - (func $rt/flags/test<~lib/array/Array> (param $0 i32) + (func $rt/flags/test<~lib/array/Array> (param $flags i32) i32.const 15 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -242,10 +242,10 @@ unreachable end ) - (func $rt/flags/test<~lib/array/Array> (param $0 i32) + (func $rt/flags/test<~lib/array/Array> (param $flags i32) i32.const 16 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -257,10 +257,10 @@ unreachable end ) - (func $rt/flags/test<~lib/array/Array> (param $0 i32) + (func $rt/flags/test<~lib/array/Array> (param $flags i32) i32.const 17 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -272,10 +272,10 @@ unreachable end ) - (func $rt/flags/test<~lib/array/Array> (param $0 i32) + (func $rt/flags/test<~lib/array/Array> (param $flags i32) i32.const 18 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -287,10 +287,10 @@ unreachable end ) - (func $rt/flags/test<~lib/array/Array> (param $0 i32) + (func $rt/flags/test<~lib/array/Array> (param $flags i32) i32.const 19 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -302,10 +302,10 @@ unreachable end ) - (func $rt/flags/test<~lib/array/Array> (param $0 i32) + (func $rt/flags/test<~lib/array/Array> (param $flags i32) i32.const 20 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -317,10 +317,10 @@ unreachable end ) - (func $rt/flags/test<~lib/array/Array> (param $0 i32) + (func $rt/flags/test<~lib/array/Array> (param $flags i32) i32.const 21 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -332,10 +332,10 @@ unreachable end ) - (func $rt/flags/test<~lib/array/Array> (param $0 i32) + (func $rt/flags/test<~lib/array/Array> (param $flags i32) i32.const 22 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -347,10 +347,10 @@ unreachable end ) - (func $rt/flags/test<~lib/array/Array> (param $0 i32) + (func $rt/flags/test<~lib/array/Array> (param $flags i32) i32.const 23 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -362,10 +362,10 @@ unreachable end ) - (func $rt/flags/test<~lib/array/Array> (param $0 i32) + (func $rt/flags/test<~lib/array/Array> (param $flags i32) i32.const 24 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -377,10 +377,10 @@ unreachable end ) - (func $rt/flags/test<~lib/array/Array> (param $0 i32) + (func $rt/flags/test<~lib/array/Array> (param $flags i32) i32.const 26 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -392,10 +392,10 @@ unreachable end ) - (func $rt/flags/test<~lib/array/Array> (param $0 i32) + (func $rt/flags/test<~lib/array/Array> (param $flags i32) i32.const 27 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -407,10 +407,10 @@ unreachable end ) - (func $rt/flags/test<~lib/set/Set> (param $0 i32) + (func $rt/flags/test<~lib/set/Set> (param $flags i32) i32.const 28 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -422,10 +422,10 @@ unreachable end ) - (func $rt/flags/test<~lib/set/Set> (param $0 i32) + (func $rt/flags/test<~lib/set/Set> (param $flags i32) i32.const 29 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -437,10 +437,10 @@ unreachable end ) - (func $rt/flags/test<~lib/set/Set> (param $0 i32) + (func $rt/flags/test<~lib/set/Set> (param $flags i32) i32.const 30 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -452,10 +452,10 @@ unreachable end ) - (func $rt/flags/test<~lib/set/Set> (param $0 i32) + (func $rt/flags/test<~lib/set/Set> (param $flags i32) i32.const 31 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -467,10 +467,10 @@ unreachable end ) - (func $rt/flags/test<~lib/set/Set> (param $0 i32) + (func $rt/flags/test<~lib/set/Set> (param $flags i32) i32.const 32 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -482,10 +482,10 @@ unreachable end ) - (func $rt/flags/test<~lib/set/Set> (param $0 i32) + (func $rt/flags/test<~lib/set/Set> (param $flags i32) i32.const 33 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -497,10 +497,10 @@ unreachable end ) - (func $rt/flags/test<~lib/set/Set> (param $0 i32) + (func $rt/flags/test<~lib/set/Set> (param $flags i32) i32.const 34 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -512,10 +512,10 @@ unreachable end ) - (func $rt/flags/test<~lib/set/Set> (param $0 i32) + (func $rt/flags/test<~lib/set/Set> (param $flags i32) i32.const 35 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -527,10 +527,10 @@ unreachable end ) - (func $rt/flags/test<~lib/set/Set> (param $0 i32) + (func $rt/flags/test<~lib/set/Set> (param $flags i32) i32.const 36 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -542,10 +542,10 @@ unreachable end ) - (func $rt/flags/test<~lib/set/Set> (param $0 i32) + (func $rt/flags/test<~lib/set/Set> (param $flags i32) i32.const 37 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -557,10 +557,10 @@ unreachable end ) - (func $rt/flags/test<~lib/set/Set> (param $0 i32) + (func $rt/flags/test<~lib/set/Set> (param $flags i32) i32.const 38 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -572,10 +572,10 @@ unreachable end ) - (func $rt/flags/test<~lib/set/Set> (param $0 i32) + (func $rt/flags/test<~lib/set/Set> (param $flags i32) i32.const 39 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -587,10 +587,10 @@ unreachable end ) - (func $rt/flags/test<~lib/set/Set> (param $0 i32) + (func $rt/flags/test<~lib/set/Set> (param $flags i32) i32.const 40 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -602,10 +602,10 @@ unreachable end ) - (func $rt/flags/test<~lib/map/Map> (param $0 i32) + (func $rt/flags/test<~lib/map/Map> (param $flags i32) i32.const 41 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -617,10 +617,10 @@ unreachable end ) - (func $rt/flags/test<~lib/map/Map> (param $0 i32) + (func $rt/flags/test<~lib/map/Map> (param $flags i32) i32.const 42 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -632,10 +632,10 @@ unreachable end ) - (func $rt/flags/test<~lib/map/Map> (param $0 i32) + (func $rt/flags/test<~lib/map/Map> (param $flags i32) i32.const 43 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -647,10 +647,10 @@ unreachable end ) - (func $rt/flags/test<~lib/map/Map> (param $0 i32) + (func $rt/flags/test<~lib/map/Map> (param $flags i32) i32.const 44 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -662,10 +662,10 @@ unreachable end ) - (func $rt/flags/test<~lib/map/Map> (param $0 i32) + (func $rt/flags/test<~lib/map/Map> (param $flags i32) i32.const 45 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -677,10 +677,10 @@ unreachable end ) - (func $rt/flags/test<~lib/map/Map> (param $0 i32) + (func $rt/flags/test<~lib/map/Map> (param $flags i32) i32.const 46 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -692,10 +692,10 @@ unreachable end ) - (func $rt/flags/test<~lib/map/Map> (param $0 i32) + (func $rt/flags/test<~lib/map/Map> (param $flags i32) i32.const 47 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -707,10 +707,10 @@ unreachable end ) - (func $rt/flags/test<~lib/map/Map> (param $0 i32) + (func $rt/flags/test<~lib/map/Map> (param $flags i32) i32.const 48 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -722,10 +722,10 @@ unreachable end ) - (func $rt/flags/test<~lib/map/Map> (param $0 i32) + (func $rt/flags/test<~lib/map/Map> (param $flags i32) i32.const 49 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -737,10 +737,10 @@ unreachable end ) - (func $rt/flags/test<~lib/map/Map> (param $0 i32) + (func $rt/flags/test<~lib/map/Map> (param $flags i32) i32.const 50 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if @@ -752,10 +752,10 @@ unreachable end ) - (func $rt/flags/test<~lib/map/Map> (param $0 i32) + (func $rt/flags/test<~lib/map/Map> (param $flags i32) i32.const 51 call $~lib/rt/__typeinfo - local.get $0 + local.get $flags i32.eq i32.eqz if diff --git a/tests/compiler/rt/instanceof.debug.wat b/tests/compiler/rt/instanceof.debug.wat index 46ca526155..a08055276d 100644 --- a/tests/compiler/rt/instanceof.debug.wat +++ b/tests/compiler/rt/instanceof.debug.wat @@ -62,50 +62,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -118,58 +118,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -186,12 +186,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -201,19 +201,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -224,27 +224,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -252,35 +252,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -290,15 +290,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -308,25 +308,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -334,33 +334,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -388,23 +388,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -416,15 +416,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -436,33 +436,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -470,21 +470,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -499,36 +499,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -536,67 +536,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -606,22 +606,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -631,12 +631,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -648,75 +648,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -728,38 +728,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -773,12 +773,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -789,38 +789,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -828,21 +828,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -857,101 +857,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -962,7 +962,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -973,26 +973,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1005,27 +1005,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1039,11 +1039,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1054,66 +1054,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1123,10 +1123,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1137,13 +1137,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1154,109 +1154,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1264,7 +1264,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1281,23 +1281,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1309,54 +1309,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1377,30 +1377,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1410,9 +1410,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1422,8 +1422,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1431,43 +1431,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1479,17 +1479,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1503,7 +1503,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1521,7 +1521,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1531,12 +1531,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1558,7 +1558,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1578,14 +1578,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1598,8 +1598,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1610,37 +1610,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1648,16 +1648,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1665,21 +1665,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1694,12 +1694,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1707,49 +1707,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1759,90 +1759,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1851,22 +1851,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1875,27 +1875,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1910,69 +1910,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1987,29 +1987,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2022,13 +2022,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2039,25 +2039,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2072,10 +2072,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2093,76 +2093,76 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/rt/__instanceof (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/__instanceof (param $ptr i32) (param $classId i32) (result i32) + (local $id i32) + (local $rttiBase i32) + local.get $ptr i32.const 20 i32.sub i32.load offset=12 - local.set $2 + local.set $id global.get $~lib/rt/__rtti_base - local.set $3 - local.get $2 - local.get $3 + local.set $rttiBase + local.get $id + local.get $rttiBase i32.load i32.le_u if loop $do-loop|0 - local.get $2 - local.get $1 + local.get $id + local.get $classId i32.eq if i32.const 1 return end - local.get $3 + local.get $rttiBase i32.const 4 i32.add - local.get $2 + local.get $id i32.const 8 i32.mul i32.add i32.load offset=4 - local.tee $2 + local.tee $id br_if $do-loop|0 end end i32.const 0 ) (func $start:rt/instanceof - (local $0 i32) + (local $var$0 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -2201,14 +2201,14 @@ drop global.get $~lib/memory/__stack_pointer global.get $rt/instanceof/animal - local.tee $0 + local.tee $var$0 i32.store - local.get $0 + local.get $var$0 i32.eqz if (result i32) i32.const 0 else - local.get $0 + local.get $var$0 i32.const 4 call $~lib/rt/__instanceof end @@ -2224,14 +2224,14 @@ end global.get $~lib/memory/__stack_pointer global.get $rt/instanceof/animal - local.tee $0 + local.tee $var$0 i32.store - local.get $0 + local.get $var$0 i32.eqz if (result i32) i32.const 0 else - local.get $0 + local.get $var$0 i32.const 5 call $~lib/rt/__instanceof end @@ -2249,14 +2249,14 @@ drop global.get $~lib/memory/__stack_pointer global.get $rt/instanceof/cat - local.tee $0 + local.tee $var$0 i32.store - local.get $0 + local.get $var$0 i32.eqz if (result i32) i32.const 0 else - local.get $0 + local.get $var$0 i32.const 4 call $~lib/rt/__instanceof end @@ -2271,14 +2271,14 @@ end global.get $~lib/memory/__stack_pointer global.get $rt/instanceof/cat - local.tee $0 + local.tee $var$0 i32.store - local.get $0 + local.get $var$0 i32.eqz if (result i32) i32.const 0 else - local.get $0 + local.get $var$0 i32.const 5 call $~lib/rt/__instanceof end @@ -2296,14 +2296,14 @@ drop global.get $~lib/memory/__stack_pointer global.get $rt/instanceof/blackcat - local.tee $0 + local.tee $var$0 i32.store - local.get $0 + local.get $var$0 i32.eqz if (result i32) i32.const 0 else - local.get $0 + local.get $var$0 i32.const 4 call $~lib/rt/__instanceof end @@ -2318,14 +2318,14 @@ end global.get $~lib/memory/__stack_pointer global.get $rt/instanceof/blackcat - local.tee $0 + local.tee $var$0 i32.store - local.get $0 + local.get $var$0 i32.eqz if (result i32) i32.const 0 else - local.get $0 + local.get $var$0 i32.const 5 call $~lib/rt/__instanceof end @@ -2361,14 +2361,14 @@ end global.get $~lib/memory/__stack_pointer global.get $rt/instanceof/nullableAnimal - local.tee $0 + local.tee $var$0 i32.store - local.get $0 + local.get $var$0 i32.eqz if (result i32) i32.const 0 else - local.get $0 + local.get $var$0 i32.const 4 call $~lib/rt/__instanceof end @@ -2384,14 +2384,14 @@ end global.get $~lib/memory/__stack_pointer global.get $rt/instanceof/nullableAnimal - local.tee $0 + local.tee $var$0 i32.store - local.get $0 + local.get $var$0 i32.eqz if (result i32) i32.const 0 else - local.get $0 + local.get $var$0 i32.const 5 call $~lib/rt/__instanceof end @@ -2419,14 +2419,14 @@ end global.get $~lib/memory/__stack_pointer global.get $rt/instanceof/nullableCat - local.tee $0 + local.tee $var$0 i32.store - local.get $0 + local.get $var$0 i32.eqz if (result i32) i32.const 0 else - local.get $0 + local.get $var$0 i32.const 4 call $~lib/rt/__instanceof end @@ -2441,14 +2441,14 @@ end global.get $~lib/memory/__stack_pointer global.get $rt/instanceof/nullableCat - local.tee $0 + local.tee $var$0 i32.store - local.get $0 + local.get $var$0 i32.eqz if (result i32) i32.const 0 else - local.get $0 + local.get $var$0 i32.const 5 call $~lib/rt/__instanceof end @@ -2476,14 +2476,14 @@ end global.get $~lib/memory/__stack_pointer global.get $rt/instanceof/nullableBlackcat - local.tee $0 + local.tee $var$0 i32.store - local.get $0 + local.get $var$0 i32.eqz if (result i32) i32.const 0 else - local.get $0 + local.get $var$0 i32.const 4 call $~lib/rt/__instanceof end @@ -2498,14 +2498,14 @@ end global.get $~lib/memory/__stack_pointer global.get $rt/instanceof/nullableBlackcat - local.tee $0 + local.tee $var$0 i32.store - local.get $0 + local.get $var$0 i32.eqz if (result i32) i32.const 0 else - local.get $0 + local.get $var$0 i32.const 5 call $~lib/rt/__instanceof end @@ -2533,14 +2533,14 @@ end global.get $~lib/memory/__stack_pointer global.get $rt/instanceof/nullAnimal - local.tee $0 + local.tee $var$0 i32.store - local.get $0 + local.get $var$0 i32.eqz if (result i32) i32.const 0 else - local.get $0 + local.get $var$0 i32.const 4 call $~lib/rt/__instanceof end @@ -2556,14 +2556,14 @@ end global.get $~lib/memory/__stack_pointer global.get $rt/instanceof/nullAnimal - local.tee $0 + local.tee $var$0 i32.store - local.get $0 + local.get $var$0 i32.eqz if (result i32) i32.const 0 else - local.get $0 + local.get $var$0 i32.const 5 call $~lib/rt/__instanceof end @@ -2592,14 +2592,14 @@ end global.get $~lib/memory/__stack_pointer global.get $rt/instanceof/nullCat - local.tee $0 + local.tee $var$0 i32.store - local.get $0 + local.get $var$0 i32.eqz if (result i32) i32.const 0 else - local.get $0 + local.get $var$0 i32.const 4 call $~lib/rt/__instanceof end @@ -2615,14 +2615,14 @@ end global.get $~lib/memory/__stack_pointer global.get $rt/instanceof/nullCat - local.tee $0 + local.tee $var$0 i32.store - local.get $0 + local.get $var$0 i32.eqz if (result i32) i32.const 0 else - local.get $0 + local.get $var$0 i32.const 5 call $~lib/rt/__instanceof end @@ -2651,14 +2651,14 @@ end global.get $~lib/memory/__stack_pointer global.get $rt/instanceof/nullBlackcat - local.tee $0 + local.tee $var$0 i32.store - local.get $0 + local.get $var$0 i32.eqz if (result i32) i32.const 0 else - local.get $0 + local.get $var$0 i32.const 4 call $~lib/rt/__instanceof end @@ -2674,14 +2674,14 @@ end global.get $~lib/memory/__stack_pointer global.get $rt/instanceof/nullBlackcat - local.tee $0 + local.tee $var$0 i32.store - local.get $0 + local.get $var$0 i32.eqz if (result i32) i32.const 0 else - local.get $0 + local.get $var$0 i32.const 5 call $~lib/rt/__instanceof end diff --git a/tests/compiler/rt/runtime-incremental-export.debug.wat b/tests/compiler/rt/runtime-incremental-export.debug.wat index 0c319d2eed..42d85f1720 100644 --- a/tests/compiler/rt/runtime-incremental-export.debug.wat +++ b/tests/compiler/rt/runtime-incremental-export.debug.wat @@ -58,50 +58,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -114,58 +114,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -182,12 +182,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -197,19 +197,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -220,27 +220,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -248,35 +248,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -286,15 +286,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -304,25 +304,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -330,33 +330,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -384,23 +384,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -412,15 +412,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -432,33 +432,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -466,21 +466,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -495,36 +495,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -532,67 +532,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -602,22 +602,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -627,12 +627,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -644,75 +644,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -724,38 +724,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -769,12 +769,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -785,38 +785,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -824,21 +824,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -853,101 +853,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -958,7 +958,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -969,26 +969,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1001,27 +1001,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1035,11 +1035,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1050,66 +1050,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1119,10 +1119,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1133,13 +1133,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1150,109 +1150,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1260,7 +1260,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1277,23 +1277,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1305,54 +1305,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1373,30 +1373,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1406,9 +1406,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1418,8 +1418,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1427,43 +1427,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1475,17 +1475,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1499,7 +1499,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1517,7 +1517,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1527,12 +1527,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1554,7 +1554,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1574,14 +1574,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1594,8 +1594,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1606,37 +1606,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1644,16 +1644,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1661,21 +1661,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1690,12 +1690,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1703,49 +1703,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1755,90 +1755,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1847,22 +1847,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1871,27 +1871,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1906,69 +1906,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1983,29 +1983,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2018,13 +2018,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2035,25 +2035,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2068,10 +2068,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2089,46 +2089,46 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/rt/itcms/__pin (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/__pin (param $ptr i32) (result i32) + (local $var$1 i32) + local.get $ptr if - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -2140,27 +2140,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 call $~lib/rt/itcms/Object#unlink - local.get $1 + local.get $var$1 global.get $~lib/rt/itcms/pinSpace i32.const 3 call $~lib/rt/itcms/Object#linkTo end - local.get $0 + local.get $ptr ) - (func $~lib/rt/itcms/__unpin (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/__unpin (param $ptr i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $1 - local.get $1 + local.set $obj + local.get $obj call $~lib/rt/itcms/Object#get:color i32.const 3 i32.ne @@ -2176,19 +2176,19 @@ i32.const 1 i32.eq if - local.get $1 + local.get $obj call $~lib/rt/itcms/Object#makeGray else - local.get $1 + local.get $obj call $~lib/rt/itcms/Object#unlink - local.get $1 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo end ) (func $~lib/rt/itcms/__collect - (local $0 i32) + (local $var$0 i32) i32.const 0 drop global.get $~lib/rt/itcms/state @@ -2199,8 +2199,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -2214,8 +2214,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop diff --git a/tests/compiler/rt/runtime-minimal-export.debug.wat b/tests/compiler/rt/runtime-minimal-export.debug.wat index 262dc47fef..0b6063e8b2 100644 --- a/tests/compiler/rt/runtime-minimal-export.debug.wat +++ b/tests/compiler/rt/runtime-minimal-export.debug.wat @@ -56,23 +56,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -84,15 +84,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -104,33 +104,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -138,21 +138,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -167,36 +167,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -204,67 +204,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -274,22 +274,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -299,12 +299,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -316,75 +316,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -396,38 +396,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -441,12 +441,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -457,38 +457,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -496,21 +496,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -525,101 +525,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -630,7 +630,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -641,26 +641,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -673,27 +673,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -707,11 +707,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -722,66 +722,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -791,10 +791,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -805,13 +805,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -822,106 +822,106 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -934,8 +934,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -946,37 +946,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -984,16 +984,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1001,21 +1001,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1030,12 +1030,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1043,49 +1043,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1095,90 +1095,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1187,22 +1187,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1211,27 +1211,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1246,69 +1246,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1323,29 +1323,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -1358,13 +1358,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -1375,25 +1375,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -1418,48 +1418,48 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/tcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/tcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/tcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/tcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/tcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/tcms/Object#set:nextWithColor ) - (func $~lib/rt/tcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/tcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/tcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/tcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/tcms/Object#set:prev ) - (func $~lib/rt/tcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/tcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -1467,9 +1467,9 @@ i32.and i32.add ) - (func $~lib/rt/tcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/tcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + local.get $size i32.const 1073741804 i32.gt_u if @@ -1481,63 +1481,63 @@ unreachable end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/tcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/tcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/tcms/fromSpace global.get $~lib/rt/tcms/white call $~lib/rt/tcms/Object#linkTo global.get $~lib/rt/tcms/total - local.get $2 + local.get $obj call $~lib/rt/tcms/Object#get:size i32.add global.set $~lib/rt/tcms/total - local.get $2 + local.get $obj i32.const 20 i32.add ) - (func $~lib/rt/tcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/tcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/tcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/tcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/tcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -1554,12 +1554,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -1569,22 +1569,22 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/tcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/tcms/Object#set:next ) - (func $~lib/rt/tcms/__pin (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tcms/__pin (param $ptr i32) (result i32) + (local $var$1 i32) + local.get $ptr if - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 call $~lib/rt/tcms/Object#get:color i32.const 3 i32.eq @@ -1596,27 +1596,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 call $~lib/rt/tcms/Object#unlink - local.get $1 + local.get $var$1 global.get $~lib/rt/tcms/pinSpace i32.const 3 call $~lib/rt/tcms/Object#linkTo end - local.get $0 + local.get $ptr ) - (func $~lib/rt/tcms/__unpin (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tcms/__unpin (param $ptr i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $1 - local.get $1 + local.set $obj + local.get $obj call $~lib/rt/tcms/Object#get:color i32.const 3 i32.ne @@ -1628,24 +1628,24 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $obj call $~lib/rt/tcms/Object#unlink - local.get $1 + local.get $obj global.get $~lib/rt/tcms/fromSpace global.get $~lib/rt/tcms/white call $~lib/rt/tcms/Object#linkTo ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1653,7 +1653,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1670,23 +1670,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1698,37 +1698,37 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) (func $~lib/rt/tcms/__collect - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + (local $pn i32) + (local $iter i32) + (local $var$2 i32) + (local $black i32) + (local $to i32) + (local $from i32) + (local $newNext i32) i32.const 0 drop i32.const 0 call $~lib/rt/__visit_globals global.get $~lib/rt/tcms/pinSpace - local.set $0 - local.get $0 + local.set $pn + local.get $pn call $~lib/rt/tcms/Object#get:next - local.set $1 + local.set $iter loop $while-continue|0 - local.get $1 - local.get $0 + local.get $iter + local.get $pn i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if i32.const 1 drop - local.get $1 + local.get $iter call $~lib/rt/tcms/Object#get:color i32.const 3 i32.eq @@ -1741,37 +1741,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $iter i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members - local.get $1 + local.get $iter call $~lib/rt/tcms/Object#get:next - local.set $1 + local.set $iter br $while-continue|0 end end global.get $~lib/rt/tcms/white i32.eqz - local.set $3 + local.set $black global.get $~lib/rt/tcms/toSpace - local.set $4 - local.get $4 + local.set $to + local.get $to call $~lib/rt/tcms/Object#get:next - local.set $1 + local.set $iter loop $while-continue|1 - local.get $1 - local.get $4 + local.get $iter + local.get $to i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if i32.const 1 drop - local.get $1 + local.get $iter call $~lib/rt/tcms/Object#get:color - local.get $3 + local.get $black i32.eq i32.eqz if @@ -1782,32 +1782,32 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $iter i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members - local.get $1 + local.get $iter call $~lib/rt/tcms/Object#get:next - local.set $1 + local.set $iter br $while-continue|1 end end global.get $~lib/rt/tcms/fromSpace - local.set $5 - local.get $5 + local.set $from + local.get $from call $~lib/rt/tcms/Object#get:next - local.set $1 + local.set $iter loop $while-continue|2 - local.get $1 - local.get $5 + local.get $iter + local.get $from i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if i32.const 1 drop - local.get $1 + local.get $iter call $~lib/rt/tcms/Object#get:color global.get $~lib/rt/tcms/white i32.eq @@ -1820,75 +1820,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $iter call $~lib/rt/tcms/Object#get:next - local.set $6 - local.get $1 + local.set $newNext + local.get $iter global.get $~lib/memory/__heap_base i32.lt_u if - local.get $1 + local.get $iter i32.const 0 call $~lib/rt/tcms/Object#set:nextWithColor - local.get $1 + local.get $iter i32.const 0 call $~lib/rt/tcms/Object#set:prev else global.get $~lib/rt/tcms/total - local.get $1 + local.get $iter call $~lib/rt/tcms/Object#get:size i32.sub global.set $~lib/rt/tcms/total i32.const 0 drop - local.get $1 + local.get $iter i32.const 4 i32.add call $~lib/rt/tlsf/__free end - local.get $6 - local.set $1 + local.get $newNext + local.set $iter br $while-continue|2 end end - local.get $5 - local.get $5 + local.get $from + local.get $from call $~lib/rt/tcms/Object#set:nextWithColor - local.get $5 - local.get $5 + local.get $from + local.get $from call $~lib/rt/tcms/Object#set:prev - local.get $4 + local.get $to global.set $~lib/rt/tcms/fromSpace - local.get $5 + local.get $from global.set $~lib/rt/tcms/toSpace - local.get $3 + local.get $black global.set $~lib/rt/tcms/white i32.const 0 drop i32.const 0 drop ) - (func $~lib/rt/tcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/tcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/tcms/Object#get:color global.get $~lib/rt/tcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/tcms/Object#unlink - local.get $2 + local.get $obj global.get $~lib/rt/tcms/toSpace global.get $~lib/rt/tcms/white i32.eqz diff --git a/tests/compiler/rt/runtime-stub-export.debug.wat b/tests/compiler/rt/runtime-stub-export.debug.wat index db8f0b3aeb..e810ff2b39 100644 --- a/tests/compiler/rt/runtime-stub-export.debug.wat +++ b/tests/compiler/rt/runtime-stub-export.debug.wat @@ -23,15 +23,15 @@ (export "__rtti_base" (global $~lib/rt/__rtti_base)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/rt/stub/maybeGrowMemory (param $newOffset i32) + (local $pagesBefore i32) + (local $maxOffset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) memory.size - local.set $1 - local.get $1 + local.set $pagesBefore + local.get $pagesBefore i32.const 16 i32.shl i32.const 15 @@ -40,13 +40,13 @@ i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.get $2 + local.set $maxOffset + local.get $newOffset + local.get $maxOffset i32.gt_u if - local.get $0 - local.get $2 + local.get $newOffset + local.get $maxOffset i32.sub i32.const 65535 i32.add @@ -56,22 +56,22 @@ i32.and i32.const 16 i32.shr_u - local.set $3 - local.get $1 - local.tee $4 - local.get $3 - local.tee $5 - local.get $4 - local.get $5 + local.set $var$3 + local.get $pagesBefore + local.tee $var$4 + local.get $var$3 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.gt_s select - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $var$3 memory.grow i32.const 0 i32.lt_s @@ -80,7 +80,7 @@ end end end - local.get $0 + local.get $newOffset global.set $~lib/rt/stub/offset ) (func $~lib/rt/common/BLOCK#set:mmInfo (param $0 i32) (param $1 i32) @@ -88,12 +88,12 @@ local.get $1 i32.store ) - (func $~lib/rt/stub/__alloc (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 + (func $~lib/rt/stub/__alloc (param $size i32) (result i32) + (local $block i32) + (local $ptr i32) + (local $var$3 i32) + (local $payloadSize i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -105,14 +105,14 @@ unreachable end global.get $~lib/rt/stub/offset - local.set $1 + local.set $block global.get $~lib/rt/stub/offset i32.const 4 i32.add - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $ptr + local.get $size + local.set $var$3 + local.get $var$3 i32.const 4 i32.add i32.const 15 @@ -123,15 +123,15 @@ i32.and i32.const 4 i32.sub - local.set $4 - local.get $2 - local.get $4 + local.set $payloadSize + local.get $ptr + local.get $payloadSize i32.add call $~lib/rt/stub/maybeGrowMemory - local.get $1 - local.get $4 + local.get $block + local.get $payloadSize call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $ptr ) (func $~lib/rt/common/OBJECT#set:gcInfo (param $0 i32) (param $1 i32) local.get $0 @@ -153,10 +153,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/stub/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/stub/__new (param $size i32) (param $id i32) (result i32) + (local $ptr i32) + (local $object i32) + local.get $size i32.const 1073741804 i32.gt_u if @@ -168,34 +168,34 @@ unreachable end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/stub/__alloc - local.set $2 - local.get $2 + local.set $ptr + local.get $ptr i32.const 4 i32.sub - local.set $3 - local.get $3 + local.set $object + local.get $object i32.const 0 call $~lib/rt/common/OBJECT#set:gcInfo - local.get $3 + local.get $object i32.const 0 call $~lib/rt/common/OBJECT#set:gcInfo2 - local.get $3 - local.get $1 + local.get $object + local.get $id call $~lib/rt/common/OBJECT#set:rtId - local.get $3 - local.get $0 + local.get $object + local.get $size call $~lib/rt/common/OBJECT#set:rtSize - local.get $2 + local.get $ptr i32.const 16 i32.add ) - (func $~lib/rt/stub/__pin (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/stub/__pin (param $ptr i32) (result i32) + local.get $ptr ) - (func $~lib/rt/stub/__unpin (param $0 i32) + (func $~lib/rt/stub/__unpin (param $ptr i32) nop ) (func $~lib/rt/stub/__collect diff --git a/tests/compiler/scoped.debug.wat b/tests/compiler/scoped.debug.wat index 4297fb4e1f..066fea57ef 100644 --- a/tests/compiler/scoped.debug.wat +++ b/tests/compiler/scoped.debug.wat @@ -12,58 +12,58 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (start $~start) - (func $scoped/fn (param $0 i32) - (local $1 i32) + (func $scoped/fn (param $c i32) + (local $var$1 i32) i32.const 0 - local.set $1 - local.get $0 - local.set $1 + local.set $var$1 + local.get $c + local.set $var$1 ) (func $start:scoped - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i64) - (local $4 f32) + (local $anotherStartFunctionLocal i32) + (local $var$1 i32) + (local $var$2 i32) + (local $var$3 i64) + (local $var$4 f32) i32.const 0 - local.set $0 + local.set $anotherStartFunctionLocal loop $for-loop|0 - local.get $0 + local.get $anotherStartFunctionLocal i32.const 1 i32.lt_s - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 if nop - local.get $0 + local.get $anotherStartFunctionLocal i32.const 1 i32.add - local.set $0 + local.set $anotherStartFunctionLocal br $for-loop|0 end end i32.const 0 - local.set $1 + local.set $var$1 loop $for-loop|1 - local.get $1 + local.get $var$1 i32.const 1 i32.lt_s - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $var$1 drop - local.get $1 + local.get $var$1 i32.const 1 i32.add - local.set $1 + local.set $var$1 br $for-loop|1 end end i64.const 5 - local.set $3 + local.set $var$3 f32.const 10 - local.set $4 + local.set $var$4 i32.const 42 call $scoped/fn ) diff --git a/tests/compiler/simd.debug.wat b/tests/compiler/simd.debug.wat index 79bbf592bb..43014db8e4 100644 --- a/tests/compiler/simd.debug.wat +++ b/tests/compiler/simd.debug.wat @@ -90,50 +90,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -146,58 +146,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -214,12 +214,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -229,19 +229,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -252,27 +252,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -280,35 +280,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -318,15 +318,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -336,25 +336,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -362,33 +362,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -416,23 +416,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -444,15 +444,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -464,33 +464,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -498,21 +498,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -527,36 +527,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -564,67 +564,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -634,22 +634,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -659,12 +659,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -676,75 +676,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -756,38 +756,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -801,12 +801,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -817,38 +817,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -856,21 +856,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -885,101 +885,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -990,7 +990,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1001,26 +1001,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1033,27 +1033,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1067,11 +1067,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1082,66 +1082,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1151,10 +1151,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1165,13 +1165,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1182,109 +1182,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1292,7 +1292,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1309,23 +1309,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1337,54 +1337,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1405,30 +1405,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1438,9 +1438,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1450,8 +1450,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1459,43 +1459,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1507,17 +1507,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1531,7 +1531,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1549,7 +1549,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1559,12 +1559,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1586,7 +1586,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1606,14 +1606,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1626,8 +1626,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1638,37 +1638,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1676,16 +1676,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1693,21 +1693,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1722,12 +1722,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1735,49 +1735,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1787,90 +1787,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1879,22 +1879,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1903,27 +1903,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1938,69 +1938,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2015,29 +2015,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2050,13 +2050,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2067,25 +2067,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2100,10 +2100,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2121,64 +2121,64 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/rt/__newBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - local.get $1 + (func $~lib/rt/__newBuffer (param $size i32) (param $id i32) (param $data i32) (result i32) + (local $buffer i32) + local.get $size + local.get $id call $~lib/rt/itcms/__new - local.set $3 - local.get $2 + local.set $buffer + local.get $data if - local.get $3 - local.get $2 - local.get $0 + local.get $buffer + local.get $data + local.get $size memory.copy end - local.get $3 + local.get $buffer ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32) + (local $child i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $childPtr i32.eqz if return end i32.const 1 drop - local.get $0 + local.get $parentPtr i32.eqz if i32.const 0 @@ -2188,37 +2188,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $childPtr i32.const 20 i32.sub - local.set $3 - local.get $3 + local.set $child + local.get $child call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $0 + local.get $parentPtr i32.const 20 i32.sub - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 call $~lib/rt/itcms/Object#get:color - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $2 + local.get $expectMultiple if - local.get $4 + local.get $var$4 call $~lib/rt/itcms/Object#makeGray else - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end else - local.get $5 + local.get $var$5 i32.const 3 i32.eq if (result i32) @@ -2229,16 +2229,16 @@ i32.const 0 end if - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end end end ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result v128) - (local $2 v128) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result v128) + (local $value v128) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -2249,23 +2249,23 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 4 i32.shl i32.add v128.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) (func $simd/test_v128 - (local $0 i32) - (local $1 v128) - (local $2 i32) - (local $3 v128) + (local $var$0 i32) + (local $var$1 v128) + (local $ptr i32) + (local $v v128) v128.const i32x4 0x00000001 0x00000000 0x00000000 0x00000000 v128.any_true i32.const 0 @@ -2348,20 +2348,20 @@ drop i32.const 64 call $~lib/rt/tlsf/__alloc - local.set $0 - local.get $0 - local.get $0 + local.set $var$0 + local.get $var$0 + local.get $var$0 v128.load offset=16 v128.store offset=32 - local.get $0 + local.get $var$0 call $~lib/rt/tlsf/__free i32.const 16 call $~lib/rt/tlsf/__alloc - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 i32.const 42 i32.store8 - local.get $0 + local.get $var$0 v128.load8_splat v128.const i32x4 0x2a2a2a2a 0x2a2a2a2a 0x2a2a2a2a 0x2a2a2a2a i8x16.eq @@ -2377,15 +2377,15 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $var$0 call $~lib/rt/tlsf/__free i32.const 16 call $~lib/rt/tlsf/__alloc - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 i32.const 42 i32.store16 - local.get $0 + local.get $var$0 v128.load16_splat v128.const i32x4 0x002a002a 0x002a002a 0x002a002a 0x002a002a i8x16.eq @@ -2401,15 +2401,15 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $var$0 call $~lib/rt/tlsf/__free i32.const 16 call $~lib/rt/tlsf/__alloc - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 i32.const 42 i32.store - local.get $0 + local.get $var$0 v128.load32_splat v128.const i32x4 0x0000002a 0x0000002a 0x0000002a 0x0000002a i8x16.eq @@ -2425,15 +2425,15 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $var$0 call $~lib/rt/tlsf/__free i32.const 16 call $~lib/rt/tlsf/__alloc - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 i64.const 42 i64.store - local.get $0 + local.get $var$0 v128.load64_splat v128.const i32x4 0x0000002a 0x00000000 0x0000002a 0x00000000 i8x16.eq @@ -2449,15 +2449,15 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $var$0 call $~lib/rt/tlsf/__free i32.const 16 call $~lib/rt/tlsf/__alloc - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 i32.const 42 i32.store - local.get $0 + local.get $var$0 v128.load32_zero v128.const i32x4 0x0000002a 0x00000000 0x00000000 0x00000000 i8x16.eq @@ -2473,15 +2473,15 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $var$0 call $~lib/rt/tlsf/__free i32.const 16 call $~lib/rt/tlsf/__alloc - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 i64.const 42 i64.store - local.get $0 + local.get $var$0 v128.load64_zero v128.const i32x4 0x0000002a 0x00000000 0x00000000 0x00000000 i8x16.eq @@ -2497,7 +2497,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $var$0 call $~lib/rt/tlsf/__free v128.const i32x4 0x3f800000 0xbf800000 0x3f800000 0xbf800000 v128.const i32x4 0xbf800000 0x3f800000 0xbf800000 0x3f800000 @@ -2562,8 +2562,8 @@ drop v128.const i32x4 0x00000001 0x00000002 0x00000003 0x00000004 f32x4.convert_i32x4_s - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 v128.const i32x4 0x3f800000 0x40000000 0x40400000 0x40800000 i8x16.eq i8x16.all_true @@ -2578,10 +2578,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i32x4.trunc_sat_f32x4_s - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 v128.const i32x4 0x00000001 0x00000002 0x00000003 0x00000004 i8x16.eq i8x16.all_true @@ -2598,8 +2598,8 @@ end v128.const i32x4 0x00000001 0x00000002 0x00000000 0x00000000 f64x2.convert_low_i32x4_s - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 v128.const i32x4 0x00000000 0x3ff00000 0x00000000 0x40000000 i8x16.eq i8x16.all_true @@ -2614,10 +2614,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i32x4.trunc_sat_f64x2_s_zero - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 v128.const i32x4 0x00000001 0x00000002 0x00000000 0x00000000 i8x16.eq i8x16.all_true @@ -2634,17 +2634,17 @@ end i32.const 16 call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $2 + local.set $ptr + local.get $ptr i32.const 42 i32.store v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000 - local.set $3 - local.get $2 - local.get $3 + local.set $v + local.get $ptr + local.get $v v128.load32_lane 0 - local.set $3 - local.get $3 + local.set $v + local.get $v v128.const i32x4 0x0000002a 0x00000000 0x00000000 0x00000000 i8x16.eq i8x16.all_true @@ -2659,21 +2659,21 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $ptr call $~lib/rt/tlsf/__free i32.const 16 call $~lib/rt/tlsf/__alloc - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 i32.const 42 i32.store v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000 - local.set $1 - local.get $0 - local.get $1 + local.set $var$1 + local.get $var$0 + local.get $var$1 v128.load32_lane 0 - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 v128.const i32x4 0x0000002a 0x00000000 0x00000000 0x00000000 i8x16.eq i8x16.all_true @@ -2688,11 +2688,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $var$0 + local.get $var$1 v128.load8_lane 0 - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 v128.const i32x4 0x0000002a 0x00000000 0x00000000 0x00000000 i8x16.eq i8x16.all_true @@ -2707,11 +2707,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $var$0 + local.get $var$1 v128.load16_lane 0 - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 v128.const i32x4 0x0000002a 0x00000000 0x00000000 0x00000000 i8x16.eq i8x16.all_true @@ -2726,11 +2726,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $var$0 + local.get $var$1 v128.load32_lane 0 - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 v128.const i32x4 0x0000002a 0x00000000 0x00000000 0x00000000 i8x16.eq i8x16.all_true @@ -2745,11 +2745,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $var$0 + local.get $var$1 v128.load64_lane 0 - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 v128.const i32x4 0x0000002a 0x00000000 0x00000000 0x00000000 i8x16.eq i8x16.all_true @@ -2764,12 +2764,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $var$0 call $~lib/rt/tlsf/__free v128.const i32x4 0x3f8ccccd 0xbe800000 0x428c051f 0x40800000 f32x4.ceil - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 v128.const i32x4 0x40000000 0x80000000 0x428e0000 0x40800000 i8x16.eq i8x16.all_true @@ -2786,8 +2786,8 @@ end v128.const i32x4 0x3f8ccccd 0xbe800000 0x428c051f 0x40800000 f32x4.floor - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 v128.const i32x4 0x3f800000 0xbf800000 0x428c0000 0x40800000 i8x16.eq i8x16.all_true @@ -2849,19 +2849,19 @@ drop ) (func $simd/test_i8x16 - (local $0 v128) - (local $1 v128) - (local $2 v128) - (local $3 v128) - (local $4 v128) - (local $5 v128) - (local $6 v128) - (local $7 v128) - (local $8 v128) - (local $9 v128) + (local $a v128) + (local $b v128) + (local $c v128) + (local $one v128) + (local $negOne v128) + (local $only1st v128) + (local $excl1st v128) + (local $var$7 v128) + (local $var$8 v128) + (local $var$9 v128) v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x7f0f0e0d - local.set $0 - local.get $0 + local.set $a + local.get $a v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x7f0f0e0d i8x16.eq i8x16.all_true @@ -2878,8 +2878,8 @@ end i32.const 1 i8x16.splat - local.set $1 - local.get $1 + local.set $b + local.get $b v128.const i32x4 0x01010101 0x01010101 0x01010101 0x01010101 i8x16.eq i8x16.all_true @@ -2894,11 +2894,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $a + local.get $b i8x16.add - local.set $2 - local.get $2 + local.set $c + local.get $c v128.const i32x4 0x05040302 0x09080706 0x0d0c0b0a 0x80100f0e i8x16.eq i8x16.all_true @@ -2913,10 +2913,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $1 + local.get $c + local.get $b i8x16.sub - local.get $0 + local.get $a i8x16.eq i8x16.all_true i32.const 0 @@ -2975,7 +2975,7 @@ i32.const 0 i32.ne drop - local.get $0 + local.get $a i8x16.neg v128.const i32x4 0xfcfdfeff 0xf8f9fafb 0xf4f5f6f7 0x81f1f2f3 i8x16.eq @@ -2991,7 +2991,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $c i8x16.extract_lane_s 0 i32.extend8_s i32.const 2 @@ -3005,7 +3005,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $c i8x16.extract_lane_s 15 i32.extend8_s i32.const -128 @@ -3019,7 +3019,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $c i8x16.extract_lane_u 15 i32.const 255 i32.and @@ -3034,7 +3034,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $c i32.const 17 i8x16.replace_lane 15 v128.const i32x4 0x05040302 0x09080706 0x0d0c0b0a 0x11100f0e @@ -3051,8 +3051,8 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $a + local.get $b i8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 v128.const i32x4 0x04030201 0x08070605 0x01010101 0x01010101 i8x16.eq @@ -3164,21 +3164,21 @@ i8x16.splat i32.const 1 i8x16.replace_lane 0 - local.set $3 + local.set $one i32.const 0 i8x16.splat i32.const -1 i8x16.replace_lane 0 - local.set $4 - local.get $4 - local.set $5 - local.get $4 + local.set $negOne + local.get $negOne + local.set $only1st + local.get $negOne v128.not - local.set $6 - local.get $4 - local.get $3 + local.set $excl1st + local.get $negOne + local.get $one i8x16.eq - local.get $6 + local.get $excl1st i8x16.eq i8x16.all_true i32.const 0 @@ -3192,10 +3192,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $negOne + local.get $one i8x16.ne - local.get $5 + local.get $only1st i8x16.eq i8x16.all_true i32.const 0 @@ -3209,10 +3209,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $negOne + local.get $one i8x16.lt_s - local.get $5 + local.get $only1st i8x16.eq i8x16.all_true i32.const 0 @@ -3226,10 +3226,10 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $4 + local.get $one + local.get $negOne i8x16.lt_u - local.get $5 + local.get $only1st i8x16.eq i8x16.all_true i32.const 0 @@ -3243,10 +3243,10 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $4 + local.get $one + local.get $negOne i8x16.le_s - local.get $6 + local.get $excl1st i8x16.eq i8x16.all_true i32.const 0 @@ -3260,10 +3260,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $negOne + local.get $one i8x16.le_u - local.get $6 + local.get $excl1st i8x16.eq i8x16.all_true i32.const 0 @@ -3277,10 +3277,10 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $4 + local.get $one + local.get $negOne i8x16.gt_s - local.get $5 + local.get $only1st i8x16.eq i8x16.all_true i32.const 0 @@ -3294,10 +3294,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $negOne + local.get $one i8x16.gt_u - local.get $5 + local.get $only1st i8x16.eq i8x16.all_true i32.const 0 @@ -3311,10 +3311,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $negOne + local.get $one i8x16.ge_s - local.get $6 + local.get $excl1st i8x16.eq i8x16.all_true i32.const 0 @@ -3328,10 +3328,10 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $4 + local.get $one + local.get $negOne i8x16.ge_u - local.get $6 + local.get $excl1st i8x16.eq i8x16.all_true i32.const 0 @@ -3370,11 +3370,11 @@ i32.ne drop v128.const i32x4 0x03020100 0x07060504 0x0b0a0908 0x0f0e0d0c - local.set $7 + local.set $var$7 v128.const i32x4 0x13121110 0x17161514 0x1b1a1918 0x1f1e1d1c - local.set $8 - local.get $7 - local.get $8 + local.set $var$8 + local.get $var$7 + local.get $var$8 i8x16.shuffle 0 17 2 19 4 21 6 23 8 25 10 27 12 29 14 31 v128.const i32x4 0x13021100 0x17061504 0x1b0a1908 0x1f0e1d0c i8x16.eq @@ -3391,9 +3391,9 @@ unreachable end v128.const i32x4 0x0c0d0e10 0x08090a0b 0x04050607 0x00010203 - local.set $9 - local.get $7 - local.get $9 + local.set $var$9 + local.get $var$7 + local.get $var$9 i8x16.swizzle v128.const i32x4 0x0c0d0e00 0x08090a0b 0x04050607 0x00010203 i8x16.eq @@ -3409,7 +3409,7 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $var$7 i8x16.popcnt v128.const i32x4 0x02010100 0x03020201 0x03020201 0x04030302 i8x16.eq @@ -3469,17 +3469,17 @@ drop ) (func $simd/test_i16x8 - (local $0 v128) - (local $1 v128) - (local $2 v128) - (local $3 v128) - (local $4 v128) - (local $5 v128) - (local $6 v128) - (local $7 i32) + (local $a v128) + (local $b v128) + (local $c v128) + (local $one v128) + (local $negOne v128) + (local $only1st v128) + (local $excl1st v128) + (local $var$7 i32) v128.const i32x4 0x00020001 0x00040003 0x00060005 0x7fff0007 - local.set $0 - local.get $0 + local.set $a + local.get $a v128.const i32x4 0x00020001 0x00040003 0x00060005 0x7fff0007 i8x16.eq i8x16.all_true @@ -3496,8 +3496,8 @@ end i32.const 1 i16x8.splat - local.set $1 - local.get $1 + local.set $b + local.get $b v128.const i32x4 0x00010001 0x00010001 0x00010001 0x00010001 i8x16.eq i8x16.all_true @@ -3512,11 +3512,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $a + local.get $b i16x8.add - local.set $2 - local.get $2 + local.set $c + local.get $c v128.const i32x4 0x00030002 0x00050004 0x00070006 0x80000008 i8x16.eq i8x16.all_true @@ -3531,10 +3531,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $1 + local.get $c + local.get $b i16x8.sub - local.get $0 + local.get $a i8x16.eq i8x16.all_true i32.const 0 @@ -3548,10 +3548,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $1 + local.get $c + local.get $b i16x8.mul - local.get $2 + local.get $c i8x16.eq i8x16.all_true i32.const 0 @@ -3610,7 +3610,7 @@ i32.const 0 i32.ne drop - local.get $0 + local.get $a i16x8.neg v128.const i32x4 0xfffeffff 0xfffcfffd 0xfffafffb 0x8001fff9 i8x16.eq @@ -3626,7 +3626,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $c i16x8.extract_lane_s 0 i32.extend16_s i32.const 2 @@ -3640,7 +3640,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $c i16x8.extract_lane_s 7 i32.extend16_s i32.const -32768 @@ -3654,7 +3654,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $c i16x8.extract_lane_u 7 i32.const 65535 i32.and @@ -3669,7 +3669,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $c i32.const 9 i16x8.replace_lane 7 v128.const i32x4 0x00030002 0x00050004 0x00070006 0x00090008 @@ -3686,8 +3686,8 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $a + local.get $b i8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 v128.const i32x4 0x00020001 0x00040003 0x00010001 0x00010001 i8x16.eq @@ -3799,21 +3799,21 @@ i16x8.splat i32.const 1 i16x8.replace_lane 0 - local.set $3 + local.set $one i32.const 0 i16x8.splat i32.const -1 i16x8.replace_lane 0 - local.set $4 - local.get $4 - local.set $5 - local.get $4 + local.set $negOne + local.get $negOne + local.set $only1st + local.get $negOne v128.not - local.set $6 - local.get $4 - local.get $3 + local.set $excl1st + local.get $negOne + local.get $one i16x8.eq - local.get $6 + local.get $excl1st i8x16.eq i8x16.all_true i32.const 0 @@ -3827,10 +3827,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $negOne + local.get $one i16x8.ne - local.get $5 + local.get $only1st i8x16.eq i8x16.all_true i32.const 0 @@ -3844,10 +3844,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $negOne + local.get $one i16x8.lt_s - local.get $5 + local.get $only1st i8x16.eq i8x16.all_true i32.const 0 @@ -3861,10 +3861,10 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $4 + local.get $one + local.get $negOne i16x8.lt_u - local.get $5 + local.get $only1st i8x16.eq i8x16.all_true i32.const 0 @@ -3878,10 +3878,10 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $4 + local.get $one + local.get $negOne i16x8.le_s - local.get $6 + local.get $excl1st i8x16.eq i8x16.all_true i32.const 0 @@ -3895,10 +3895,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $negOne + local.get $one i16x8.le_u - local.get $6 + local.get $excl1st i8x16.eq i8x16.all_true i32.const 0 @@ -3912,10 +3912,10 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $4 + local.get $one + local.get $negOne i16x8.gt_s - local.get $5 + local.get $only1st i8x16.eq i8x16.all_true i32.const 0 @@ -3929,10 +3929,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $negOne + local.get $one i16x8.gt_u - local.get $5 + local.get $only1st i8x16.eq i8x16.all_true i32.const 0 @@ -3946,10 +3946,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $negOne + local.get $one i16x8.ge_s - local.get $6 + local.get $excl1st i8x16.eq i8x16.all_true i32.const 0 @@ -3963,10 +3963,10 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $4 + local.get $one + local.get $negOne i16x8.ge_u - local.get $6 + local.get $excl1st i8x16.eq i8x16.all_true i32.const 0 @@ -4052,11 +4052,11 @@ i32.const 0 i32.ne drop - local.get $0 - local.get $1 + local.get $a + local.get $b i8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 - local.get $0 - local.get $1 + local.get $a + local.get $b i8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 i8x16.eq i8x16.all_true @@ -4071,11 +4071,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $a + local.get $b i8x16.swizzle - local.get $0 - local.get $1 + local.get $a + local.get $b i8x16.swizzle i8x16.eq i8x16.all_true @@ -4092,32 +4092,32 @@ end i32.const 16 call $~lib/rt/tlsf/__alloc - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 i32.const 1 i32.store8 - local.get $7 + local.get $var$7 i32.const 2 i32.store8 offset=1 - local.get $7 + local.get $var$7 i32.const 3 i32.store8 offset=2 - local.get $7 + local.get $var$7 i32.const 4 i32.store8 offset=3 - local.get $7 + local.get $var$7 i32.const 5 i32.store8 offset=4 - local.get $7 + local.get $var$7 i32.const 6 i32.store8 offset=5 - local.get $7 + local.get $var$7 i32.const 7 i32.store8 offset=6 - local.get $7 + local.get $var$7 i32.const -1 i32.store8 offset=7 - local.get $7 + local.get $var$7 v128.load8x8_s align=1 v128.const i32x4 0x00020001 0x00040003 0x00060005 0xffff0007 i8x16.eq @@ -4133,7 +4133,7 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $var$7 v128.load8x8_u align=1 v128.const i32x4 0x00020001 0x00040003 0x00060005 0x00ff0007 i8x16.eq @@ -4149,7 +4149,7 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $var$7 call $~lib/rt/tlsf/__free v128.const i32x4 0xc001ffff 0xffff7ffd 0xffff8000 0x8000bfff v128.const i32x4 0xc000ffff 0x80000001 0x00018000 0xfff6c000 @@ -4160,26 +4160,26 @@ i32.const 0 i32.ne drop - local.get $0 + local.get $a i16x8.extadd_pairwise_i8x16_s drop - local.get $0 + local.get $a i16x8.extadd_pairwise_i8x16_u drop - local.get $0 - local.get $0 + local.get $a + local.get $a i16x8.extmul_low_i8x16_s drop - local.get $0 - local.get $0 + local.get $a + local.get $a i16x8.extmul_low_i8x16_u drop - local.get $0 - local.get $0 + local.get $a + local.get $a i16x8.extmul_high_i8x16_s drop - local.get $0 - local.get $0 + local.get $a + local.get $a i16x8.extmul_high_i8x16_u drop v128.const i32x4 0x00010001 0x00010001 0x00010001 0x00010001 @@ -4226,17 +4226,17 @@ drop ) (func $simd/test_i32x4 - (local $0 v128) - (local $1 v128) - (local $2 v128) - (local $3 v128) - (local $4 v128) - (local $5 v128) - (local $6 v128) - (local $7 i32) + (local $a v128) + (local $b v128) + (local $c v128) + (local $one v128) + (local $negOne v128) + (local $only1st v128) + (local $excl1st v128) + (local $var$7 i32) v128.const i32x4 0x00000001 0x00000002 0x00000003 0x7fffffff - local.set $0 - local.get $0 + local.set $a + local.get $a v128.const i32x4 0x00000001 0x00000002 0x00000003 0x7fffffff i8x16.eq i8x16.all_true @@ -4253,8 +4253,8 @@ end i32.const 1 i32x4.splat - local.set $1 - local.get $1 + local.set $b + local.get $b v128.const i32x4 0x00000001 0x00000001 0x00000001 0x00000001 i8x16.eq i8x16.all_true @@ -4269,11 +4269,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $a + local.get $b i32x4.add - local.set $2 - local.get $2 + local.set $c + local.get $c v128.const i32x4 0x00000002 0x00000003 0x00000004 0x80000000 i8x16.eq i8x16.all_true @@ -4288,10 +4288,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $1 + local.get $c + local.get $b i32x4.sub - local.get $0 + local.get $a i8x16.eq i8x16.all_true i32.const 0 @@ -4305,10 +4305,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $1 + local.get $c + local.get $b i32x4.mul - local.get $2 + local.get $c i8x16.eq i8x16.all_true i32.const 0 @@ -4367,7 +4367,7 @@ i32.const 0 i32.ne drop - local.get $0 + local.get $a i32x4.neg v128.const i32x4 0xffffffff 0xfffffffe 0xfffffffd 0x80000001 i8x16.eq @@ -4383,7 +4383,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $c i32x4.extract_lane 0 i32.const 2 i32.eq @@ -4396,7 +4396,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $c i32x4.extract_lane 3 i32.const -2147483648 i32.eq @@ -4409,7 +4409,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $c i32.const 5 i32x4.replace_lane 3 v128.const i32x4 0x00000002 0x00000003 0x00000004 0x00000005 @@ -4426,8 +4426,8 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $a + local.get $b i8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 v128.const i32x4 0x00000001 0x00000002 0x00000001 0x00000001 i8x16.eq @@ -4495,21 +4495,21 @@ i32x4.splat i32.const 1 i32x4.replace_lane 0 - local.set $3 + local.set $one i32.const 0 i32x4.splat i32.const -1 i32x4.replace_lane 0 - local.set $4 - local.get $4 - local.set $5 - local.get $4 + local.set $negOne + local.get $negOne + local.set $only1st + local.get $negOne v128.not - local.set $6 - local.get $4 - local.get $3 + local.set $excl1st + local.get $negOne + local.get $one i32x4.eq - local.get $6 + local.get $excl1st i8x16.eq i8x16.all_true i32.const 0 @@ -4523,10 +4523,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $negOne + local.get $one i32x4.ne - local.get $5 + local.get $only1st i8x16.eq i8x16.all_true i32.const 0 @@ -4540,10 +4540,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $negOne + local.get $one i32x4.lt_s - local.get $5 + local.get $only1st i8x16.eq i8x16.all_true i32.const 0 @@ -4557,10 +4557,10 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $4 + local.get $one + local.get $negOne i32x4.lt_u - local.get $5 + local.get $only1st i8x16.eq i8x16.all_true i32.const 0 @@ -4574,10 +4574,10 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $4 + local.get $one + local.get $negOne i32x4.le_s - local.get $6 + local.get $excl1st i8x16.eq i8x16.all_true i32.const 0 @@ -4591,10 +4591,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $negOne + local.get $one i32x4.le_u - local.get $6 + local.get $excl1st i8x16.eq i8x16.all_true i32.const 0 @@ -4608,10 +4608,10 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $4 + local.get $one + local.get $negOne i32x4.gt_s - local.get $5 + local.get $only1st i8x16.eq i8x16.all_true i32.const 0 @@ -4625,10 +4625,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $negOne + local.get $one i32x4.gt_u - local.get $5 + local.get $only1st i8x16.eq i8x16.all_true i32.const 0 @@ -4642,10 +4642,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $3 + local.get $negOne + local.get $one i32x4.ge_s - local.get $6 + local.get $excl1st i8x16.eq i8x16.all_true i32.const 0 @@ -4659,10 +4659,10 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $4 + local.get $one + local.get $negOne i32x4.ge_u - local.get $6 + local.get $excl1st i8x16.eq i8x16.all_true i32.const 0 @@ -4744,11 +4744,11 @@ i32.const 0 i32.ne drop - local.get $0 - local.get $1 + local.get $a + local.get $b i8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 - local.get $0 - local.get $1 + local.get $a + local.get $b i8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 i8x16.eq i8x16.all_true @@ -4765,20 +4765,20 @@ end i32.const 16 call $~lib/rt/tlsf/__alloc - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 i32.const 1 i32.store16 - local.get $7 + local.get $var$7 i32.const 2 i32.store16 offset=2 - local.get $7 + local.get $var$7 i32.const 3 i32.store16 offset=4 - local.get $7 + local.get $var$7 i32.const -1 i32.store16 offset=6 - local.get $7 + local.get $var$7 v128.load16x4_s align=2 v128.const i32x4 0x00000001 0x00000002 0x00000003 0xffffffff i8x16.eq @@ -4794,7 +4794,7 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $var$7 v128.load16x4_u align=2 v128.const i32x4 0x00000001 0x00000002 0x00000003 0x0000ffff i8x16.eq @@ -4810,34 +4810,34 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $var$7 call $~lib/rt/tlsf/__free - local.get $0 + local.get $a i32x4.extadd_pairwise_i16x8_s drop - local.get $0 + local.get $a i32x4.extadd_pairwise_i16x8_u drop - local.get $0 + local.get $a i32x4.trunc_sat_f64x2_s_zero drop - local.get $0 + local.get $a i32x4.trunc_sat_f64x2_u_zero drop - local.get $0 - local.get $0 + local.get $a + local.get $a i32x4.extmul_low_i16x8_s drop - local.get $0 - local.get $0 + local.get $a + local.get $a i32x4.extmul_low_i16x8_u drop - local.get $0 - local.get $0 + local.get $a + local.get $a i32x4.extmul_high_i16x8_s drop - local.get $0 - local.get $0 + local.get $a + local.get $a i32x4.extmul_high_i16x8_u drop v128.const i32x4 0x00000001 0x00000001 0x00000001 0x00000001 @@ -4889,13 +4889,13 @@ drop ) (func $simd/test_i64x2 - (local $0 v128) - (local $1 v128) - (local $2 v128) - (local $3 i32) + (local $a v128) + (local $b v128) + (local $c v128) + (local $var$3 i32) v128.const i32x4 0x00000001 0x00000000 0xffffffff 0x7fffffff - local.set $0 - local.get $0 + local.set $a + local.get $a v128.const i32x4 0x00000001 0x00000000 0xffffffff 0x7fffffff i8x16.eq i8x16.all_true @@ -4912,8 +4912,8 @@ end i64.const 1 i64x2.splat - local.set $1 - local.get $1 + local.set $b + local.get $b v128.const i32x4 0x00000001 0x00000000 0x00000001 0x00000000 i8x16.eq i8x16.all_true @@ -4928,11 +4928,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $a + local.get $b i64x2.add - local.set $2 - local.get $2 + local.set $c + local.get $c v128.const i32x4 0x00000002 0x00000000 0x00000000 0x80000000 i8x16.eq i8x16.all_true @@ -4947,10 +4947,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $1 + local.get $c + local.get $b i64x2.sub - local.get $0 + local.get $a i8x16.eq i8x16.all_true i32.const 0 @@ -4964,10 +4964,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $1 + local.get $c + local.get $b i64x2.mul - local.get $2 + local.get $c i8x16.eq i8x16.all_true i32.const 0 @@ -4981,7 +4981,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $a i64x2.neg v128.const i32x4 0xffffffff 0xffffffff 0x00000001 0x80000000 i8x16.eq @@ -4997,7 +4997,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $c i64x2.extract_lane 0 i64.const 2 i64.eq @@ -5010,7 +5010,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $c i64x2.extract_lane 1 i64.const -9223372036854775808 i64.eq @@ -5023,7 +5023,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $c i64.const 3 i64x2.replace_lane 1 v128.const i32x4 0x00000002 0x00000000 0x00000003 0x00000000 @@ -5040,8 +5040,8 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $a + local.get $b i8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 v128.const i32x4 0x00000001 0x00000000 0x00000001 0x00000000 i8x16.eq @@ -5107,14 +5107,14 @@ drop i32.const 16 call $~lib/rt/tlsf/__alloc - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const 1 i32.store - local.get $3 + local.get $var$3 i32.const -1 i32.store offset=4 - local.get $3 + local.get $var$3 v128.load32x2_s align=4 v128.const i32x4 0x00000001 0x00000000 0xffffffff 0xffffffff i8x16.eq @@ -5130,7 +5130,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $var$3 v128.load32x2_u align=4 v128.const i32x4 0x00000001 0x00000000 0xffffffff 0x00000000 i8x16.eq @@ -5146,22 +5146,22 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $var$3 call $~lib/rt/tlsf/__free - local.get $0 - local.get $0 + local.get $a + local.get $a i64x2.extmul_low_i32x4_s drop - local.get $0 - local.get $0 + local.get $a + local.get $a i64x2.extmul_low_i32x4_u drop - local.get $0 - local.get $0 + local.get $a + local.get $a i64x2.extmul_high_i32x4_s drop - local.get $0 - local.get $0 + local.get $a + local.get $a i64x2.extmul_high_i32x4_u drop v128.const i32x4 0x0000000c 0x00000000 0x0000000c 0x00000000 @@ -5500,18 +5500,18 @@ drop ) (func $simd/test_f32x4 - (local $0 v128) - (local $1 v128) - (local $2 v128) - (local $3 v128) - (local $4 v128) - (local $5 v128) - (local $6 v128) - (local $7 v128) - (local $8 v128) + (local $a v128) + (local $b v128) + (local $c v128) + (local $d v128) + (local $one v128) + (local $negOne v128) + (local $only1st v128) + (local $excl1st v128) + (local $var$8 v128) v128.const i32x4 0x3fc00000 0x40200000 0x40600000 0x40900000 - local.set $0 - local.get $0 + local.set $a + local.get $a v128.const i32x4 0x3fc00000 0x40200000 0x40600000 0x40900000 i8x16.eq i8x16.all_true @@ -5528,8 +5528,8 @@ end f32.const 1 f32x4.splat - local.set $1 - local.get $1 + local.set $b + local.get $b v128.const i32x4 0x3f800000 0x3f800000 0x3f800000 0x3f800000 i8x16.eq i8x16.all_true @@ -5544,11 +5544,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $a + local.get $b f32x4.add - local.set $2 - local.get $2 + local.set $c + local.get $c v128.const i32x4 0x40200000 0x40600000 0x40900000 0x40b00000 i8x16.eq i8x16.all_true @@ -5563,10 +5563,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $1 + local.get $c + local.get $b f32x4.sub - local.get $0 + local.get $a i8x16.eq i8x16.all_true i32.const 0 @@ -5580,10 +5580,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $1 + local.get $c + local.get $b f32x4.mul - local.get $2 + local.get $c i8x16.eq i8x16.all_true i32.const 0 @@ -5597,14 +5597,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $0 + local.get $a + local.get $a f32x4.mul - local.set $3 - local.get $3 - local.get $0 + local.set $d + local.get $d + local.get $a f32x4.div - local.get $0 + local.get $a i8x16.eq i8x16.all_true i32.const 0 @@ -5618,10 +5618,10 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $0 + local.get $d + local.get $a f32x4.mul - local.get $0 + local.get $a i8x16.ne v128.any_true i32.const 0 @@ -5635,7 +5635,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $a f32x4.neg v128.const i32x4 0xbfc00000 0xc0200000 0xc0600000 0xc0900000 i8x16.eq @@ -5651,7 +5651,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $c f32x4.extract_lane 0 f32.const 2.5 f32.eq @@ -5664,7 +5664,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $c f32x4.extract_lane 3 f32.const 5.5 f32.eq @@ -5677,7 +5677,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $c f32.const 6.5 f32x4.replace_lane 3 v128.const i32x4 0x40200000 0x40600000 0x40900000 0x40d00000 @@ -5694,8 +5694,8 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $a + local.get $b i8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 v128.const i32x4 0x3fc00000 0x40200000 0x3f800000 0x3f800000 i8x16.eq @@ -5715,20 +5715,20 @@ f32x4.splat f32.const 1 f32x4.replace_lane 0 - local.set $4 + local.set $one f32.const 0 f32x4.splat f32.const -1 f32x4.replace_lane 0 - local.set $5 + local.set $negOne v128.const i32x4 0xffffffff 0x00000000 0x00000000 0x00000000 - local.set $6 + local.set $only1st v128.const i32x4 0x00000000 0xffffffff 0xffffffff 0xffffffff - local.set $7 - local.get $5 - local.get $4 + local.set $excl1st + local.get $negOne + local.get $one f32x4.eq - local.get $7 + local.get $excl1st i8x16.eq i8x16.all_true i32.const 0 @@ -5742,10 +5742,10 @@ call $~lib/builtins/abort unreachable end - local.get $5 - local.get $4 + local.get $negOne + local.get $one f32x4.ne - local.get $6 + local.get $only1st i8x16.eq i8x16.all_true i32.const 0 @@ -5759,10 +5759,10 @@ call $~lib/builtins/abort unreachable end - local.get $5 - local.get $4 + local.get $negOne + local.get $one f32x4.lt - local.get $6 + local.get $only1st i8x16.eq i8x16.all_true i32.const 0 @@ -5776,10 +5776,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $5 + local.get $one + local.get $negOne f32x4.le - local.get $7 + local.get $excl1st i8x16.eq i8x16.all_true i32.const 0 @@ -5793,10 +5793,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $5 + local.get $one + local.get $negOne f32x4.gt - local.get $6 + local.get $only1st i8x16.eq i8x16.all_true i32.const 0 @@ -5810,10 +5810,10 @@ call $~lib/builtins/abort unreachable end - local.get $5 - local.get $4 + local.get $negOne + local.get $one f32x4.ge - local.get $7 + local.get $excl1st i8x16.eq i8x16.all_true i32.const 0 @@ -5827,10 +5827,10 @@ call $~lib/builtins/abort unreachable end - local.get $5 - local.get $4 + local.get $negOne + local.get $one f32x4.min - local.get $5 + local.get $negOne i8x16.eq i8x16.all_true i32.const 0 @@ -5844,10 +5844,10 @@ call $~lib/builtins/abort unreachable end - local.get $5 - local.get $4 + local.get $negOne + local.get $one f32x4.max - local.get $4 + local.get $one i8x16.eq i8x16.all_true i32.const 0 @@ -5861,9 +5861,9 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $negOne f32x4.abs - local.get $4 + local.get $one i8x16.eq i8x16.all_true i32.const 0 @@ -5905,7 +5905,7 @@ i32.const 0 i32.ne drop - local.get $0 + local.get $a f32x4.demote_f64x2_zero drop v128.const i32x4 0x3f800000 0xbf800000 0x3f800000 0xbf800000 @@ -5928,8 +5928,8 @@ drop v128.const i32x4 0x3f8ccccd 0xbe800000 0x428c051f 0x40800000 f32x4.ceil - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 v128.const i32x4 0x40000000 0x80000000 0x428e0000 0x40800000 i8x16.eq i8x16.all_true @@ -5946,8 +5946,8 @@ end v128.const i32x4 0x3f8ccccd 0xbe800000 0x428c051f 0x40800000 f32x4.floor - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 v128.const i32x4 0x3f800000 0xbf800000 0x428c0000 0x40800000 i8x16.eq i8x16.all_true @@ -5980,18 +5980,18 @@ drop ) (func $simd/test_f64x2 - (local $0 v128) - (local $1 v128) - (local $2 v128) - (local $3 v128) - (local $4 v128) - (local $5 v128) - (local $6 v128) - (local $7 v128) - (local $8 v128) + (local $a v128) + (local $b v128) + (local $c v128) + (local $d v128) + (local $one v128) + (local $negOne v128) + (local $only1st v128) + (local $excl1st v128) + (local $var$8 v128) v128.const i32x4 0x00000000 0x3ff80000 0x00000000 0x40040000 - local.set $0 - local.get $0 + local.set $a + local.get $a v128.const i32x4 0x00000000 0x3ff80000 0x00000000 0x40040000 i8x16.eq i8x16.all_true @@ -6008,8 +6008,8 @@ end f64.const 1 f64x2.splat - local.set $1 - local.get $1 + local.set $b + local.get $b v128.const i32x4 0x00000000 0x3ff00000 0x00000000 0x3ff00000 i8x16.eq i8x16.all_true @@ -6024,11 +6024,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $a + local.get $b f64x2.add - local.set $2 - local.get $2 + local.set $c + local.get $c v128.const i32x4 0x00000000 0x40040000 0x00000000 0x400c0000 i8x16.eq i8x16.all_true @@ -6043,10 +6043,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $1 + local.get $c + local.get $b f64x2.sub - local.get $0 + local.get $a i8x16.eq i8x16.all_true i32.const 0 @@ -6060,10 +6060,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $1 + local.get $c + local.get $b f64x2.mul - local.get $2 + local.get $c i8x16.eq i8x16.all_true i32.const 0 @@ -6077,14 +6077,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $0 + local.get $a + local.get $a f64x2.mul - local.set $3 - local.get $3 - local.get $0 + local.set $d + local.get $d + local.get $a f64x2.div - local.get $0 + local.get $a i8x16.eq i8x16.all_true i32.const 0 @@ -6098,10 +6098,10 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $0 + local.get $d + local.get $a f64x2.mul - local.get $0 + local.get $a i8x16.ne v128.any_true i32.const 0 @@ -6115,7 +6115,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $a f64x2.neg v128.const i32x4 0x00000000 0xbff80000 0x00000000 0xc0040000 i8x16.eq @@ -6131,7 +6131,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $c f64x2.extract_lane 0 f64.const 2.5 f64.eq @@ -6144,7 +6144,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $c f64x2.extract_lane 1 f64.const 3.5 f64.eq @@ -6157,7 +6157,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $c f64.const 4.5 f64x2.replace_lane 1 v128.const i32x4 0x00000000 0x40040000 0x00000000 0x40120000 @@ -6174,8 +6174,8 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $a + local.get $b i8x16.shuffle 0 1 2 3 4 5 6 7 24 25 26 27 28 29 30 31 v128.const i32x4 0x00000000 0x3ff80000 0x00000000 0x3ff00000 i8x16.eq @@ -6195,20 +6195,20 @@ f64x2.splat f64.const 1 f64x2.replace_lane 0 - local.set $4 + local.set $one f64.const 0 f64x2.splat f64.const -1 f64x2.replace_lane 0 - local.set $5 + local.set $negOne v128.const i32x4 0xffffffff 0xffffffff 0x00000000 0x00000000 - local.set $6 + local.set $only1st v128.const i32x4 0x00000000 0x00000000 0xffffffff 0xffffffff - local.set $7 - local.get $5 - local.get $4 + local.set $excl1st + local.get $negOne + local.get $one f64x2.eq - local.get $7 + local.get $excl1st i8x16.eq i8x16.all_true i32.const 0 @@ -6222,10 +6222,10 @@ call $~lib/builtins/abort unreachable end - local.get $5 - local.get $4 + local.get $negOne + local.get $one f64x2.ne - local.get $6 + local.get $only1st i8x16.eq i8x16.all_true i32.const 0 @@ -6239,10 +6239,10 @@ call $~lib/builtins/abort unreachable end - local.get $5 - local.get $4 + local.get $negOne + local.get $one f64x2.lt - local.get $6 + local.get $only1st i8x16.eq i8x16.all_true i32.const 0 @@ -6256,10 +6256,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $5 + local.get $one + local.get $negOne f64x2.le - local.get $7 + local.get $excl1st i8x16.eq i8x16.all_true i32.const 0 @@ -6273,10 +6273,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $5 + local.get $one + local.get $negOne f64x2.gt - local.get $6 + local.get $only1st i8x16.eq i8x16.all_true i32.const 0 @@ -6290,10 +6290,10 @@ call $~lib/builtins/abort unreachable end - local.get $5 - local.get $4 + local.get $negOne + local.get $one f64x2.ge - local.get $7 + local.get $excl1st i8x16.eq i8x16.all_true i32.const 0 @@ -6307,10 +6307,10 @@ call $~lib/builtins/abort unreachable end - local.get $5 - local.get $4 + local.get $negOne + local.get $one f64x2.min - local.get $5 + local.get $negOne i8x16.eq i8x16.all_true i32.const 0 @@ -6324,10 +6324,10 @@ call $~lib/builtins/abort unreachable end - local.get $5 - local.get $4 + local.get $negOne + local.get $one f64x2.max - local.get $4 + local.get $one i8x16.eq i8x16.all_true i32.const 0 @@ -6341,9 +6341,9 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $negOne f64x2.abs - local.get $4 + local.get $one i8x16.eq i8x16.all_true i32.const 0 @@ -6365,13 +6365,13 @@ i32.const 0 i32.ne drop - local.get $0 + local.get $a f64x2.convert_low_i32x4_s drop - local.get $0 + local.get $a f64x2.convert_low_i32x4_u drop - local.get $0 + local.get $a f64x2.promote_low_f32x4 drop v128.const i32x4 0x00000000 0x3ff00000 0x00000000 0xbff00000 @@ -6394,8 +6394,8 @@ drop v128.const i32x4 0x9999999a 0x3ff19999 0x00000000 0xbfd00000 f64x2.ceil - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 v128.const i32x4 0x00000000 0x40000000 0x00000000 0x80000000 i8x16.eq i8x16.all_true @@ -6412,8 +6412,8 @@ end v128.const i32x4 0x9999999a 0x3ff19999 0x00000000 0xbfd00000 f64x2.floor - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 v128.const i32x4 0x00000000 0x3ff00000 0x00000000 0xbff00000 i8x16.eq i8x16.all_true @@ -6446,14 +6446,14 @@ drop ) (func $simd/test_const (result v128) - (local $0 v128) + (local $var$0 v128) v128.const i32x4 0x00000001 0x00000001 0x00000001 0x00000001 - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 ) (func $start:simd - (local $0 i32) - (local $1 i32) + (local $var$0 i32) + (local $var$1 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -6485,9 +6485,9 @@ i32.const 3 i32.const 32 call $~lib/rt/__newArray - local.tee $1 + local.tee $var$1 i32.store - local.get $1 + local.get $var$1 i32.const 0 call $~lib/array/Array#__get i32x4.extract_lane 0 @@ -6529,139 +6529,139 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $simd/reexport (param $0 v128) (result v128) - local.get $0 - local.get $0 + (func $simd/reexport (param $a v128) (result v128) + local.get $a + local.get $a i32x4.mul ) - (func $simd/test_vars_i8x16_partial (param $0 i32) (param $1 i32) (param $2 i32) (result v128) + (func $simd/test_vars_i8x16_partial (param $a i32) (param $b i32) (param $c i32) (result v128) v128.const i32x4 0x03000100 0x07000504 0x0b0a0908 0x000e0d0c - local.get $0 + local.get $a i8x16.replace_lane 2 - local.get $1 + local.get $b i8x16.replace_lane 6 - local.get $2 + local.get $c i8x16.replace_lane 15 ) - (func $simd/test_vars_i8x16_full (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (param $7 i32) (param $8 i32) (param $9 i32) (param $10 i32) (param $11 i32) (param $12 i32) (param $13 i32) (param $14 i32) (param $15 i32) (result v128) - local.get $0 + (func $simd/test_vars_i8x16_full (param $a i32) (param $b i32) (param $c i32) (param $d i32) (param $e i32) (param $f i32) (param $g i32) (param $h i32) (param $i i32) (param $k i32) (param $l i32) (param $m i32) (param $n i32) (param $o i32) (param $p i32) (param $q i32) (result v128) + local.get $a i8x16.splat - local.get $1 + local.get $b i8x16.replace_lane 1 - local.get $2 + local.get $c i8x16.replace_lane 2 - local.get $3 + local.get $d i8x16.replace_lane 3 - local.get $4 + local.get $e i8x16.replace_lane 4 - local.get $5 + local.get $f i8x16.replace_lane 5 - local.get $6 + local.get $g i8x16.replace_lane 6 - local.get $7 + local.get $h i8x16.replace_lane 7 - local.get $8 + local.get $i i8x16.replace_lane 8 - local.get $9 + local.get $k i8x16.replace_lane 9 - local.get $10 + local.get $l i8x16.replace_lane 10 - local.get $11 + local.get $m i8x16.replace_lane 11 - local.get $12 + local.get $n i8x16.replace_lane 12 - local.get $13 + local.get $o i8x16.replace_lane 13 - local.get $14 + local.get $p i8x16.replace_lane 14 - local.get $15 + local.get $q i8x16.replace_lane 15 ) - (func $simd/test_vars_i16x8_partial (param $0 i32) (param $1 i32) (param $2 i32) (result v128) + (func $simd/test_vars_i16x8_partial (param $a i32) (param $b i32) (param $c i32) (result v128) v128.const i32x4 0x00010000 0x00030000 0x00050000 0x00000006 - local.get $0 + local.get $a i16x8.replace_lane 2 - local.get $1 + local.get $b i16x8.replace_lane 4 - local.get $2 + local.get $c i16x8.replace_lane 7 ) - (func $simd/test_vars_i16x8_full (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (param $7 i32) (result v128) - local.get $0 + (func $simd/test_vars_i16x8_full (param $a i32) (param $b i32) (param $c i32) (param $d i32) (param $e i32) (param $f i32) (param $g i32) (param $h i32) (result v128) + local.get $a i16x8.splat - local.get $1 + local.get $b i16x8.replace_lane 1 - local.get $2 + local.get $c i16x8.replace_lane 2 - local.get $3 + local.get $d i16x8.replace_lane 3 - local.get $4 + local.get $e i16x8.replace_lane 4 - local.get $5 + local.get $f i16x8.replace_lane 5 - local.get $6 + local.get $g i16x8.replace_lane 6 - local.get $7 + local.get $h i16x8.replace_lane 7 ) - (func $simd/test_vars_i32x4_partial (param $0 i32) (param $1 i32) (param $2 i32) (result v128) + (func $simd/test_vars_i32x4_partial (param $a i32) (param $b i32) (param $c i32) (result v128) v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000 - local.get $0 + local.get $a i32x4.replace_lane 1 - local.get $1 + local.get $b i32x4.replace_lane 2 - local.get $2 + local.get $c i32x4.replace_lane 3 ) - (func $simd/test_vars_i32x4_full (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result v128) - local.get $0 + (func $simd/test_vars_i32x4_full (param $a i32) (param $b i32) (param $c i32) (param $d i32) (result v128) + local.get $a i32x4.splat - local.get $1 + local.get $b i32x4.replace_lane 1 - local.get $2 + local.get $c i32x4.replace_lane 2 - local.get $3 + local.get $d i32x4.replace_lane 3 ) - (func $simd/test_vars_i64x2_partial (param $0 i64) (result v128) + (func $simd/test_vars_i64x2_partial (param $a i64) (result v128) v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000 - local.get $0 + local.get $a i64x2.replace_lane 1 ) - (func $simd/test_vars_i64x2_full (param $0 i64) (param $1 i64) (result v128) - local.get $0 + (func $simd/test_vars_i64x2_full (param $a i64) (param $b i64) (result v128) + local.get $a i64x2.splat - local.get $1 + local.get $b i64x2.replace_lane 1 ) - (func $simd/test_vars_f32x4_partial (param $0 f32) (param $1 f32) (param $2 f32) (result v128) + (func $simd/test_vars_f32x4_partial (param $a f32) (param $b f32) (param $c f32) (result v128) v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000 - local.get $0 + local.get $a f32x4.replace_lane 1 - local.get $1 + local.get $b f32x4.replace_lane 2 - local.get $2 + local.get $c f32x4.replace_lane 3 ) - (func $simd/test_vars_f32x4_full (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (result v128) - local.get $0 + (func $simd/test_vars_f32x4_full (param $a f32) (param $b f32) (param $c f32) (param $d f32) (result v128) + local.get $a f32x4.splat - local.get $1 + local.get $b f32x4.replace_lane 1 - local.get $2 + local.get $c f32x4.replace_lane 2 - local.get $3 + local.get $d f32x4.replace_lane 3 ) - (func $simd/test_vars_f64x2_partial (param $0 f64) (result v128) + (func $simd/test_vars_f64x2_partial (param $a f64) (result v128) v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000 - local.get $0 + local.get $a f64x2.replace_lane 1 ) - (func $simd/test_vars_f64x2_full (param $0 f64) (param $1 f64) (result v128) - local.get $0 + (func $simd/test_vars_f64x2_full (param $a f64) (param $b f64) (result v128) + local.get $a f64x2.splat - local.get $1 + local.get $b f64x2.replace_lane 1 ) (func $~lib/rt/__visit_globals (param $0 i32) @@ -6684,12 +6684,12 @@ call $~lib/rt/itcms/__visit end ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -6697,12 +6697,12 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) diff --git a/tests/compiler/std/array-access.debug.wat b/tests/compiler/std/array-access.debug.wat index 85d7b89371..8368142a57 100644 --- a/tests/compiler/std/array-access.debug.wat +++ b/tests/compiler/std/array-access.debug.wat @@ -26,10 +26,10 @@ (export "stringArrayMethodCall" (func $export:std/array-access/stringArrayMethodCall)) (export "stringArrayArrayPropertyAccess" (func $export:std/array-access/stringArrayArrayPropertyAccess)) (export "stringArrayArrayMethodCall" (func $export:std/array-access/stringArrayArrayMethodCall)) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i32) + (local $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -40,56 +40,56 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add i32.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.get $1 + (func $~lib/util/string/compareImpl (param $str1 i32) (param $index1 i32) (param $str2 i32) (param $index2 i32) (param $len i32) (result i32) + (local $ptr1 i32) + (local $ptr2 i32) + (local $var$7 i32) + (local $a i32) + (local $b i32) + local.get $str1 + local.get $index1 i32.const 1 i32.shl i32.add - local.set $5 - local.get $2 - local.get $3 + local.set $ptr1 + local.get $str2 + local.get $index2 i32.const 1 i32.shl i32.add - local.set $6 + local.set $ptr2 i32.const 0 i32.const 2 i32.lt_s drop - local.get $4 + local.get $len i32.const 4 i32.ge_u if (result i32) - local.get $5 + local.get $ptr1 i32.const 7 i32.and - local.get $6 + local.get $ptr2 i32.const 7 i32.and i32.or @@ -100,27 +100,27 @@ if block $do-break|0 loop $do-loop|0 - local.get $5 + local.get $ptr1 i64.load - local.get $6 + local.get $ptr2 i64.load i64.ne if br $do-break|0 end - local.get $5 + local.get $ptr1 i32.const 8 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 8 i32.add - local.set $6 - local.get $4 + local.set $ptr2 + local.get $len i32.const 4 i32.sub - local.set $4 - local.get $4 + local.set $len + local.get $len i32.const 4 i32.ge_u br_if $do-loop|0 @@ -128,85 +128,85 @@ end end loop $while-continue|1 - local.get $4 - local.tee $7 + local.get $len + local.tee $var$7 i32.const 1 i32.sub - local.set $4 - local.get $7 - local.set $7 - local.get $7 + local.set $len + local.get $var$7 + local.set $var$7 + local.get $var$7 if - local.get $5 + local.get $ptr1 i32.load16_u - local.set $8 - local.get $6 + local.set $a + local.get $ptr2 i32.load16_u - local.set $9 - local.get $8 - local.get $9 + local.set $b + local.get $a + local.get $b i32.ne if - local.get $8 - local.get $9 + local.get $a + local.get $b i32.sub return end - local.get $5 + local.get $ptr1 i32.const 2 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 2 i32.add - local.set $6 + local.set $ptr2 br $while-continue|1 end end i32.const 0 ) - (func $~lib/string/String#startsWith (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $0 + (func $~lib/string/String#startsWith (param $this i32) (param $search i32) (param $start i32) (result i32) + (local $len i32) + (local $var$4 i32) + (local $var$5 i32) + (local $searchStart i32) + (local $searchLength i32) + local.get $this call $~lib/string/String#get:length - local.set $3 - local.get $2 - local.tee $4 + local.set $len + local.get $start + local.tee $var$4 i32.const 0 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.gt_s select - local.tee $5 - local.get $3 - local.tee $4 - local.get $5 - local.get $4 + local.tee $var$5 + local.get $len + local.tee $var$4 + local.get $var$5 + local.get $var$4 i32.lt_s select - local.set $6 - local.get $1 + local.set $searchStart + local.get $search call $~lib/string/String#get:length - local.set $7 - local.get $7 - local.get $6 + local.set $searchLength + local.get $searchLength + local.get $searchStart i32.add - local.get $3 + local.get $len i32.gt_s if i32.const 0 return end - local.get $0 - local.get $6 - local.get $1 + local.get $this + local.get $searchStart + local.get $search i32.const 0 - local.get $7 + local.get $searchLength call $~lib/util/string/compareImpl i32.eqz ) diff --git a/tests/compiler/std/array-literal.debug.wat b/tests/compiler/std/array-literal.debug.wat index 46a3c3ae13..e5c399e771 100644 --- a/tests/compiler/std/array-literal.debug.wat +++ b/tests/compiler/std/array-literal.debug.wat @@ -58,14 +58,14 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (start $~start) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i32) + (local $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -76,26 +76,26 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 0 i32.shl i32.add i32.load8_s - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i32) + (local $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -106,17 +106,17 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add i32.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) (func $~lib/rt/itcms/Object#set:nextWithColor (param $0 i32) (param $1 i32) local.get $0 @@ -128,50 +128,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -184,58 +184,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -252,12 +252,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -267,19 +267,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -290,27 +290,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -318,35 +318,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -356,15 +356,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -374,25 +374,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -400,33 +400,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -454,23 +454,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -482,15 +482,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -502,33 +502,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -536,21 +536,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -565,36 +565,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -602,67 +602,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -672,22 +672,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -697,12 +697,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -714,75 +714,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -794,38 +794,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -839,12 +839,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -855,38 +855,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -894,21 +894,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -923,101 +923,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -1028,7 +1028,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1039,26 +1039,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1071,27 +1071,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1105,11 +1105,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1120,66 +1120,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1189,10 +1189,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1203,13 +1203,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1220,109 +1220,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1330,7 +1330,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1347,23 +1347,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1375,54 +1375,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1443,30 +1443,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1476,9 +1476,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1488,8 +1488,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1497,43 +1497,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1545,17 +1545,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1569,7 +1569,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1587,7 +1587,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1597,12 +1597,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1624,7 +1624,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1644,14 +1644,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1664,8 +1664,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1676,37 +1676,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1714,16 +1714,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1731,21 +1731,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1760,12 +1760,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1773,49 +1773,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1825,90 +1825,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1917,22 +1917,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1941,27 +1941,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1976,69 +1976,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2053,29 +2053,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2088,13 +2088,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2105,25 +2105,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2138,10 +2138,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2159,64 +2159,64 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/rt/__newBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - local.get $1 + (func $~lib/rt/__newBuffer (param $size i32) (param $id i32) (param $data i32) (result i32) + (local $buffer i32) + local.get $size + local.get $id call $~lib/rt/itcms/__new - local.set $3 - local.get $2 + local.set $buffer + local.get $data if - local.get $3 - local.get $2 - local.get $0 + local.get $buffer + local.get $data + local.get $size memory.copy end - local.get $3 + local.get $buffer ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32) + (local $child i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $childPtr i32.eqz if return end i32.const 1 drop - local.get $0 + local.get $parentPtr i32.eqz if i32.const 0 @@ -2226,37 +2226,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $childPtr i32.const 20 i32.sub - local.set $3 - local.get $3 + local.set $child + local.get $child call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $0 + local.get $parentPtr i32.const 20 i32.sub - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 call $~lib/rt/itcms/Object#get:color - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $2 + local.get $expectMultiple if - local.get $4 + local.get $var$4 call $~lib/rt/itcms/Object#makeGray else - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end else - local.get $5 + local.get $var$5 i32.const 3 i32.eq if (result i32) @@ -2267,81 +2267,81 @@ i32.const 0 end if - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end end end ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 0 i32.shl i32.add - local.get $2 + local.get $value i32.store8 i32.const 0 drop ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store i32.const 0 drop ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store i32.const 1 drop - local.get $0 - local.get $2 + local.get $this + local.get $value i32.const 1 call $~lib/rt/itcms/__link ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store i32.const 1 drop - local.get $0 - local.get $2 + local.get $this + local.get $value i32.const 1 call $~lib/rt/itcms/__link ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $std/array-literal/doesntLeak (param $0 i32) + (func $std/array-literal/doesntLeak (param $refs i32) nop ) (func $~lib/rt/itcms/__collect - (local $0 i32) + (local $var$0 i32) i32.const 0 drop global.get $~lib/rt/itcms/state @@ -2352,8 +2352,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -2367,8 +2367,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -2460,12 +2460,12 @@ call $~lib/rt/itcms/__visit end ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -2473,12 +2473,12 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -2486,49 +2486,49 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $val i32) i32.const 1 drop - local.get $0 + local.get $this i32.load offset=4 - local.set $2 - local.get $2 - local.get $0 + local.set $var$2 + local.get $var$2 + local.get $this i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $var$2 i32.load - local.set $5 - local.get $5 + local.set $val + local.get $val if - local.get $5 - local.get $1 + local.get $val + local.get $cookie call $~lib/rt/itcms/__visit end - local.get $2 + local.get $var$2 i32.const 4 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -2536,49 +2536,49 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $val i32) i32.const 1 drop - local.get $0 + local.get $this i32.load offset=4 - local.set $2 - local.get $2 - local.get $0 + local.set $var$2 + local.get $var$2 + local.get $this i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $var$2 i32.load - local.set $5 - local.get $5 + local.set $val + local.get $val if - local.get $5 - local.get $1 + local.get $val + local.get $cookie call $~lib/rt/itcms/__visit end - local.get $2 + local.get $var$2 i32.const 4 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) diff --git a/tests/compiler/std/array.debug.wat b/tests/compiler/std/array.debug.wat index b42761973a..c341f51dab 100644 --- a/tests/compiler/std/array.debug.wat +++ b/tests/compiler/std/array.debug.wat @@ -394,50 +394,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -450,58 +450,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -518,12 +518,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -533,19 +533,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -556,27 +556,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -584,35 +584,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -622,15 +622,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -640,25 +640,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -666,33 +666,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -720,23 +720,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -748,15 +748,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -768,33 +768,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -802,21 +802,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -831,36 +831,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -868,67 +868,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 - i32.const 1 - local.get $5 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 + i32.const 1 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -938,22 +938,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -963,12 +963,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -980,75 +980,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -1060,38 +1060,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -1105,12 +1105,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -1121,38 +1121,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1160,21 +1160,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -1189,101 +1189,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -1294,7 +1294,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1305,26 +1305,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1337,27 +1337,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1371,11 +1371,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1386,66 +1386,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1455,10 +1455,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1469,13 +1469,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1486,109 +1486,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1596,7 +1596,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1613,23 +1613,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1641,54 +1641,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1709,30 +1709,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1742,9 +1742,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1754,8 +1754,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1763,43 +1763,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1811,17 +1811,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1835,7 +1835,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1853,7 +1853,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1863,12 +1863,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1890,7 +1890,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1910,14 +1910,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1930,8 +1930,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1942,37 +1942,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1980,16 +1980,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1997,21 +1997,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -2026,12 +2026,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -2039,49 +2039,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -2091,90 +2091,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -2183,22 +2183,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -2207,27 +2207,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -2242,69 +2242,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2319,29 +2319,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2354,13 +2354,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2371,25 +2371,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2404,10 +2404,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2425,49 +2425,49 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32) + (local $child i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $childPtr i32.eqz if return end i32.const 1 drop - local.get $0 + local.get $parentPtr i32.eqz if i32.const 0 @@ -2477,37 +2477,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $childPtr i32.const 20 i32.sub - local.set $3 - local.get $3 + local.set $child + local.get $child call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $0 + local.get $parentPtr i32.const 20 i32.sub - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 call $~lib/rt/itcms/Object#get:color - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $2 + local.get $expectMultiple if - local.get $4 + local.get $var$4 call $~lib/rt/itcms/Object#makeGray else - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end else - local.get $5 + local.get $var$5 i32.const 3 i32.eq if (result i32) @@ -2518,7 +2518,7 @@ i32.const 0 end if - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end end @@ -2548,8 +2548,8 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array.isArray<~lib/array/Array|null> (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array.isArray<~lib/array/Array|null> (param $value i32) (result i32) + local.get $value i32.const 0 i32.ne if (result i32) @@ -2563,8 +2563,8 @@ local.get $1 i32.store ) - (func $~lib/array/Array.isArray (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array.isArray (param $value i32) (result i32) + local.get $value i32.const 0 i32.ne if (result i32) @@ -2592,8 +2592,8 @@ local.get $1 i32.store offset=8 ) - (func $~lib/array/Array.isArray<~lib/typedarray/Uint8Array> (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array.isArray<~lib/typedarray/Uint8Array> (param $value i32) (result i32) + local.get $value i32.const 0 i32.ne if (result i32) @@ -2602,11 +2602,11 @@ i32.const 0 end ) - (func $~lib/array/Array.isArray (param $0 i32) (result i32) + (func $~lib/array/Array.isArray (param $value i32) (result i32) i32.const 0 ) - (func $~lib/array/Array.isArray<~lib/string/String> (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array.isArray<~lib/string/String> (param $value i32) (result i32) + local.get $value i32.const 0 i32.ne if (result i32) @@ -2615,8 +2615,8 @@ i32.const 0 end ) - (func $~lib/array/Array.isArray<~lib/array/Array> (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array.isArray<~lib/array/Array> (param $value i32) (result i32) + local.get $value i32.const 0 i32.ne if (result i32) @@ -2625,113 +2625,113 @@ i32.const 0 end ) - (func $~lib/rt/__newBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - local.get $1 + (func $~lib/rt/__newBuffer (param $size i32) (param $id i32) (param $data i32) (result i32) + (local $buffer i32) + local.get $size + local.get $id call $~lib/rt/itcms/__new - local.set $3 - local.get $2 + local.set $buffer + local.get $data if - local.get $3 - local.get $2 - local.get $0 + local.get $buffer + local.get $data + local.get $size memory.copy end - local.get $3 + local.get $buffer ) - (func $~lib/util/bytes/FILL (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) - (local $5 i32) - (local $6 i32) - local.get $3 + (func $~lib/util/bytes/FILL (param $ptr i32) (param $len i32) (param $value i32) (param $start i32) (param $end i32) + (local $var$5 i32) + (local $var$6 i32) + local.get $start i32.const 0 i32.lt_s if (result i32) - local.get $1 - local.get $3 + local.get $len + local.get $start i32.add - local.tee $5 + local.tee $var$5 i32.const 0 - local.tee $6 - local.get $5 - local.get $6 + local.tee $var$6 + local.get $var$5 + local.get $var$6 i32.gt_u select else - local.get $3 - local.tee $6 - local.get $1 - local.tee $5 - local.get $6 - local.get $5 + local.get $start + local.tee $var$6 + local.get $len + local.tee $var$5 + local.get $var$6 + local.get $var$5 i32.lt_s select end - local.set $3 - local.get $4 + local.set $start + local.get $end i32.const 0 i32.lt_s if (result i32) - local.get $1 - local.get $4 + local.get $len + local.get $end i32.add - local.tee $5 + local.tee $var$5 i32.const 0 - local.tee $6 - local.get $5 - local.get $6 + local.tee $var$6 + local.get $var$5 + local.get $var$6 i32.gt_u select else - local.get $4 - local.tee $6 - local.get $1 - local.tee $5 - local.get $6 - local.get $5 + local.get $end + local.tee $var$6 + local.get $len + local.tee $var$5 + local.get $var$6 + local.get $var$5 i32.lt_s select end - local.set $4 + local.set $end i32.const 1 i32.const 1 i32.eq drop - local.get $3 - local.get $4 + local.get $start + local.get $end i32.lt_s if - local.get $0 - local.get $3 + local.get $ptr + local.get $start i32.add - local.get $2 - local.get $4 - local.get $3 + local.get $value + local.get $end + local.get $start i32.sub memory.fill end ) - (func $~lib/array/Array#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (param $this i32) (param $value i32) (param $start i32) (param $end i32) (result i32) i32.const 0 drop - local.get $0 + local.get $this i32.load offset=4 - local.get $0 + local.get $this i32.load offset=12 - local.get $1 - local.get $2 - local.get $3 + local.get $value + local.get $start + local.get $end call $~lib/util/bytes/FILL - local.get $0 + local.get $this ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i32) + (local $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -2742,37 +2742,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 0 i32.shl i32.add i32.load8_u - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) - (func $std/array/isArraysEqual (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $2 + (func $std/array/isArraysEqual (param $a i32) (param $b i32) (param $len i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + local.get $len i32.eqz if - local.get $0 + local.get $a call $~lib/array/Array#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $len + local.get $len + local.get $b call $~lib/array/Array#get:length i32.ne if i32.const 0 return end - local.get $0 - local.get $1 + local.get $a + local.get $b i32.eq if i32.const 1 @@ -2780,89 +2780,89 @@ end end i32.const 0 - local.set $3 + local.set $var$3 loop $for-loop|0 - local.get $3 - local.get $2 + local.get $var$3 + local.get $len i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if i32.const 0 drop - local.get $0 - local.get $3 + local.get $a + local.get $var$3 call $~lib/array/Array#__get - local.get $1 - local.get $3 + local.get $b + local.get $var$3 call $~lib/array/Array#__get i32.ne if i32.const 0 return end - local.get $3 + local.get $var$3 i32.const 1 i32.add - local.set $3 + local.set $var$3 br $for-loop|0 end end i32.const 1 ) - (func $~lib/util/bytes/FILL (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) - (local $5 i32) - (local $6 i32) - local.get $3 + (func $~lib/util/bytes/FILL (param $ptr i32) (param $len i32) (param $value i32) (param $start i32) (param $end i32) + (local $var$5 i32) + (local $var$6 i32) + local.get $start i32.const 0 i32.lt_s if (result i32) - local.get $1 - local.get $3 + local.get $len + local.get $start i32.add - local.tee $5 + local.tee $var$5 i32.const 0 - local.tee $6 - local.get $5 - local.get $6 + local.tee $var$6 + local.get $var$5 + local.get $var$6 i32.gt_u select else - local.get $3 - local.tee $6 - local.get $1 - local.tee $5 - local.get $6 - local.get $5 + local.get $start + local.tee $var$6 + local.get $len + local.tee $var$5 + local.get $var$6 + local.get $var$5 i32.lt_s select end - local.set $3 - local.get $4 + local.set $start + local.get $end i32.const 0 i32.lt_s if (result i32) - local.get $1 - local.get $4 + local.get $len + local.get $end i32.add - local.tee $5 + local.tee $var$5 i32.const 0 - local.tee $6 - local.get $5 - local.get $6 + local.tee $var$6 + local.get $var$5 + local.get $var$6 i32.gt_u select else - local.get $4 - local.tee $6 - local.get $1 - local.tee $5 - local.get $6 - local.get $5 + local.get $end + local.tee $var$6 + local.get $len + local.tee $var$5 + local.get $var$6 + local.get $var$5 i32.lt_s select end - local.set $4 + local.set $end i32.const 4 i32.const 1 i32.eq @@ -2873,26 +2873,26 @@ drop i32.const 1 drop - local.get $2 + local.get $value i32.const 0 i32.eq - local.get $2 + local.get $value i32.const -1 i32.eq i32.or if - local.get $3 - local.get $4 + local.get $start + local.get $end i32.lt_s if - local.get $0 - local.get $3 + local.get $ptr + local.get $start i32.const 2 i32.shl i32.add - local.get $2 - local.get $4 - local.get $3 + local.get $value + local.get $end + local.get $start i32.sub i32.const 2 i32.shl @@ -2901,48 +2901,48 @@ return end loop $for-loop|0 - local.get $3 - local.get $4 + local.get $start + local.get $end i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $3 + local.get $ptr + local.get $start i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store - local.get $3 + local.get $start i32.const 1 i32.add - local.set $3 + local.set $start br $for-loop|0 end end ) - (func $~lib/array/Array#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (param $this i32) (param $value i32) (param $start i32) (param $end i32) (result i32) i32.const 0 drop - local.get $0 + local.get $this i32.load offset=4 - local.get $0 + local.get $this i32.load offset=12 - local.get $1 - local.get $2 - local.get $3 + local.get $value + local.get $start + local.get $end call $~lib/util/bytes/FILL - local.get $0 + local.get $this ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i32) + (local $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -2953,37 +2953,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add i32.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) - (func $std/array/isArraysEqual (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $2 + (func $std/array/isArraysEqual (param $a i32) (param $b i32) (param $len i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + local.get $len i32.eqz if - local.get $0 + local.get $a call $~lib/array/Array#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $len + local.get $len + local.get $b call $~lib/array/Array#get:length i32.ne if i32.const 0 return end - local.get $0 - local.get $1 + local.get $a + local.get $b i32.eq if i32.const 1 @@ -2991,89 +2991,89 @@ end end i32.const 0 - local.set $3 + local.set $var$3 loop $for-loop|0 - local.get $3 - local.get $2 + local.get $var$3 + local.get $len i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if i32.const 0 drop - local.get $0 - local.get $3 + local.get $a + local.get $var$3 call $~lib/array/Array#__get - local.get $1 - local.get $3 + local.get $b + local.get $var$3 call $~lib/array/Array#__get i32.ne if i32.const 0 return end - local.get $3 + local.get $var$3 i32.const 1 i32.add - local.set $3 + local.set $var$3 br $for-loop|0 end end i32.const 1 ) - (func $~lib/util/bytes/FILL (param $0 i32) (param $1 i32) (param $2 f32) (param $3 i32) (param $4 i32) - (local $5 i32) - (local $6 i32) - local.get $3 + (func $~lib/util/bytes/FILL (param $ptr i32) (param $len i32) (param $value f32) (param $start i32) (param $end i32) + (local $var$5 i32) + (local $var$6 i32) + local.get $start i32.const 0 i32.lt_s if (result i32) - local.get $1 - local.get $3 + local.get $len + local.get $start i32.add - local.tee $5 + local.tee $var$5 i32.const 0 - local.tee $6 - local.get $5 - local.get $6 + local.tee $var$6 + local.get $var$5 + local.get $var$6 i32.gt_u select else - local.get $3 - local.tee $6 - local.get $1 - local.tee $5 - local.get $6 - local.get $5 + local.get $start + local.tee $var$6 + local.get $len + local.tee $var$5 + local.get $var$6 + local.get $var$5 i32.lt_s select end - local.set $3 - local.get $4 + local.set $start + local.get $end i32.const 0 i32.lt_s if (result i32) - local.get $1 - local.get $4 + local.get $len + local.get $end i32.add - local.tee $5 + local.tee $var$5 i32.const 0 - local.tee $6 - local.get $5 - local.get $6 + local.tee $var$6 + local.get $var$5 + local.get $var$6 i32.gt_u select else - local.get $4 - local.tee $6 - local.get $1 - local.tee $5 - local.get $6 - local.get $5 + local.get $end + local.tee $var$6 + local.get $len + local.tee $var$5 + local.get $var$6 + local.get $var$5 i32.lt_s select end - local.set $4 + local.set $end i32.const 4 i32.const 1 i32.eq @@ -3086,7 +3086,7 @@ drop i32.const 1 drop - local.get $2 + local.get $value i32.reinterpret_f32 i32.const 0 i32.eq @@ -3098,18 +3098,18 @@ i32.eq end if - local.get $3 - local.get $4 + local.get $start + local.get $end i32.lt_s if - local.get $0 - local.get $3 + local.get $ptr + local.get $start i32.const 2 i32.shl i32.add i32.const 0 - local.get $4 - local.get $3 + local.get $end + local.get $start i32.sub i32.const 2 i32.shl @@ -3118,48 +3118,48 @@ return end loop $for-loop|0 - local.get $3 - local.get $4 + local.get $start + local.get $end i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $3 + local.get $ptr + local.get $start i32.const 2 i32.shl i32.add - local.get $2 + local.get $value f32.store - local.get $3 + local.get $start i32.const 1 i32.add - local.set $3 + local.set $start br $for-loop|0 end end ) - (func $~lib/array/Array#fill (param $0 i32) (param $1 f32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (param $this i32) (param $value f32) (param $start i32) (param $end i32) (result i32) i32.const 0 drop - local.get $0 + local.get $this i32.load offset=4 - local.get $0 + local.get $this i32.load offset=12 - local.get $1 - local.get $2 - local.get $3 + local.get $value + local.get $start + local.get $end call $~lib/util/bytes/FILL - local.get $0 + local.get $this ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result f32) - (local $2 f32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result f32) + (local $value f32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -3170,39 +3170,39 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add f32.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) - (func $std/array/isArraysEqual (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 f32) - (local $6 f64) - local.get $2 + (func $std/array/isArraysEqual (param $a i32) (param $b i32) (param $len i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 f32) + (local $var$6 f64) + local.get $len i32.eqz if - local.get $0 + local.get $a call $~lib/array/Array#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $len + local.get $len + local.get $b call $~lib/array/Array#get:length i32.ne if i32.const 0 return end - local.get $0 - local.get $1 + local.get $a + local.get $b i32.eq if i32.const 1 @@ -3210,29 +3210,29 @@ end end i32.const 0 - local.set $3 + local.set $var$3 loop $for-loop|0 - local.get $3 - local.get $2 + local.get $var$3 + local.get $len i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if block $for-continue|0 i32.const 1 drop - local.get $0 - local.get $3 + local.get $a + local.get $var$3 call $~lib/array/Array#__get - local.tee $5 - local.get $5 + local.tee $var$5 + local.get $var$5 f32.ne if (result i32) - local.get $1 - local.get $3 + local.get $b + local.get $var$3 call $~lib/array/Array#__get - local.tee $5 - local.get $5 + local.tee $var$5 + local.get $var$5 f32.ne else i32.const 0 @@ -3240,12 +3240,12 @@ if br $for-continue|0 end - local.get $0 - local.get $3 + local.get $a + local.get $var$3 call $~lib/array/Array#__get f64.promote_f32 - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 i64.reinterpret_f64 i64.const 63 i64.shr_u @@ -3253,12 +3253,12 @@ i64.ne i32.const 0 i32.ne - local.get $1 - local.get $3 + local.get $b + local.get $var$3 call $~lib/array/Array#__get f64.promote_f32 - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 i64.reinterpret_f64 i64.const 63 i64.shr_u @@ -3271,11 +3271,11 @@ i32.const 0 return end - local.get $0 - local.get $3 + local.get $a + local.get $var$3 call $~lib/array/Array#__get - local.get $1 - local.get $3 + local.get $b + local.get $var$3 call $~lib/array/Array#__get f32.ne if @@ -3283,36 +3283,36 @@ return end end - local.get $3 + local.get $var$3 i32.const 1 i32.add - local.set $3 + local.set $var$3 br $for-loop|0 end end i32.const 1 ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (param $0 i32) (result i32) - local.get $0 + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 ) - (func $~lib/rt/itcms/__renew (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/rt/itcms/__renew (param $oldPtr i32) (param $size i32) (result i32) + (local $oldObj i32) + (local $newPtr i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $oldPtr i32.const 20 i32.sub - local.set $2 - local.get $1 - local.get $2 + local.set $oldObj + local.get $size + local.get $oldObj i32.load i32.const 3 i32.const -1 @@ -3322,49 +3322,49 @@ i32.sub i32.le_u if - local.get $2 - local.get $1 + local.get $oldObj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $0 + local.get $oldPtr return end - local.get $1 - local.get $2 + local.get $size + local.get $oldObj i32.load offset=12 call $~lib/rt/itcms/__new - local.set $3 - local.get $3 - local.get $0 - local.get $1 - local.tee $4 - local.get $2 + local.set $newPtr + local.get $newPtr + local.get $oldPtr + local.get $size + local.tee $var$4 + local.get $oldObj i32.load offset=16 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.lt_u select memory.copy - local.get $3 - ) - (func $~lib/array/ensureCapacity (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $0 + local.get $newPtr + ) + (func $~lib/array/ensureCapacity (param $array i32) (param $newSize i32) (param $alignLog2 i32) (param $canGrow i32) + (local $oldCapacity i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $array i32.load offset=8 - local.set $4 - local.get $1 - local.get $4 - local.get $2 + local.set $oldCapacity + local.get $newSize + local.get $oldCapacity + local.get $alignLog2 i32.shr_u i32.gt_u if - local.get $1 + local.get $newSize i32.const 1073741820 - local.get $2 + local.get $alignLog2 i32.shr_u i32.gt_u if @@ -3375,103 +3375,103 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.load - local.set $5 - local.get $1 - local.tee $6 + local.set $var$5 + local.get $newSize + local.tee $var$6 i32.const 8 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.gt_u select - local.get $2 + local.get $alignLog2 i32.shl - local.set $6 - local.get $3 + local.set $var$6 + local.get $canGrow if - local.get $4 + local.get $oldCapacity i32.const 1 i32.shl - local.tee $7 + local.tee $var$7 i32.const 1073741820 - local.tee $8 - local.get $7 - local.get $8 + local.tee $var$8 + local.get $var$7 + local.get $var$8 i32.lt_u select - local.tee $8 - local.get $6 - local.tee $7 - local.get $8 - local.get $7 + local.tee $var$8 + local.get $var$6 + local.tee $var$7 + local.get $var$8 + local.get $var$7 i32.gt_u select - local.set $6 + local.set $var$6 end - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 call $~lib/rt/itcms/__renew - local.set $8 + local.set $var$8 i32.const 2 global.get $~lib/shared/runtime/Runtime.Incremental i32.ne drop - local.get $8 - local.get $5 + local.get $var$8 + local.get $var$5 i32.ne if - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.store - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.store offset=4 - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.const 0 call $~lib/rt/itcms/__link end - local.get $0 - local.get $6 + local.get $array + local.get $var$6 i32.store offset=8 end ) - (func $~lib/array/Array#push (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/array/Array#push (param $this i32) (param $value i32) (result i32) + (local $oldLen i32) + (local $len i32) + local.get $this i32.load offset=12 - local.set $2 - local.get $2 + local.set $oldLen + local.get $oldLen i32.const 1 i32.add - local.set $3 - local.get $0 - local.get $3 + local.set $len + local.get $this + local.get $len i32.const 2 i32.const 1 call $~lib/array/ensureCapacity i32.const 0 drop - local.get $0 + local.get $this i32.load offset=4 - local.get $2 + local.get $oldLen i32.const 2 i32.shl i32.add - local.get $1 + local.get $value i32.store - local.get $0 - local.get $3 + local.get $this + local.get $len call $~lib/array/Array#set:length_ - local.get $3 + local.get $len ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i32) + (local $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -3482,25 +3482,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add i32.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) - (func $~lib/array/Array#pop (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/array/Array#pop (param $this i32) (result i32) + (local $len i32) + (local $val i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $len + local.get $len i32.const 1 i32.lt_s if @@ -3511,35 +3511,35 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $len i32.const 1 i32.sub - local.tee $1 + local.tee $len i32.const 2 i32.shl i32.add i32.load - local.set $2 - local.get $0 - local.get $1 + local.set $val + local.get $this + local.get $len call $~lib/array/Array#set:length_ - local.get $2 + local.get $val ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store i32.const 1 drop - local.get $0 - local.get $2 + local.get $this + local.get $value i32.const 1 call $~lib/rt/itcms/__link ) @@ -3548,37 +3548,37 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 + (func $~lib/array/Array#set:length (param $this i32) (param $newLength i32) + local.get $this + local.get $newLength i32.const 2 i32.const 0 call $~lib/array/ensureCapacity - local.get $0 - local.get $1 + local.get $this + local.get $newLength call $~lib/array/Array#set:length_ ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#at (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/array/Array#at (param $this i32) (param $index i32) (result i32) + (local $len i32) + (local $value i32) + local.get $this i32.load offset=12 - local.set $2 - local.get $1 + local.set $len + local.get $index i32.const 0 - local.get $2 - local.get $1 + local.get $len + local.get $index i32.const 0 i32.ge_s select i32.add - local.set $1 - local.get $1 - local.get $2 + local.set $index + local.get $index + local.get $len i32.ge_u if i32.const 320 @@ -3588,165 +3588,165 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add i32.load - local.set $3 + local.set $value i32.const 0 drop - local.get $3 + local.get $value ) - (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 + (func $~lib/array/Array#copyWithin (param $this i32) (param $target i32) (param $start i32) (param $end i32) (result i32) + (local $ptr i32) + (local $len i32) + (local $var$6 i32) + (local $var$7 i32) + (local $to i32) + (local $from i32) + (local $last i32) + (local $count i32) + local.get $this i32.load offset=4 - local.set $4 - local.get $0 + local.set $ptr + local.get $this 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 + local.set $len + local.get $end + local.tee $var$6 + local.get $len + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_s select - local.set $3 - local.get $1 + local.set $end + local.get $target i32.const 0 i32.lt_s if (result i32) - local.get $5 - local.get $1 + local.get $len + local.get $target i32.add - local.tee $7 + local.tee $var$7 i32.const 0 - local.tee $6 - local.get $7 - local.get $6 + local.tee $var$6 + local.get $var$7 + local.get $var$6 i32.gt_s select else - local.get $1 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 + local.get $target + local.tee $var$6 + local.get $len + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_s select end - local.set $8 - local.get $2 + local.set $to + local.get $start i32.const 0 i32.lt_s if (result i32) - local.get $5 - local.get $2 + local.get $len + local.get $start i32.add - local.tee $7 + local.tee $var$7 i32.const 0 - local.tee $6 - local.get $7 - local.get $6 + local.tee $var$6 + local.get $var$7 + local.get $var$6 i32.gt_s select else - local.get $2 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 + local.get $start + local.tee $var$6 + local.get $len + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_s select end - local.set $9 - local.get $3 + local.set $from + local.get $end i32.const 0 i32.lt_s if (result i32) - local.get $5 - local.get $3 + local.get $len + local.get $end i32.add - local.tee $7 + local.tee $var$7 i32.const 0 - local.tee $6 - local.get $7 - local.get $6 + local.tee $var$6 + local.get $var$7 + local.get $var$6 i32.gt_s select else - local.get $3 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 + local.get $end + local.tee $var$6 + local.get $len + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_s select end - local.set $10 - local.get $10 - local.get $9 + local.set $last + local.get $last + local.get $from i32.sub - local.tee $7 - local.get $5 - local.get $8 + local.tee $var$7 + local.get $len + local.get $to i32.sub - local.tee $6 - local.get $7 - local.get $6 + local.tee $var$6 + local.get $var$7 + local.get $var$6 i32.lt_s select - local.set $11 - local.get $4 - local.get $8 + local.set $count + local.get $ptr + local.get $to i32.const 2 i32.shl i32.add - local.get $4 - local.get $9 + local.get $ptr + local.get $from i32.const 2 i32.shl i32.add - local.get $11 + local.get $count i32.const 2 i32.shl memory.copy - local.get $0 + local.get $this ) - (func $std/array/isArraysEqual (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $2 + (func $std/array/isArraysEqual (param $a i32) (param $b i32) (param $len i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + local.get $len i32.eqz if - local.get $0 + local.get $a call $~lib/array/Array#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $len + local.get $len + local.get $b call $~lib/array/Array#get:length i32.ne if i32.const 0 return end - local.get $0 - local.get $1 + local.get $a + local.get $b i32.eq if i32.const 1 @@ -3754,81 +3754,81 @@ end end i32.const 0 - local.set $3 + local.set $var$3 loop $for-loop|0 - local.get $3 - local.get $2 + local.get $var$3 + local.get $len i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if i32.const 0 drop - local.get $0 - local.get $3 + local.get $a + local.get $var$3 call $~lib/array/Array#__get - local.get $1 - local.get $3 + local.get $b + local.get $var$3 call $~lib/array/Array#__get i32.ne if i32.const 0 return end - local.get $3 + local.get $var$3 i32.const 1 i32.add - local.set $3 + local.set $var$3 br $for-loop|0 end end i32.const 1 ) - (func $~lib/array/Array#unshift (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/array/Array#unshift (param $this i32) (param $value i32) (result i32) + (local $len i32) + (local $ptr i32) + local.get $this i32.load offset=12 i32.const 1 i32.add - local.set $2 - local.get $0 - local.get $2 + local.set $len + local.get $this + local.get $len i32.const 2 i32.const 1 call $~lib/array/ensureCapacity - local.get $0 + local.get $this i32.load offset=4 - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 4 i32.add - local.get $3 - local.get $2 + local.get $ptr + local.get $len i32.const 1 i32.sub i32.const 2 i32.shl memory.copy - local.get $3 - local.get $1 + local.get $ptr + local.get $value i32.store i32.const 0 drop - local.get $0 - local.get $2 + local.get $this + local.get $len call $~lib/array/Array#set:length_ - 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 + local.get $len + ) + (func $~lib/array/Array#shift (param $this i32) (result i32) + (local $len i32) + (local $base i32) + (local $element i32) + (local $lastIndex i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $len + local.get $len i32.const 1 i32.lt_s if @@ -3839,56 +3839,56 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.set $2 - local.get $2 + local.set $base + local.get $base i32.load - local.set $3 - local.get $1 + local.set $element + local.get $len i32.const 1 i32.sub - local.set $4 - local.get $2 - local.get $2 + local.set $lastIndex + local.get $base + local.get $base i32.const 4 i32.add - local.get $4 + local.get $lastIndex i32.const 2 i32.shl memory.copy i32.const 0 drop - local.get $2 - local.get $4 + local.get $base + local.get $lastIndex i32.const 2 i32.shl i32.add i32.const 0 i32.store - local.get $0 - local.get $4 + local.get $this + local.get $lastIndex call $~lib/array/Array#set:length_ - local.get $3 - ) - (func $~lib/util/bytes/REVERSE (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $1 + local.get $element + ) + (func $~lib/util/bytes/REVERSE (param $ptr i32) (param $len i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $front i32) + (local $back i32) + (local $temp i32) + local.get $len i32.const 1 i32.gt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $var$2 + local.get $len i32.const 1 i32.shr_u - local.set $4 + local.set $var$4 i32.const 0 i32.const 1 i32.lt_s @@ -3901,81 +3901,81 @@ i32.const 2 i32.eq drop - local.get $1 + local.get $len i32.const 1 i32.sub - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $4 + local.get $var$2 + local.get $var$4 i32.lt_u - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $0 - local.get $2 + local.get $ptr + local.get $var$2 i32.const 2 i32.shl i32.add - local.set $6 - local.get $0 - local.get $3 - local.get $2 + local.set $front + local.get $ptr + local.get $var$3 + local.get $var$2 i32.sub i32.const 2 i32.shl i32.add - local.set $7 - local.get $6 + local.set $back + local.get $front i32.load - local.set $8 - local.get $6 - local.get $7 + local.set $temp + local.get $front + local.get $back i32.load i32.store - local.get $7 - local.get $8 + local.get $back + local.get $temp i32.store - local.get $2 + local.get $var$2 i32.const 1 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end end ) - (func $~lib/array/Array#reverse (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#reverse (param $this i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this i32.load offset=12 call $~lib/util/bytes/REVERSE - local.get $0 - ) - (func $~lib/util/bytes/REVERSE (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i64) - (local $11 i32) - (local $12 i32) - (local $13 i32) - local.get $1 + local.get $this + ) + (func $~lib/util/bytes/REVERSE (param $ptr i32) (param $len i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $front i32) + (local $back i32) + (local $temp i64) + (local $var$9 i64) + (local $var$10 i64) + (local $front_0 i32) + (local $back_0 i32) + (local $temp_0 i32) + local.get $len i32.const 1 i32.gt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $var$2 + local.get $len i32.const 1 i32.shr_u - local.set $4 + local.set $var$4 i32.const 0 i32.const 1 i32.lt_s @@ -3984,48 +3984,48 @@ i32.const 1 i32.eq drop - local.get $1 + local.get $len i32.const 8 i32.sub - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 + local.get $var$2 i32.const 7 i32.add - local.get $4 + local.get $var$4 i32.lt_u - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $0 - local.get $2 + local.get $ptr + local.get $var$2 i32.add - local.set $6 - local.get $0 - local.get $3 + local.set $front + local.get $ptr + local.get $var$3 i32.add - local.get $2 + local.get $var$2 i32.sub - local.set $7 - local.get $6 + local.set $back + local.get $front i64.load - local.tee $8 + local.tee $temp i64.const 8 i64.shr_u i64.const 71777214294589695 i64.and - local.get $8 + local.get $temp i64.const 71777214294589695 i64.and i64.const 8 i64.shl i64.or - local.tee $9 + local.tee $var$9 i64.const 16 i64.shr_u i64.const 281470681808895 i64.and - local.get $9 + local.get $var$9 i64.const 281470681808895 i64.and i64.const 16 @@ -4033,27 +4033,27 @@ i64.or i64.const 32 i64.rotr - local.set $8 - local.get $6 - local.get $7 + local.set $temp + local.get $front + local.get $back i64.load - local.tee $9 + local.tee $var$9 i64.const 8 i64.shr_u i64.const 71777214294589695 i64.and - local.get $9 + local.get $var$9 i64.const 71777214294589695 i64.and i64.const 8 i64.shl i64.or - local.tee $10 + local.tee $var$10 i64.const 16 i64.shr_u i64.const 281470681808895 i64.and - local.get $10 + local.get $var$10 i64.const 281470681808895 i64.and i64.const 16 @@ -4062,13 +4062,13 @@ i64.const 32 i64.rotr i64.store - local.get $7 - local.get $8 + local.get $back + local.get $temp i64.store - local.get $2 + local.get $var$2 i32.const 8 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end @@ -4076,79 +4076,79 @@ i32.const 2 i32.eq drop - local.get $1 + local.get $len i32.const 1 i32.sub - local.set $3 + local.set $var$3 loop $while-continue|1 - local.get $2 - local.get $4 + local.get $var$2 + local.get $var$4 i32.lt_u - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $0 - local.get $2 + local.get $ptr + local.get $var$2 i32.const 0 i32.shl i32.add - local.set $11 - local.get $0 - local.get $3 - local.get $2 + local.set $front_0 + local.get $ptr + local.get $var$3 + local.get $var$2 i32.sub i32.const 0 i32.shl i32.add - local.set $12 - local.get $11 + local.set $back_0 + local.get $front_0 i32.load8_u - local.set $13 - local.get $11 - local.get $12 + local.set $temp_0 + local.get $front_0 + local.get $back_0 i32.load8_u i32.store8 - local.get $12 - local.get $13 + local.get $back_0 + local.get $temp_0 i32.store8 - local.get $2 + local.get $var$2 i32.const 1 i32.add - local.set $2 + local.set $var$2 br $while-continue|1 end end end ) - (func $~lib/array/Array#reverse (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#reverse (param $this i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this i32.load offset=12 call $~lib/util/bytes/REVERSE - local.get $0 - ) - (func $~lib/util/bytes/REVERSE (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + local.get $this + ) + (func $~lib/util/bytes/REVERSE (param $ptr i32) (param $len i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $front i32) + (local $back i32) + (local $temp i32) + (local $front_0 i32) + (local $back_0 i32) + (local $temp_0 i32) + local.get $len i32.const 1 i32.gt_u if - i32.const 0 - local.set $2 - local.get $1 + i32.const 0 + local.set $var$2 + local.get $len i32.const 1 i32.shr_u - local.set $4 + local.set $var$4 i32.const 0 i32.const 1 i32.lt_s @@ -4161,114 +4161,114 @@ i32.const 2 i32.eq drop - local.get $1 + local.get $len i32.const 2 i32.sub - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 + local.get $var$2 i32.const 1 i32.add - local.get $4 + local.get $var$4 i32.lt_u - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $0 - local.get $2 + local.get $ptr + local.get $var$2 i32.const 1 i32.shl i32.add - local.set $6 - local.get $0 - local.get $3 - local.get $2 + local.set $front + local.get $ptr + local.get $var$3 + local.get $var$2 i32.sub i32.const 1 i32.shl i32.add - local.set $7 - local.get $7 + local.set $back + local.get $back i32.load i32.const 16 i32.rotr - local.set $8 - local.get $7 - local.get $6 + local.set $temp + local.get $back + local.get $front i32.load i32.const 16 i32.rotr i32.store - local.get $6 - local.get $8 + local.get $front + local.get $temp i32.store - local.get $2 + local.get $var$2 i32.const 2 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end - local.get $1 + local.get $len i32.const 1 i32.sub - local.set $3 + local.set $var$3 loop $while-continue|1 - local.get $2 - local.get $4 + local.get $var$2 + local.get $var$4 i32.lt_u - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $0 - local.get $2 + local.get $ptr + local.get $var$2 i32.const 1 i32.shl i32.add - local.set $9 - local.get $0 - local.get $3 - local.get $2 + local.set $front_0 + local.get $ptr + local.get $var$3 + local.get $var$2 i32.sub i32.const 1 i32.shl i32.add - local.set $10 - local.get $9 + local.set $back_0 + local.get $front_0 i32.load16_u - local.set $11 - local.get $9 - local.get $10 + local.set $temp_0 + local.get $front_0 + local.get $back_0 i32.load16_u i32.store16 - local.get $10 - local.get $11 + local.get $back_0 + local.get $temp_0 i32.store16 - local.get $2 + local.get $var$2 i32.const 1 i32.add - local.set $2 + local.set $var$2 br $while-continue|1 end end end ) - (func $~lib/array/Array#reverse (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#reverse (param $this i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this i32.load offset=12 call $~lib/util/bytes/REVERSE - local.get $0 + local.get $this ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i32) + (local $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -4279,290 +4279,290 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 1 i32.shl i32.add i32.load16_u - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) - (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 + (func $~lib/array/Array#indexOf (param $this i32) (param $value i32) (param $fromIndex i32) (result i32) + (local $len i32) + (local $var$4 i32) + (local $var$5 i32) + (local $ptr i32) + local.get $this i32.load offset=12 - local.set $3 - local.get $3 + local.set $len + local.get $len i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $2 - local.get $3 + local.get $fromIndex + local.get $len i32.ge_s end if i32.const -1 return end - local.get $2 + local.get $fromIndex i32.const 0 i32.lt_s if - local.get $3 - local.get $2 + local.get $len + local.get $fromIndex i32.add - local.tee $4 + local.tee $var$4 i32.const 0 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.gt_s select - local.set $2 + local.set $fromIndex end - local.get $0 + local.get $this i32.load offset=4 - local.set $6 + local.set $ptr loop $while-continue|0 - local.get $2 - local.get $3 + local.get $fromIndex + local.get $len i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $6 - local.get $2 + local.get $ptr + local.get $fromIndex i32.const 2 i32.shl i32.add i32.load - local.get $1 + local.get $value i32.eq if - local.get $2 + local.get $fromIndex return end - local.get $2 + local.get $fromIndex i32.const 1 i32.add - local.set $2 + local.set $fromIndex br $while-continue|0 end end i32.const -1 ) - (func $~lib/array/Array#indexOf (param $0 i32) (param $1 f32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 + (func $~lib/array/Array#indexOf (param $this i32) (param $value f32) (param $fromIndex i32) (result i32) + (local $len i32) + (local $var$4 i32) + (local $var$5 i32) + (local $ptr i32) + local.get $this i32.load offset=12 - local.set $3 - local.get $3 + local.set $len + local.get $len i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $2 - local.get $3 + local.get $fromIndex + local.get $len i32.ge_s end if i32.const -1 return end - local.get $2 + local.get $fromIndex i32.const 0 i32.lt_s if - local.get $3 - local.get $2 + local.get $len + local.get $fromIndex i32.add - local.tee $4 + local.tee $var$4 i32.const 0 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.gt_s select - local.set $2 + local.set $fromIndex end - local.get $0 + local.get $this i32.load offset=4 - local.set $6 + local.set $ptr loop $while-continue|0 - local.get $2 - local.get $3 + local.get $fromIndex + local.get $len i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $6 - local.get $2 + local.get $ptr + local.get $fromIndex i32.const 2 i32.shl i32.add f32.load - local.get $1 + local.get $value f32.eq if - local.get $2 + local.get $fromIndex return end - local.get $2 + local.get $fromIndex i32.const 1 i32.add - local.set $2 + local.set $fromIndex br $while-continue|0 end end i32.const -1 ) - (func $~lib/array/Array#indexOf (param $0 i32) (param $1 f64) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 + (func $~lib/array/Array#indexOf (param $this i32) (param $value f64) (param $fromIndex i32) (result i32) + (local $len i32) + (local $var$4 i32) + (local $var$5 i32) + (local $ptr i32) + local.get $this i32.load offset=12 - local.set $3 - local.get $3 + local.set $len + local.get $len i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $2 - local.get $3 + local.get $fromIndex + local.get $len i32.ge_s end if i32.const -1 return end - local.get $2 + local.get $fromIndex i32.const 0 i32.lt_s if - local.get $3 - local.get $2 + local.get $len + local.get $fromIndex i32.add - local.tee $4 + local.tee $var$4 i32.const 0 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.gt_s select - local.set $2 + local.set $fromIndex end - local.get $0 + local.get $this i32.load offset=4 - local.set $6 + local.set $ptr loop $while-continue|0 - local.get $2 - local.get $3 + local.get $fromIndex + local.get $len i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $6 - local.get $2 + local.get $ptr + local.get $fromIndex i32.const 3 i32.shl i32.add f64.load - local.get $1 + local.get $value f64.eq if - local.get $2 + local.get $fromIndex return end - local.get $2 + local.get $fromIndex i32.const 1 i32.add - local.set $2 + local.set $fromIndex br $while-continue|0 end end i32.const -1 ) - (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 + (func $~lib/array/Array#lastIndexOf (param $this i32) (param $value i32) (param $fromIndex i32) (result i32) + (local $len i32) + (local $ptr i32) + (local $var$5 i32) + local.get $this i32.load offset=12 - local.set $3 - local.get $3 + local.set $len + local.get $len i32.const 0 i32.eq if i32.const -1 return end - local.get $2 + local.get $fromIndex i32.const 0 i32.lt_s if - local.get $3 - local.get $2 + local.get $len + local.get $fromIndex i32.add - local.set $2 + local.set $fromIndex else - local.get $2 - local.get $3 + local.get $fromIndex + local.get $len i32.ge_s if - local.get $3 + local.get $len i32.const 1 i32.sub - local.set $2 + local.set $fromIndex end end - local.get $0 + local.get $this i32.load offset=4 - local.set $4 + local.set $ptr loop $while-continue|0 - local.get $2 + local.get $fromIndex i32.const 0 i32.ge_s - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 - local.get $2 + local.get $ptr + local.get $fromIndex i32.const 2 i32.shl i32.add i32.load - local.get $1 + local.get $value i32.eq if - local.get $2 + local.get $fromIndex return end - local.get $2 + local.get $fromIndex i32.const 1 i32.sub - local.set $2 + local.set $fromIndex br $while-continue|0 end end i32.const -1 ) - (func $~lib/array/Array#lastIndexOf@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#lastIndexOf@varargs (param $this i32) (param $value i32) (param $fromIndex i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -4573,94 +4573,94 @@ end unreachable end - local.get $0 + local.get $this i32.load offset=12 - local.set $2 + local.set $fromIndex end - local.get $0 - local.get $1 - local.get $2 + local.get $this + local.get $value + local.get $fromIndex call $~lib/array/Array#lastIndexOf ) - (func $~lib/array/Array#includes (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#includes (param $this i32) (param $value i32) (param $fromIndex i32) (result i32) i32.const 0 drop - local.get $0 - local.get $1 - local.get $2 + local.get $this + local.get $value + local.get $fromIndex call $~lib/array/Array#indexOf i32.const 0 i32.ge_s return ) - (func $~lib/array/Array#includes (param $0 i32) (param $1 f32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 f32) + (func $~lib/array/Array#includes (param $this i32) (param $value f32) (param $fromIndex i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $elem f32) i32.const 1 drop - local.get $0 + local.get $this i32.load offset=12 - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $2 - local.get $3 + local.get $fromIndex + local.get $var$3 i32.ge_s end if i32.const 0 return end - local.get $2 + local.get $fromIndex i32.const 0 i32.lt_s if - local.get $3 - local.get $2 + local.get $var$3 + local.get $fromIndex i32.add - local.tee $4 + local.tee $var$4 i32.const 0 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.gt_s select - local.set $2 + local.set $fromIndex end - local.get $0 + local.get $this i32.load offset=4 - local.set $4 + local.set $var$4 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $fromIndex + local.get $var$3 i32.lt_s - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 - local.get $2 + local.get $var$4 + local.get $fromIndex i32.const 2 i32.shl i32.add f32.load - local.set $6 - local.get $6 - local.get $1 + local.set $elem + local.get $elem + local.get $value f32.eq if (result i32) i32.const 1 else - local.get $6 - local.get $6 + local.get $elem + local.get $elem f32.ne - local.get $1 - local.get $1 + local.get $value + local.get $value f32.ne i32.and end @@ -4668,84 +4668,84 @@ i32.const 1 return end - local.get $2 + local.get $fromIndex i32.const 1 i32.add - local.set $2 + local.set $fromIndex br $while-continue|0 end end i32.const 0 return ) - (func $~lib/array/Array#includes (param $0 i32) (param $1 f64) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 f64) + (func $~lib/array/Array#includes (param $this i32) (param $value f64) (param $fromIndex i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $elem f64) i32.const 1 drop - local.get $0 + local.get $this i32.load offset=12 - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $2 - local.get $3 + local.get $fromIndex + local.get $var$3 i32.ge_s end if i32.const 0 return end - local.get $2 + local.get $fromIndex i32.const 0 i32.lt_s if - local.get $3 - local.get $2 + local.get $var$3 + local.get $fromIndex i32.add - local.tee $4 + local.tee $var$4 i32.const 0 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.gt_s select - local.set $2 + local.set $fromIndex end - local.get $0 + local.get $this i32.load offset=4 - local.set $4 + local.set $var$4 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $fromIndex + local.get $var$3 i32.lt_s - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 - local.get $2 + local.get $var$4 + local.get $fromIndex i32.const 3 i32.shl i32.add f64.load - local.set $6 - local.get $6 - local.get $1 + local.set $elem + local.get $elem + local.get $value f64.eq if (result i32) i32.const 1 else - local.get $6 - local.get $6 + local.get $elem + local.get $elem f64.ne - local.get $1 - local.get $1 + local.get $value + local.get $value f64.ne i32.and end @@ -4753,29 +4753,29 @@ i32.const 1 return end - local.get $2 + local.get $fromIndex i32.const 1 i32.add - local.set $2 + local.set $fromIndex br $while-continue|0 end end i32.const 0 return ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store i32.const 1 drop - local.get $0 - local.get $2 + local.get $this + local.get $value i32.const 1 call $~lib/rt/itcms/__link ) @@ -4784,29 +4784,29 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store i32.const 0 drop ) - (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__set (param $this i32) (param $index i32) (param $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if - local.get $1 + local.get $index i32.const 0 i32.lt_s if @@ -4816,221 +4816,221 @@ i32.const 22 call $~lib/builtins/abort unreachable - end - local.get $0 - local.get $1 + end + local.get $this + local.get $index i32.const 1 i32.add i32.const 2 i32.const 1 call $~lib/array/ensureCapacity - local.get $0 - local.get $1 + local.get $this + local.get $index i32.const 1 i32.add call $~lib/array/Array#set:length_ end - local.get $0 - local.get $1 - local.get $2 + local.get $this + local.get $index + local.get $value call $~lib/array/Array#__uset ) - (func $start:std/array~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $start:std/array~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 0 i32.eq ) - (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) + (func $~lib/array/Array#findIndex (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) i32.const 0 - local.set $2 - local.get $0 + local.set $var$2 + local.get $this i32.load offset=12 - local.set $3 + local.set $var$3 loop $for-loop|0 - local.get $2 - local.get $3 - local.tee $4 - local.get $0 + local.get $var$2 + local.get $var$3 + local.tee $var$4 + local.get $this i32.load offset=12 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.lt_s select i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $0 + local.get $this i32.load offset=4 - local.get $2 + local.get $var$2 i32.const 2 i32.shl i32.add i32.load - local.get $2 - local.get $0 + local.get $var$2 + local.get $this i32.const 3 global.set $~argumentsLength - local.get $1 + local.get $fn i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if - local.get $2 + local.get $var$2 return end - local.get $2 + local.get $var$2 i32.const 1 i32.add - local.set $2 + local.set $var$2 br $for-loop|0 end end i32.const -1 ) - (func $start:std/array~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $start:std/array~anonymous|1 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 1 i32.eq ) - (func $start:std/array~anonymous|2 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $start:std/array~anonymous|2 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 100 i32.eq ) - (func $start:std/array~anonymous|3 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $2 + (func $start:std/array~anonymous|3 (param $value i32) (param $_ i32) (param $array i32) (result i32) + local.get $array i32.const 100 call $~lib/array/Array#push drop - local.get $0 + local.get $value i32.const 100 i32.eq ) - (func $start:std/array~anonymous|4 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $start:std/array~anonymous|4 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 100 i32.eq ) - (func $start:std/array~anonymous|5 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $2 + (func $start:std/array~anonymous|5 (param $value i32) (param $_ i32) (param $array i32) (result i32) + local.get $array call $~lib/array/Array#pop drop - local.get $0 + local.get $value i32.const 100 i32.eq ) - (func $start:std/array~anonymous|6 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $start:std/array~anonymous|6 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 0 i32.eq ) - (func $~lib/array/Array#findLastIndex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/array/Array#findLastIndex (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + local.get $this i32.load offset=12 i32.const 1 i32.sub - local.set $2 + local.set $var$2 loop $for-loop|0 - local.get $2 + local.get $var$2 i32.const 0 i32.ge_s - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $0 + local.get $this i32.load offset=4 - local.get $2 + local.get $var$2 i32.const 2 i32.shl i32.add i32.load - local.get $2 - local.get $0 + local.get $var$2 + local.get $this i32.const 3 global.set $~argumentsLength - local.get $1 + local.get $fn i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if - local.get $2 + local.get $var$2 return end - local.get $2 + local.get $var$2 i32.const 1 i32.sub - local.set $2 + local.set $var$2 br $for-loop|0 end end i32.const -1 ) - (func $start:std/array~anonymous|7 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $start:std/array~anonymous|7 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 1 i32.eq ) - (func $start:std/array~anonymous|8 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $start:std/array~anonymous|8 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 100 i32.eq ) - (func $start:std/array~anonymous|9 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $2 + (func $start:std/array~anonymous|9 (param $value i32) (param $_ i32) (param $array i32) (result i32) + local.get $array call $~lib/array/Array#pop drop - local.get $0 + local.get $value i32.const 100 i32.eq ) - (func $start:std/array~anonymous|10 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $start:std/array~anonymous|10 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 0 i32.ge_s ) - (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) + (func $~lib/array/Array#every (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) i32.const 0 - local.set $2 - local.get $0 + local.set $var$2 + local.get $this i32.load offset=12 - local.set $3 + local.set $var$3 loop $for-loop|0 - local.get $2 - local.get $3 - local.tee $4 - local.get $0 + local.get $var$2 + local.get $var$3 + local.tee $var$4 + local.get $this i32.load offset=12 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.lt_s select i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $0 + local.get $this i32.load offset=4 - local.get $2 + local.get $var$2 i32.const 2 i32.shl i32.add i32.load - local.get $2 - local.get $0 + local.get $var$2 + local.get $this i32.const 3 global.set $~argumentsLength - local.get $1 + local.get $fn i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) i32.eqz @@ -5038,299 +5038,299 @@ i32.const 0 return end - local.get $2 + local.get $var$2 i32.const 1 i32.add - local.set $2 + local.set $var$2 br $for-loop|0 end end i32.const 1 ) - (func $start:std/array~anonymous|11 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $start:std/array~anonymous|11 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 0 i32.le_s ) - (func $start:std/array~anonymous|12 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $2 + (func $start:std/array~anonymous|12 (param $value i32) (param $_ i32) (param $array i32) (result i32) + local.get $array i32.const 100 call $~lib/array/Array#push drop - local.get $0 + local.get $value i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|13 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $start:std/array~anonymous|13 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|14 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $2 + (func $start:std/array~anonymous|14 (param $value i32) (param $_ i32) (param $array i32) (result i32) + local.get $array call $~lib/array/Array#pop drop - local.get $0 + local.get $value i32.const 3 i32.lt_s ) - (func $start:std/array~anonymous|15 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $start:std/array~anonymous|15 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 3 i32.ge_s ) - (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) + (func $~lib/array/Array#some (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) i32.const 0 - local.set $2 - local.get $0 + local.set $var$2 + local.get $this i32.load offset=12 - local.set $3 + local.set $var$3 loop $for-loop|0 - local.get $2 - local.get $3 - local.tee $4 - local.get $0 + local.get $var$2 + local.get $var$3 + local.tee $var$4 + local.get $this i32.load offset=12 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.lt_s select i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $0 + local.get $this i32.load offset=4 - local.get $2 + local.get $var$2 i32.const 2 i32.shl i32.add i32.load - local.get $2 - local.get $0 + local.get $var$2 + local.get $this i32.const 3 global.set $~argumentsLength - local.get $1 + local.get $fn i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if i32.const 1 return end - local.get $2 + local.get $var$2 i32.const 1 i32.add - local.set $2 + local.set $var$2 br $for-loop|0 end end i32.const 0 ) - (func $start:std/array~anonymous|16 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $start:std/array~anonymous|16 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const -1 i32.le_s ) - (func $start:std/array~anonymous|17 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $2 + (func $start:std/array~anonymous|17 (param $value i32) (param $_ i32) (param $array i32) (result i32) + local.get $array i32.const 100 call $~lib/array/Array#push drop - local.get $0 + local.get $value i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|18 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $start:std/array~anonymous|18 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|19 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $2 + (func $start:std/array~anonymous|19 (param $value i32) (param $_ i32) (param $array i32) (result i32) + local.get $array call $~lib/array/Array#pop drop - local.get $0 + local.get $value i32.const 3 i32.gt_s ) - (func $start:std/array~anonymous|20 (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|20 (param $value i32) (param $$1 i32) (param $$2 i32) global.get $std/array/i - local.get $0 + local.get $value i32.add global.set $std/array/i ) - (func $~lib/array/Array#forEach (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#forEach (param $this i32) (param $fn i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) i32.const 0 - local.set $2 - local.get $0 + local.set $var$2 + local.get $this i32.load offset=12 - local.set $3 + local.set $var$3 loop $for-loop|0 - local.get $2 - local.get $3 - local.tee $4 - local.get $0 + local.get $var$2 + local.get $var$3 + local.tee $var$4 + local.get $this i32.load offset=12 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.lt_s select i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $0 + local.get $this i32.load offset=4 - local.get $2 + local.get $var$2 i32.const 2 i32.shl i32.add i32.load - local.get $2 - local.get $0 + local.get $var$2 + local.get $this i32.const 3 global.set $~argumentsLength - local.get $1 + local.get $fn i32.load call_indirect $0 (type $i32_i32_i32_=>_none) - local.get $2 + local.get $var$2 i32.const 1 i32.add - local.set $2 + local.set $var$2 br $for-loop|0 end end ) - (func $start:std/array~anonymous|21 (param $0 i32) (param $1 i32) (param $2 i32) - local.get $2 + (func $start:std/array~anonymous|21 (param $value i32) (param $_ i32) (param $array i32) + local.get $array i32.const 100 call $~lib/array/Array#push drop global.get $std/array/i - local.get $0 + local.get $value i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|22 (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|22 (param $value i32) (param $$1 i32) (param $$2 i32) global.get $std/array/i - local.get $0 + local.get $value i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|23 (param $0 i32) (param $1 i32) (param $2 i32) - local.get $2 + (func $start:std/array~anonymous|23 (param $value i32) (param $_ i32) (param $array i32) + local.get $array call $~lib/array/Array#pop drop global.get $std/array/i - local.get $0 + local.get $value i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|24 (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 + (func $start:std/array~anonymous|24 (param $value i32) (param $index i32) (param $array i32) + (local $var$3 i32) + (local $var$4 i32) + local.get $index i32.const 0 i32.eq if i32.const 0 - local.set $3 + local.set $var$3 loop $for-loop|0 - local.get $3 + local.get $var$3 i32.const 4 i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $array call $~lib/array/Array#pop drop - local.get $3 + local.get $var$3 i32.const 1 i32.add - local.set $3 + local.set $var$3 br $for-loop|0 end end i32.const 0 - local.set $3 + local.set $var$3 loop $for-loop|1 - local.get $3 + local.get $var$3 i32.const 100 i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $array i32.const 100 - local.get $3 + local.get $var$3 i32.add call $~lib/array/Array#push drop - local.get $3 + local.get $var$3 i32.const 1 i32.add - local.set $3 + local.set $var$3 br $for-loop|1 end end i32.const 0 - local.set $3 + local.set $var$3 loop $for-loop|2 - local.get $3 + local.get $var$3 i32.const 100 i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $array call $~lib/array/Array#pop drop - local.get $3 + local.get $var$3 i32.const 1 i32.add - local.set $3 + local.set $var$3 br $for-loop|2 end end i32.const 0 - local.set $3 + local.set $var$3 loop $for-loop|3 - local.get $3 + local.get $var$3 i32.const 100 i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 - local.get $3 + local.get $array + local.get $var$3 i32.const 200 i32.add call $~lib/array/Array#push drop - local.get $3 + local.get $var$3 i32.const 1 i32.add - local.set $3 + local.set $var$3 br $for-loop|3 end end end - local.get $1 + local.get $index i32.const 2 i32.eq if - local.get $0 + local.get $value i32.const 202 i32.eq i32.eqz @@ -5344,446 +5344,446 @@ end end ) - (func $start:std/array~anonymous|25 (param $0 i32) (param $1 i32) (param $2 i32) (result f32) - local.get $0 + (func $start:std/array~anonymous|25 (param $value i32) (param $$1 i32) (param $$2 i32) (result f32) + local.get $value f32.convert_i32_s ) - (func $start:std/array~anonymous|26 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $2 + (func $start:std/array~anonymous|26 (param $value i32) (param $_ i32) (param $array i32) (result i32) + local.get $array i32.const 100 call $~lib/array/Array#push drop global.get $std/array/i - local.get $0 + local.get $value i32.add global.set $std/array/i - local.get $0 + local.get $value ) - (func $start:std/array~anonymous|27 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|27 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) global.get $std/array/i - local.get $0 + local.get $value i32.add global.set $std/array/i - local.get $0 + local.get $value ) - (func $start:std/array~anonymous|28 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $2 + (func $start:std/array~anonymous|28 (param $value i32) (param $_ i32) (param $array i32) (result i32) + local.get $array call $~lib/array/Array#pop drop global.get $std/array/i - local.get $0 + local.get $value i32.add global.set $std/array/i - local.get $0 + local.get $value ) - (func $start:std/array~anonymous|29 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $start:std/array~anonymous|29 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|30 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $2 + (func $start:std/array~anonymous|30 (param $value i32) (param $_ i32) (param $array i32) (result i32) + local.get $array i32.const 100 call $~lib/array/Array#push drop global.get $std/array/i - local.get $0 + local.get $value i32.add global.set $std/array/i - local.get $0 + local.get $value i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|31 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|31 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) global.get $std/array/i - local.get $0 + local.get $value i32.add global.set $std/array/i - local.get $0 + local.get $value i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|32 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $2 + (func $start:std/array~anonymous|32 (param $value i32) (param $_ i32) (param $array i32) (result i32) + local.get $array call $~lib/array/Array#pop drop global.get $std/array/i - local.get $0 + local.get $value i32.add global.set $std/array/i - local.get $0 + local.get $value i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|33 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 - local.get $1 + (func $start:std/array~anonymous|33 (param $prev i32) (param $current i32) (param $$2 i32) (param $$3 i32) (result i32) + local.get $prev + local.get $current i32.add ) - (func $~lib/array/Array#reduce (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $2 - local.set $3 + (func $~lib/array/Array#reduce (param $this i32) (param $fn i32) (param $initialValue i32) (result i32) + (local $acc i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + local.get $initialValue + local.set $acc i32.const 0 - local.set $4 - local.get $0 + local.set $var$4 + local.get $this i32.load offset=12 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $4 - local.get $5 - local.tee $6 - local.get $0 + local.get $var$4 + local.get $var$5 + local.tee $var$6 + local.get $this i32.load offset=12 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_s select i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $3 - local.get $0 + local.get $acc + local.get $this i32.load offset=4 - local.get $4 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load - local.get $4 - local.get $0 + local.get $var$4 + local.get $this i32.const 4 global.set $~argumentsLength - local.get $1 + local.get $fn i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $4 + local.set $acc + local.get $var$4 i32.const 1 i32.add - local.set $4 + local.set $var$4 br $for-loop|0 end end - local.get $3 + local.get $acc ) - (func $start:std/array~anonymous|34 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 - local.get $1 + (func $start:std/array~anonymous|34 (param $prev i32) (param $current i32) (param $$2 i32) (param $$3 i32) (result i32) + local.get $prev + local.get $current i32.add ) - (func $start:std/array~anonymous|35 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 + (func $start:std/array~anonymous|35 (param $prev i32) (param $current i32) (param $$2 i32) (param $$3 i32) (result i32) + local.get $prev if (result i32) i32.const 1 else - local.get $1 + local.get $current i32.const 2 i32.gt_s end ) - (func $~lib/array/Array#reduce (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $2 - local.set $3 + (func $~lib/array/Array#reduce (param $this i32) (param $fn i32) (param $initialValue i32) (result i32) + (local $acc i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + local.get $initialValue + local.set $acc i32.const 0 - local.set $4 - local.get $0 + local.set $var$4 + local.get $this i32.load offset=12 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $4 - local.get $5 - local.tee $6 - local.get $0 + local.get $var$4 + local.get $var$5 + local.tee $var$6 + local.get $this i32.load offset=12 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_s select i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $3 - local.get $0 + local.get $acc + local.get $this i32.load offset=4 - local.get $4 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load - local.get $4 - local.get $0 + local.get $var$4 + local.get $this i32.const 4 global.set $~argumentsLength - local.get $1 + local.get $fn i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $4 + local.set $acc + local.get $var$4 i32.const 1 i32.add - local.set $4 + local.set $var$4 br $for-loop|0 end end - local.get $3 + local.get $acc ) - (func $start:std/array~anonymous|36 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 + (func $start:std/array~anonymous|36 (param $prev i32) (param $current i32) (param $$2 i32) (param $$3 i32) (result i32) + local.get $prev if (result i32) i32.const 1 else - local.get $1 + local.get $current i32.const 100 i32.gt_s end ) - (func $start:std/array~anonymous|37 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $3 + (func $start:std/array~anonymous|37 (param $prev i32) (param $current i32) (param $_ i32) (param $array i32) (result i32) + local.get $array i32.const 1 call $~lib/array/Array#push drop - local.get $0 - local.get $1 + local.get $prev + local.get $current i32.add ) - (func $start:std/array~anonymous|38 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 - local.get $1 + (func $start:std/array~anonymous|38 (param $prev i32) (param $current i32) (param $$2 i32) (param $$3 i32) (result i32) + local.get $prev + local.get $current i32.add ) - (func $start:std/array~anonymous|39 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $3 + (func $start:std/array~anonymous|39 (param $prev i32) (param $current i32) (param $_ i32) (param $array i32) (result i32) + local.get $array call $~lib/array/Array#pop drop - local.get $0 - local.get $1 + local.get $prev + local.get $current i32.add ) - (func $start:std/array~anonymous|40 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 - local.get $1 + (func $start:std/array~anonymous|40 (param $prev i32) (param $current i32) (param $$2 i32) (param $$3 i32) (result i32) + local.get $prev + local.get $current i32.add ) - (func $~lib/array/Array#reduceRight (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $2 - local.set $3 - local.get $0 + (func $~lib/array/Array#reduceRight (param $this i32) (param $fn i32) (param $initialValue i32) (result i32) + (local $acc i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $initialValue + local.set $acc + local.get $this i32.load offset=12 i32.const 1 i32.sub - local.set $4 + local.set $var$4 loop $for-loop|0 - local.get $4 + local.get $var$4 i32.const 0 i32.ge_s - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $3 - local.get $0 + local.get $acc + local.get $this i32.load offset=4 - local.get $4 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load - local.get $4 - local.get $0 + local.get $var$4 + local.get $this i32.const 4 global.set $~argumentsLength - local.get $1 + local.get $fn i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $4 + local.set $acc + local.get $var$4 i32.const 1 i32.sub - local.set $4 + local.set $var$4 br $for-loop|0 end end - local.get $3 + local.get $acc ) - (func $start:std/array~anonymous|41 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 - local.get $1 + (func $start:std/array~anonymous|41 (param $prev i32) (param $current i32) (param $$2 i32) (param $$3 i32) (result i32) + local.get $prev + local.get $current i32.add ) - (func $start:std/array~anonymous|42 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 + (func $start:std/array~anonymous|42 (param $prev i32) (param $current i32) (param $$2 i32) (param $$3 i32) (result i32) + local.get $prev if (result i32) i32.const 1 else - local.get $1 + local.get $current i32.const 2 i32.gt_s end ) - (func $~lib/array/Array#reduceRight (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $2 - local.set $3 - local.get $0 + (func $~lib/array/Array#reduceRight (param $this i32) (param $fn i32) (param $initialValue i32) (result i32) + (local $acc i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $initialValue + local.set $acc + local.get $this i32.load offset=12 i32.const 1 i32.sub - local.set $4 + local.set $var$4 loop $for-loop|0 - local.get $4 + local.get $var$4 i32.const 0 i32.ge_s - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $3 - local.get $0 + local.get $acc + local.get $this i32.load offset=4 - local.get $4 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load - local.get $4 - local.get $0 + local.get $var$4 + local.get $this i32.const 4 global.set $~argumentsLength - local.get $1 + local.get $fn i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $4 + local.set $acc + local.get $var$4 i32.const 1 i32.sub - local.set $4 + local.set $var$4 br $for-loop|0 end end - local.get $3 + local.get $acc ) - (func $start:std/array~anonymous|43 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 + (func $start:std/array~anonymous|43 (param $prev i32) (param $current i32) (param $$2 i32) (param $$3 i32) (result i32) + local.get $prev if (result i32) i32.const 1 else - local.get $1 + local.get $current i32.const 100 i32.gt_s end ) - (func $start:std/array~anonymous|44 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $3 + (func $start:std/array~anonymous|44 (param $prev i32) (param $current i32) (param $_ i32) (param $array i32) (result i32) + local.get $array i32.const 1 call $~lib/array/Array#push drop - local.get $0 - local.get $1 + local.get $prev + local.get $current i32.add ) - (func $start:std/array~anonymous|45 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 - local.get $1 + (func $start:std/array~anonymous|45 (param $prev i32) (param $current i32) (param $$2 i32) (param $$3 i32) (result i32) + local.get $prev + local.get $current i32.add ) - (func $start:std/array~anonymous|46 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $3 + (func $start:std/array~anonymous|46 (param $prev i32) (param $current i32) (param $_ i32) (param $array i32) (result i32) + local.get $array call $~lib/array/Array#pop drop - local.get $0 - local.get $1 + local.get $prev + local.get $current i32.add ) - (func $~lib/math/murmurHash3 (param $0 i64) (result i64) - local.get $0 - local.get $0 + (func $~lib/math/murmurHash3 (param $h i64) (result i64) + local.get $h + local.get $h i64.const 33 i64.shr_u i64.xor - local.set $0 - local.get $0 + local.set $h + local.get $h i64.const -49064778989728563 i64.mul - local.set $0 - local.get $0 - local.get $0 + local.set $h + local.get $h + local.get $h i64.const 33 i64.shr_u i64.xor - local.set $0 - local.get $0 + local.set $h + local.get $h i64.const -4265267296055464877 i64.mul - local.set $0 - local.get $0 - local.get $0 + local.set $h + local.get $h + local.get $h i64.const 33 i64.shr_u i64.xor - local.set $0 - local.get $0 + local.set $h + local.get $h ) - (func $~lib/math/splitMix32 (param $0 i32) (result i32) - local.get $0 + (func $~lib/math/splitMix32 (param $h i32) (result i32) + local.get $h i32.const 1831565813 i32.add - local.set $0 - local.get $0 - local.get $0 + local.set $h + local.get $h + local.get $h i32.const 15 i32.shr_u i32.xor - local.get $0 + local.get $h i32.const 1 i32.or i32.mul - local.set $0 - local.get $0 - local.get $0 - local.get $0 - local.get $0 + local.set $h + local.get $h + local.get $h + local.get $h + local.get $h i32.const 7 i32.shr_u i32.xor - local.get $0 + local.get $h i32.const 61 i32.or i32.mul i32.add i32.xor - local.set $0 - local.get $0 - local.get $0 + local.set $h + local.get $h + local.get $h i32.const 14 i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (param $0 i64) - local.get $0 + (func $~lib/math/NativeMath.seedRandom (param $value i64) + local.get $value i64.const 0 i64.eq if i64.const -7046029254386353131 - local.set $0 + local.set $value end - local.get $0 + local.get $value call $~lib/math/murmurHash3 global.set $~lib/math/random_state0_64 global.get $~lib/math/random_state0_64 @@ -5791,7 +5791,7 @@ i64.xor call $~lib/math/murmurHash3 global.set $~lib/math/random_state1_64 - local.get $0 + local.get $value i32.wrap_i64 call $~lib/math/splitMix32 global.set $~lib/math/random_state0_32 @@ -5811,139 +5811,139 @@ local.get $1 i32.store offset=4 ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store i32.const 1 drop - local.get $0 - local.get $2 + local.get $this + local.get $value i32.const 1 call $~lib/rt/itcms/__link ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 f32) - (local $9 f32) - (local $10 f32) - (local $11 f32) - (local $12 i32) - (local $13 i32) + (func $~lib/util/sort/insertionSort (param $ptr i32) (param $left i32) (param $right i32) (param $presorted i32) (param $comparator i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 f32) + (local $var$9 f32) + (local $var$10 f32) + (local $var$11 f32) + (local $var$12 i32) + (local $var$13 i32) i32.const 0 i32.const 1 i32.ge_s drop - local.get $2 - local.get $1 + local.get $right + local.get $left i32.sub i32.const 1 i32.add - local.set $5 - local.get $1 - local.get $5 + local.set $var$5 + local.get $left + local.get $var$5 i32.const 1 i32.and - local.get $3 - local.get $5 - local.get $3 + local.get $presorted + local.get $var$5 + local.get $presorted i32.sub i32.const 1 i32.and i32.sub - local.get $3 + local.get $presorted i32.const 0 i32.eq select i32.add - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $6 - local.get $2 + local.get $var$6 + local.get $right i32.le_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $0 - local.get $6 + local.get $ptr + local.get $var$6 i32.const 2 i32.shl i32.add f32.load - local.set $8 - local.get $0 - local.get $6 + local.set $var$8 + local.get $ptr + local.get $var$6 i32.const 2 i32.shl i32.add f32.load offset=4 - local.set $9 - local.get $9 - local.set $10 - local.get $8 - local.set $11 - local.get $8 - local.get $9 + local.set $var$9 + local.get $var$9 + local.set $var$10 + local.get $var$8 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $f32_f32_=>_i32) i32.const 0 i32.le_s if - local.get $8 - local.set $10 - local.get $9 - local.set $11 + local.get $var$8 + local.set $var$10 + local.get $var$9 + local.set $var$11 end - local.get $6 + local.get $var$6 i32.const 1 i32.sub - local.set $12 + local.set $var$12 block $while-break|1 loop $while-continue|1 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add f32.load - local.set $8 - local.get $8 - local.get $11 + local.set $var$8 + local.get $var$8 + local.get $var$11 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $f32_f32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $8 + local.get $var$8 f32.store offset=8 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|1 end @@ -5951,49 +5951,49 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $11 + local.get $var$11 f32.store offset=8 block $while-break|2 loop $while-continue|2 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add f32.load - local.set $8 - local.get $8 - local.get $10 + local.set $var$8 + local.get $var$8 + local.get $var$10 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $f32_f32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $8 + local.get $var$8 f32.store offset=4 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|2 end @@ -6001,78 +6001,78 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 f32.store offset=4 - local.get $6 + local.get $var$6 i32.const 2 i32.add - local.set $6 + local.set $var$6 br $for-loop|0 end end ) - (func $~lib/util/sort/extendRunRight (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 f32) - local.get $1 - local.get $2 + (func $~lib/util/sort/extendRunRight (param $ptr i32) (param $i i32) (param $right i32) (param $comparator i32) (result i32) + (local $j i32) + (local $var$5 i32) + (local $var$6 i32) + (local $tmp f32) + local.get $i + local.get $right i32.eq if - local.get $1 + local.get $i return end - local.get $1 - local.set $4 - local.get $0 - local.get $4 + local.get $i + local.set $j + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add f32.load - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 1 i32.add - local.tee $4 + local.tee $j i32.const 2 i32.shl i32.add f32.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $f32_f32_=>_i32) i32.const 0 i32.gt_s if loop $while-continue|0 - local.get $4 - local.get $2 + local.get $j + local.get $right i32.lt_s if (result i32) - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add f32.load offset=4 - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add f32.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $f32_f32_=>_i32) i32.const 31 @@ -6080,83 +6080,83 @@ else i32.const 0 end - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 + local.get $j i32.const 1 i32.add - local.set $4 + local.set $j br $while-continue|0 end end - local.get $4 - local.set $5 + local.get $j + local.set $var$5 loop $while-continue|1 - local.get $1 - local.get $5 + local.get $i + local.get $var$5 i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $1 + local.get $ptr + local.get $i i32.const 2 i32.shl i32.add f32.load - local.set $7 - local.get $0 - local.get $1 + local.set $tmp + local.get $ptr + local.get $i i32.const 2 i32.shl i32.add - local.get $0 - local.get $5 + local.get $ptr + local.get $var$5 i32.const 2 i32.shl i32.add f32.load f32.store - local.get $1 + local.get $i i32.const 1 i32.add - local.set $1 - local.get $0 - local.get $5 + local.set $i + local.get $ptr + local.get $var$5 i32.const 2 i32.shl i32.add - local.get $7 + local.get $tmp f32.store - local.get $5 + local.get $var$5 i32.const 1 i32.sub - local.set $5 + local.set $var$5 br $while-continue|1 end end else loop $while-continue|2 - local.get $4 - local.get $2 + local.get $j + local.get $right i32.lt_s if (result i32) - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add f32.load offset=4 - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add f32.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $f32_f32_=>_i32) i32.const 0 @@ -6164,105 +6164,105 @@ else i32.const 0 end - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 + local.get $j i32.const 1 i32.add - local.set $4 + local.set $j br $while-continue|2 end end end - local.get $4 + local.get $j ) - (func $~lib/util/sort/nodePower (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i64) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i64) - local.get $1 - local.get $0 + (func $~lib/util/sort/nodePower (param $left i32) (param $right i32) (param $startA i32) (param $startB i32) (param $endB i32) (result i32) + (local $n i64) + (local $s i32) + (local $l i32) + (local $r i32) + (local $a i64) + (local $b i64) + local.get $right + local.get $left i32.sub i32.const 1 i32.add i64.extend_i32_u - local.set $5 - local.get $3 - local.get $0 + local.set $n + local.get $startB + local.get $left i32.const 1 i32.shl i32.sub - local.set $6 - local.get $2 - local.get $6 + local.set $s + local.get $startA + local.get $s i32.add - local.set $7 - local.get $4 - local.get $6 + local.set $l + local.get $endB + local.get $s i32.add i32.const 1 i32.add - local.set $8 - local.get $7 + local.set $r + local.get $l i64.extend_i32_u i64.const 30 i64.shl - local.get $5 + local.get $n i64.div_u - local.set $9 - local.get $8 + local.set $a + local.get $r i64.extend_i32_u i64.const 30 i64.shl - local.get $5 + local.get $n i64.div_u - local.set $10 - local.get $9 - local.get $10 + local.set $b + local.get $a + local.get $b i64.xor i32.wrap_i64 i32.clz ) - (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 f32) - (local $12 f32) - local.get $2 + (func $~lib/util/sort/mergeRuns (param $ptr i32) (param $l i32) (param $m i32) (param $r i32) (param $buffer i32) (param $comparator i32) + (local $i i32) + (local $j i32) + (local $t i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 f32) + (local $var$12 f32) + local.get $m i32.const 1 i32.sub - local.set $2 - local.get $3 - local.get $2 + local.set $m + local.get $r + local.get $m i32.add - local.set $8 - local.get $2 + local.set $t + local.get $m i32.const 1 i32.add - local.set $6 + local.set $i loop $for-loop|0 - local.get $6 - local.get $1 + local.get $i + local.get $l i32.gt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $6 + local.get $buffer + local.get $i i32.const 1 i32.sub i32.const 2 i32.shl i32.add - local.get $0 - local.get $6 + local.get $ptr + local.get $i i32.const 1 i32.sub i32.const 2 @@ -6270,134 +6270,134 @@ i32.add f32.load f32.store - local.get $6 + local.get $i i32.const 1 i32.sub - local.set $6 + local.set $i br $for-loop|0 end end - local.get $2 - local.set $7 + local.get $m + local.set $j loop $for-loop|1 - local.get $7 - local.get $3 + local.get $j + local.get $r i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $8 - local.get $7 + local.get $buffer + local.get $t + local.get $j i32.sub i32.const 2 i32.shl i32.add - local.get $0 - local.get $7 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add f32.load offset=4 f32.store - local.get $7 + local.get $j i32.const 1 i32.add - local.set $7 + local.set $j br $for-loop|1 end end - local.get $1 - local.set $9 + local.get $l + local.set $var$9 loop $for-loop|2 - local.get $9 - local.get $3 + local.get $var$9 + local.get $r i32.le_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $4 - local.get $7 + local.get $buffer + local.get $j i32.const 2 i32.shl i32.add f32.load - local.set $11 - local.get $4 - local.get $6 + local.set $var$11 + local.get $buffer + local.get $i i32.const 2 i32.shl i32.add f32.load - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 i32.const 2 global.set $~argumentsLength - local.get $5 + local.get $comparator i32.load call_indirect $0 (type $f32_f32_=>_i32) i32.const 0 i32.lt_s if - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 2 i32.shl i32.add - local.get $11 + local.get $var$11 f32.store - local.get $7 + local.get $j i32.const 1 i32.sub - local.set $7 + local.set $j else - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 2 i32.shl i32.add - local.get $12 + local.get $var$12 f32.store - local.get $6 + local.get $i i32.const 1 i32.add - local.set $6 + local.set $i end - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|2 end end ) - (func $~lib/util/sort/SORT (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 f32) - (local $5 f32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) - (local $21 i32) - (local $22 i32) - local.get $1 + (func $~lib/util/sort/SORT (param $ptr i32) (param $len i32) (param $comparator i32) + (local $startB i32) + (local $var$4 f32) + (local $var$5 f32) + (local $lgPlus2 i32) + (local $lgPlus2Size i32) + (local $leftRunStartBuf i32) + (local $leftRunEndBuf i32) + (local $var$10 i32) + (local $buffer i32) + (local $hi i32) + (local $endA i32) + (local $lenA i32) + (local $top i32) + (local $startA i32) + (local $endB i32) + (local $lenB i32) + (local $k i32) + (local $var$20 i32) + (local $var$21 i32) + (local $var$22 i32) + local.get $len i32.const 48 i32.le_s if - local.get $1 + local.get $len i32.const 1 i32.le_s if @@ -6410,535 +6410,535 @@ block $break|0 block $case1|0 block $case0|0 - local.get $1 - local.set $3 - local.get $3 + local.get $len + local.set $startB + local.get $startB i32.const 3 i32.eq br_if $case0|0 - local.get $3 + local.get $startB i32.const 2 i32.eq br_if $case1|0 br $break|0 end - local.get $0 + local.get $ptr f32.load - local.set $4 - local.get $0 + local.set $var$4 + local.get $ptr f32.load offset=4 - local.set $5 - local.get $4 - local.get $5 + local.set $var$5 + local.get $var$4 + local.get $var$5 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $f32_f32_=>_i32) i32.const 0 i32.gt_s - local.set $3 - local.get $0 - local.get $5 - local.get $4 - local.get $3 + local.set $startB + local.get $ptr + local.get $var$5 + local.get $var$4 + local.get $startB select f32.store - local.get $4 - local.get $5 - local.get $3 + local.get $var$4 + local.get $var$5 + local.get $startB select - local.set $4 - local.get $0 + local.set $var$4 + local.get $ptr f32.load offset=8 - local.set $5 - local.get $4 - local.get $5 + local.set $var$5 + local.get $var$4 + local.get $var$5 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $f32_f32_=>_i32) i32.const 0 i32.gt_s - local.set $3 - local.get $0 - local.get $5 - local.get $4 - local.get $3 + local.set $startB + local.get $ptr + local.get $var$5 + local.get $var$4 + local.get $startB select f32.store offset=4 - local.get $0 - local.get $4 - local.get $5 - local.get $3 + local.get $ptr + local.get $var$4 + local.get $var$5 + local.get $startB select f32.store offset=8 end - local.get $0 + local.get $ptr f32.load - local.set $5 - local.get $0 + local.set $var$5 + local.get $ptr f32.load offset=4 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $f32_f32_=>_i32) i32.const 0 i32.gt_s - local.set $3 - local.get $0 - local.get $4 - local.get $5 - local.get $3 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $var$5 + local.get $startB select f32.store - local.get $0 - local.get $5 - local.get $4 - local.get $3 + local.get $ptr + local.get $var$5 + local.get $var$4 + local.get $startB select f32.store offset=4 return end - local.get $0 + local.get $ptr i32.const 0 - local.get $1 + local.get $len i32.const 1 i32.sub i32.const 0 - local.get $2 + local.get $comparator call $~lib/util/sort/insertionSort return end - local.get $1 - local.set $3 + local.get $len + local.set $startB i32.const 31 - local.get $3 + local.get $startB i32.clz i32.sub i32.const 2 i32.add - local.set $6 - local.get $6 + local.set $lgPlus2 + local.get $lgPlus2 i32.const 2 i32.shl - local.set $7 - local.get $7 + local.set $lgPlus2Size + local.get $lgPlus2Size i32.const 1 i32.shl call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 - local.get $7 + local.set $leftRunStartBuf + local.get $leftRunStartBuf + local.get $lgPlus2Size i32.add - local.set $9 + local.set $leftRunEndBuf i32.const 0 - local.set $3 + local.set $startB loop $for-loop|1 - local.get $3 - local.get $6 + local.get $startB + local.get $lgPlus2 i32.lt_u - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $8 - local.get $3 + local.get $leftRunStartBuf + local.get $startB i32.const 2 i32.shl i32.add i32.const -1 i32.store - local.get $3 + local.get $startB i32.const 1 i32.add - local.set $3 + local.set $startB br $for-loop|1 end end - local.get $1 + local.get $len i32.const 2 i32.shl call $~lib/rt/tlsf/__alloc - local.set $11 - local.get $1 + local.set $buffer + local.get $len i32.const 1 i32.sub - local.set $12 - local.get $0 + local.set $hi + local.get $ptr i32.const 0 - local.get $12 - local.get $2 + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight - local.set $13 - local.get $13 + local.set $endA + local.get $endA i32.const 1 i32.add - local.set $14 - local.get $14 + local.set $lenA + local.get $lenA i32.const 32 i32.lt_s if - local.get $12 - local.tee $10 + local.get $hi + local.tee $var$10 i32.const 32 i32.const 1 i32.sub - local.tee $3 - local.get $10 - local.get $3 + local.tee $startB + local.get $var$10 + local.get $startB i32.lt_s select - local.set $13 - local.get $0 + local.set $endA + local.get $ptr i32.const 0 - local.get $13 - local.get $14 - local.get $2 + local.get $endA + local.get $lenA + local.get $comparator call $~lib/util/sort/insertionSort end i32.const 0 - local.set $15 + local.set $top i32.const 0 - local.set $16 + local.set $startA loop $while-continue|2 - local.get $13 - local.get $12 + local.get $endA + local.get $hi i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $13 + local.get $endA i32.const 1 i32.add - local.set $3 - local.get $0 - local.get $3 - local.get $12 - local.get $2 + local.set $startB + local.get $ptr + local.get $startB + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight - local.set $17 - local.get $17 - local.get $3 + local.set $endB + local.get $endB + local.get $startB i32.sub i32.const 1 i32.add - local.set $18 - local.get $18 + local.set $lenB + local.get $lenB i32.const 32 i32.lt_s if - local.get $12 - local.tee $19 - local.get $3 + local.get $hi + local.tee $k + local.get $startB i32.const 32 i32.add i32.const 1 i32.sub - local.tee $20 - local.get $19 - local.get $20 + local.tee $var$20 + local.get $k + local.get $var$20 i32.lt_s select - local.set $17 - local.get $0 - local.get $3 - local.get $17 - local.get $18 - local.get $2 + local.set $endB + local.get $ptr + local.get $startB + local.get $endB + local.get $lenB + local.get $comparator call $~lib/util/sort/insertionSort end i32.const 0 - local.get $12 - local.get $16 - local.get $3 - local.get $17 + local.get $hi + local.get $startA + local.get $startB + local.get $endB call $~lib/util/sort/nodePower - local.set $19 - local.get $15 - local.set $20 + local.set $k + local.get $top + local.set $var$20 loop $for-loop|3 - local.get $20 - local.get $19 + local.get $var$20 + local.get $k i32.gt_u - local.set $21 - local.get $21 + local.set $var$21 + local.get $var$21 if - local.get $8 - local.get $20 + local.get $leftRunStartBuf + local.get $var$20 i32.const 2 i32.shl i32.add i32.load - local.set $22 - local.get $22 + local.set $var$22 + local.get $var$22 i32.const -1 i32.ne if - local.get $0 - local.get $22 - local.get $9 - local.get $20 + local.get $ptr + local.get $var$22 + local.get $leftRunEndBuf + local.get $var$20 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $13 - local.get $11 - local.get $2 + local.get $endA + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns - local.get $22 - local.set $16 - local.get $8 - local.get $20 + local.get $var$22 + local.set $startA + local.get $leftRunStartBuf + local.get $var$20 i32.const 2 i32.shl i32.add i32.const -1 i32.store end - local.get $20 + local.get $var$20 i32.const 1 i32.sub - local.set $20 + local.set $var$20 br $for-loop|3 end end - local.get $8 - local.get $19 + local.get $leftRunStartBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $16 + local.get $startA i32.store - local.get $9 - local.get $19 + local.get $leftRunEndBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $13 + local.get $endA i32.store - local.get $3 - local.set $16 - local.get $17 - local.set $13 - local.get $19 - local.set $15 + local.get $startB + local.set $startA + local.get $endB + local.set $endA + local.get $k + local.set $top br $while-continue|2 end end - local.get $15 - local.set $10 + local.get $top + local.set $var$10 loop $for-loop|4 - local.get $10 + local.get $var$10 i32.const 0 i32.ne - local.set $20 - local.get $20 + local.set $var$20 + local.get $var$20 if - local.get $8 - local.get $10 + local.get $leftRunStartBuf + local.get $var$10 i32.const 2 i32.shl i32.add i32.load - local.set $21 - local.get $21 + local.set $var$21 + local.get $var$21 i32.const -1 i32.ne if - local.get $0 - local.get $21 - local.get $9 - local.get $10 + local.get $ptr + local.get $var$21 + local.get $leftRunEndBuf + local.get $var$10 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $12 - local.get $11 - local.get $2 + local.get $hi + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns end - local.get $10 + local.get $var$10 i32.const 1 i32.sub - local.set $10 + local.set $var$10 br $for-loop|4 end end - local.get $11 + local.get $buffer call $~lib/rt/tlsf/__free - local.get $8 + local.get $leftRunStartBuf call $~lib/rt/tlsf/__free ) - (func $~lib/array/Array#sort (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/array/Array#sort (param $this i32) (param $comparator i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this i32.load offset=12 - local.get $1 + local.get $comparator call $~lib/util/sort/SORT - local.get $0 + local.get $this ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 f32) (param $1 f32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $a f32) (param $b f32) (result i32) + (local $ia i32) + (local $ib i32) + local.get $a i32.reinterpret_f32 - local.set $2 - local.get $1 + local.set $ia + local.get $b i32.reinterpret_f32 - local.set $3 - local.get $2 - local.get $2 + local.set $ib + local.get $ia + local.get $ia i32.const 31 i32.shr_s i32.const 1 i32.shr_u i32.xor - local.set $2 - local.get $3 - local.get $3 + local.set $ia + local.get $ib + local.get $ib i32.const 31 i32.shr_s i32.const 1 i32.shr_u i32.xor - local.set $3 - local.get $2 - local.get $3 + local.set $ib + local.get $ia + local.get $ib i32.gt_s - local.get $2 - local.get $3 + local.get $ia + local.get $ib i32.lt_s i32.sub ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 i32) - (local $13 i32) + (func $~lib/util/sort/insertionSort (param $ptr i32) (param $left i32) (param $right i32) (param $presorted i32) (param $comparator i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 f64) + (local $var$9 f64) + (local $var$10 f64) + (local $var$11 f64) + (local $var$12 i32) + (local $var$13 i32) i32.const 0 i32.const 1 i32.ge_s drop - local.get $2 - local.get $1 + local.get $right + local.get $left i32.sub i32.const 1 i32.add - local.set $5 - local.get $1 - local.get $5 + local.set $var$5 + local.get $left + local.get $var$5 i32.const 1 i32.and - local.get $3 - local.get $5 - local.get $3 + local.get $presorted + local.get $var$5 + local.get $presorted i32.sub i32.const 1 i32.and i32.sub - local.get $3 + local.get $presorted i32.const 0 i32.eq select i32.add - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $6 - local.get $2 + local.get $var$6 + local.get $right i32.le_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $0 - local.get $6 + local.get $ptr + local.get $var$6 i32.const 3 i32.shl i32.add f64.load - local.set $8 - local.get $0 - local.get $6 + local.set $var$8 + local.get $ptr + local.get $var$6 i32.const 3 i32.shl i32.add f64.load offset=8 - local.set $9 - local.get $9 - local.set $10 - local.get $8 - local.set $11 - local.get $8 - local.get $9 + local.set $var$9 + local.get $var$9 + local.set $var$10 + local.get $var$8 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $f64_f64_=>_i32) i32.const 0 i32.le_s if - local.get $8 - local.set $10 - local.get $9 - local.set $11 + local.get $var$8 + local.set $var$10 + local.get $var$9 + local.set $var$11 end - local.get $6 + local.get $var$6 i32.const 1 i32.sub - local.set $12 + local.set $var$12 block $while-break|1 loop $while-continue|1 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 3 i32.shl i32.add f64.load - local.set $8 - local.get $8 - local.get $11 + local.set $var$8 + local.get $var$8 + local.get $var$11 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $f64_f64_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 3 i32.shl i32.add - local.get $8 + local.get $var$8 f64.store offset=16 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|1 end @@ -6946,49 +6946,49 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 3 i32.shl i32.add - local.get $11 + local.get $var$11 f64.store offset=16 block $while-break|2 loop $while-continue|2 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 3 i32.shl i32.add f64.load - local.set $8 - local.get $8 - local.get $10 + local.set $var$8 + local.get $var$8 + local.get $var$10 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $f64_f64_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 3 i32.shl i32.add - local.get $8 + local.get $var$8 f64.store offset=8 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|2 end @@ -6996,78 +6996,78 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 3 i32.shl i32.add - local.get $10 + local.get $var$10 f64.store offset=8 - local.get $6 + local.get $var$6 i32.const 2 i32.add - local.set $6 + local.set $var$6 br $for-loop|0 end - end - ) - (func $~lib/util/sort/extendRunRight (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 f64) - local.get $1 - local.get $2 + end + ) + (func $~lib/util/sort/extendRunRight (param $ptr i32) (param $i i32) (param $right i32) (param $comparator i32) (result i32) + (local $j i32) + (local $var$5 i32) + (local $var$6 i32) + (local $tmp f64) + local.get $i + local.get $right i32.eq if - local.get $1 + local.get $i return end - local.get $1 - local.set $4 - local.get $0 - local.get $4 + local.get $i + local.set $j + local.get $ptr + local.get $j i32.const 3 i32.shl i32.add f64.load - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 1 i32.add - local.tee $4 + local.tee $j i32.const 3 i32.shl i32.add f64.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $f64_f64_=>_i32) i32.const 0 i32.gt_s if loop $while-continue|0 - local.get $4 - local.get $2 + local.get $j + local.get $right i32.lt_s if (result i32) - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 3 i32.shl i32.add f64.load offset=8 - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 3 i32.shl i32.add f64.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $f64_f64_=>_i32) i32.const 31 @@ -7075,83 +7075,83 @@ else i32.const 0 end - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 + local.get $j i32.const 1 i32.add - local.set $4 + local.set $j br $while-continue|0 end end - local.get $4 - local.set $5 + local.get $j + local.set $var$5 loop $while-continue|1 - local.get $1 - local.get $5 + local.get $i + local.get $var$5 i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $1 + local.get $ptr + local.get $i i32.const 3 i32.shl i32.add f64.load - local.set $7 - local.get $0 - local.get $1 + local.set $tmp + local.get $ptr + local.get $i i32.const 3 i32.shl i32.add - local.get $0 - local.get $5 + local.get $ptr + local.get $var$5 i32.const 3 i32.shl i32.add f64.load f64.store - local.get $1 + local.get $i i32.const 1 i32.add - local.set $1 - local.get $0 - local.get $5 + local.set $i + local.get $ptr + local.get $var$5 i32.const 3 i32.shl i32.add - local.get $7 + local.get $tmp f64.store - local.get $5 + local.get $var$5 i32.const 1 i32.sub - local.set $5 + local.set $var$5 br $while-continue|1 end end else loop $while-continue|2 - local.get $4 - local.get $2 + local.get $j + local.get $right i32.lt_s if (result i32) - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 3 i32.shl i32.add f64.load offset=8 - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 3 i32.shl i32.add f64.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $f64_f64_=>_i32) i32.const 0 @@ -7159,55 +7159,55 @@ else i32.const 0 end - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 + local.get $j i32.const 1 i32.add - local.set $4 + local.set $j br $while-continue|2 end end end - local.get $4 + local.get $j ) - (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 f64) - (local $12 f64) - local.get $2 + (func $~lib/util/sort/mergeRuns (param $ptr i32) (param $l i32) (param $m i32) (param $r i32) (param $buffer i32) (param $comparator i32) + (local $i i32) + (local $j i32) + (local $t i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 f64) + (local $var$12 f64) + local.get $m i32.const 1 i32.sub - local.set $2 - local.get $3 - local.get $2 + local.set $m + local.get $r + local.get $m i32.add - local.set $8 - local.get $2 + local.set $t + local.get $m i32.const 1 i32.add - local.set $6 + local.set $i loop $for-loop|0 - local.get $6 - local.get $1 + local.get $i + local.get $l i32.gt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $6 + local.get $buffer + local.get $i i32.const 1 i32.sub i32.const 3 i32.shl i32.add - local.get $0 - local.get $6 + local.get $ptr + local.get $i i32.const 1 i32.sub i32.const 3 @@ -7215,134 +7215,134 @@ i32.add f64.load f64.store - local.get $6 + local.get $i i32.const 1 i32.sub - local.set $6 + local.set $i br $for-loop|0 end end - local.get $2 - local.set $7 + local.get $m + local.set $j loop $for-loop|1 - local.get $7 - local.get $3 + local.get $j + local.get $r i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $8 - local.get $7 + local.get $buffer + local.get $t + local.get $j i32.sub i32.const 3 i32.shl i32.add - local.get $0 - local.get $7 + local.get $ptr + local.get $j i32.const 3 i32.shl i32.add f64.load offset=8 f64.store - local.get $7 + local.get $j i32.const 1 i32.add - local.set $7 + local.set $j br $for-loop|1 end end - local.get $1 - local.set $9 + local.get $l + local.set $var$9 loop $for-loop|2 - local.get $9 - local.get $3 + local.get $var$9 + local.get $r i32.le_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $4 - local.get $7 + local.get $buffer + local.get $j i32.const 3 i32.shl i32.add f64.load - local.set $11 - local.get $4 - local.get $6 + local.set $var$11 + local.get $buffer + local.get $i i32.const 3 i32.shl i32.add f64.load - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 i32.const 2 global.set $~argumentsLength - local.get $5 + local.get $comparator i32.load call_indirect $0 (type $f64_f64_=>_i32) i32.const 0 i32.lt_s if - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 3 i32.shl i32.add - local.get $11 + local.get $var$11 f64.store - local.get $7 + local.get $j i32.const 1 i32.sub - local.set $7 + local.set $j else - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 3 i32.shl i32.add - local.get $12 + local.get $var$12 f64.store - local.get $6 + local.get $i i32.const 1 i32.add - local.set $6 + local.set $i end - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|2 end end ) - (func $~lib/util/sort/SORT (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 f64) - (local $5 f64) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) - (local $21 i32) - (local $22 i32) - local.get $1 + (func $~lib/util/sort/SORT (param $ptr i32) (param $len i32) (param $comparator i32) + (local $startB i32) + (local $var$4 f64) + (local $var$5 f64) + (local $lgPlus2 i32) + (local $lgPlus2Size i32) + (local $leftRunStartBuf i32) + (local $leftRunEndBuf i32) + (local $var$10 i32) + (local $buffer i32) + (local $hi i32) + (local $endA i32) + (local $lenA i32) + (local $top i32) + (local $startA i32) + (local $endB i32) + (local $lenB i32) + (local $k i32) + (local $var$20 i32) + (local $var$21 i32) + (local $var$22 i32) + local.get $len i32.const 48 i32.le_s if - local.get $1 + local.get $len i32.const 1 i32.le_s if @@ -7355,426 +7355,426 @@ block $break|0 block $case1|0 block $case0|0 - local.get $1 - local.set $3 - local.get $3 + local.get $len + local.set $startB + local.get $startB i32.const 3 i32.eq br_if $case0|0 - local.get $3 + local.get $startB i32.const 2 i32.eq br_if $case1|0 br $break|0 end - local.get $0 + local.get $ptr f64.load - local.set $4 - local.get $0 + local.set $var$4 + local.get $ptr f64.load offset=8 - local.set $5 - local.get $4 - local.get $5 + local.set $var$5 + local.get $var$4 + local.get $var$5 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $f64_f64_=>_i32) i32.const 0 i32.gt_s - local.set $3 - local.get $0 - local.get $5 - local.get $4 - local.get $3 + local.set $startB + local.get $ptr + local.get $var$5 + local.get $var$4 + local.get $startB select f64.store - local.get $4 - local.get $5 - local.get $3 + local.get $var$4 + local.get $var$5 + local.get $startB select - local.set $4 - local.get $0 + local.set $var$4 + local.get $ptr f64.load offset=16 - local.set $5 - local.get $4 - local.get $5 + local.set $var$5 + local.get $var$4 + local.get $var$5 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $f64_f64_=>_i32) i32.const 0 i32.gt_s - local.set $3 - local.get $0 - local.get $5 - local.get $4 - local.get $3 + local.set $startB + local.get $ptr + local.get $var$5 + local.get $var$4 + local.get $startB select f64.store offset=8 - local.get $0 - local.get $4 - local.get $5 - local.get $3 + local.get $ptr + local.get $var$4 + local.get $var$5 + local.get $startB select f64.store offset=16 end - local.get $0 + local.get $ptr f64.load - local.set $5 - local.get $0 + local.set $var$5 + local.get $ptr f64.load offset=8 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $f64_f64_=>_i32) i32.const 0 i32.gt_s - local.set $3 - local.get $0 - local.get $4 - local.get $5 - local.get $3 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $var$5 + local.get $startB select f64.store - local.get $0 - local.get $5 - local.get $4 - local.get $3 + local.get $ptr + local.get $var$5 + local.get $var$4 + local.get $startB select f64.store offset=8 return end - local.get $0 + local.get $ptr i32.const 0 - local.get $1 + local.get $len i32.const 1 i32.sub i32.const 0 - local.get $2 + local.get $comparator call $~lib/util/sort/insertionSort return end - local.get $1 - local.set $3 + local.get $len + local.set $startB i32.const 31 - local.get $3 + local.get $startB i32.clz i32.sub i32.const 2 i32.add - local.set $6 - local.get $6 + local.set $lgPlus2 + local.get $lgPlus2 i32.const 2 i32.shl - local.set $7 - local.get $7 + local.set $lgPlus2Size + local.get $lgPlus2Size i32.const 1 i32.shl call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 - local.get $7 + local.set $leftRunStartBuf + local.get $leftRunStartBuf + local.get $lgPlus2Size i32.add - local.set $9 + local.set $leftRunEndBuf i32.const 0 - local.set $3 + local.set $startB loop $for-loop|1 - local.get $3 - local.get $6 + local.get $startB + local.get $lgPlus2 i32.lt_u - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $8 - local.get $3 + local.get $leftRunStartBuf + local.get $startB i32.const 2 i32.shl i32.add i32.const -1 i32.store - local.get $3 + local.get $startB i32.const 1 i32.add - local.set $3 + local.set $startB br $for-loop|1 end end - local.get $1 + local.get $len i32.const 3 i32.shl call $~lib/rt/tlsf/__alloc - local.set $11 - local.get $1 + local.set $buffer + local.get $len i32.const 1 i32.sub - local.set $12 - local.get $0 + local.set $hi + local.get $ptr i32.const 0 - local.get $12 - local.get $2 + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight - local.set $13 - local.get $13 + local.set $endA + local.get $endA i32.const 1 i32.add - local.set $14 - local.get $14 + local.set $lenA + local.get $lenA i32.const 32 i32.lt_s if - local.get $12 - local.tee $10 + local.get $hi + local.tee $var$10 i32.const 32 i32.const 1 i32.sub - local.tee $3 - local.get $10 - local.get $3 + local.tee $startB + local.get $var$10 + local.get $startB i32.lt_s select - local.set $13 - local.get $0 + local.set $endA + local.get $ptr i32.const 0 - local.get $13 - local.get $14 - local.get $2 + local.get $endA + local.get $lenA + local.get $comparator call $~lib/util/sort/insertionSort end i32.const 0 - local.set $15 + local.set $top i32.const 0 - local.set $16 + local.set $startA loop $while-continue|2 - local.get $13 - local.get $12 + local.get $endA + local.get $hi i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $13 + local.get $endA i32.const 1 i32.add - local.set $3 - local.get $0 - local.get $3 - local.get $12 - local.get $2 + local.set $startB + local.get $ptr + local.get $startB + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight - local.set $17 - local.get $17 - local.get $3 + local.set $endB + local.get $endB + local.get $startB i32.sub i32.const 1 i32.add - local.set $18 - local.get $18 + local.set $lenB + local.get $lenB i32.const 32 i32.lt_s if - local.get $12 - local.tee $19 - local.get $3 + local.get $hi + local.tee $k + local.get $startB i32.const 32 i32.add i32.const 1 i32.sub - local.tee $20 - local.get $19 - local.get $20 + local.tee $var$20 + local.get $k + local.get $var$20 i32.lt_s select - local.set $17 - local.get $0 - local.get $3 - local.get $17 - local.get $18 - local.get $2 + local.set $endB + local.get $ptr + local.get $startB + local.get $endB + local.get $lenB + local.get $comparator call $~lib/util/sort/insertionSort end i32.const 0 - local.get $12 - local.get $16 - local.get $3 - local.get $17 + local.get $hi + local.get $startA + local.get $startB + local.get $endB call $~lib/util/sort/nodePower - local.set $19 - local.get $15 - local.set $20 + local.set $k + local.get $top + local.set $var$20 loop $for-loop|3 - local.get $20 - local.get $19 + local.get $var$20 + local.get $k i32.gt_u - local.set $21 - local.get $21 + local.set $var$21 + local.get $var$21 if - local.get $8 - local.get $20 + local.get $leftRunStartBuf + local.get $var$20 i32.const 2 i32.shl i32.add i32.load - local.set $22 - local.get $22 + local.set $var$22 + local.get $var$22 i32.const -1 i32.ne if - local.get $0 - local.get $22 - local.get $9 - local.get $20 + local.get $ptr + local.get $var$22 + local.get $leftRunEndBuf + local.get $var$20 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $13 - local.get $11 - local.get $2 + local.get $endA + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns - local.get $22 - local.set $16 - local.get $8 - local.get $20 + local.get $var$22 + local.set $startA + local.get $leftRunStartBuf + local.get $var$20 i32.const 2 i32.shl i32.add i32.const -1 i32.store end - local.get $20 + local.get $var$20 i32.const 1 i32.sub - local.set $20 + local.set $var$20 br $for-loop|3 end end - local.get $8 - local.get $19 + local.get $leftRunStartBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $16 + local.get $startA i32.store - local.get $9 - local.get $19 + local.get $leftRunEndBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $13 + local.get $endA i32.store - local.get $3 - local.set $16 - local.get $17 - local.set $13 - local.get $19 - local.set $15 + local.get $startB + local.set $startA + local.get $endB + local.set $endA + local.get $k + local.set $top br $while-continue|2 end end - local.get $15 - local.set $10 + local.get $top + local.set $var$10 loop $for-loop|4 - local.get $10 + local.get $var$10 i32.const 0 i32.ne - local.set $20 - local.get $20 + local.set $var$20 + local.get $var$20 if - local.get $8 - local.get $10 + local.get $leftRunStartBuf + local.get $var$10 i32.const 2 i32.shl i32.add i32.load - local.set $21 - local.get $21 + local.set $var$21 + local.get $var$21 i32.const -1 i32.ne if - local.get $0 - local.get $21 - local.get $9 - local.get $10 + local.get $ptr + local.get $var$21 + local.get $leftRunEndBuf + local.get $var$10 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $12 - local.get $11 - local.get $2 + local.get $hi + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns end - local.get $10 + local.get $var$10 i32.const 1 i32.sub - local.set $10 + local.set $var$10 br $for-loop|4 end end - local.get $11 + local.get $buffer call $~lib/rt/tlsf/__free - local.get $8 + local.get $leftRunStartBuf call $~lib/rt/tlsf/__free ) - (func $~lib/array/Array#sort (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/array/Array#sort (param $this i32) (param $comparator i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this i32.load offset=12 - local.get $1 + local.get $comparator call $~lib/util/sort/SORT - local.get $0 + local.get $this ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 f64) (param $1 f64) (result i32) - (local $2 i64) - (local $3 i64) - local.get $0 + (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $a f64) (param $b f64) (result i32) + (local $ia i64) + (local $ib i64) + local.get $a i64.reinterpret_f64 - local.set $2 - local.get $1 + local.set $ia + local.get $b i64.reinterpret_f64 - local.set $3 - local.get $2 - local.get $2 + local.set $ib + local.get $ia + local.get $ia i64.const 63 i64.shr_s i64.const 1 i64.shr_u i64.xor - local.set $2 - local.get $3 - local.get $3 + local.set $ia + local.get $ib + local.get $ib i64.const 63 i64.shr_s i64.const 1 i64.shr_u i64.xor - local.set $3 - local.get $2 - local.get $3 + local.set $ib + local.get $ia + local.get $ib i64.gt_s - local.get $2 - local.get $3 + local.get $ia + local.get $ib i64.lt_s i32.sub ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result f64) - (local $2 f64) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result f64) + (local $value f64) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -7785,38 +7785,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add f64.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) - (func $std/array/isArraysEqual (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 f64) - local.get $2 + (func $std/array/isArraysEqual (param $a i32) (param $b i32) (param $len i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 f64) + local.get $len i32.eqz if - local.get $0 + local.get $a call $~lib/array/Array#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $len + local.get $len + local.get $b call $~lib/array/Array#get:length i32.ne if i32.const 0 return end - local.get $0 - local.get $1 + local.get $a + local.get $b i32.eq if i32.const 1 @@ -7824,29 +7824,29 @@ end end i32.const 0 - local.set $3 + local.set $var$3 loop $for-loop|0 - local.get $3 - local.get $2 + local.get $var$3 + local.get $len i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if block $for-continue|0 i32.const 1 drop - local.get $0 - local.get $3 + local.get $a + local.get $var$3 call $~lib/array/Array#__get - local.tee $5 - local.get $5 + local.tee $var$5 + local.get $var$5 f64.ne if (result i32) - local.get $1 - local.get $3 + local.get $b + local.get $var$3 call $~lib/array/Array#__get - local.tee $5 - local.get $5 + local.tee $var$5 + local.get $var$5 f64.ne else i32.const 0 @@ -7854,11 +7854,11 @@ if br $for-continue|0 end - local.get $0 - local.get $3 + local.get $a + local.get $var$3 call $~lib/array/Array#__get - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i64.reinterpret_f64 i64.const 63 i64.shr_u @@ -7866,11 +7866,11 @@ i64.ne i32.const 0 i32.ne - local.get $1 - local.get $3 + local.get $b + local.get $var$3 call $~lib/array/Array#__get - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i64.reinterpret_f64 i64.const 63 i64.shr_u @@ -7883,11 +7883,11 @@ i32.const 0 return end - local.get $0 - local.get $3 + local.get $a + local.get $var$3 call $~lib/array/Array#__get - local.get $1 - local.get $3 + local.get $b + local.get $var$3 call $~lib/array/Array#__get f64.ne if @@ -7895,132 +7895,132 @@ return end end - local.get $3 + local.get $var$3 i32.const 1 i32.add - local.set $3 + local.set $var$3 br $for-loop|0 end end i32.const 1 ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $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) + (func $~lib/util/sort/insertionSort (param $ptr i32) (param $left i32) (param $right i32) (param $presorted i32) (param $comparator i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 0 i32.const 1 i32.ge_s drop - local.get $2 - local.get $1 + local.get $right + local.get $left i32.sub i32.const 1 i32.add - local.set $5 - local.get $1 - local.get $5 + local.set $var$5 + local.get $left + local.get $var$5 i32.const 1 i32.and - local.get $3 - local.get $5 - local.get $3 + local.get $presorted + local.get $var$5 + local.get $presorted i32.sub i32.const 1 i32.and i32.sub - local.get $3 + local.get $presorted i32.const 0 i32.eq select i32.add - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $6 - local.get $2 + local.get $var$6 + local.get $right i32.le_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $0 - local.get $6 + local.get $ptr + local.get $var$6 i32.const 2 i32.shl i32.add i32.load - local.set $8 - local.get $0 - local.get $6 + local.set $var$8 + local.get $ptr + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $9 - local.get $9 - local.set $10 - local.get $8 - local.set $11 - local.get $8 - local.get $9 + local.set $var$9 + local.get $var$9 + local.set $var$10 + local.get $var$8 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.le_s if - local.get $8 - local.set $10 - local.get $9 - local.set $11 + local.get $var$8 + local.set $var$10 + local.get $var$9 + local.set $var$11 end - local.get $6 + local.get $var$6 i32.const 1 i32.sub - local.set $12 + local.set $var$12 block $while-break|1 loop $while-continue|1 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add i32.load - local.set $8 - local.get $8 - local.get $11 + local.set $var$8 + local.get $var$8 + local.get $var$11 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $8 + local.get $var$8 i32.store offset=8 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|1 end @@ -8028,49 +8028,49 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store offset=8 block $while-break|2 loop $while-continue|2 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add i32.load - local.set $8 - local.get $8 - local.get $10 + local.set $var$8 + local.get $var$8 + local.get $var$10 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $8 + local.get $var$8 i32.store offset=4 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|2 end @@ -8078,78 +8078,78 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.const 2 i32.add - local.set $6 + local.set $var$6 br $for-loop|0 end end ) - (func $~lib/util/sort/extendRunRight (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 - local.get $2 + (func $~lib/util/sort/extendRunRight (param $ptr i32) (param $i i32) (param $right i32) (param $comparator i32) (result i32) + (local $j i32) + (local $var$5 i32) + (local $var$6 i32) + (local $tmp i32) + local.get $i + local.get $right i32.eq if - local.get $1 + local.get $i return end - local.get $1 - local.set $4 - local.get $0 - local.get $4 + local.get $i + local.set $j + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 1 i32.add - local.tee $4 + local.tee $j i32.const 2 i32.shl i32.add i32.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if loop $while-continue|0 - local.get $4 - local.get $2 + local.get $j + local.get $right i32.lt_s if (result i32) - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load offset=4 - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 31 @@ -8157,83 +8157,83 @@ else i32.const 0 end - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 + local.get $j i32.const 1 i32.add - local.set $4 + local.set $j br $while-continue|0 end end - local.get $4 - local.set $5 + local.get $j + local.set $var$5 loop $while-continue|1 - local.get $1 - local.get $5 + local.get $i + local.get $var$5 i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $1 + local.get $ptr + local.get $i i32.const 2 i32.shl i32.add i32.load - local.set $7 - local.get $0 - local.get $1 + local.set $tmp + local.get $ptr + local.get $i i32.const 2 i32.shl i32.add - local.get $0 - local.get $5 + local.get $ptr + local.get $var$5 i32.const 2 i32.shl i32.add i32.load i32.store - local.get $1 + local.get $i i32.const 1 i32.add - local.set $1 - local.get $0 - local.get $5 + local.set $i + local.get $ptr + local.get $var$5 i32.const 2 i32.shl i32.add - local.get $7 + local.get $tmp i32.store - local.get $5 + local.get $var$5 i32.const 1 i32.sub - local.set $5 + local.set $var$5 br $while-continue|1 end end else loop $while-continue|2 - local.get $4 - local.get $2 + local.get $j + local.get $right i32.lt_s if (result i32) - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load offset=4 - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 @@ -8241,55 +8241,55 @@ else i32.const 0 end - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 + local.get $j i32.const 1 i32.add - local.set $4 + local.set $j br $while-continue|2 end end end - local.get $4 + local.get $j ) - (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $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 $2 + (func $~lib/util/sort/mergeRuns (param $ptr i32) (param $l i32) (param $m i32) (param $r i32) (param $buffer i32) (param $comparator i32) + (local $i i32) + (local $j i32) + (local $t i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $m i32.const 1 i32.sub - local.set $2 - local.get $3 - local.get $2 + local.set $m + local.get $r + local.get $m i32.add - local.set $8 - local.get $2 + local.set $t + local.get $m i32.const 1 i32.add - local.set $6 + local.set $i loop $for-loop|0 - local.get $6 - local.get $1 + local.get $i + local.get $l i32.gt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $6 + local.get $buffer + local.get $i i32.const 1 i32.sub i32.const 2 i32.shl i32.add - local.get $0 - local.get $6 + local.get $ptr + local.get $i i32.const 1 i32.sub i32.const 2 @@ -8297,132 +8297,132 @@ i32.add i32.load i32.store - local.get $6 + local.get $i i32.const 1 i32.sub - local.set $6 + local.set $i br $for-loop|0 end end - local.get $2 - local.set $7 + local.get $m + local.set $j loop $for-loop|1 - local.get $7 - local.get $3 + local.get $j + local.get $r i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $8 - local.get $7 + local.get $buffer + local.get $t + local.get $j i32.sub i32.const 2 i32.shl i32.add - local.get $0 - local.get $7 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load offset=4 i32.store - local.get $7 + local.get $j i32.const 1 i32.add - local.set $7 + local.set $j br $for-loop|1 end end - local.get $1 - local.set $9 + local.get $l + local.set $var$9 loop $for-loop|2 - local.get $9 - local.get $3 + local.get $var$9 + local.get $r i32.le_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $4 - local.get $7 + local.get $buffer + local.get $j i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $4 - local.get $6 + local.set $var$11 + local.get $buffer + local.get $i i32.const 2 i32.shl i32.add i32.load - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 i32.const 2 global.set $~argumentsLength - local.get $5 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 2 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store - local.get $7 + local.get $j i32.const 1 i32.sub - local.set $7 + local.set $j else - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 2 i32.shl i32.add - local.get $12 - i32.store - local.get $6 - i32.const 1 - i32.add - local.set $6 - end - local.get $9 - i32.const 1 - i32.add - local.set $9 - br $for-loop|2 - end - end - ) - (func $~lib/util/sort/SORT (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 $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) - local.get $1 + local.get $var$12 + i32.store + local.get $i + i32.const 1 + i32.add + local.set $i + end + local.get $var$9 + i32.const 1 + i32.add + local.set $var$9 + br $for-loop|2 + end + end + ) + (func $~lib/util/sort/SORT (param $ptr i32) (param $len i32) (param $comparator i32) + (local $endB i32) + (local $var$4 i32) + (local $startB i32) + (local $lgPlus2 i32) + (local $lgPlus2Size i32) + (local $leftRunStartBuf i32) + (local $leftRunEndBuf i32) + (local $buffer i32) + (local $hi i32) + (local $endA i32) + (local $lenA i32) + (local $top i32) + (local $startA i32) + (local $lenB i32) + (local $k i32) + (local $var$18 i32) + (local $var$19 i32) + (local $var$20 i32) + local.get $len i32.const 48 i32.le_s if - local.get $1 + local.get $len i32.const 1 i32.le_s if @@ -8435,507 +8435,507 @@ block $break|0 block $case1|0 block $case0|0 - local.get $1 - local.set $3 - local.get $3 + local.get $len + local.set $endB + local.get $endB i32.const 3 i32.eq br_if $case0|0 - local.get $3 + local.get $endB i32.const 2 i32.eq br_if $case1|0 br $break|0 end - local.get $0 + local.get $ptr i32.load - local.set $3 - local.get $0 + local.set $endB + local.get $ptr i32.load offset=4 - local.set $4 - local.get $3 - local.get $4 + local.set $var$4 + local.get $endB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $5 - local.get $0 - local.get $4 - local.get $3 - local.get $5 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $endB + local.get $startB select i32.store - local.get $3 - local.get $4 - local.get $5 + local.get $endB + local.get $var$4 + local.get $startB select - local.set $3 - local.get $0 + local.set $endB + local.get $ptr i32.load offset=8 - local.set $4 - local.get $3 - local.get $4 + local.set $var$4 + local.get $endB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $5 - local.get $0 - local.get $4 - local.get $3 - local.get $5 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $endB + local.get $startB select i32.store offset=4 - local.get $0 - local.get $3 - local.get $4 - local.get $5 + local.get $ptr + local.get $endB + local.get $var$4 + local.get $startB select i32.store offset=8 end - local.get $0 + local.get $ptr i32.load - local.set $5 - local.get $0 + local.set $startB + local.get $ptr i32.load offset=4 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $startB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $3 - local.get $0 - local.get $4 - local.get $5 - local.get $3 + local.set $endB + local.get $ptr + local.get $var$4 + local.get $startB + local.get $endB select i32.store - local.get $0 - local.get $5 - local.get $4 - local.get $3 + local.get $ptr + local.get $startB + local.get $var$4 + local.get $endB select i32.store offset=4 return end - local.get $0 + local.get $ptr i32.const 0 - local.get $1 + local.get $len i32.const 1 i32.sub i32.const 0 - local.get $2 + local.get $comparator call $~lib/util/sort/insertionSort return end - local.get $1 - local.set $5 + local.get $len + local.set $startB i32.const 31 - local.get $5 + local.get $startB i32.clz i32.sub i32.const 2 i32.add - local.set $6 - local.get $6 + local.set $lgPlus2 + local.get $lgPlus2 i32.const 2 i32.shl - local.set $7 - local.get $7 + local.set $lgPlus2Size + local.get $lgPlus2Size i32.const 1 i32.shl call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 - local.get $7 + local.set $leftRunStartBuf + local.get $leftRunStartBuf + local.get $lgPlus2Size i32.add - local.set $9 + local.set $leftRunEndBuf i32.const 0 - local.set $5 + local.set $startB loop $for-loop|1 - local.get $5 - local.get $6 + local.get $startB + local.get $lgPlus2 i32.lt_u - local.set $3 - local.get $3 + local.set $endB + local.get $endB if - local.get $8 - local.get $5 + local.get $leftRunStartBuf + local.get $startB i32.const 2 i32.shl i32.add i32.const -1 i32.store - local.get $5 + local.get $startB i32.const 1 i32.add - local.set $5 + local.set $startB br $for-loop|1 end end - local.get $1 + local.get $len i32.const 2 i32.shl call $~lib/rt/tlsf/__alloc - local.set $10 - local.get $1 + local.set $buffer + local.get $len i32.const 1 i32.sub - local.set $11 - local.get $0 + local.set $hi + local.get $ptr i32.const 0 - local.get $11 - local.get $2 + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight - local.set $12 - local.get $12 + local.set $endA + local.get $endA i32.const 1 i32.add - local.set $13 - local.get $13 + local.set $lenA + local.get $lenA i32.const 32 i32.lt_s if - local.get $11 - local.tee $4 + local.get $hi + local.tee $var$4 i32.const 32 i32.const 1 i32.sub - local.tee $5 - local.get $4 - local.get $5 + local.tee $startB + local.get $var$4 + local.get $startB i32.lt_s select - local.set $12 - local.get $0 + local.set $endA + local.get $ptr i32.const 0 - local.get $12 - local.get $13 - local.get $2 + local.get $endA + local.get $lenA + local.get $comparator call $~lib/util/sort/insertionSort end i32.const 0 - local.set $14 + local.set $top i32.const 0 - local.set $15 + local.set $startA loop $while-continue|2 - local.get $12 - local.get $11 + local.get $endA + local.get $hi i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $12 + local.get $endA i32.const 1 i32.add - local.set $5 - local.get $0 - local.get $5 - local.get $11 - local.get $2 + local.set $startB + local.get $ptr + local.get $startB + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight - local.set $3 - local.get $3 - local.get $5 + local.set $endB + local.get $endB + local.get $startB i32.sub i32.const 1 i32.add - local.set $16 - local.get $16 + local.set $lenB + local.get $lenB i32.const 32 i32.lt_s if - local.get $11 - local.tee $17 - local.get $5 + local.get $hi + local.tee $k + local.get $startB i32.const 32 i32.add i32.const 1 i32.sub - local.tee $18 - local.get $17 - local.get $18 + local.tee $var$18 + local.get $k + local.get $var$18 i32.lt_s select - local.set $3 - local.get $0 - local.get $5 - local.get $3 - local.get $16 - local.get $2 + local.set $endB + local.get $ptr + local.get $startB + local.get $endB + local.get $lenB + local.get $comparator call $~lib/util/sort/insertionSort end i32.const 0 - local.get $11 - local.get $15 - local.get $5 - local.get $3 + local.get $hi + local.get $startA + local.get $startB + local.get $endB call $~lib/util/sort/nodePower - local.set $17 - local.get $14 - local.set $18 + local.set $k + local.get $top + local.set $var$18 loop $for-loop|3 - local.get $18 - local.get $17 + local.get $var$18 + local.get $k i32.gt_u - local.set $19 - local.get $19 + local.set $var$19 + local.get $var$19 if - local.get $8 - local.get $18 + local.get $leftRunStartBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.load - local.set $20 - local.get $20 + local.set $var$20 + local.get $var$20 i32.const -1 i32.ne if - local.get $0 - local.get $20 - local.get $9 - local.get $18 + local.get $ptr + local.get $var$20 + local.get $leftRunEndBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $12 - local.get $10 - local.get $2 + local.get $endA + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns - local.get $20 - local.set $15 - local.get $8 - local.get $18 + local.get $var$20 + local.set $startA + local.get $leftRunStartBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.const -1 i32.store end - local.get $18 + local.get $var$18 i32.const 1 i32.sub - local.set $18 + local.set $var$18 br $for-loop|3 end end - local.get $8 - local.get $17 + local.get $leftRunStartBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $15 + local.get $startA i32.store - local.get $9 - local.get $17 + local.get $leftRunEndBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $12 + local.get $endA i32.store - local.get $5 - local.set $15 - local.get $3 - local.set $12 - local.get $17 - local.set $14 + local.get $startB + local.set $startA + local.get $endB + local.set $endA + local.get $k + local.set $top br $while-continue|2 end end - local.get $14 - local.set $4 + local.get $top + local.set $var$4 loop $for-loop|4 - local.get $4 + local.get $var$4 i32.const 0 i32.ne - local.set $18 - local.get $18 + local.set $var$18 + local.get $var$18 if - local.get $8 - local.get $4 + local.get $leftRunStartBuf + local.get $var$4 i32.const 2 i32.shl i32.add i32.load - local.set $19 - local.get $19 + local.set $var$19 + local.get $var$19 i32.const -1 i32.ne if - local.get $0 - local.get $19 - local.get $9 - local.get $4 + local.get $ptr + local.get $var$19 + local.get $leftRunEndBuf + local.get $var$4 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $11 - local.get $10 - local.get $2 + local.get $hi + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns end - local.get $4 + local.get $var$4 i32.const 1 i32.sub - local.set $4 + local.set $var$4 br $for-loop|4 end end - local.get $10 + local.get $buffer call $~lib/rt/tlsf/__free - local.get $8 + local.get $leftRunStartBuf call $~lib/rt/tlsf/__free ) - (func $~lib/array/Array#sort (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/array/Array#sort (param $this i32) (param $comparator i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this i32.load offset=12 - local.get $1 + local.get $comparator call $~lib/util/sort/SORT - local.get $0 + local.get $this ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.sub ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $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) + (func $~lib/util/sort/insertionSort (param $ptr i32) (param $left i32) (param $right i32) (param $presorted i32) (param $comparator i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 0 i32.const 1 i32.ge_s drop - local.get $2 - local.get $1 + local.get $right + local.get $left i32.sub i32.const 1 i32.add - local.set $5 - local.get $1 - local.get $5 + local.set $var$5 + local.get $left + local.get $var$5 i32.const 1 i32.and - local.get $3 - local.get $5 - local.get $3 + local.get $presorted + local.get $var$5 + local.get $presorted i32.sub i32.const 1 i32.and i32.sub - local.get $3 + local.get $presorted i32.const 0 i32.eq select i32.add - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $6 - local.get $2 + local.get $var$6 + local.get $right i32.le_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $0 - local.get $6 + local.get $ptr + local.get $var$6 i32.const 2 i32.shl i32.add i32.load - local.set $8 - local.get $0 - local.get $6 + local.set $var$8 + local.get $ptr + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $9 - local.get $9 - local.set $10 - local.get $8 - local.set $11 - local.get $8 - local.get $9 + local.set $var$9 + local.get $var$9 + local.set $var$10 + local.get $var$8 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.le_s if - local.get $8 - local.set $10 - local.get $9 - local.set $11 + local.get $var$8 + local.set $var$10 + local.get $var$9 + local.set $var$11 end - local.get $6 + local.get $var$6 i32.const 1 i32.sub - local.set $12 + local.set $var$12 block $while-break|1 loop $while-continue|1 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add i32.load - local.set $8 - local.get $8 - local.get $11 + local.set $var$8 + local.get $var$8 + local.get $var$11 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $8 + local.get $var$8 i32.store offset=8 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|1 end @@ -8943,49 +8943,49 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store offset=8 block $while-break|2 loop $while-continue|2 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add i32.load - local.set $8 - local.get $8 - local.get $10 + local.set $var$8 + local.get $var$8 + local.get $var$10 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $8 + local.get $var$8 i32.store offset=4 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|2 end @@ -8993,78 +8993,78 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.const 2 i32.add - local.set $6 + local.set $var$6 br $for-loop|0 end end ) - (func $~lib/util/sort/extendRunRight (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 - local.get $2 + (func $~lib/util/sort/extendRunRight (param $ptr i32) (param $i i32) (param $right i32) (param $comparator i32) (result i32) + (local $j i32) + (local $var$5 i32) + (local $var$6 i32) + (local $tmp i32) + local.get $i + local.get $right i32.eq if - local.get $1 + local.get $i return end - local.get $1 - local.set $4 - local.get $0 - local.get $4 + local.get $i + local.set $j + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 1 i32.add - local.tee $4 + local.tee $j i32.const 2 i32.shl i32.add i32.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if loop $while-continue|0 - local.get $4 - local.get $2 + local.get $j + local.get $right i32.lt_s if (result i32) - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load offset=4 - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 31 @@ -9072,83 +9072,83 @@ else i32.const 0 end - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 + local.get $j i32.const 1 i32.add - local.set $4 + local.set $j br $while-continue|0 end end - local.get $4 - local.set $5 + local.get $j + local.set $var$5 loop $while-continue|1 - local.get $1 - local.get $5 + local.get $i + local.get $var$5 i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $1 + local.get $ptr + local.get $i i32.const 2 i32.shl i32.add i32.load - local.set $7 - local.get $0 - local.get $1 + local.set $tmp + local.get $ptr + local.get $i i32.const 2 i32.shl i32.add - local.get $0 - local.get $5 + local.get $ptr + local.get $var$5 i32.const 2 i32.shl i32.add i32.load i32.store - local.get $1 + local.get $i i32.const 1 i32.add - local.set $1 - local.get $0 - local.get $5 + local.set $i + local.get $ptr + local.get $var$5 i32.const 2 i32.shl i32.add - local.get $7 + local.get $tmp i32.store - local.get $5 + local.get $var$5 i32.const 1 i32.sub - local.set $5 + local.set $var$5 br $while-continue|1 end end else loop $while-continue|2 - local.get $4 - local.get $2 + local.get $j + local.get $right i32.lt_s if (result i32) - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load offset=4 - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 @@ -9156,55 +9156,55 @@ else i32.const 0 end - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 + local.get $j i32.const 1 i32.add - local.set $4 + local.set $j br $while-continue|2 end end end - local.get $4 + local.get $j ) - (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $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 $2 + (func $~lib/util/sort/mergeRuns (param $ptr i32) (param $l i32) (param $m i32) (param $r i32) (param $buffer i32) (param $comparator i32) + (local $i i32) + (local $j i32) + (local $t i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $m i32.const 1 i32.sub - local.set $2 - local.get $3 - local.get $2 + local.set $m + local.get $r + local.get $m i32.add - local.set $8 - local.get $2 + local.set $t + local.get $m i32.const 1 i32.add - local.set $6 + local.set $i loop $for-loop|0 - local.get $6 - local.get $1 + local.get $i + local.get $l i32.gt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $6 + local.get $buffer + local.get $i i32.const 1 i32.sub i32.const 2 i32.shl i32.add - local.get $0 - local.get $6 + local.get $ptr + local.get $i i32.const 1 i32.sub i32.const 2 @@ -9212,132 +9212,132 @@ i32.add i32.load i32.store - local.get $6 + local.get $i i32.const 1 i32.sub - local.set $6 + local.set $i br $for-loop|0 end end - local.get $2 - local.set $7 + local.get $m + local.set $j loop $for-loop|1 - local.get $7 - local.get $3 + local.get $j + local.get $r i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $8 - local.get $7 + local.get $buffer + local.get $t + local.get $j i32.sub i32.const 2 i32.shl i32.add - local.get $0 - local.get $7 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load offset=4 i32.store - local.get $7 + local.get $j i32.const 1 i32.add - local.set $7 + local.set $j br $for-loop|1 end end - local.get $1 - local.set $9 + local.get $l + local.set $var$9 loop $for-loop|2 - local.get $9 - local.get $3 + local.get $var$9 + local.get $r i32.le_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $4 - local.get $7 + local.get $buffer + local.get $j i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $4 - local.get $6 + local.set $var$11 + local.get $buffer + local.get $i i32.const 2 i32.shl i32.add i32.load - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 i32.const 2 global.set $~argumentsLength - local.get $5 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 2 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store - local.get $7 + local.get $j i32.const 1 i32.sub - local.set $7 + local.set $j else - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 2 i32.shl i32.add - local.get $12 + local.get $var$12 i32.store - local.get $6 + local.get $i i32.const 1 i32.add - local.set $6 + local.set $i end - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|2 end end ) - (func $~lib/util/sort/SORT (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 $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) - local.get $1 + (func $~lib/util/sort/SORT (param $ptr i32) (param $len i32) (param $comparator i32) + (local $endB i32) + (local $var$4 i32) + (local $startB i32) + (local $lgPlus2 i32) + (local $lgPlus2Size i32) + (local $leftRunStartBuf i32) + (local $leftRunEndBuf i32) + (local $buffer i32) + (local $hi i32) + (local $endA i32) + (local $lenA i32) + (local $top i32) + (local $startA i32) + (local $lenB i32) + (local $k i32) + (local $var$18 i32) + (local $var$19 i32) + (local $var$20 i32) + local.get $len i32.const 48 i32.le_s if - local.get $1 + local.get $len i32.const 1 i32.le_s if @@ -9350,398 +9350,398 @@ block $break|0 block $case1|0 block $case0|0 - local.get $1 - local.set $3 - local.get $3 + local.get $len + local.set $endB + local.get $endB i32.const 3 i32.eq br_if $case0|0 - local.get $3 + local.get $endB i32.const 2 i32.eq br_if $case1|0 br $break|0 end - local.get $0 + local.get $ptr i32.load - local.set $3 - local.get $0 + local.set $endB + local.get $ptr i32.load offset=4 - local.set $4 - local.get $3 - local.get $4 + local.set $var$4 + local.get $endB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $5 - local.get $0 - local.get $4 - local.get $3 - local.get $5 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $endB + local.get $startB select i32.store - local.get $3 - local.get $4 - local.get $5 + local.get $endB + local.get $var$4 + local.get $startB select - local.set $3 - local.get $0 + local.set $endB + local.get $ptr i32.load offset=8 - local.set $4 - local.get $3 - local.get $4 + local.set $var$4 + local.get $endB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $5 - local.get $0 - local.get $4 - local.get $3 - local.get $5 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $endB + local.get $startB select i32.store offset=4 - local.get $0 - local.get $3 - local.get $4 - local.get $5 + local.get $ptr + local.get $endB + local.get $var$4 + local.get $startB select i32.store offset=8 end - local.get $0 + local.get $ptr i32.load - local.set $5 - local.get $0 + local.set $startB + local.get $ptr i32.load offset=4 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $startB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $3 - local.get $0 - local.get $4 - local.get $5 - local.get $3 + local.set $endB + local.get $ptr + local.get $var$4 + local.get $startB + local.get $endB select i32.store - local.get $0 - local.get $5 - local.get $4 - local.get $3 + local.get $ptr + local.get $startB + local.get $var$4 + local.get $endB select i32.store offset=4 return end - local.get $0 + local.get $ptr i32.const 0 - local.get $1 + local.get $len i32.const 1 i32.sub i32.const 0 - local.get $2 + local.get $comparator call $~lib/util/sort/insertionSort return end - local.get $1 - local.set $5 + local.get $len + local.set $startB i32.const 31 - local.get $5 + local.get $startB i32.clz i32.sub i32.const 2 i32.add - local.set $6 - local.get $6 + local.set $lgPlus2 + local.get $lgPlus2 i32.const 2 i32.shl - local.set $7 - local.get $7 + local.set $lgPlus2Size + local.get $lgPlus2Size i32.const 1 i32.shl call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 - local.get $7 + local.set $leftRunStartBuf + local.get $leftRunStartBuf + local.get $lgPlus2Size i32.add - local.set $9 + local.set $leftRunEndBuf i32.const 0 - local.set $5 + local.set $startB loop $for-loop|1 - local.get $5 - local.get $6 + local.get $startB + local.get $lgPlus2 i32.lt_u - local.set $3 - local.get $3 + local.set $endB + local.get $endB if - local.get $8 - local.get $5 + local.get $leftRunStartBuf + local.get $startB i32.const 2 i32.shl i32.add i32.const -1 i32.store - local.get $5 + local.get $startB i32.const 1 i32.add - local.set $5 + local.set $startB br $for-loop|1 end end - local.get $1 + local.get $len i32.const 2 i32.shl call $~lib/rt/tlsf/__alloc - local.set $10 - local.get $1 + local.set $buffer + local.get $len i32.const 1 i32.sub - local.set $11 - local.get $0 + local.set $hi + local.get $ptr i32.const 0 - local.get $11 - local.get $2 + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight - local.set $12 - local.get $12 + local.set $endA + local.get $endA i32.const 1 i32.add - local.set $13 - local.get $13 + local.set $lenA + local.get $lenA i32.const 32 i32.lt_s if - local.get $11 - local.tee $4 + local.get $hi + local.tee $var$4 i32.const 32 i32.const 1 i32.sub - local.tee $5 - local.get $4 - local.get $5 + local.tee $startB + local.get $var$4 + local.get $startB i32.lt_s select - local.set $12 - local.get $0 + local.set $endA + local.get $ptr i32.const 0 - local.get $12 - local.get $13 - local.get $2 + local.get $endA + local.get $lenA + local.get $comparator call $~lib/util/sort/insertionSort end i32.const 0 - local.set $14 + local.set $top i32.const 0 - local.set $15 + local.set $startA loop $while-continue|2 - local.get $12 - local.get $11 + local.get $endA + local.get $hi i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $12 + local.get $endA i32.const 1 i32.add - local.set $5 - local.get $0 - local.get $5 - local.get $11 - local.get $2 + local.set $startB + local.get $ptr + local.get $startB + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight - local.set $3 - local.get $3 - local.get $5 + local.set $endB + local.get $endB + local.get $startB i32.sub i32.const 1 i32.add - local.set $16 - local.get $16 + local.set $lenB + local.get $lenB i32.const 32 i32.lt_s if - local.get $11 - local.tee $17 - local.get $5 + local.get $hi + local.tee $k + local.get $startB i32.const 32 i32.add i32.const 1 i32.sub - local.tee $18 - local.get $17 - local.get $18 + local.tee $var$18 + local.get $k + local.get $var$18 i32.lt_s select - local.set $3 - local.get $0 - local.get $5 - local.get $3 - local.get $16 - local.get $2 + local.set $endB + local.get $ptr + local.get $startB + local.get $endB + local.get $lenB + local.get $comparator call $~lib/util/sort/insertionSort end i32.const 0 - local.get $11 - local.get $15 - local.get $5 - local.get $3 + local.get $hi + local.get $startA + local.get $startB + local.get $endB call $~lib/util/sort/nodePower - local.set $17 - local.get $14 - local.set $18 + local.set $k + local.get $top + local.set $var$18 loop $for-loop|3 - local.get $18 - local.get $17 + local.get $var$18 + local.get $k i32.gt_u - local.set $19 - local.get $19 + local.set $var$19 + local.get $var$19 if - local.get $8 - local.get $18 + local.get $leftRunStartBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.load - local.set $20 - local.get $20 + local.set $var$20 + local.get $var$20 i32.const -1 i32.ne if - local.get $0 - local.get $20 - local.get $9 - local.get $18 + local.get $ptr + local.get $var$20 + local.get $leftRunEndBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $12 - local.get $10 - local.get $2 + local.get $endA + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns - local.get $20 - local.set $15 - local.get $8 - local.get $18 + local.get $var$20 + local.set $startA + local.get $leftRunStartBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.const -1 i32.store end - local.get $18 + local.get $var$18 i32.const 1 i32.sub - local.set $18 + local.set $var$18 br $for-loop|3 end end - local.get $8 - local.get $17 + local.get $leftRunStartBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $15 + local.get $startA i32.store - local.get $9 - local.get $17 + local.get $leftRunEndBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $12 + local.get $endA i32.store - local.get $5 - local.set $15 - local.get $3 - local.set $12 - local.get $17 - local.set $14 + local.get $startB + local.set $startA + local.get $endB + local.set $endA + local.get $k + local.set $top br $while-continue|2 end end - local.get $14 - local.set $4 + local.get $top + local.set $var$4 loop $for-loop|4 - local.get $4 + local.get $var$4 i32.const 0 i32.ne - local.set $18 - local.get $18 + local.set $var$18 + local.get $var$18 if - local.get $8 - local.get $4 + local.get $leftRunStartBuf + local.get $var$4 i32.const 2 i32.shl i32.add i32.load - local.set $19 - local.get $19 + local.set $var$19 + local.get $var$19 i32.const -1 i32.ne if - local.get $0 - local.get $19 - local.get $9 - local.get $4 + local.get $ptr + local.get $var$19 + local.get $leftRunEndBuf + local.get $var$4 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $11 - local.get $10 - local.get $2 + local.get $hi + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns end - local.get $4 + local.get $var$4 i32.const 1 i32.sub - local.set $4 + local.set $var$4 br $for-loop|4 end end - local.get $10 + local.get $buffer call $~lib/rt/tlsf/__free - local.get $8 + local.get $leftRunStartBuf call $~lib/rt/tlsf/__free ) - (func $~lib/array/Array#sort (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/array/Array#sort (param $this i32) (param $comparator i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this i32.load offset=12 - local.get $1 + local.get $comparator call $~lib/util/sort/SORT - local.get $0 + local.get $this ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.gt_u - local.get $0 - local.get $1 + local.get $a + local.get $b i32.lt_u i32.sub ) (func $~lib/math/NativeMath.random (result f64) - (local $0 i64) - (local $1 i64) - (local $2 i64) + (local $s1 i64) + (local $s0 i64) + (local $r i64) global.get $~lib/math/random_seeded i32.eqz if @@ -9750,78 +9750,78 @@ call $~lib/math/NativeMath.seedRandom end global.get $~lib/math/random_state0_64 - local.set $0 + local.set $s1 global.get $~lib/math/random_state1_64 - local.set $1 - local.get $1 + local.set $s0 + local.get $s0 global.set $~lib/math/random_state0_64 - local.get $0 - local.get $0 + local.get $s1 + local.get $s1 i64.const 23 i64.shl i64.xor - local.set $0 - local.get $0 - local.get $0 + local.set $s1 + local.get $s1 + local.get $s1 i64.const 17 i64.shr_u i64.xor - local.set $0 - local.get $0 - local.get $1 + local.set $s1 + local.get $s1 + local.get $s0 i64.xor - local.set $0 - local.get $0 - local.get $1 + local.set $s1 + local.get $s1 + local.get $s0 i64.const 26 i64.shr_u i64.xor - local.set $0 - local.get $0 + local.set $s1 + local.get $s1 global.set $~lib/math/random_state1_64 - local.get $1 + local.get $s0 i64.const 12 i64.shr_u i64.const 4607182418800017408 i64.or - local.set $2 - local.get $2 + local.set $r + local.get $r f64.reinterpret_i64 f64.const 1 f64.sub ) - (func $~lib/util/sort/COMPARATOR~anonymous|1 (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/util/sort/COMPARATOR~anonymous|1 (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.sub ) - (func $std/array/isSorted (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (func $std/array/isSorted (param $data i32) (param $comparator i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) i32.const 1 - local.set $2 - local.get $0 + local.set $var$2 + local.get $data call $~lib/array/Array#get:length - local.set $3 + local.set $var$3 loop $for-loop|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $0 - local.get $2 + local.get $data + local.get $var$2 i32.const 1 i32.sub call $~lib/array/Array#__get - local.get $0 - local.get $2 + local.get $data + local.get $var$2 call $~lib/array/Array#__get i32.const 2 global.set $~argumentsLength - local.get $1 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 @@ -9830,32 +9830,32 @@ i32.const 0 return end - local.get $2 + local.get $var$2 i32.const 1 i32.add - local.set $2 + local.set $var$2 br $for-loop|0 end end i32.const 1 ) - (func $std/array/assertStableSortedForComplexObjects~anonymous|0 (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $std/array/assertStableSortedForComplexObjects~anonymous|0 (param $a i32) (param $b i32) (result i32) + local.get $a i32.load - local.get $1 + local.get $b i32.load i32.sub ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $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) + (func $~lib/util/sort/insertionSort (param $ptr i32) (param $left i32) (param $right i32) (param $presorted i32) (param $comparator i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -9868,115 +9868,115 @@ i32.const 1 i32.ge_s drop - local.get $2 - local.get $1 + local.get $right + local.get $left i32.sub i32.const 1 i32.add - local.set $5 - local.get $1 - local.get $5 + local.set $var$5 + local.get $left + local.get $var$5 i32.const 1 i32.and - local.get $3 - local.get $5 - local.get $3 + local.get $presorted + local.get $var$5 + local.get $presorted i32.sub i32.const 1 i32.and i32.sub - local.get $3 + local.get $presorted i32.const 0 i32.eq select i32.add - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $6 - local.get $2 + local.get $var$6 + local.get $right i32.le_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if global.get $~lib/memory/__stack_pointer - local.get $0 - local.get $6 + local.get $ptr + local.get $var$6 i32.const 2 i32.shl i32.add i32.load - local.tee $8 + local.tee $var$8 i32.store global.get $~lib/memory/__stack_pointer - local.get $0 - local.get $6 + local.get $ptr + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 - local.tee $9 + local.tee $var$9 i32.store offset=4 - local.get $9 - local.set $10 - local.get $8 - local.set $11 - local.get $8 - local.get $9 + local.get $var$9 + local.set $var$10 + local.get $var$8 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.le_s if - local.get $8 - local.set $10 - local.get $9 - local.set $11 + local.get $var$8 + local.set $var$10 + local.get $var$9 + local.set $var$11 end - local.get $6 + local.get $var$6 i32.const 1 i32.sub - local.set $12 + local.set $var$12 block $while-break|1 loop $while-continue|1 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if global.get $~lib/memory/__stack_pointer - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add i32.load - local.tee $8 + local.tee $var$8 i32.store - local.get $8 - local.get $11 + local.get $var$8 + local.get $var$11 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $8 + local.get $var$8 i32.store offset=8 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|1 end @@ -9984,51 +9984,51 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store offset=8 block $while-break|2 loop $while-continue|2 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if global.get $~lib/memory/__stack_pointer - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add i32.load - local.tee $8 + local.tee $var$8 i32.store - local.get $8 - local.get $10 + local.get $var$8 + local.get $var$10 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $8 + local.get $var$8 i32.store offset=4 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|2 end @@ -10036,17 +10036,17 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.const 2 i32.add - local.set $6 + local.set $var$6 br $for-loop|0 end end @@ -10055,14 +10055,14 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (func $~lib/util/sort/mergeRuns (param $ptr i32) (param $l i32) (param $m i32) (param $r i32) (param $buffer i32) (param $comparator i32) + (local $i i32) + (local $j i32) + (local $t i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -10071,34 +10071,34 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $2 + local.get $m i32.const 1 i32.sub - local.set $2 - local.get $3 - local.get $2 + local.set $m + local.get $r + local.get $m i32.add - local.set $8 - local.get $2 + local.set $t + local.get $m i32.const 1 i32.add - local.set $6 + local.set $i loop $for-loop|0 - local.get $6 - local.get $1 + local.get $i + local.get $l i32.gt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $6 + local.get $buffer + local.get $i i32.const 1 i32.sub i32.const 2 i32.shl i32.add - local.get $0 - local.get $6 + local.get $ptr + local.get $i i32.const 1 i32.sub i32.const 2 @@ -10106,108 +10106,108 @@ i32.add i32.load i32.store - local.get $6 + local.get $i i32.const 1 i32.sub - local.set $6 + local.set $i br $for-loop|0 end end - local.get $2 - local.set $7 + local.get $m + local.set $j loop $for-loop|1 - local.get $7 - local.get $3 + local.get $j + local.get $r i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $8 - local.get $7 + local.get $buffer + local.get $t + local.get $j i32.sub i32.const 2 i32.shl i32.add - local.get $0 - local.get $7 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load offset=4 i32.store - local.get $7 + local.get $j i32.const 1 i32.add - local.set $7 + local.set $j br $for-loop|1 end end - local.get $1 - local.set $9 + local.get $l + local.set $var$9 loop $for-loop|2 - local.get $9 - local.get $3 + local.get $var$9 + local.get $r i32.le_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if global.get $~lib/memory/__stack_pointer - local.get $4 - local.get $7 + local.get $buffer + local.get $j i32.const 2 i32.shl i32.add i32.load - local.tee $11 + local.tee $var$11 i32.store global.get $~lib/memory/__stack_pointer - local.get $4 - local.get $6 + local.get $buffer + local.get $i i32.const 2 i32.shl i32.add i32.load - local.tee $12 + local.tee $var$12 i32.store offset=4 - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i32.const 2 global.set $~argumentsLength - local.get $5 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 2 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store - local.get $7 + local.get $j i32.const 1 i32.sub - local.set $7 + local.set $j else - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 2 i32.shl i32.add - local.get $12 + local.get $var$12 i32.store - local.get $6 + local.get $i i32.const 1 i32.add - local.set $6 + local.set $i end - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|2 end end @@ -10216,25 +10216,25 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/util/sort/SORT (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 $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) + (func $~lib/util/sort/SORT (param $ptr i32) (param $len i32) (param $comparator i32) + (local $endB i32) + (local $var$4 i32) + (local $startB i32) + (local $lgPlus2 i32) + (local $lgPlus2Size i32) + (local $leftRunStartBuf i32) + (local $leftRunEndBuf i32) + (local $buffer i32) + (local $hi i32) + (local $endA i32) + (local $lenA i32) + (local $top i32) + (local $startA i32) + (local $lenB i32) + (local $k i32) + (local $var$18 i32) + (local $var$19 i32) + (local $var$20 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -10246,11 +10246,11 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store offset=8 - local.get $1 + local.get $len i32.const 48 i32.le_s if - local.get $1 + local.get $len i32.const 1 i32.le_s if @@ -10267,109 +10267,109 @@ block $break|0 block $case1|0 block $case0|0 - local.get $1 - local.set $3 - local.get $3 + local.get $len + local.set $endB + local.get $endB i32.const 3 i32.eq br_if $case0|0 - local.get $3 + local.get $endB i32.const 2 i32.eq br_if $case1|0 br $break|0 end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $ptr i32.load - local.tee $3 + local.tee $endB i32.store global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $ptr i32.load offset=4 - local.tee $4 + local.tee $var$4 i32.store offset=4 - local.get $3 - local.get $4 + local.get $endB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $5 - local.get $0 - local.get $4 - local.get $3 - local.get $5 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $endB + local.get $startB select i32.store global.get $~lib/memory/__stack_pointer - local.get $3 - local.get $4 - local.get $5 + local.get $endB + local.get $var$4 + local.get $startB select - local.tee $3 + local.tee $endB i32.store global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $ptr i32.load offset=8 - local.tee $4 + local.tee $var$4 i32.store offset=4 - local.get $3 - local.get $4 + local.get $endB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $5 - local.get $0 - local.get $4 - local.get $3 - local.get $5 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $endB + local.get $startB select i32.store offset=4 - local.get $0 - local.get $3 - local.get $4 - local.get $5 + local.get $ptr + local.get $endB + local.get $var$4 + local.get $startB select i32.store offset=8 end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $ptr i32.load - local.tee $5 + local.tee $startB i32.store offset=8 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $ptr i32.load offset=4 - local.tee $4 + local.tee $var$4 i32.store offset=4 - local.get $5 - local.get $4 + local.get $startB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $3 - local.get $0 - local.get $4 - local.get $5 - local.get $3 + local.set $endB + local.get $ptr + local.get $var$4 + local.get $startB + local.get $endB select i32.store - local.get $0 - local.get $5 - local.get $4 - local.get $3 + local.get $ptr + local.get $startB + local.get $var$4 + local.get $endB select i32.store offset=4 global.get $~lib/memory/__stack_pointer @@ -10378,13 +10378,13 @@ global.set $~lib/memory/__stack_pointer return end - local.get $0 + local.get $ptr i32.const 0 - local.get $1 + local.get $len i32.const 1 i32.sub i32.const 0 - local.get $2 + local.get $comparator call $~lib/util/sort/insertionSort global.get $~lib/memory/__stack_pointer i32.const 12 @@ -10392,306 +10392,306 @@ global.set $~lib/memory/__stack_pointer return end - local.get $1 - local.set $5 + local.get $len + local.set $startB i32.const 31 - local.get $5 + local.get $startB i32.clz i32.sub i32.const 2 i32.add - local.set $6 - local.get $6 + local.set $lgPlus2 + local.get $lgPlus2 i32.const 2 i32.shl - local.set $7 - local.get $7 + local.set $lgPlus2Size + local.get $lgPlus2Size i32.const 1 i32.shl call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 - local.get $7 + local.set $leftRunStartBuf + local.get $leftRunStartBuf + local.get $lgPlus2Size i32.add - local.set $9 + local.set $leftRunEndBuf i32.const 0 - local.set $5 + local.set $startB loop $for-loop|1 - local.get $5 - local.get $6 + local.get $startB + local.get $lgPlus2 i32.lt_u - local.set $3 - local.get $3 + local.set $endB + local.get $endB if - local.get $8 - local.get $5 + local.get $leftRunStartBuf + local.get $startB i32.const 2 i32.shl i32.add i32.const -1 i32.store - local.get $5 + local.get $startB i32.const 1 i32.add - local.set $5 + local.set $startB br $for-loop|1 end end - local.get $1 + local.get $len i32.const 2 i32.shl call $~lib/rt/tlsf/__alloc - local.set $10 - local.get $1 + local.set $buffer + local.get $len i32.const 1 i32.sub - local.set $11 - local.get $0 + local.set $hi + local.get $ptr i32.const 0 - local.get $11 - local.get $2 + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight - local.set $12 - local.get $12 + local.set $endA + local.get $endA i32.const 1 i32.add - local.set $13 - local.get $13 + local.set $lenA + local.get $lenA i32.const 32 i32.lt_s if - local.get $11 - local.tee $4 + local.get $hi + local.tee $var$4 i32.const 32 i32.const 1 i32.sub - local.tee $5 - local.get $4 - local.get $5 + local.tee $startB + local.get $var$4 + local.get $startB i32.lt_s select - local.set $12 - local.get $0 + local.set $endA + local.get $ptr i32.const 0 - local.get $12 - local.get $13 - local.get $2 + local.get $endA + local.get $lenA + local.get $comparator call $~lib/util/sort/insertionSort end i32.const 0 - local.set $14 + local.set $top i32.const 0 - local.set $15 + local.set $startA loop $while-continue|2 - local.get $12 - local.get $11 + local.get $endA + local.get $hi i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $12 + local.get $endA i32.const 1 i32.add - local.set $5 - local.get $0 - local.get $5 - local.get $11 - local.get $2 + local.set $startB + local.get $ptr + local.get $startB + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight - local.set $3 - local.get $3 - local.get $5 + local.set $endB + local.get $endB + local.get $startB i32.sub i32.const 1 i32.add - local.set $16 - local.get $16 + local.set $lenB + local.get $lenB i32.const 32 i32.lt_s if - local.get $11 - local.tee $17 - local.get $5 + local.get $hi + local.tee $k + local.get $startB i32.const 32 i32.add i32.const 1 i32.sub - local.tee $18 - local.get $17 - local.get $18 + local.tee $var$18 + local.get $k + local.get $var$18 i32.lt_s select - local.set $3 - local.get $0 - local.get $5 - local.get $3 - local.get $16 - local.get $2 + local.set $endB + local.get $ptr + local.get $startB + local.get $endB + local.get $lenB + local.get $comparator call $~lib/util/sort/insertionSort end i32.const 0 - local.get $11 - local.get $15 - local.get $5 - local.get $3 + local.get $hi + local.get $startA + local.get $startB + local.get $endB call $~lib/util/sort/nodePower - local.set $17 - local.get $14 - local.set $18 + local.set $k + local.get $top + local.set $var$18 loop $for-loop|3 - local.get $18 - local.get $17 + local.get $var$18 + local.get $k i32.gt_u - local.set $19 - local.get $19 + local.set $var$19 + local.get $var$19 if - local.get $8 - local.get $18 + local.get $leftRunStartBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.load - local.set $20 - local.get $20 + local.set $var$20 + local.get $var$20 i32.const -1 i32.ne if - local.get $0 - local.get $20 - local.get $9 - local.get $18 + local.get $ptr + local.get $var$20 + local.get $leftRunEndBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $12 - local.get $10 - local.get $2 + local.get $endA + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns - local.get $20 - local.set $15 - local.get $8 - local.get $18 + local.get $var$20 + local.set $startA + local.get $leftRunStartBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.const -1 i32.store end - local.get $18 + local.get $var$18 i32.const 1 i32.sub - local.set $18 + local.set $var$18 br $for-loop|3 end end - local.get $8 - local.get $17 + local.get $leftRunStartBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $15 + local.get $startA i32.store - local.get $9 - local.get $17 + local.get $leftRunEndBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $12 + local.get $endA i32.store - local.get $5 - local.set $15 - local.get $3 - local.set $12 - local.get $17 - local.set $14 + local.get $startB + local.set $startA + local.get $endB + local.set $endA + local.get $k + local.set $top br $while-continue|2 end end - local.get $14 - local.set $4 + local.get $top + local.set $var$4 loop $for-loop|4 - local.get $4 + local.get $var$4 i32.const 0 i32.ne - local.set $18 - local.get $18 + local.set $var$18 + local.get $var$18 if - local.get $8 - local.get $4 + local.get $leftRunStartBuf + local.get $var$4 i32.const 2 i32.shl i32.add i32.load - local.set $19 - local.get $19 + local.set $var$19 + local.get $var$19 i32.const -1 i32.ne if - local.get $0 - local.get $19 - local.get $9 - local.get $4 + local.get $ptr + local.get $var$19 + local.get $leftRunEndBuf + local.get $var$4 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $11 - local.get $10 - local.get $2 + local.get $hi + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns end - local.get $4 + local.get $var$4 i32.const 1 i32.sub - local.set $4 + local.set $var$4 br $for-loop|4 end end - local.get $10 + local.get $buffer call $~lib/rt/tlsf/__free - local.get $8 + local.get $leftRunStartBuf call $~lib/rt/tlsf/__free global.get $~lib/memory/__stack_pointer i32.const 12 i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/array/Array#sort (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/array/Array#sort (param $this i32) (param $comparator i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this i32.load offset=12 - local.get $1 + local.get $comparator call $~lib/util/sort/SORT - local.get $0 + local.get $this ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $start:std/array~anonymous|47 (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $start:std/array~anonymous|47 (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.sub ) - (func $start:std/array~anonymous|48 (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 + (func $start:std/array~anonymous|48 (param $a i32) (param $b i32) (result i32) + local.get $b + local.get $a i32.sub ) - (func $start:std/array~anonymous|49 (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $start:std/array~anonymous|49 (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.sub ) - (func $start:std/array~anonymous|50 (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 + (func $start:std/array~anonymous|50 (param $a i32) (param $b i32) (result i32) + local.get $b + local.get $a i32.sub ) (func $~lib/array/Array<~lib/array/Array>#set:buffer (param $0 i32) (param $1 i32) @@ -10718,29 +10718,29 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array<~lib/array/Array>#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array<~lib/array/Array>#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store i32.const 1 drop - local.get $0 - local.get $2 + local.get $this + local.get $value i32.const 1 call $~lib/rt/itcms/__link ) - (func $~lib/array/Array<~lib/array/Array>#__set (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array<~lib/array/Array>#__set (param $this i32) (param $index i32) (param $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if - local.get $1 + local.get $index i32.const 0 i32.lt_s if @@ -10751,43 +10751,43 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $this + local.get $index i32.const 1 i32.add i32.const 2 i32.const 1 call $~lib/array/ensureCapacity - local.get $0 - local.get $1 + local.get $this + local.get $index i32.const 1 i32.add call $~lib/array/Array<~lib/array/Array>#set:length_ end - local.get $0 - local.get $1 - local.get $2 + local.get $this + local.get $index + local.get $value call $~lib/array/Array<~lib/array/Array>#__uset ) - (func $start:std/array~anonymous|51 (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $start:std/array~anonymous|51 (param $a i32) (param $b i32) (result i32) + local.get $a i32.const 0 call $~lib/array/Array#__get - local.get $1 + local.get $b i32.const 0 call $~lib/array/Array#__get i32.sub ) - (func $~lib/util/sort/insertionSort<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $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) + (func $~lib/util/sort/insertionSort<~lib/array/Array> (param $ptr i32) (param $left i32) (param $right i32) (param $presorted i32) (param $comparator i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -10800,115 +10800,115 @@ i32.const 1 i32.ge_s drop - local.get $2 - local.get $1 + local.get $right + local.get $left i32.sub i32.const 1 i32.add - local.set $5 - local.get $1 - local.get $5 + local.set $var$5 + local.get $left + local.get $var$5 i32.const 1 i32.and - local.get $3 - local.get $5 - local.get $3 + local.get $presorted + local.get $var$5 + local.get $presorted i32.sub i32.const 1 i32.and i32.sub - local.get $3 + local.get $presorted i32.const 0 i32.eq select i32.add - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $6 - local.get $2 + local.get $var$6 + local.get $right i32.le_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if global.get $~lib/memory/__stack_pointer - local.get $0 - local.get $6 + local.get $ptr + local.get $var$6 i32.const 2 i32.shl i32.add i32.load - local.tee $8 + local.tee $var$8 i32.store global.get $~lib/memory/__stack_pointer - local.get $0 - local.get $6 + local.get $ptr + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 - local.tee $9 + local.tee $var$9 i32.store offset=4 - local.get $9 - local.set $10 - local.get $8 - local.set $11 - local.get $8 - local.get $9 + local.get $var$9 + local.set $var$10 + local.get $var$8 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.le_s if - local.get $8 - local.set $10 - local.get $9 - local.set $11 + local.get $var$8 + local.set $var$10 + local.get $var$9 + local.set $var$11 end - local.get $6 + local.get $var$6 i32.const 1 i32.sub - local.set $12 + local.set $var$12 block $while-break|1 loop $while-continue|1 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if global.get $~lib/memory/__stack_pointer - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add i32.load - local.tee $8 + local.tee $var$8 i32.store - local.get $8 - local.get $11 + local.get $var$8 + local.get $var$11 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $8 + local.get $var$8 i32.store offset=8 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|1 end @@ -10916,51 +10916,51 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store offset=8 block $while-break|2 loop $while-continue|2 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if global.get $~lib/memory/__stack_pointer - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add i32.load - local.tee $8 + local.tee $var$8 i32.store - local.get $8 - local.get $10 + local.get $var$8 + local.get $var$10 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $8 + local.get $var$8 i32.store offset=4 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|2 end @@ -10968,17 +10968,17 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.const 2 i32.add - local.set $6 + local.set $var$6 br $for-loop|0 end end @@ -10987,14 +10987,14 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/util/sort/mergeRuns<~lib/array/Array> (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (func $~lib/util/sort/mergeRuns<~lib/array/Array> (param $ptr i32) (param $l i32) (param $m i32) (param $r i32) (param $buffer i32) (param $comparator i32) + (local $i i32) + (local $j i32) + (local $t i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -11003,34 +11003,34 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $2 + local.get $m i32.const 1 i32.sub - local.set $2 - local.get $3 - local.get $2 + local.set $m + local.get $r + local.get $m i32.add - local.set $8 - local.get $2 + local.set $t + local.get $m i32.const 1 i32.add - local.set $6 + local.set $i loop $for-loop|0 - local.get $6 - local.get $1 + local.get $i + local.get $l i32.gt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $6 + local.get $buffer + local.get $i i32.const 1 i32.sub i32.const 2 i32.shl i32.add - local.get $0 - local.get $6 + local.get $ptr + local.get $i i32.const 1 i32.sub i32.const 2 @@ -11038,108 +11038,108 @@ i32.add i32.load i32.store - local.get $6 + local.get $i i32.const 1 i32.sub - local.set $6 + local.set $i br $for-loop|0 end end - local.get $2 - local.set $7 + local.get $m + local.set $j loop $for-loop|1 - local.get $7 - local.get $3 + local.get $j + local.get $r i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $8 - local.get $7 + local.get $buffer + local.get $t + local.get $j i32.sub i32.const 2 i32.shl i32.add - local.get $0 - local.get $7 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load offset=4 i32.store - local.get $7 + local.get $j i32.const 1 i32.add - local.set $7 + local.set $j br $for-loop|1 end end - local.get $1 - local.set $9 + local.get $l + local.set $var$9 loop $for-loop|2 - local.get $9 - local.get $3 + local.get $var$9 + local.get $r i32.le_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if global.get $~lib/memory/__stack_pointer - local.get $4 - local.get $7 + local.get $buffer + local.get $j i32.const 2 i32.shl i32.add i32.load - local.tee $11 + local.tee $var$11 i32.store global.get $~lib/memory/__stack_pointer - local.get $4 - local.get $6 + local.get $buffer + local.get $i i32.const 2 i32.shl i32.add i32.load - local.tee $12 + local.tee $var$12 i32.store offset=4 - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i32.const 2 global.set $~argumentsLength - local.get $5 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 2 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store - local.get $7 + local.get $j i32.const 1 i32.sub - local.set $7 + local.set $j else - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 2 i32.shl i32.add - local.get $12 + local.get $var$12 i32.store - local.get $6 + local.get $i i32.const 1 i32.add - local.set $6 + local.set $i end - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|2 end end @@ -11148,25 +11148,25 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/util/sort/SORT<~lib/array/Array> (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 $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) + (func $~lib/util/sort/SORT<~lib/array/Array> (param $ptr i32) (param $len i32) (param $comparator i32) + (local $endB i32) + (local $var$4 i32) + (local $startB i32) + (local $lgPlus2 i32) + (local $lgPlus2Size i32) + (local $leftRunStartBuf i32) + (local $leftRunEndBuf i32) + (local $buffer i32) + (local $hi i32) + (local $endA i32) + (local $lenA i32) + (local $top i32) + (local $startA i32) + (local $lenB i32) + (local $k i32) + (local $var$18 i32) + (local $var$19 i32) + (local $var$20 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -11178,11 +11178,11 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store offset=8 - local.get $1 + local.get $len i32.const 48 i32.le_s if - local.get $1 + local.get $len i32.const 1 i32.le_s if @@ -11199,109 +11199,109 @@ block $break|0 block $case1|0 block $case0|0 - local.get $1 - local.set $3 - local.get $3 + local.get $len + local.set $endB + local.get $endB i32.const 3 i32.eq br_if $case0|0 - local.get $3 + local.get $endB i32.const 2 i32.eq br_if $case1|0 br $break|0 end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $ptr i32.load - local.tee $3 + local.tee $endB i32.store global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $ptr i32.load offset=4 - local.tee $4 + local.tee $var$4 i32.store offset=4 - local.get $3 - local.get $4 + local.get $endB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $5 - local.get $0 - local.get $4 - local.get $3 - local.get $5 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $endB + local.get $startB select i32.store global.get $~lib/memory/__stack_pointer - local.get $3 - local.get $4 - local.get $5 + local.get $endB + local.get $var$4 + local.get $startB select - local.tee $3 + local.tee $endB i32.store global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $ptr i32.load offset=8 - local.tee $4 + local.tee $var$4 i32.store offset=4 - local.get $3 - local.get $4 + local.get $endB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $5 - local.get $0 - local.get $4 - local.get $3 - local.get $5 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $endB + local.get $startB select i32.store offset=4 - local.get $0 - local.get $3 - local.get $4 - local.get $5 + local.get $ptr + local.get $endB + local.get $var$4 + local.get $startB select i32.store offset=8 end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $ptr i32.load - local.tee $5 + local.tee $startB i32.store offset=8 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $ptr i32.load offset=4 - local.tee $4 + local.tee $var$4 i32.store offset=4 - local.get $5 - local.get $4 + local.get $startB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $3 - local.get $0 - local.get $4 - local.get $5 - local.get $3 + local.set $endB + local.get $ptr + local.get $var$4 + local.get $startB + local.get $endB select i32.store - local.get $0 - local.get $5 - local.get $4 - local.get $3 + local.get $ptr + local.get $startB + local.get $var$4 + local.get $endB select i32.store offset=4 global.get $~lib/memory/__stack_pointer @@ -11310,13 +11310,13 @@ global.set $~lib/memory/__stack_pointer return end - local.get $0 + local.get $ptr i32.const 0 - local.get $1 + local.get $len i32.const 1 i32.sub i32.const 0 - local.get $2 + local.get $comparator call $~lib/util/sort/insertionSort<~lib/array/Array> global.get $~lib/memory/__stack_pointer i32.const 12 @@ -11324,286 +11324,286 @@ global.set $~lib/memory/__stack_pointer return end - local.get $1 - local.set $5 + local.get $len + local.set $startB i32.const 31 - local.get $5 + local.get $startB i32.clz i32.sub i32.const 2 i32.add - local.set $6 - local.get $6 + local.set $lgPlus2 + local.get $lgPlus2 i32.const 2 i32.shl - local.set $7 - local.get $7 + local.set $lgPlus2Size + local.get $lgPlus2Size i32.const 1 i32.shl call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 - local.get $7 + local.set $leftRunStartBuf + local.get $leftRunStartBuf + local.get $lgPlus2Size i32.add - local.set $9 + local.set $leftRunEndBuf i32.const 0 - local.set $5 + local.set $startB loop $for-loop|1 - local.get $5 - local.get $6 + local.get $startB + local.get $lgPlus2 i32.lt_u - local.set $3 - local.get $3 + local.set $endB + local.get $endB if - local.get $8 - local.get $5 + local.get $leftRunStartBuf + local.get $startB i32.const 2 i32.shl i32.add i32.const -1 i32.store - local.get $5 + local.get $startB i32.const 1 i32.add - local.set $5 + local.set $startB br $for-loop|1 end end - local.get $1 + local.get $len i32.const 2 i32.shl call $~lib/rt/tlsf/__alloc - local.set $10 - local.get $1 + local.set $buffer + local.get $len i32.const 1 i32.sub - local.set $11 - local.get $0 + local.set $hi + local.get $ptr i32.const 0 - local.get $11 - local.get $2 + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight<~lib/array/Array> - local.set $12 - local.get $12 + local.set $endA + local.get $endA i32.const 1 i32.add - local.set $13 - local.get $13 + local.set $lenA + local.get $lenA i32.const 32 i32.lt_s if - local.get $11 - local.tee $4 + local.get $hi + local.tee $var$4 i32.const 32 i32.const 1 i32.sub - local.tee $5 - local.get $4 - local.get $5 + local.tee $startB + local.get $var$4 + local.get $startB i32.lt_s select - local.set $12 - local.get $0 + local.set $endA + local.get $ptr i32.const 0 - local.get $12 - local.get $13 - local.get $2 + local.get $endA + local.get $lenA + local.get $comparator call $~lib/util/sort/insertionSort<~lib/array/Array> end i32.const 0 - local.set $14 + local.set $top i32.const 0 - local.set $15 + local.set $startA loop $while-continue|2 - local.get $12 - local.get $11 + local.get $endA + local.get $hi i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $12 + local.get $endA i32.const 1 i32.add - local.set $5 - local.get $0 - local.get $5 - local.get $11 - local.get $2 + local.set $startB + local.get $ptr + local.get $startB + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight<~lib/array/Array> - local.set $3 - local.get $3 - local.get $5 + local.set $endB + local.get $endB + local.get $startB i32.sub i32.const 1 i32.add - local.set $16 - local.get $16 + local.set $lenB + local.get $lenB i32.const 32 i32.lt_s if - local.get $11 - local.tee $17 - local.get $5 + local.get $hi + local.tee $k + local.get $startB i32.const 32 i32.add i32.const 1 i32.sub - local.tee $18 - local.get $17 - local.get $18 + local.tee $var$18 + local.get $k + local.get $var$18 i32.lt_s select - local.set $3 - local.get $0 - local.get $5 - local.get $3 - local.get $16 - local.get $2 + local.set $endB + local.get $ptr + local.get $startB + local.get $endB + local.get $lenB + local.get $comparator call $~lib/util/sort/insertionSort<~lib/array/Array> end i32.const 0 - local.get $11 - local.get $15 - local.get $5 - local.get $3 + local.get $hi + local.get $startA + local.get $startB + local.get $endB call $~lib/util/sort/nodePower - local.set $17 - local.get $14 - local.set $18 + local.set $k + local.get $top + local.set $var$18 loop $for-loop|3 - local.get $18 - local.get $17 + local.get $var$18 + local.get $k i32.gt_u - local.set $19 - local.get $19 + local.set $var$19 + local.get $var$19 if - local.get $8 - local.get $18 + local.get $leftRunStartBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.load - local.set $20 - local.get $20 + local.set $var$20 + local.get $var$20 i32.const -1 i32.ne if - local.get $0 - local.get $20 - local.get $9 - local.get $18 + local.get $ptr + local.get $var$20 + local.get $leftRunEndBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $12 - local.get $10 - local.get $2 + local.get $endA + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns<~lib/array/Array> - local.get $20 - local.set $15 - local.get $8 - local.get $18 + local.get $var$20 + local.set $startA + local.get $leftRunStartBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.const -1 i32.store end - local.get $18 + local.get $var$18 i32.const 1 i32.sub - local.set $18 + local.set $var$18 br $for-loop|3 end end - local.get $8 - local.get $17 + local.get $leftRunStartBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $15 + local.get $startA i32.store - local.get $9 - local.get $17 + local.get $leftRunEndBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $12 + local.get $endA i32.store - local.get $5 - local.set $15 - local.get $3 - local.set $12 - local.get $17 - local.set $14 + local.get $startB + local.set $startA + local.get $endB + local.set $endA + local.get $k + local.set $top br $while-continue|2 end end - local.get $14 - local.set $4 + local.get $top + local.set $var$4 loop $for-loop|4 - local.get $4 + local.get $var$4 i32.const 0 i32.ne - local.set $18 - local.get $18 + local.set $var$18 + local.get $var$18 if - local.get $8 - local.get $4 + local.get $leftRunStartBuf + local.get $var$4 i32.const 2 i32.shl i32.add i32.load - local.set $19 - local.get $19 + local.set $var$19 + local.get $var$19 i32.const -1 i32.ne if - local.get $0 - local.get $19 - local.get $9 - local.get $4 + local.get $ptr + local.get $var$19 + local.get $leftRunEndBuf + local.get $var$4 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $11 - local.get $10 - local.get $2 + local.get $hi + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns<~lib/array/Array> end - local.get $4 + local.get $var$4 i32.const 1 i32.sub - local.set $4 + local.set $var$4 br $for-loop|4 end end - local.get $10 + local.get $buffer call $~lib/rt/tlsf/__free - local.get $8 + local.get $leftRunStartBuf call $~lib/rt/tlsf/__free global.get $~lib/memory/__stack_pointer i32.const 12 i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/array/Array<~lib/array/Array>#sort (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/array/Array<~lib/array/Array>#sort (param $this i32) (param $comparator i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this i32.load offset=12 - local.get $1 + local.get $comparator call $~lib/util/sort/SORT<~lib/array/Array> - local.get $0 + local.get $this ) - (func $~lib/array/Array<~lib/array/Array>#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array<~lib/array/Array>#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) (func $~lib/array/Array>#set:buffer (param $0 i32) (param $1 i32) @@ -11635,29 +11635,29 @@ local.get $1 i32.store ) - (func $~lib/array/Array>#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array>#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store i32.const 1 drop - local.get $0 - local.get $2 + local.get $this + local.get $value i32.const 1 call $~lib/rt/itcms/__link ) - (func $~lib/array/Array>#__set (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array>#__set (param $this i32) (param $index i32) (param $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if - local.get $1 + local.get $index i32.const 0 i32.lt_s if @@ -11668,41 +11668,41 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $this + local.get $index i32.const 1 i32.add i32.const 2 i32.const 1 call $~lib/array/ensureCapacity - local.get $0 - local.get $1 + local.get $this + local.get $index i32.const 1 i32.add call $~lib/array/Array>#set:length_ end - local.get $0 - local.get $1 - local.get $2 + local.get $this + local.get $index + local.get $value call $~lib/array/Array>#__uset ) - (func $start:std/array~anonymous|52 (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $start:std/array~anonymous|52 (param $a i32) (param $b i32) (result i32) + local.get $a i32.load - local.get $1 + local.get $b i32.load i32.sub ) - (func $~lib/util/sort/insertionSort> (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $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) + (func $~lib/util/sort/insertionSort> (param $ptr i32) (param $left i32) (param $right i32) (param $presorted i32) (param $comparator i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -11715,115 +11715,115 @@ i32.const 1 i32.ge_s drop - local.get $2 - local.get $1 + local.get $right + local.get $left i32.sub i32.const 1 i32.add - local.set $5 - local.get $1 - local.get $5 + local.set $var$5 + local.get $left + local.get $var$5 i32.const 1 i32.and - local.get $3 - local.get $5 - local.get $3 + local.get $presorted + local.get $var$5 + local.get $presorted i32.sub i32.const 1 i32.and i32.sub - local.get $3 + local.get $presorted i32.const 0 i32.eq select i32.add - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $6 - local.get $2 + local.get $var$6 + local.get $right i32.le_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if global.get $~lib/memory/__stack_pointer - local.get $0 - local.get $6 + local.get $ptr + local.get $var$6 i32.const 2 i32.shl i32.add i32.load - local.tee $8 + local.tee $var$8 i32.store global.get $~lib/memory/__stack_pointer - local.get $0 - local.get $6 + local.get $ptr + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 - local.tee $9 + local.tee $var$9 i32.store offset=4 - local.get $9 - local.set $10 - local.get $8 - local.set $11 - local.get $8 - local.get $9 + local.get $var$9 + local.set $var$10 + local.get $var$8 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.le_s if - local.get $8 - local.set $10 - local.get $9 - local.set $11 + local.get $var$8 + local.set $var$10 + local.get $var$9 + local.set $var$11 end - local.get $6 + local.get $var$6 i32.const 1 i32.sub - local.set $12 + local.set $var$12 block $while-break|1 loop $while-continue|1 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if global.get $~lib/memory/__stack_pointer - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add i32.load - local.tee $8 + local.tee $var$8 i32.store - local.get $8 - local.get $11 + local.get $var$8 + local.get $var$11 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $8 + local.get $var$8 i32.store offset=8 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|1 end @@ -11831,51 +11831,51 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store offset=8 block $while-break|2 loop $while-continue|2 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if global.get $~lib/memory/__stack_pointer - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add i32.load - local.tee $8 + local.tee $var$8 i32.store - local.get $8 - local.get $10 + local.get $var$8 + local.get $var$10 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $8 + local.get $var$8 i32.store offset=4 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|2 end @@ -11883,17 +11883,17 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.const 2 i32.add - local.set $6 + local.set $var$6 br $for-loop|0 end end @@ -11902,14 +11902,14 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/util/sort/mergeRuns> (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (func $~lib/util/sort/mergeRuns> (param $ptr i32) (param $l i32) (param $m i32) (param $r i32) (param $buffer i32) (param $comparator i32) + (local $i i32) + (local $j i32) + (local $t i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -11918,34 +11918,34 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $2 + local.get $m i32.const 1 i32.sub - local.set $2 - local.get $3 - local.get $2 + local.set $m + local.get $r + local.get $m i32.add - local.set $8 - local.get $2 + local.set $t + local.get $m i32.const 1 i32.add - local.set $6 + local.set $i loop $for-loop|0 - local.get $6 - local.get $1 + local.get $i + local.get $l i32.gt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $6 + local.get $buffer + local.get $i i32.const 1 i32.sub i32.const 2 i32.shl i32.add - local.get $0 - local.get $6 + local.get $ptr + local.get $i i32.const 1 i32.sub i32.const 2 @@ -11953,108 +11953,108 @@ i32.add i32.load i32.store - local.get $6 + local.get $i i32.const 1 i32.sub - local.set $6 + local.set $i br $for-loop|0 end end - local.get $2 - local.set $7 + local.get $m + local.set $j loop $for-loop|1 - local.get $7 - local.get $3 + local.get $j + local.get $r i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $8 - local.get $7 + local.get $buffer + local.get $t + local.get $j i32.sub i32.const 2 i32.shl i32.add - local.get $0 - local.get $7 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load offset=4 i32.store - local.get $7 + local.get $j i32.const 1 i32.add - local.set $7 + local.set $j br $for-loop|1 end end - local.get $1 - local.set $9 + local.get $l + local.set $var$9 loop $for-loop|2 - local.get $9 - local.get $3 + local.get $var$9 + local.get $r i32.le_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if global.get $~lib/memory/__stack_pointer - local.get $4 - local.get $7 + local.get $buffer + local.get $j i32.const 2 i32.shl i32.add i32.load - local.tee $11 + local.tee $var$11 i32.store global.get $~lib/memory/__stack_pointer - local.get $4 - local.get $6 + local.get $buffer + local.get $i i32.const 2 i32.shl i32.add i32.load - local.tee $12 + local.tee $var$12 i32.store offset=4 - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i32.const 2 global.set $~argumentsLength - local.get $5 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 2 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store - local.get $7 + local.get $j i32.const 1 i32.sub - local.set $7 + local.set $j else - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 2 i32.shl i32.add - local.get $12 + local.get $var$12 i32.store - local.get $6 + local.get $i i32.const 1 i32.add - local.set $6 + local.set $i end - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|2 end end @@ -12063,25 +12063,25 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/util/sort/SORT> (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 $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) + (func $~lib/util/sort/SORT> (param $ptr i32) (param $len i32) (param $comparator i32) + (local $endB i32) + (local $var$4 i32) + (local $startB i32) + (local $lgPlus2 i32) + (local $lgPlus2Size i32) + (local $leftRunStartBuf i32) + (local $leftRunEndBuf i32) + (local $buffer i32) + (local $hi i32) + (local $endA i32) + (local $lenA i32) + (local $top i32) + (local $startA i32) + (local $lenB i32) + (local $k i32) + (local $var$18 i32) + (local $var$19 i32) + (local $var$20 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -12093,11 +12093,11 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store offset=8 - local.get $1 + local.get $len i32.const 48 i32.le_s if - local.get $1 + local.get $len i32.const 1 i32.le_s if @@ -12114,109 +12114,109 @@ block $break|0 block $case1|0 block $case0|0 - local.get $1 - local.set $3 - local.get $3 + local.get $len + local.set $endB + local.get $endB i32.const 3 i32.eq br_if $case0|0 - local.get $3 + local.get $endB i32.const 2 i32.eq br_if $case1|0 br $break|0 end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $ptr i32.load - local.tee $3 + local.tee $endB i32.store global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $ptr i32.load offset=4 - local.tee $4 + local.tee $var$4 i32.store offset=4 - local.get $3 - local.get $4 + local.get $endB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $5 - local.get $0 - local.get $4 - local.get $3 - local.get $5 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $endB + local.get $startB select i32.store global.get $~lib/memory/__stack_pointer - local.get $3 - local.get $4 - local.get $5 + local.get $endB + local.get $var$4 + local.get $startB select - local.tee $3 + local.tee $endB i32.store global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $ptr i32.load offset=8 - local.tee $4 + local.tee $var$4 i32.store offset=4 - local.get $3 - local.get $4 + local.get $endB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $5 - local.get $0 - local.get $4 - local.get $3 - local.get $5 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $endB + local.get $startB select i32.store offset=4 - local.get $0 - local.get $3 - local.get $4 - local.get $5 + local.get $ptr + local.get $endB + local.get $var$4 + local.get $startB select i32.store offset=8 end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $ptr i32.load - local.tee $5 + local.tee $startB i32.store offset=8 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $ptr i32.load offset=4 - local.tee $4 + local.tee $var$4 i32.store offset=4 - local.get $5 - local.get $4 + local.get $startB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $3 - local.get $0 - local.get $4 - local.get $5 - local.get $3 + local.set $endB + local.get $ptr + local.get $var$4 + local.get $startB + local.get $endB select i32.store - local.get $0 - local.get $5 - local.get $4 - local.get $3 + local.get $ptr + local.get $startB + local.get $var$4 + local.get $endB select i32.store offset=4 global.get $~lib/memory/__stack_pointer @@ -12225,13 +12225,13 @@ global.set $~lib/memory/__stack_pointer return end - local.get $0 + local.get $ptr i32.const 0 - local.get $1 + local.get $len i32.const 1 i32.sub i32.const 0 - local.get $2 + local.get $comparator call $~lib/util/sort/insertionSort> global.get $~lib/memory/__stack_pointer i32.const 12 @@ -12239,298 +12239,298 @@ global.set $~lib/memory/__stack_pointer return end - local.get $1 - local.set $5 + local.get $len + local.set $startB i32.const 31 - local.get $5 + local.get $startB i32.clz i32.sub i32.const 2 i32.add - local.set $6 - local.get $6 + local.set $lgPlus2 + local.get $lgPlus2 i32.const 2 i32.shl - local.set $7 - local.get $7 + local.set $lgPlus2Size + local.get $lgPlus2Size i32.const 1 i32.shl call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 - local.get $7 + local.set $leftRunStartBuf + local.get $leftRunStartBuf + local.get $lgPlus2Size i32.add - local.set $9 + local.set $leftRunEndBuf i32.const 0 - local.set $5 + local.set $startB loop $for-loop|1 - local.get $5 - local.get $6 + local.get $startB + local.get $lgPlus2 i32.lt_u - local.set $3 - local.get $3 - if - local.get $8 - local.get $5 + local.set $endB + local.get $endB + if + local.get $leftRunStartBuf + local.get $startB i32.const 2 i32.shl i32.add i32.const -1 i32.store - local.get $5 + local.get $startB i32.const 1 i32.add - local.set $5 + local.set $startB br $for-loop|1 end end - local.get $1 + local.get $len i32.const 2 i32.shl call $~lib/rt/tlsf/__alloc - local.set $10 - local.get $1 + local.set $buffer + local.get $len i32.const 1 i32.sub - local.set $11 - local.get $0 + local.set $hi + local.get $ptr i32.const 0 - local.get $11 - local.get $2 + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight> - local.set $12 - local.get $12 + local.set $endA + local.get $endA i32.const 1 i32.add - local.set $13 - local.get $13 + local.set $lenA + local.get $lenA i32.const 32 i32.lt_s if - local.get $11 - local.tee $4 + local.get $hi + local.tee $var$4 i32.const 32 i32.const 1 i32.sub - local.tee $5 - local.get $4 - local.get $5 + local.tee $startB + local.get $var$4 + local.get $startB i32.lt_s select - local.set $12 - local.get $0 + local.set $endA + local.get $ptr i32.const 0 - local.get $12 - local.get $13 - local.get $2 + local.get $endA + local.get $lenA + local.get $comparator call $~lib/util/sort/insertionSort> end i32.const 0 - local.set $14 + local.set $top i32.const 0 - local.set $15 + local.set $startA loop $while-continue|2 - local.get $12 - local.get $11 + local.get $endA + local.get $hi i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $12 + local.get $endA i32.const 1 i32.add - local.set $5 - local.get $0 - local.get $5 - local.get $11 - local.get $2 + local.set $startB + local.get $ptr + local.get $startB + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight> - local.set $3 - local.get $3 - local.get $5 + local.set $endB + local.get $endB + local.get $startB i32.sub i32.const 1 i32.add - local.set $16 - local.get $16 + local.set $lenB + local.get $lenB i32.const 32 i32.lt_s if - local.get $11 - local.tee $17 - local.get $5 + local.get $hi + local.tee $k + local.get $startB i32.const 32 i32.add i32.const 1 i32.sub - local.tee $18 - local.get $17 - local.get $18 + local.tee $var$18 + local.get $k + local.get $var$18 i32.lt_s select - local.set $3 - local.get $0 - local.get $5 - local.get $3 - local.get $16 - local.get $2 + local.set $endB + local.get $ptr + local.get $startB + local.get $endB + local.get $lenB + local.get $comparator call $~lib/util/sort/insertionSort> end i32.const 0 - local.get $11 - local.get $15 - local.get $5 - local.get $3 + local.get $hi + local.get $startA + local.get $startB + local.get $endB call $~lib/util/sort/nodePower - local.set $17 - local.get $14 - local.set $18 + local.set $k + local.get $top + local.set $var$18 loop $for-loop|3 - local.get $18 - local.get $17 + local.get $var$18 + local.get $k i32.gt_u - local.set $19 - local.get $19 + local.set $var$19 + local.get $var$19 if - local.get $8 - local.get $18 + local.get $leftRunStartBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.load - local.set $20 - local.get $20 + local.set $var$20 + local.get $var$20 i32.const -1 i32.ne if - local.get $0 - local.get $20 - local.get $9 - local.get $18 + local.get $ptr + local.get $var$20 + local.get $leftRunEndBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $12 - local.get $10 - local.get $2 + local.get $endA + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns> - local.get $20 - local.set $15 - local.get $8 - local.get $18 + local.get $var$20 + local.set $startA + local.get $leftRunStartBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.const -1 i32.store end - local.get $18 + local.get $var$18 i32.const 1 i32.sub - local.set $18 + local.set $var$18 br $for-loop|3 end end - local.get $8 - local.get $17 + local.get $leftRunStartBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $15 + local.get $startA i32.store - local.get $9 - local.get $17 + local.get $leftRunEndBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $12 + local.get $endA i32.store - local.get $5 - local.set $15 - local.get $3 - local.set $12 - local.get $17 - local.set $14 + local.get $startB + local.set $startA + local.get $endB + local.set $endA + local.get $k + local.set $top br $while-continue|2 end end - local.get $14 - local.set $4 + local.get $top + local.set $var$4 loop $for-loop|4 - local.get $4 + local.get $var$4 i32.const 0 i32.ne - local.set $18 - local.get $18 + local.set $var$18 + local.get $var$18 if - local.get $8 - local.get $4 + local.get $leftRunStartBuf + local.get $var$4 i32.const 2 i32.shl i32.add i32.load - local.set $19 - local.get $19 + local.set $var$19 + local.get $var$19 i32.const -1 i32.ne if - local.get $0 - local.get $19 - local.get $9 - local.get $4 + local.get $ptr + local.get $var$19 + local.get $leftRunEndBuf + local.get $var$4 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $11 - local.get $10 - local.get $2 + local.get $hi + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns> end - local.get $4 + local.get $var$4 i32.const 1 i32.sub - local.set $4 + local.set $var$4 br $for-loop|4 end end - local.get $10 + local.get $buffer call $~lib/rt/tlsf/__free - local.get $8 + local.get $leftRunStartBuf call $~lib/rt/tlsf/__free global.get $~lib/memory/__stack_pointer i32.const 12 i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/array/Array>#sort (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/array/Array>#sort (param $this i32) (param $comparator i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this i32.load offset=12 - local.get $1 + local.get $comparator call $~lib/util/sort/SORT> - local.get $0 + local.get $this ) - (func $~lib/array/Array>#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array>#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/util/sort/insertionSort<~lib/string/String|null> (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $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) + (func $~lib/util/sort/insertionSort<~lib/string/String|null> (param $ptr i32) (param $left i32) (param $right i32) (param $presorted i32) (param $comparator i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -12543,115 +12543,115 @@ i32.const 1 i32.ge_s drop - local.get $2 - local.get $1 + local.get $right + local.get $left i32.sub i32.const 1 i32.add - local.set $5 - local.get $1 - local.get $5 + local.set $var$5 + local.get $left + local.get $var$5 i32.const 1 i32.and - local.get $3 - local.get $5 - local.get $3 + local.get $presorted + local.get $var$5 + local.get $presorted i32.sub i32.const 1 i32.and i32.sub - local.get $3 + local.get $presorted i32.const 0 i32.eq select i32.add - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $6 - local.get $2 + local.get $var$6 + local.get $right i32.le_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if global.get $~lib/memory/__stack_pointer - local.get $0 - local.get $6 + local.get $ptr + local.get $var$6 i32.const 2 i32.shl i32.add i32.load - local.tee $8 + local.tee $var$8 i32.store global.get $~lib/memory/__stack_pointer - local.get $0 - local.get $6 + local.get $ptr + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 - local.tee $9 + local.tee $var$9 i32.store offset=4 - local.get $9 - local.set $10 - local.get $8 - local.set $11 - local.get $8 - local.get $9 + local.get $var$9 + local.set $var$10 + local.get $var$8 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.le_s if - local.get $8 - local.set $10 - local.get $9 - local.set $11 + local.get $var$8 + local.set $var$10 + local.get $var$9 + local.set $var$11 end - local.get $6 + local.get $var$6 i32.const 1 i32.sub - local.set $12 + local.set $var$12 block $while-break|1 loop $while-continue|1 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if global.get $~lib/memory/__stack_pointer - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add i32.load - local.tee $8 + local.tee $var$8 i32.store - local.get $8 - local.get $11 + local.get $var$8 + local.get $var$11 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $8 + local.get $var$8 i32.store offset=8 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|1 end @@ -12659,51 +12659,51 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store offset=8 block $while-break|2 loop $while-continue|2 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if global.get $~lib/memory/__stack_pointer - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add i32.load - local.tee $8 + local.tee $var$8 i32.store - local.get $8 - local.get $10 + local.get $var$8 + local.get $var$10 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $8 + local.get $var$8 i32.store offset=4 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|2 end @@ -12711,17 +12711,17 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.const 2 i32.add - local.set $6 + local.set $var$6 br $for-loop|0 end end @@ -12730,14 +12730,14 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/util/sort/mergeRuns<~lib/string/String|null> (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (func $~lib/util/sort/mergeRuns<~lib/string/String|null> (param $ptr i32) (param $l i32) (param $m i32) (param $r i32) (param $buffer i32) (param $comparator i32) + (local $i i32) + (local $j i32) + (local $t i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -12746,34 +12746,34 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $2 + local.get $m i32.const 1 i32.sub - local.set $2 - local.get $3 - local.get $2 + local.set $m + local.get $r + local.get $m i32.add - local.set $8 - local.get $2 + local.set $t + local.get $m i32.const 1 i32.add - local.set $6 + local.set $i loop $for-loop|0 - local.get $6 - local.get $1 + local.get $i + local.get $l i32.gt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $6 + local.get $buffer + local.get $i i32.const 1 i32.sub i32.const 2 i32.shl i32.add - local.get $0 - local.get $6 + local.get $ptr + local.get $i i32.const 1 i32.sub i32.const 2 @@ -12781,108 +12781,108 @@ i32.add i32.load i32.store - local.get $6 + local.get $i i32.const 1 i32.sub - local.set $6 + local.set $i br $for-loop|0 end end - local.get $2 - local.set $7 + local.get $m + local.set $j loop $for-loop|1 - local.get $7 - local.get $3 + local.get $j + local.get $r i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $8 - local.get $7 + local.get $buffer + local.get $t + local.get $j i32.sub i32.const 2 i32.shl i32.add - local.get $0 - local.get $7 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load offset=4 i32.store - local.get $7 + local.get $j i32.const 1 i32.add - local.set $7 + local.set $j br $for-loop|1 end end - local.get $1 - local.set $9 + local.get $l + local.set $var$9 loop $for-loop|2 - local.get $9 - local.get $3 + local.get $var$9 + local.get $r i32.le_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if global.get $~lib/memory/__stack_pointer - local.get $4 - local.get $7 + local.get $buffer + local.get $j i32.const 2 i32.shl i32.add i32.load - local.tee $11 + local.tee $var$11 i32.store global.get $~lib/memory/__stack_pointer - local.get $4 - local.get $6 + local.get $buffer + local.get $i i32.const 2 i32.shl i32.add i32.load - local.tee $12 + local.tee $var$12 i32.store offset=4 - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i32.const 2 global.set $~argumentsLength - local.get $5 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 2 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store - local.get $7 + local.get $j i32.const 1 i32.sub - local.set $7 + local.set $j else - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 2 i32.shl i32.add - local.get $12 + local.get $var$12 i32.store - local.get $6 + local.get $i i32.const 1 i32.add - local.set $6 + local.set $i end - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|2 end end @@ -12891,25 +12891,25 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/util/sort/SORT<~lib/string/String|null> (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 $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) + (func $~lib/util/sort/SORT<~lib/string/String|null> (param $ptr i32) (param $len i32) (param $comparator i32) + (local $endB i32) + (local $var$4 i32) + (local $startB i32) + (local $lgPlus2 i32) + (local $lgPlus2Size i32) + (local $leftRunStartBuf i32) + (local $leftRunEndBuf i32) + (local $buffer i32) + (local $hi i32) + (local $endA i32) + (local $lenA i32) + (local $top i32) + (local $startA i32) + (local $lenB i32) + (local $k i32) + (local $var$18 i32) + (local $var$19 i32) + (local $var$20 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -12921,11 +12921,11 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store offset=8 - local.get $1 + local.get $len i32.const 48 i32.le_s if - local.get $1 + local.get $len i32.const 1 i32.le_s if @@ -12942,109 +12942,109 @@ block $break|0 block $case1|0 block $case0|0 - local.get $1 - local.set $3 - local.get $3 + local.get $len + local.set $endB + local.get $endB i32.const 3 i32.eq br_if $case0|0 - local.get $3 + local.get $endB i32.const 2 i32.eq br_if $case1|0 br $break|0 end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $ptr i32.load - local.tee $3 + local.tee $endB i32.store global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $ptr i32.load offset=4 - local.tee $4 + local.tee $var$4 i32.store offset=4 - local.get $3 - local.get $4 + local.get $endB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $5 - local.get $0 - local.get $4 - local.get $3 - local.get $5 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $endB + local.get $startB select i32.store global.get $~lib/memory/__stack_pointer - local.get $3 - local.get $4 - local.get $5 + local.get $endB + local.get $var$4 + local.get $startB select - local.tee $3 + local.tee $endB i32.store global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $ptr i32.load offset=8 - local.tee $4 + local.tee $var$4 i32.store offset=4 - local.get $3 - local.get $4 + local.get $endB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $5 - local.get $0 - local.get $4 - local.get $3 - local.get $5 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $endB + local.get $startB select i32.store offset=4 - local.get $0 - local.get $3 - local.get $4 - local.get $5 + local.get $ptr + local.get $endB + local.get $var$4 + local.get $startB select i32.store offset=8 end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $ptr i32.load - local.tee $5 + local.tee $startB i32.store offset=8 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $ptr i32.load offset=4 - local.tee $4 + local.tee $var$4 i32.store offset=4 - local.get $5 - local.get $4 + local.get $startB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $3 - local.get $0 - local.get $4 - local.get $5 - local.get $3 + local.set $endB + local.get $ptr + local.get $var$4 + local.get $startB + local.get $endB select i32.store - local.get $0 - local.get $5 - local.get $4 - local.get $3 + local.get $ptr + local.get $startB + local.get $var$4 + local.get $endB select i32.store offset=4 global.get $~lib/memory/__stack_pointer @@ -13053,13 +13053,13 @@ global.set $~lib/memory/__stack_pointer return end - local.get $0 + local.get $ptr i32.const 0 - local.get $1 + local.get $len i32.const 1 i32.sub i32.const 0 - local.get $2 + local.get $comparator call $~lib/util/sort/insertionSort<~lib/string/String|null> global.get $~lib/memory/__stack_pointer i32.const 12 @@ -13067,326 +13067,326 @@ global.set $~lib/memory/__stack_pointer return end - local.get $1 - local.set $5 + local.get $len + local.set $startB i32.const 31 - local.get $5 + local.get $startB i32.clz i32.sub i32.const 2 i32.add - local.set $6 - local.get $6 + local.set $lgPlus2 + local.get $lgPlus2 i32.const 2 i32.shl - local.set $7 - local.get $7 + local.set $lgPlus2Size + local.get $lgPlus2Size i32.const 1 i32.shl call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 - local.get $7 + local.set $leftRunStartBuf + local.get $leftRunStartBuf + local.get $lgPlus2Size i32.add - local.set $9 + local.set $leftRunEndBuf i32.const 0 - local.set $5 + local.set $startB loop $for-loop|1 - local.get $5 - local.get $6 + local.get $startB + local.get $lgPlus2 i32.lt_u - local.set $3 - local.get $3 + local.set $endB + local.get $endB if - local.get $8 - local.get $5 + local.get $leftRunStartBuf + local.get $startB i32.const 2 i32.shl i32.add i32.const -1 i32.store - local.get $5 + local.get $startB i32.const 1 i32.add - local.set $5 + local.set $startB br $for-loop|1 end end - local.get $1 + local.get $len i32.const 2 i32.shl call $~lib/rt/tlsf/__alloc - local.set $10 - local.get $1 + local.set $buffer + local.get $len i32.const 1 i32.sub - local.set $11 - local.get $0 + local.set $hi + local.get $ptr i32.const 0 - local.get $11 - local.get $2 + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight<~lib/string/String|null> - local.set $12 - local.get $12 + local.set $endA + local.get $endA i32.const 1 i32.add - local.set $13 - local.get $13 + local.set $lenA + local.get $lenA i32.const 32 i32.lt_s if - local.get $11 - local.tee $4 + local.get $hi + local.tee $var$4 i32.const 32 i32.const 1 i32.sub - local.tee $5 - local.get $4 - local.get $5 + local.tee $startB + local.get $var$4 + local.get $startB i32.lt_s select - local.set $12 - local.get $0 + local.set $endA + local.get $ptr i32.const 0 - local.get $12 - local.get $13 - local.get $2 + local.get $endA + local.get $lenA + local.get $comparator call $~lib/util/sort/insertionSort<~lib/string/String|null> end i32.const 0 - local.set $14 + local.set $top i32.const 0 - local.set $15 + local.set $startA loop $while-continue|2 - local.get $12 - local.get $11 + local.get $endA + local.get $hi i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $12 + local.get $endA i32.const 1 i32.add - local.set $5 - local.get $0 - local.get $5 - local.get $11 - local.get $2 + local.set $startB + local.get $ptr + local.get $startB + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight<~lib/string/String|null> - local.set $3 - local.get $3 - local.get $5 + local.set $endB + local.get $endB + local.get $startB i32.sub i32.const 1 i32.add - local.set $16 - local.get $16 + local.set $lenB + local.get $lenB i32.const 32 i32.lt_s if - local.get $11 - local.tee $17 - local.get $5 + local.get $hi + local.tee $k + local.get $startB i32.const 32 i32.add i32.const 1 i32.sub - local.tee $18 - local.get $17 - local.get $18 + local.tee $var$18 + local.get $k + local.get $var$18 i32.lt_s select - local.set $3 - local.get $0 - local.get $5 - local.get $3 - local.get $16 - local.get $2 + local.set $endB + local.get $ptr + local.get $startB + local.get $endB + local.get $lenB + local.get $comparator call $~lib/util/sort/insertionSort<~lib/string/String|null> end i32.const 0 - local.get $11 - local.get $15 - local.get $5 - local.get $3 + local.get $hi + local.get $startA + local.get $startB + local.get $endB call $~lib/util/sort/nodePower - local.set $17 - local.get $14 - local.set $18 + local.set $k + local.get $top + local.set $var$18 loop $for-loop|3 - local.get $18 - local.get $17 + local.get $var$18 + local.get $k i32.gt_u - local.set $19 - local.get $19 + local.set $var$19 + local.get $var$19 if - local.get $8 - local.get $18 + local.get $leftRunStartBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.load - local.set $20 - local.get $20 + local.set $var$20 + local.get $var$20 i32.const -1 i32.ne if - local.get $0 - local.get $20 - local.get $9 - local.get $18 + local.get $ptr + local.get $var$20 + local.get $leftRunEndBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $12 - local.get $10 - local.get $2 + local.get $endA + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns<~lib/string/String|null> - local.get $20 - local.set $15 - local.get $8 - local.get $18 + local.get $var$20 + local.set $startA + local.get $leftRunStartBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.const -1 i32.store end - local.get $18 + local.get $var$18 i32.const 1 i32.sub - local.set $18 + local.set $var$18 br $for-loop|3 end end - local.get $8 - local.get $17 + local.get $leftRunStartBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $15 + local.get $startA i32.store - local.get $9 - local.get $17 + local.get $leftRunEndBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $12 + local.get $endA i32.store - local.get $5 - local.set $15 - local.get $3 - local.set $12 - local.get $17 - local.set $14 + local.get $startB + local.set $startA + local.get $endB + local.set $endA + local.get $k + local.set $top br $while-continue|2 end end - local.get $14 - local.set $4 + local.get $top + local.set $var$4 loop $for-loop|4 - local.get $4 + local.get $var$4 i32.const 0 i32.ne - local.set $18 - local.get $18 + local.set $var$18 + local.get $var$18 if - local.get $8 - local.get $4 + local.get $leftRunStartBuf + local.get $var$4 i32.const 2 i32.shl i32.add i32.load - local.set $19 - local.get $19 + local.set $var$19 + local.get $var$19 i32.const -1 i32.ne if - local.get $0 - local.get $19 - local.get $9 - local.get $4 + local.get $ptr + local.get $var$19 + local.get $leftRunEndBuf + local.get $var$4 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $11 - local.get $10 - local.get $2 + local.get $hi + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns<~lib/string/String|null> end - local.get $4 + local.get $var$4 i32.const 1 i32.sub - local.set $4 + local.set $var$4 br $for-loop|4 end end - local.get $10 + local.get $buffer call $~lib/rt/tlsf/__free - local.get $8 + local.get $leftRunStartBuf call $~lib/rt/tlsf/__free global.get $~lib/memory/__stack_pointer i32.const 12 i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/array/Array<~lib/string/String|null>#sort (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/array/Array<~lib/string/String|null>#sort (param $this i32) (param $comparator i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this i32.load offset=12 - local.get $1 + local.get $comparator call $~lib/util/sort/SORT<~lib/string/String|null> - local.get $0 + local.get $this ) - (func $~lib/array/Array<~lib/string/String|null>#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array<~lib/string/String|null>#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.get $1 + (func $~lib/util/string/compareImpl (param $str1 i32) (param $index1 i32) (param $str2 i32) (param $index2 i32) (param $len i32) (result i32) + (local $ptr1 i32) + (local $ptr2 i32) + (local $var$7 i32) + (local $a i32) + (local $b i32) + local.get $str1 + local.get $index1 i32.const 1 i32.shl i32.add - local.set $5 - local.get $2 - local.get $3 + local.set $ptr1 + local.get $str2 + local.get $index2 i32.const 1 i32.shl i32.add - local.set $6 + local.set $ptr2 i32.const 0 i32.const 2 i32.lt_s drop - local.get $4 + local.get $len i32.const 4 i32.ge_u if (result i32) - local.get $5 + local.get $ptr1 i32.const 7 i32.and - local.get $6 + local.get $ptr2 i32.const 7 i32.and i32.or @@ -13397,27 +13397,27 @@ if block $do-break|0 loop $do-loop|0 - local.get $5 + local.get $ptr1 i64.load - local.get $6 + local.get $ptr2 i64.load i64.ne if br $do-break|0 end - local.get $5 + local.get $ptr1 i32.const 8 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 8 i32.add - local.set $6 - local.get $4 + local.set $ptr2 + local.get $len i32.const 4 i32.sub - local.set $4 - local.get $4 + local.set $len + local.get $len i32.const 4 i32.ge_u br_if $do-loop|0 @@ -13425,62 +13425,62 @@ end end loop $while-continue|1 - local.get $4 - local.tee $7 + local.get $len + local.tee $var$7 i32.const 1 i32.sub - local.set $4 - local.get $7 - local.set $7 - local.get $7 + local.set $len + local.get $var$7 + local.set $var$7 + local.get $var$7 if - local.get $5 + local.get $ptr1 i32.load16_u - local.set $8 - local.get $6 + local.set $a + local.get $ptr2 i32.load16_u - local.set $9 - local.get $8 - local.get $9 + local.set $b + local.get $a + local.get $b i32.ne if - local.get $8 - local.get $9 + local.get $a + local.get $b i32.sub return end - local.get $5 + local.get $ptr1 i32.const 2 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 2 i32.add - local.set $6 + local.set $ptr2 br $while-continue|1 end end i32.const 0 ) - (func $~lib/util/sort/COMPARATOR<~lib/string/String|null>~anonymous|0 (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - local.get $1 + (func $~lib/util/sort/COMPARATOR<~lib/string/String|null>~anonymous|0 (param $a i32) (param $b i32) (result i32) + (local $alen i32) + (local $blen i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $a + local.get $b i32.eq if (result i32) i32.const 1 else - local.get $0 + local.get $a i32.const 0 i32.eq end if (result i32) i32.const 1 else - local.get $1 + local.get $b i32.const 0 i32.eq end @@ -13488,56 +13488,56 @@ i32.const 0 return end - local.get $0 + local.get $a call $~lib/string/String#get:length - local.set $2 - local.get $1 + local.set $alen + local.get $b call $~lib/string/String#get:length - local.set $3 - local.get $2 - local.get $3 + local.set $blen + local.get $alen + local.get $blen i32.or i32.eqz if i32.const 0 return end - local.get $2 + local.get $alen i32.eqz if i32.const -1 return end - local.get $3 + local.get $blen i32.eqz if i32.const 1 return end - local.get $0 + local.get $a i32.const 0 - local.get $1 + local.get $b i32.const 0 - local.get $2 - local.tee $4 - local.get $3 - local.tee $5 - local.get $4 - local.get $5 + local.get $alen + local.tee $var$4 + local.get $blen + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.lt_s select call $~lib/util/string/compareImpl - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if (result i32) - local.get $4 + local.get $var$4 else - local.get $2 - local.get $3 + local.get $alen + local.get $blen i32.sub end ) - (func $std/array/assertSorted<~lib/string/String|null>@varargs (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/string/String|null>@varargs (param $arr i32) (param $comparator i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -13567,33 +13567,33 @@ i32.const 8800 br $~lib/util/sort/COMPARATOR<~lib/string/String|null>|inlined.0 end - local.tee $1 + local.tee $comparator i32.store end - local.get $0 - local.get $1 + local.get $arr + local.get $comparator call $std/array/assertSorted<~lib/string/String|null> global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__eq (param $left i32) (param $right i32) (result i32) + (local $leftLength i32) + local.get $left + local.get $right i32.eq if i32.const 1 return end - local.get $0 + local.get $left i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $1 + local.get $right i32.const 0 i32.eq end @@ -13601,28 +13601,28 @@ i32.const 0 return end - local.get $0 + local.get $left call $~lib/string/String#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $leftLength + local.get $leftLength + local.get $right call $~lib/string/String#get:length i32.ne if i32.const 0 return end - local.get $0 + local.get $left i32.const 0 - local.get $1 + local.get $right i32.const 0 - local.get $2 + local.get $leftLength call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String.__ne (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__ne (param $left i32) (param $right i32) (result i32) + local.get $left + local.get $right call $~lib/string/String.__eq i32.eqz ) @@ -13650,34 +13650,34 @@ local.get $1 i32.store offset=12 ) - (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__concat (param $left i32) (param $right i32) (result i32) + local.get $left + local.get $right call $~lib/string/String#concat ) - (func $~lib/array/Array<~lib/string/String>#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array<~lib/string/String>#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store i32.const 1 drop - local.get $0 - local.get $2 + local.get $this + local.get $value i32.const 1 call $~lib/rt/itcms/__link ) - (func $~lib/array/Array<~lib/string/String>#__set (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array<~lib/string/String>#__set (param $this i32) (param $index i32) (param $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if - local.get $1 + local.get $index i32.const 0 i32.lt_s if @@ -13688,34 +13688,34 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $this + local.get $index i32.const 1 i32.add i32.const 2 i32.const 1 call $~lib/array/ensureCapacity - local.get $0 - local.get $1 + local.get $this + local.get $index i32.const 1 i32.add call $~lib/array/Array<~lib/string/String>#set:length_ end - local.get $0 - local.get $1 - local.get $2 + local.get $this + local.get $index + local.get $value call $~lib/array/Array<~lib/string/String>#__uset ) - (func $~lib/util/sort/insertionSort<~lib/string/String> (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $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) + (func $~lib/util/sort/insertionSort<~lib/string/String> (param $ptr i32) (param $left i32) (param $right i32) (param $presorted i32) (param $comparator i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -13728,115 +13728,115 @@ i32.const 1 i32.ge_s drop - local.get $2 - local.get $1 + local.get $right + local.get $left i32.sub i32.const 1 i32.add - local.set $5 - local.get $1 - local.get $5 + local.set $var$5 + local.get $left + local.get $var$5 i32.const 1 i32.and - local.get $3 - local.get $5 - local.get $3 + local.get $presorted + local.get $var$5 + local.get $presorted i32.sub i32.const 1 i32.and i32.sub - local.get $3 + local.get $presorted i32.const 0 i32.eq select i32.add - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $6 - local.get $2 + local.get $var$6 + local.get $right i32.le_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if global.get $~lib/memory/__stack_pointer - local.get $0 - local.get $6 + local.get $ptr + local.get $var$6 i32.const 2 i32.shl i32.add i32.load - local.tee $8 + local.tee $var$8 i32.store global.get $~lib/memory/__stack_pointer - local.get $0 - local.get $6 + local.get $ptr + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 - local.tee $9 + local.tee $var$9 i32.store offset=4 - local.get $9 - local.set $10 - local.get $8 - local.set $11 - local.get $8 - local.get $9 + local.get $var$9 + local.set $var$10 + local.get $var$8 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.le_s if - local.get $8 - local.set $10 - local.get $9 - local.set $11 + local.get $var$8 + local.set $var$10 + local.get $var$9 + local.set $var$11 end - local.get $6 + local.get $var$6 i32.const 1 i32.sub - local.set $12 + local.set $var$12 block $while-break|1 loop $while-continue|1 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if global.get $~lib/memory/__stack_pointer - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add i32.load - local.tee $8 + local.tee $var$8 i32.store - local.get $8 - local.get $11 + local.get $var$8 + local.get $var$11 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $8 + local.get $var$8 i32.store offset=8 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|1 end @@ -13844,51 +13844,51 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store offset=8 block $while-break|2 loop $while-continue|2 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if global.get $~lib/memory/__stack_pointer - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add i32.load - local.tee $8 + local.tee $var$8 i32.store - local.get $8 - local.get $10 + local.get $var$8 + local.get $var$10 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $8 + local.get $var$8 i32.store offset=4 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|2 end @@ -13896,17 +13896,17 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.const 2 i32.add - local.set $6 + local.set $var$6 br $for-loop|0 end end @@ -13915,14 +13915,14 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/util/sort/mergeRuns<~lib/string/String> (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (func $~lib/util/sort/mergeRuns<~lib/string/String> (param $ptr i32) (param $l i32) (param $m i32) (param $r i32) (param $buffer i32) (param $comparator i32) + (local $i i32) + (local $j i32) + (local $t i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -13931,34 +13931,34 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $2 + local.get $m i32.const 1 i32.sub - local.set $2 - local.get $3 - local.get $2 + local.set $m + local.get $r + local.get $m i32.add - local.set $8 - local.get $2 + local.set $t + local.get $m i32.const 1 i32.add - local.set $6 + local.set $i loop $for-loop|0 - local.get $6 - local.get $1 + local.get $i + local.get $l i32.gt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $6 + local.get $buffer + local.get $i i32.const 1 i32.sub i32.const 2 i32.shl - i32.add - local.get $0 - local.get $6 + i32.add + local.get $ptr + local.get $i i32.const 1 i32.sub i32.const 2 @@ -13966,108 +13966,108 @@ i32.add i32.load i32.store - local.get $6 + local.get $i i32.const 1 i32.sub - local.set $6 + local.set $i br $for-loop|0 end end - local.get $2 - local.set $7 + local.get $m + local.set $j loop $for-loop|1 - local.get $7 - local.get $3 + local.get $j + local.get $r i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $8 - local.get $7 + local.get $buffer + local.get $t + local.get $j i32.sub i32.const 2 i32.shl i32.add - local.get $0 - local.get $7 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load offset=4 i32.store - local.get $7 + local.get $j i32.const 1 i32.add - local.set $7 + local.set $j br $for-loop|1 end end - local.get $1 - local.set $9 + local.get $l + local.set $var$9 loop $for-loop|2 - local.get $9 - local.get $3 + local.get $var$9 + local.get $r i32.le_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if global.get $~lib/memory/__stack_pointer - local.get $4 - local.get $7 + local.get $buffer + local.get $j i32.const 2 i32.shl i32.add i32.load - local.tee $11 + local.tee $var$11 i32.store global.get $~lib/memory/__stack_pointer - local.get $4 - local.get $6 + local.get $buffer + local.get $i i32.const 2 i32.shl i32.add i32.load - local.tee $12 + local.tee $var$12 i32.store offset=4 - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i32.const 2 global.set $~argumentsLength - local.get $5 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 2 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store - local.get $7 + local.get $j i32.const 1 i32.sub - local.set $7 + local.set $j else - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 2 i32.shl i32.add - local.get $12 + local.get $var$12 i32.store - local.get $6 + local.get $i i32.const 1 i32.add - local.set $6 + local.set $i end - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|2 end end @@ -14076,25 +14076,25 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/util/sort/SORT<~lib/string/String> (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 $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) + (func $~lib/util/sort/SORT<~lib/string/String> (param $ptr i32) (param $len i32) (param $comparator i32) + (local $endB i32) + (local $var$4 i32) + (local $startB i32) + (local $lgPlus2 i32) + (local $lgPlus2Size i32) + (local $leftRunStartBuf i32) + (local $leftRunEndBuf i32) + (local $buffer i32) + (local $hi i32) + (local $endA i32) + (local $lenA i32) + (local $top i32) + (local $startA i32) + (local $lenB i32) + (local $k i32) + (local $var$18 i32) + (local $var$19 i32) + (local $var$20 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -14106,11 +14106,11 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store offset=8 - local.get $1 + local.get $len i32.const 48 i32.le_s if - local.get $1 + local.get $len i32.const 1 i32.le_s if @@ -14127,109 +14127,109 @@ block $break|0 block $case1|0 block $case0|0 - local.get $1 - local.set $3 - local.get $3 + local.get $len + local.set $endB + local.get $endB i32.const 3 i32.eq br_if $case0|0 - local.get $3 + local.get $endB i32.const 2 i32.eq br_if $case1|0 br $break|0 end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $ptr i32.load - local.tee $3 + local.tee $endB i32.store global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $ptr i32.load offset=4 - local.tee $4 + local.tee $var$4 i32.store offset=4 - local.get $3 - local.get $4 + local.get $endB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $5 - local.get $0 - local.get $4 - local.get $3 - local.get $5 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $endB + local.get $startB select i32.store global.get $~lib/memory/__stack_pointer - local.get $3 - local.get $4 - local.get $5 + local.get $endB + local.get $var$4 + local.get $startB select - local.tee $3 + local.tee $endB i32.store global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $ptr i32.load offset=8 - local.tee $4 + local.tee $var$4 i32.store offset=4 - local.get $3 - local.get $4 + local.get $endB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $5 - local.get $0 - local.get $4 - local.get $3 - local.get $5 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $endB + local.get $startB select i32.store offset=4 - local.get $0 - local.get $3 - local.get $4 - local.get $5 + local.get $ptr + local.get $endB + local.get $var$4 + local.get $startB select i32.store offset=8 end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $ptr i32.load - local.tee $5 + local.tee $startB i32.store offset=8 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $ptr i32.load offset=4 - local.tee $4 + local.tee $var$4 i32.store offset=4 - local.get $5 - local.get $4 + local.get $startB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $3 - local.get $0 - local.get $4 - local.get $5 - local.get $3 + local.set $endB + local.get $ptr + local.get $var$4 + local.get $startB + local.get $endB select i32.store - local.get $0 - local.get $5 - local.get $4 - local.get $3 + local.get $ptr + local.get $startB + local.get $var$4 + local.get $endB select i32.store offset=4 global.get $~lib/memory/__stack_pointer @@ -14238,13 +14238,13 @@ global.set $~lib/memory/__stack_pointer return end - local.get $0 + local.get $ptr i32.const 0 - local.get $1 + local.get $len i32.const 1 i32.sub i32.const 0 - local.get $2 + local.get $comparator call $~lib/util/sort/insertionSort<~lib/string/String> global.get $~lib/memory/__stack_pointer i32.const 12 @@ -14252,307 +14252,307 @@ global.set $~lib/memory/__stack_pointer return end - local.get $1 - local.set $5 + local.get $len + local.set $startB i32.const 31 - local.get $5 + local.get $startB i32.clz i32.sub i32.const 2 i32.add - local.set $6 - local.get $6 + local.set $lgPlus2 + local.get $lgPlus2 i32.const 2 i32.shl - local.set $7 - local.get $7 + local.set $lgPlus2Size + local.get $lgPlus2Size i32.const 1 i32.shl call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 - local.get $7 + local.set $leftRunStartBuf + local.get $leftRunStartBuf + local.get $lgPlus2Size i32.add - local.set $9 + local.set $leftRunEndBuf i32.const 0 - local.set $5 + local.set $startB loop $for-loop|1 - local.get $5 - local.get $6 + local.get $startB + local.get $lgPlus2 i32.lt_u - local.set $3 - local.get $3 + local.set $endB + local.get $endB if - local.get $8 - local.get $5 + local.get $leftRunStartBuf + local.get $startB i32.const 2 i32.shl i32.add i32.const -1 i32.store - local.get $5 + local.get $startB i32.const 1 i32.add - local.set $5 + local.set $startB br $for-loop|1 end end - local.get $1 + local.get $len i32.const 2 i32.shl call $~lib/rt/tlsf/__alloc - local.set $10 - local.get $1 + local.set $buffer + local.get $len i32.const 1 i32.sub - local.set $11 - local.get $0 + local.set $hi + local.get $ptr i32.const 0 - local.get $11 - local.get $2 + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight<~lib/string/String> - local.set $12 - local.get $12 + local.set $endA + local.get $endA i32.const 1 i32.add - local.set $13 - local.get $13 + local.set $lenA + local.get $lenA i32.const 32 i32.lt_s if - local.get $11 - local.tee $4 + local.get $hi + local.tee $var$4 i32.const 32 i32.const 1 i32.sub - local.tee $5 - local.get $4 - local.get $5 + local.tee $startB + local.get $var$4 + local.get $startB i32.lt_s select - local.set $12 - local.get $0 + local.set $endA + local.get $ptr i32.const 0 - local.get $12 - local.get $13 - local.get $2 + local.get $endA + local.get $lenA + local.get $comparator call $~lib/util/sort/insertionSort<~lib/string/String> end i32.const 0 - local.set $14 + local.set $top i32.const 0 - local.set $15 + local.set $startA loop $while-continue|2 - local.get $12 - local.get $11 + local.get $endA + local.get $hi i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $12 + local.get $endA i32.const 1 i32.add - local.set $5 - local.get $0 - local.get $5 - local.get $11 - local.get $2 + local.set $startB + local.get $ptr + local.get $startB + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight<~lib/string/String> - local.set $3 - local.get $3 - local.get $5 + local.set $endB + local.get $endB + local.get $startB i32.sub i32.const 1 i32.add - local.set $16 - local.get $16 + local.set $lenB + local.get $lenB i32.const 32 i32.lt_s if - local.get $11 - local.tee $17 - local.get $5 + local.get $hi + local.tee $k + local.get $startB i32.const 32 i32.add i32.const 1 i32.sub - local.tee $18 - local.get $17 - local.get $18 + local.tee $var$18 + local.get $k + local.get $var$18 i32.lt_s select - local.set $3 - local.get $0 - local.get $5 - local.get $3 - local.get $16 - local.get $2 + local.set $endB + local.get $ptr + local.get $startB + local.get $endB + local.get $lenB + local.get $comparator call $~lib/util/sort/insertionSort<~lib/string/String> end i32.const 0 - local.get $11 - local.get $15 - local.get $5 - local.get $3 + local.get $hi + local.get $startA + local.get $startB + local.get $endB call $~lib/util/sort/nodePower - local.set $17 - local.get $14 - local.set $18 + local.set $k + local.get $top + local.set $var$18 loop $for-loop|3 - local.get $18 - local.get $17 + local.get $var$18 + local.get $k i32.gt_u - local.set $19 - local.get $19 + local.set $var$19 + local.get $var$19 if - local.get $8 - local.get $18 + local.get $leftRunStartBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.load - local.set $20 - local.get $20 + local.set $var$20 + local.get $var$20 i32.const -1 i32.ne if - local.get $0 - local.get $20 - local.get $9 - local.get $18 + local.get $ptr + local.get $var$20 + local.get $leftRunEndBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $12 - local.get $10 - local.get $2 + local.get $endA + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns<~lib/string/String> - local.get $20 - local.set $15 - local.get $8 - local.get $18 + local.get $var$20 + local.set $startA + local.get $leftRunStartBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.const -1 i32.store end - local.get $18 + local.get $var$18 i32.const 1 i32.sub - local.set $18 + local.set $var$18 br $for-loop|3 end end - local.get $8 - local.get $17 + local.get $leftRunStartBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $15 + local.get $startA i32.store - local.get $9 - local.get $17 + local.get $leftRunEndBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $12 + local.get $endA i32.store - local.get $5 - local.set $15 - local.get $3 - local.set $12 - local.get $17 - local.set $14 + local.get $startB + local.set $startA + local.get $endB + local.set $endA + local.get $k + local.set $top br $while-continue|2 end end - local.get $14 - local.set $4 + local.get $top + local.set $var$4 loop $for-loop|4 - local.get $4 + local.get $var$4 i32.const 0 i32.ne - local.set $18 - local.get $18 + local.set $var$18 + local.get $var$18 if - local.get $8 - local.get $4 + local.get $leftRunStartBuf + local.get $var$4 i32.const 2 i32.shl i32.add i32.load - local.set $19 - local.get $19 + local.set $var$19 + local.get $var$19 i32.const -1 i32.ne if - local.get $0 - local.get $19 - local.get $9 - local.get $4 + local.get $ptr + local.get $var$19 + local.get $leftRunEndBuf + local.get $var$4 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $11 - local.get $10 - local.get $2 + local.get $hi + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns<~lib/string/String> end - local.get $4 + local.get $var$4 i32.const 1 i32.sub - local.set $4 + local.set $var$4 br $for-loop|4 end end - local.get $10 + local.get $buffer call $~lib/rt/tlsf/__free - local.get $8 + local.get $leftRunStartBuf call $~lib/rt/tlsf/__free global.get $~lib/memory/__stack_pointer i32.const 12 i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/array/Array<~lib/string/String>#sort (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/array/Array<~lib/string/String>#sort (param $this i32) (param $comparator i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this i32.load offset=12 - local.get $1 + local.get $comparator call $~lib/util/sort/SORT<~lib/string/String> - local.get $0 + local.get $this ) - (func $~lib/array/Array<~lib/string/String>#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array<~lib/string/String>#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|0 (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - local.get $1 + (func $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|0 (param $a i32) (param $b i32) (result i32) + (local $alen i32) + (local $blen i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $a + local.get $b i32.eq if (result i32) i32.const 1 else - local.get $0 + local.get $a i32.const 0 i32.eq end if (result i32) i32.const 1 else - local.get $1 + local.get $b i32.const 0 i32.eq end @@ -14560,56 +14560,56 @@ i32.const 0 return end - local.get $0 + local.get $a call $~lib/string/String#get:length - local.set $2 - local.get $1 + local.set $alen + local.get $b call $~lib/string/String#get:length - local.set $3 - local.get $2 - local.get $3 + local.set $blen + local.get $alen + local.get $blen i32.or i32.eqz if i32.const 0 return end - local.get $2 + local.get $alen i32.eqz if i32.const -1 return end - local.get $3 + local.get $blen i32.eqz if i32.const 1 return end - local.get $0 + local.get $a i32.const 0 - local.get $1 + local.get $b i32.const 0 - local.get $2 - local.tee $4 - local.get $3 - local.tee $5 - local.get $4 - local.get $5 + local.get $alen + local.tee $var$4 + local.get $blen + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.lt_s select call $~lib/util/string/compareImpl - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if (result i32) - local.get $4 + local.get $var$4 else - local.get $2 - local.get $3 + local.get $alen + local.get $blen i32.sub end ) - (func $std/array/assertSorted<~lib/string/String>@varargs (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/string/String>@varargs (param $arr i32) (param $comparator i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -14639,56 +14639,56 @@ i32.const 8832 br $~lib/util/sort/COMPARATOR<~lib/string/String>|inlined.0 end - local.tee $1 + local.tee $comparator i32.store end - local.get $0 - local.get $1 + local.get $arr + local.get $comparator call $std/array/assertSorted<~lib/string/String> global.get $~lib/memory/__stack_pointer i32.const 4 i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/array/Array#join (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/array/Array#join (param $this i32) (param $separator i32) (result i32) + (local $ptr i32) + (local $len i32) + local.get $this i32.load offset=4 - local.set $2 - local.get $0 + local.set $ptr + local.get $this i32.load offset=12 - local.set $3 + local.set $len i32.const 1 drop - local.get $2 - local.get $3 - local.get $1 + local.get $ptr + local.get $len + local.get $separator call $~lib/util/string/joinBooleanArray return ) - (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) - local.get $0 + (func $~lib/util/number/decimalCount32 (param $value i32) (result i32) + local.get $value i32.const 100000 i32.lt_u if - local.get $0 + local.get $value i32.const 100 i32.lt_u if i32.const 1 - local.get $0 + local.get $value i32.const 10 i32.ge_u i32.add return else i32.const 3 - local.get $0 + local.get $value i32.const 10000 i32.ge_u i32.add - local.get $0 + local.get $value i32.const 1000 i32.ge_u i32.add @@ -14696,23 +14696,23 @@ end unreachable else - local.get $0 + local.get $value i32.const 10000000 i32.lt_u if i32.const 6 - local.get $0 + local.get $value i32.const 1000000 i32.ge_u i32.add return else i32.const 8 - local.get $0 + local.get $value i32.const 1000000000 i32.ge_u i32.add - local.get $0 + local.get $value i32.const 100000000 i32.ge_u i32.add @@ -14722,66 +14722,66 @@ end unreachable ) - (func $~lib/util/number/utoa32_dec_lut (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 i64) - (local $9 i64) - (local $10 i32) - (local $11 i32) + (func $~lib/util/number/utoa32_dec_lut (param $buffer i32) (param $num i32) (param $offset i32) + (local $var$3 i32) + (local $t i32) + (local $r i32) + (local $d1 i32) + (local $d2 i32) + (local $digits1 i64) + (local $digits2 i64) + (local $var$10 i32) + (local $var$11 i32) loop $while-continue|0 - local.get $1 + local.get $num i32.const 10000 i32.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $1 + local.get $num i32.const 10000 i32.div_u - local.set $4 - local.get $1 + local.set $t + local.get $num i32.const 10000 i32.rem_u - local.set $5 - local.get $4 - local.set $1 - local.get $5 + local.set $r + local.get $t + local.set $num + local.get $r i32.const 100 i32.div_u - local.set $6 - local.get $5 + local.set $d1 + local.get $r i32.const 100 i32.rem_u - local.set $7 + local.set $d2 i32.const 9276 - local.get $6 + local.get $d1 i32.const 2 i32.shl i32.add i64.load32_u - local.set $8 + local.set $digits1 i32.const 9276 - local.get $7 + local.get $d2 i32.const 2 i32.shl i32.add i64.load32_u - local.set $9 - local.get $2 + local.set $digits2 + local.get $offset i32.const 4 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $8 - local.get $9 + local.get $digits1 + local.get $digits2 i64.const 32 i64.shl i64.or @@ -14789,99 +14789,99 @@ br $while-continue|0 end end - local.get $1 + local.get $num i32.const 100 i32.ge_u if - local.get $1 + local.get $num i32.const 100 i32.div_u - local.set $3 - local.get $1 + local.set $var$3 + local.get $num i32.const 100 i32.rem_u - local.set $10 - local.get $3 - local.set $1 - local.get $2 + local.set $var$10 + local.get $var$3 + local.set $num + local.get $offset i32.const 2 i32.sub - local.set $2 + local.set $offset i32.const 9276 - local.get $10 + local.get $var$10 i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store end - local.get $1 + local.get $num i32.const 10 i32.ge_u if - local.get $2 + local.get $offset i32.const 2 i32.sub - local.set $2 + local.set $offset i32.const 9276 - local.get $1 + local.get $num i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store else - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 + local.set $offset i32.const 48 - local.get $1 + local.get $num i32.add - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store16 end ) - (func $~lib/util/number/utoa_hex_lut (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i32) + (func $~lib/util/number/utoa_hex_lut (param $buffer i32) (param $num i64) (param $offset i32) + (local $var$3 i32) loop $while-continue|0 - local.get $2 + local.get $offset i32.const 2 i32.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $2 + local.get $offset i32.const 2 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 9696 - local.get $1 + local.get $num i32.wrap_i64 i32.const 255 i32.and @@ -14890,20 +14890,20 @@ i32.add i32.load i32.store - local.get $1 + local.get $num i64.const 8 i64.shr_u - local.set $1 + local.set $num br $while-continue|0 end end - local.get $2 + local.get $offset i32.const 1 i32.and if - local.get $0 + local.get $buffer i32.const 9696 - local.get $1 + local.get $num i32.wrap_i64 i32.const 6 i32.shl @@ -14912,25 +14912,25 @@ i32.store16 end ) - (func $~lib/util/number/ulog_base (param $0 i64) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) - (local $4 i64) - (local $5 i32) - local.get $1 - local.set $2 - local.get $2 + (func $~lib/util/number/ulog_base (param $num i64) (param $base i32) (result i32) + (local $var$2 i32) + (local $b64 i64) + (local $b i64) + (local $e i32) + local.get $base + local.set $var$2 + local.get $var$2 i32.popcnt i32.const 1 i32.eq if i32.const 63 - local.get $0 + local.get $num i64.clz i32.wrap_i64 i32.sub i32.const 31 - local.get $1 + local.get $base i32.clz i32.sub i32.div_u @@ -14938,95 +14938,95 @@ i32.add return end - local.get $1 + local.get $base i64.extend_i32_s - local.set $3 - local.get $3 - local.set $4 + local.set $b64 + local.get $b64 + local.set $b i32.const 1 - local.set $5 + local.set $e loop $while-continue|0 - local.get $0 - local.get $4 + local.get $num + local.get $b i64.ge_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 - local.get $4 + local.get $num + local.get $b i64.div_u - local.set $0 - local.get $4 - local.get $4 + local.set $num + local.get $b + local.get $b i64.mul - local.set $4 - local.get $5 + local.set $b + local.get $e i32.const 1 i32.shl - local.set $5 + local.set $e br $while-continue|0 end end loop $while-continue|1 - local.get $0 + local.get $num i64.const 1 i64.ge_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 - local.get $3 + local.get $num + local.get $b64 i64.div_u - local.set $0 - local.get $5 + local.set $num + local.get $e i32.const 1 i32.add - local.set $5 + local.set $e br $while-continue|1 end end - local.get $5 + local.get $e i32.const 1 i32.sub ) - (func $~lib/util/number/utoa64_any_core (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i32) - (local $4 i64) - (local $5 i64) - (local $6 i64) - local.get $3 + (func $~lib/util/number/utoa64_any_core (param $buffer i32) (param $num i64) (param $offset i32) (param $radix i32) + (local $base i64) + (local $var$5 i64) + (local $q i64) + local.get $radix i64.extend_i32_s - local.set $4 - local.get $3 - local.get $3 + local.set $base + local.get $radix + local.get $radix i32.const 1 i32.sub i32.and i32.const 0 i32.eq if - local.get $3 + local.get $radix i32.ctz i32.const 7 i32.and i64.extend_i32_s - local.set $5 - local.get $4 + local.set $var$5 + local.get $base i64.const 1 i64.sub - local.set $6 + local.set $q loop $do-loop|0 - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 10752 - local.get $1 - local.get $6 + local.get $num + local.get $q i64.and i32.wrap_i64 i32.const 1 @@ -15034,34 +15034,34 @@ i32.add i32.load16_u i32.store16 - local.get $1 - local.get $5 + local.get $num + local.get $var$5 i64.shr_u - local.set $1 - local.get $1 + local.set $num + local.get $num i64.const 0 i64.ne br_if $do-loop|0 end else loop $do-loop|1 - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 - local.get $1 - local.get $4 + local.set $offset + local.get $num + local.get $base i64.div_u - local.set $6 - local.get $0 - local.get $2 + local.set $q + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 10752 - local.get $1 - local.get $6 - local.get $4 + local.get $num + local.get $q + local.get $base i64.mul i64.sub i32.wrap_i64 @@ -15070,32 +15070,32 @@ i32.add i32.load16_u i32.store16 - local.get $6 - local.set $1 - local.get $1 + local.get $q + local.set $num + local.get $num i64.const 0 i64.ne br_if $do-loop|1 end end ) - (func $~lib/util/number/itoa_buffered (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) + (func $~lib/util/number/itoa_buffered (param $buffer i32) (param $value i32) (result i32) + (local $sign i32) + (local $dest i32) + (local $decimals i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) i32.const 0 - local.set $2 + local.set $sign i32.const 1 drop - local.get $1 + local.get $value i32.const 0 i32.lt_s - local.set $2 - local.get $2 + local.set $sign + local.get $sign if i32.const 4 i32.const 1 @@ -15105,20 +15105,20 @@ i32.const 2 i32.eq drop - local.get $0 + local.get $buffer i32.const 45 i32.store16 i32.const 0 - local.get $1 + local.get $value i32.sub - local.set $1 + local.set $value end - local.get $0 - local.get $2 + local.get $buffer + local.get $sign i32.const 1 i32.shl i32.add - local.set $3 + local.set $dest i32.const 0 i32.const 1 i32.le_s @@ -15129,98 +15129,98 @@ i32.const 4 i32.le_u drop - local.get $1 + local.get $value i32.const 10 i32.lt_u if - local.get $3 - local.get $1 + local.get $dest + local.get $value i32.const 48 i32.or i32.store16 i32.const 1 - local.get $2 + local.get $sign i32.add return end i32.const 0 - local.set $4 + local.set $decimals i32.const 4 i32.const 4 i32.le_u drop - local.get $1 - local.set $5 - local.get $5 + local.get $value + local.set $var$5 + local.get $var$5 call $~lib/util/number/decimalCount32 - local.set $4 - local.get $3 - local.set $8 - local.get $5 - local.set $7 - local.get $4 - local.set $6 + local.set $decimals + local.get $dest + local.set $var$8 + local.get $var$5 + local.set $var$7 + local.get $decimals + local.set $var$6 i32.const 0 i32.const 1 i32.ge_s drop - local.get $8 - local.get $7 - local.get $6 + local.get $var$8 + local.get $var$7 + local.get $var$6 call $~lib/util/number/utoa32_dec_lut - local.get $2 - local.get $4 + local.get $sign + local.get $decimals i32.add ) - (func $~lib/array/Array#join (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/array/Array#join (param $this i32) (param $separator i32) (result i32) + (local $ptr i32) + (local $len i32) + local.get $this i32.load offset=4 - local.set $2 - local.get $0 + local.set $ptr + local.get $this i32.load offset=12 - local.set $3 + local.set $len i32.const 0 drop i32.const 1 drop - local.get $2 - local.get $3 - local.get $1 + local.get $ptr + local.get $len + local.get $separator call $~lib/util/string/joinIntegerArray return ) - (func $~lib/util/number/itoa_buffered (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) + (func $~lib/util/number/itoa_buffered (param $buffer i32) (param $value i32) (result i32) + (local $sign i32) + (local $dest i32) + (local $decimals i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) i32.const 0 - local.set $2 + local.set $sign i32.const 0 drop - local.get $0 - local.get $2 + local.get $buffer + local.get $sign i32.const 1 i32.shl i32.add - local.set $3 + local.set $dest i32.const 0 i32.const 1 i32.le_s drop i32.const 0 drop - local.get $1 + local.get $value i32.const 10 i32.lt_u if - local.get $0 - local.get $1 + local.get $buffer + local.get $value i32.const 48 i32.or i32.store16 @@ -15228,113 +15228,113 @@ return end i32.const 0 - local.set $4 + local.set $decimals i32.const 4 i32.const 4 i32.le_u drop - local.get $1 - local.set $5 - local.get $5 + local.get $value + local.set $var$5 + local.get $var$5 call $~lib/util/number/decimalCount32 - local.set $4 - local.get $3 - local.set $8 - local.get $5 - local.set $7 - local.get $4 - local.set $6 + local.set $decimals + local.get $dest + local.set $var$8 + local.get $var$5 + local.set $var$7 + local.get $decimals + local.set $var$6 i32.const 0 i32.const 1 i32.ge_s drop - local.get $8 - local.get $7 - local.get $6 + local.get $var$8 + local.get $var$7 + local.get $var$6 call $~lib/util/number/utoa32_dec_lut - local.get $2 - local.get $4 + local.get $sign + local.get $decimals i32.add ) - (func $~lib/array/Array#join (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/array/Array#join (param $this i32) (param $separator i32) (result i32) + (local $ptr i32) + (local $len i32) + local.get $this i32.load offset=4 - local.set $2 - local.get $0 + local.set $ptr + local.get $this i32.load offset=12 - local.set $3 + local.set $len i32.const 0 drop i32.const 1 drop - local.get $2 - local.get $3 - local.get $1 + local.get $ptr + local.get $len + local.get $separator call $~lib/util/string/joinIntegerArray return ) - (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i64) - (local $11 i32) - (local $12 i64) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i32) - (local $24 i32) - (local $25 i32) - (local $26 i32) - (local $27 i64) - i32.const 0 - local.get $4 + (func $~lib/util/number/genDigits (param $buffer i32) (param $w_frc i64) (param $w_exp i32) (param $mp_frc i64) (param $mp_exp i32) (param $delta i64) (param $sign i32) (result i32) + (local $one_exp i32) + (local $one_frc i64) + (local $mask i64) + (local $wp_w_frc i64) + (local $p1 i32) + (local $p2 i64) + (local $kappa i32) + (local $len i32) + (local $var$15 i32) + (local $d i32) + (local $var$17 i32) + (local $tmp i64) + (local $var$19 i64) + (local $var$20 i64) + (local $var$21 i64) + (local $d_0 i64) + (local $var$23 i32) + (local $var$24 i32) + (local $var$25 i32) + (local $var$26 i32) + (local $var$27 i64) + i32.const 0 + local.get $mp_exp i32.sub - local.set $7 + local.set $one_exp i64.const 1 - local.get $7 + local.get $one_exp i64.extend_i32_s i64.shl - local.set $8 - local.get $8 + local.set $one_frc + local.get $one_frc i64.const 1 i64.sub - local.set $9 - local.get $3 - local.get $1 + local.set $mask + local.get $mp_frc + local.get $w_frc i64.sub - local.set $10 - local.get $3 - local.get $7 + local.set $wp_w_frc + local.get $mp_frc + local.get $one_exp i64.extend_i32_s i64.shr_u i32.wrap_i64 - local.set $11 - local.get $3 - local.get $9 + local.set $p1 + local.get $mp_frc + local.get $mask i64.and - local.set $12 - local.get $11 + local.set $p2 + local.get $p1 call $~lib/util/number/decimalCount32 - local.set $13 - local.get $6 - local.set $14 + local.set $kappa + local.get $sign + local.set $len loop $while-continue|0 - local.get $13 + local.get $kappa i32.const 0 i32.gt_s - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 if block $break|1 block $case10|1 @@ -15348,275 +15348,275 @@ block $case2|1 block $case1|1 block $case0|1 - local.get $13 - local.set $17 - local.get $17 + local.get $kappa + local.set $var$17 + local.get $var$17 i32.const 10 i32.eq br_if $case0|1 - local.get $17 + local.get $var$17 i32.const 9 i32.eq br_if $case1|1 - local.get $17 + local.get $var$17 i32.const 8 i32.eq br_if $case2|1 - local.get $17 + local.get $var$17 i32.const 7 i32.eq br_if $case3|1 - local.get $17 + local.get $var$17 i32.const 6 i32.eq br_if $case4|1 - local.get $17 + local.get $var$17 i32.const 5 i32.eq br_if $case5|1 - local.get $17 + local.get $var$17 i32.const 4 i32.eq br_if $case6|1 - local.get $17 + local.get $var$17 i32.const 3 i32.eq br_if $case7|1 - local.get $17 + local.get $var$17 i32.const 2 i32.eq br_if $case8|1 - local.get $17 + local.get $var$17 i32.const 1 i32.eq br_if $case9|1 br $case10|1 end - local.get $11 + local.get $p1 i32.const 1000000000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 1000000000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 100000000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 100000000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 10000000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 10000000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 1000000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 1000000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 100000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 100000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 10000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 10000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 1000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 1000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 100 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 100 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 10 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 10 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 - local.set $16 + local.get $p1 + local.set $d i32.const 0 - local.set $11 + local.set $p1 br $break|1 end i32.const 0 - local.set $16 + local.set $d br $break|1 end - local.get $16 - local.get $14 + local.get $d + local.get $len i32.or if - local.get $0 - local.get $14 - local.tee $17 + local.get $buffer + local.get $len + local.tee $var$17 i32.const 1 i32.add - local.set $14 - local.get $17 + local.set $len + local.get $var$17 i32.const 1 i32.shl i32.add i32.const 48 - local.get $16 + local.get $d i32.const 65535 i32.and i32.add i32.store16 end - local.get $13 + local.get $kappa i32.const 1 i32.sub - local.set $13 - local.get $11 + local.set $kappa + local.get $p1 i64.extend_i32_u - local.get $7 + local.get $one_exp i64.extend_i32_s i64.shl - local.get $12 + local.get $p2 i64.add - local.set $18 - local.get $18 - local.get $5 + local.set $tmp + local.get $tmp + local.get $delta i64.le_u if global.get $~lib/util/number/_K - local.get $13 + local.get $kappa i32.add global.set $~lib/util/number/_K - local.get $0 - local.set $23 - local.get $14 - local.set $17 - local.get $5 - local.set $22 - local.get $18 - local.set $21 + local.get $buffer + local.set $var$23 + local.get $len + local.set $var$17 + local.get $delta + local.set $d_0 + local.get $tmp + local.set $var$21 i32.const 12272 - local.get $13 + local.get $kappa i32.const 2 i32.shl i32.add i64.load32_u - local.get $7 + local.get $one_exp i64.extend_i32_s i64.shl - local.set $20 - local.get $10 - local.set $19 - local.get $23 - local.get $17 + local.set $var$20 + local.get $wp_w_frc + local.set $var$19 + local.get $var$23 + local.get $var$17 i32.const 1 i32.sub i32.const 1 i32.shl i32.add - local.set $24 - local.get $24 + local.set $var$24 + local.get $var$24 i32.load16_u - local.set $25 + local.set $var$25 loop $while-continue|3 - local.get $21 - local.get $19 + local.get $var$21 + local.get $var$19 i64.lt_u if (result i32) - local.get $22 - local.get $21 + local.get $d_0 + local.get $var$21 i64.sub - local.get $20 + local.get $var$20 i64.ge_u else i32.const 0 end if (result i32) - local.get $21 - local.get $20 + local.get $var$21 + local.get $var$20 i64.add - local.get $19 + local.get $var$19 i64.lt_u if (result i32) i32.const 1 else - local.get $19 - local.get $21 + local.get $var$19 + local.get $var$21 i64.sub - local.get $21 - local.get $20 + local.get $var$21 + local.get $var$20 i64.add - local.get $19 + local.get $var$19 i64.sub i64.gt_u end else i32.const 0 end - local.set $26 - local.get $26 + local.set $var$26 + local.get $var$26 if - local.get $25 + local.get $var$25 i32.const 1 i32.sub - local.set $25 - local.get $21 - local.get $20 + local.set $var$25 + local.get $var$21 + local.get $var$20 i64.add - local.set $21 + local.set $var$21 br $while-continue|3 end end - local.get $24 - local.get $25 + local.get $var$24 + local.get $var$25 i32.store16 - local.get $14 + local.get $len return end br $while-continue|0 @@ -15624,150 +15624,150 @@ end loop $while-continue|4 i32.const 1 - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 if - local.get $12 + local.get $p2 i64.const 10 i64.mul - local.set $12 - local.get $5 + local.set $p2 + local.get $delta i64.const 10 i64.mul - local.set $5 - local.get $12 - local.get $7 + local.set $delta + local.get $p2 + local.get $one_exp i64.extend_i32_s i64.shr_u - local.set $22 - local.get $22 - local.get $14 + local.set $d_0 + local.get $d_0 + local.get $len i64.extend_i32_s i64.or i64.const 0 i64.ne if - local.get $0 - local.get $14 - local.tee $25 + local.get $buffer + local.get $len + local.tee $var$25 i32.const 1 i32.add - local.set $14 - local.get $25 + local.set $len + local.get $var$25 i32.const 1 i32.shl i32.add i32.const 48 - local.get $22 + local.get $d_0 i32.wrap_i64 i32.const 65535 i32.and i32.add i32.store16 end - local.get $12 - local.get $9 + local.get $p2 + local.get $mask i64.and - local.set $12 - local.get $13 + local.set $p2 + local.get $kappa i32.const 1 i32.sub - local.set $13 - local.get $12 - local.get $5 + local.set $kappa + local.get $p2 + local.get $delta i64.lt_u if global.get $~lib/util/number/_K - local.get $13 + local.get $kappa i32.add global.set $~lib/util/number/_K - local.get $10 + local.get $wp_w_frc i32.const 12272 i32.const 0 - local.get $13 + local.get $kappa i32.sub i32.const 2 i32.shl i32.add i64.load32_u i64.mul - local.set $10 - local.get $0 - local.set $17 - local.get $14 - local.set $26 - local.get $5 - local.set $27 - local.get $12 - local.set $21 - local.get $8 - local.set $20 - local.get $10 - local.set $19 - local.get $17 - local.get $26 + local.set $wp_w_frc + local.get $buffer + local.set $var$17 + local.get $len + local.set $var$26 + local.get $delta + local.set $var$27 + local.get $p2 + local.set $var$21 + local.get $one_frc + local.set $var$20 + local.get $wp_w_frc + local.set $var$19 + local.get $var$17 + local.get $var$26 i32.const 1 i32.sub i32.const 1 i32.shl i32.add - local.set $25 - local.get $25 + local.set $var$25 + local.get $var$25 i32.load16_u - local.set $24 + local.set $var$24 loop $while-continue|6 - local.get $21 - local.get $19 + local.get $var$21 + local.get $var$19 i64.lt_u if (result i32) - local.get $27 - local.get $21 + local.get $var$27 + local.get $var$21 i64.sub - local.get $20 + local.get $var$20 i64.ge_u else i32.const 0 end if (result i32) - local.get $21 - local.get $20 + local.get $var$21 + local.get $var$20 i64.add - local.get $19 + local.get $var$19 i64.lt_u if (result i32) i32.const 1 else - local.get $19 - local.get $21 + local.get $var$19 + local.get $var$21 i64.sub - local.get $21 - local.get $20 + local.get $var$21 + local.get $var$20 i64.add - local.get $19 + local.get $var$19 i64.sub i64.gt_u end else i32.const 0 end - local.set $23 - local.get $23 + local.set $var$23 + local.get $var$23 if - local.get $24 + local.get $var$24 i32.const 1 i32.sub - local.set $24 - local.get $21 - local.get $20 + local.set $var$24 + local.get $var$21 + local.get $var$20 i64.add - local.set $21 + local.set $var$21 br $while-continue|6 end end - local.get $25 - local.get $24 + local.get $var$25 + local.get $var$24 i32.store16 - local.get $14 + local.get $len return end br $while-continue|4 @@ -15775,21 +15775,21 @@ end unreachable ) - (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $2 - i32.eqz - if - local.get $0 - local.get $1 + (func $~lib/util/number/prettify (param $buffer i32) (param $length i32) (param $k i32) (result i32) + (local $kk i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $k + i32.eqz + if + local.get $buffer + local.get $length i32.const 1 i32.shl i32.add @@ -15799,51 +15799,51 @@ i32.shl i32.or i32.store - local.get $1 + local.get $length i32.const 2 i32.add return end - local.get $1 - local.get $2 + local.get $length + local.get $k i32.add - local.set $3 - local.get $1 - local.get $3 + local.set $kk + local.get $length + local.get $kk i32.le_s if (result i32) - local.get $3 + local.get $kk i32.const 21 i32.le_s else i32.const 0 end if - local.get $1 - local.set $4 + local.get $length + local.set $var$4 loop $for-loop|0 - local.get $4 - local.get $3 + local.get $var$4 + local.get $kk i32.lt_s - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $0 - local.get $4 + local.get $buffer + local.get $var$4 i32.const 1 i32.shl i32.add i32.const 48 i32.store16 - local.get $4 + local.get $var$4 i32.const 1 i32.add - local.set $4 + local.set $var$4 br $for-loop|0 end end - local.get $0 - local.get $3 + local.get $buffer + local.get $kk i32.const 1 i32.shl i32.add @@ -15853,55 +15853,55 @@ i32.shl i32.or i32.store - local.get $3 + local.get $kk i32.const 2 i32.add return else - local.get $3 + local.get $kk i32.const 0 i32.gt_s if (result i32) - local.get $3 + local.get $kk i32.const 21 i32.le_s else i32.const 0 end if - local.get $0 - local.get $3 + local.get $buffer + local.get $kk i32.const 1 i32.shl i32.add - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 i32.const 2 i32.add - local.get $4 + local.get $var$4 i32.const 0 - local.get $2 + local.get $k i32.sub i32.const 1 i32.shl memory.copy - local.get $0 - local.get $3 + local.get $buffer + local.get $kk i32.const 1 i32.shl i32.add i32.const 46 i32.store16 - local.get $1 + local.get $length i32.const 1 i32.add return else i32.const -6 - local.get $3 + local.get $kk i32.lt_s if (result i32) - local.get $3 + local.get $kk i32.const 0 i32.le_s else @@ -15909,20 +15909,20 @@ end if i32.const 2 - local.get $3 + local.get $kk i32.sub - local.set $4 - local.get $0 - local.get $4 + local.set $var$4 + local.get $buffer + local.get $var$4 i32.const 1 i32.shl i32.add - local.get $0 - local.get $1 + local.get $buffer + local.get $length i32.const 1 i32.shl memory.copy - local.get $0 + local.get $buffer i32.const 48 i32.const 46 i32.const 16 @@ -15930,164 +15930,164 @@ i32.or i32.store i32.const 2 - local.set $5 + local.set $var$5 loop $for-loop|1 - local.get $5 - local.get $4 + local.get $var$5 + local.get $var$4 i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $5 + local.get $buffer + local.get $var$5 i32.const 1 i32.shl i32.add i32.const 48 i32.store16 - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|1 end end - local.get $1 - local.get $4 + local.get $length + local.get $var$4 i32.add return else - local.get $1 + local.get $length i32.const 1 i32.eq if - local.get $0 + local.get $buffer i32.const 101 i32.store16 offset=2 - local.get $0 + local.get $buffer i32.const 4 i32.add - local.set $5 - local.get $3 + local.set $var$5 + local.get $kk i32.const 1 i32.sub - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 i32.const 0 i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if i32.const 0 - local.get $6 + local.get $var$6 i32.sub - local.set $6 + local.set $var$6 end - local.get $6 + local.get $var$6 call $~lib/util/number/decimalCount32 i32.const 1 i32.add - local.set $7 - local.get $5 - local.set $10 - local.get $6 - local.set $9 - local.get $7 - local.set $8 + local.set $var$7 + local.get $var$5 + local.set $var$10 + local.get $var$6 + local.set $var$9 + local.get $var$7 + local.set $var$8 i32.const 0 i32.const 1 i32.ge_s drop - local.get $10 - local.get $9 - local.get $8 + local.get $var$10 + local.get $var$9 + local.get $var$8 call $~lib/util/number/utoa32_dec_lut - local.get $5 + local.get $var$5 i32.const 45 i32.const 43 - local.get $4 + local.get $var$4 select i32.store16 - local.get $7 - local.set $1 - local.get $1 + local.get $var$7 + local.set $length + local.get $length i32.const 2 i32.add return else - local.get $1 + local.get $length i32.const 1 i32.shl - local.set $7 - local.get $0 + local.set $var$7 + local.get $buffer i32.const 4 i32.add - local.get $0 + local.get $buffer i32.const 2 i32.add - local.get $7 + local.get $var$7 i32.const 2 i32.sub memory.copy - local.get $0 + local.get $buffer i32.const 46 i32.store16 offset=2 - local.get $0 - local.get $7 + local.get $buffer + local.get $var$7 i32.add i32.const 101 i32.store16 offset=2 - local.get $1 - local.get $0 - local.get $7 + local.get $length + local.get $buffer + local.get $var$7 i32.add i32.const 4 i32.add - local.set $9 - local.get $3 + local.set $var$9 + local.get $kk i32.const 1 i32.sub - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 i32.const 0 i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if i32.const 0 - local.get $8 + local.get $var$8 i32.sub - local.set $8 + local.set $var$8 end - local.get $8 + local.get $var$8 call $~lib/util/number/decimalCount32 i32.const 1 i32.add - local.set $5 - local.get $9 - local.set $11 - local.get $8 - local.set $6 - local.get $5 - local.set $10 + local.set $var$5 + local.get $var$9 + local.set $var$11 + local.get $var$8 + local.set $var$6 + local.get $var$5 + local.set $var$10 i32.const 0 i32.const 1 i32.ge_s drop - local.get $11 - local.get $6 - local.get $10 + local.get $var$11 + local.get $var$6 + local.get $var$10 call $~lib/util/number/utoa32_dec_lut - local.get $9 + local.get $var$9 i32.const 45 i32.const 43 - local.get $4 + local.get $var$4 select i32.store16 - local.get $5 + local.get $var$5 i32.add - local.set $1 - local.get $1 + local.set $length + local.get $length i32.const 2 i32.add return @@ -16100,534 +16100,534 @@ end unreachable ) - (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f64) - (local $6 i64) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i32) - (local $11 i64) - (local $12 i64) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 f64) - (local $17 i64) - (local $18 i64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i64) - (local $24 i64) - (local $25 i64) - (local $26 i32) - (local $27 i64) - (local $28 i32) - local.get $1 + (func $~lib/util/number/dtoa_core (param $buffer i32) (param $value f64) (result i32) + (local $sign i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 f64) + (local $var$6 i64) + (local $var$7 i32) + (local $var$8 i64) + (local $var$9 i64) + (local $var$10 i32) + (local $var$11 i64) + (local $var$12 i64) + (local $var$13 i32) + (local $var$14 i32) + (local $var$15 i32) + (local $var$16 f64) + (local $var$17 i64) + (local $var$18 i64) + (local $var$19 i64) + (local $var$20 i64) + (local $var$21 i64) + (local $var$22 i64) + (local $var$23 i64) + (local $var$24 i64) + (local $var$25 i64) + (local $var$26 i32) + (local $var$27 i64) + (local $len i32) + local.get $value f64.const 0 f64.lt - local.set $2 - local.get $2 + local.set $sign + local.get $sign if - local.get $1 + local.get $value f64.neg - local.set $1 - local.get $0 + local.set $value + local.get $buffer i32.const 45 i32.store16 end - local.get $1 - local.set $5 - local.get $0 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.get $value + local.set $var$5 + local.get $buffer + local.set $var$4 + local.get $sign + local.set $var$3 + local.get $var$5 i64.reinterpret_f64 - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 i64.const 9218868437227405312 i64.and i64.const 52 i64.shr_u i32.wrap_i64 - local.set $7 - local.get $6 + local.set $var$7 + local.get $var$6 i64.const 4503599627370495 i64.and - local.set $8 - local.get $7 + local.set $var$8 + local.get $var$7 i32.const 0 i32.ne i64.extend_i32_u i64.const 52 i64.shl - local.get $8 + local.get $var$8 i64.add - local.set $9 - local.get $7 + local.set $var$9 + local.get $var$7 i32.const 1 - local.get $7 + local.get $var$7 select i32.const 1023 i32.const 52 i32.add i32.sub - local.set $7 - local.get $9 - local.set $11 - local.get $7 - local.set $10 - local.get $11 + local.set $var$7 + local.get $var$9 + local.set $var$11 + local.get $var$7 + local.set $var$10 + local.get $var$11 i64.const 1 i64.shl i64.const 1 i64.add - local.set $12 - local.get $10 + local.set $var$12 + local.get $var$10 i32.const 1 i32.sub - local.set $13 - local.get $12 + local.set $var$13 + local.get $var$12 i64.clz i32.wrap_i64 - local.set $14 - local.get $12 - local.get $14 + local.set $var$14 + local.get $var$12 + local.get $var$14 i64.extend_i32_s i64.shl - local.set $12 - local.get $13 - local.get $14 + local.set $var$12 + local.get $var$13 + local.get $var$14 i32.sub - local.set $13 + local.set $var$13 i32.const 1 - local.get $11 + local.get $var$11 i64.const 4503599627370496 i64.eq i32.add - local.set $15 - local.get $12 + local.set $var$15 + local.get $var$12 global.set $~lib/util/number/_frc_plus - local.get $11 - local.get $15 + local.get $var$11 + local.get $var$15 i64.extend_i32_s i64.shl i64.const 1 i64.sub - local.get $10 - local.get $15 + local.get $var$10 + local.get $var$15 i32.sub - local.get $13 + local.get $var$13 i32.sub i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_minus - local.get $13 + local.get $var$13 global.set $~lib/util/number/_exp global.get $~lib/util/number/_exp - local.set $10 + local.set $var$10 i32.const -61 - local.get $10 + local.get $var$10 i32.sub f64.convert_i32_s f64.const 0.30102999566398114 f64.mul f64.const 347 f64.add - local.set $16 - local.get $16 + local.set $var$16 + local.get $var$16 i32.trunc_sat_f64_s - local.set $15 - local.get $15 - local.get $15 + local.set $var$15 + local.get $var$15 + local.get $var$15 f64.convert_i32_s - local.get $16 + local.get $var$16 f64.ne i32.add - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 i32.const 3 i32.shr_s i32.const 1 i32.add - local.set $14 + local.set $var$14 i32.const 348 - local.get $14 + local.get $var$14 i32.const 3 i32.shl i32.sub global.set $~lib/util/number/_K i32.const 11400 - local.get $14 + local.get $var$14 i32.const 3 i32.shl i32.add i64.load global.set $~lib/util/number/_frc_pow i32.const 12096 - local.get $14 + local.get $var$14 i32.const 1 i32.shl i32.add i32.load16_s global.set $~lib/util/number/_exp_pow - local.get $9 + local.get $var$9 i64.clz i32.wrap_i64 - local.set $14 - local.get $9 - local.get $14 + local.set $var$14 + local.get $var$9 + local.get $var$14 i64.extend_i32_s i64.shl - local.set $9 - local.get $7 - local.get $14 + local.set $var$9 + local.get $var$7 + local.get $var$14 i32.sub - local.set $7 + local.set $var$7 global.get $~lib/util/number/_frc_pow - local.set $12 + local.set $var$12 global.get $~lib/util/number/_exp_pow - local.set $15 - local.get $9 - local.set $17 - local.get $12 - local.set $11 - local.get $17 + local.set $var$15 + local.get $var$9 + local.set $var$17 + local.get $var$12 + local.set $var$11 + local.get $var$17 i64.const 4294967295 i64.and - local.set $18 - local.get $11 + local.set $var$18 + local.get $var$11 i64.const 4294967295 i64.and - local.set $19 - local.get $17 + local.set $var$19 + local.get $var$17 i64.const 32 i64.shr_u - local.set $20 - local.get $11 + local.set $var$20 + local.get $var$11 i64.const 32 i64.shr_u - local.set $21 - local.get $18 - local.get $19 + local.set $var$21 + local.get $var$18 + local.get $var$19 i64.mul - local.set $22 - local.get $20 - local.get $19 + local.set $var$22 + local.get $var$20 + local.get $var$19 i64.mul - local.get $22 + local.get $var$22 i64.const 32 i64.shr_u i64.add - local.set $23 - local.get $18 - local.get $21 + local.set $var$23 + local.get $var$18 + local.get $var$21 i64.mul - local.get $23 + local.get $var$23 i64.const 4294967295 i64.and i64.add - local.set $24 - local.get $24 + local.set $var$24 + local.get $var$24 i64.const 2147483647 i64.add - local.set $24 - local.get $23 + local.set $var$24 + local.get $var$23 i64.const 32 i64.shr_u - local.set $23 - local.get $24 + local.set $var$23 + local.get $var$24 i64.const 32 i64.shr_u - local.set $24 - local.get $20 - local.get $21 + local.set $var$24 + local.get $var$20 + local.get $var$21 i64.mul - local.get $23 + local.get $var$23 i64.add - local.get $24 + local.get $var$24 i64.add - local.set $24 - local.get $7 - local.set $10 - local.get $15 - local.set $13 - local.get $10 - local.get $13 + local.set $var$24 + local.get $var$7 + local.set $var$10 + local.get $var$15 + local.set $var$13 + local.get $var$10 + local.get $var$13 i32.add i32.const 64 i32.add - local.set $10 + local.set $var$10 global.get $~lib/util/number/_frc_plus - local.set $17 - local.get $12 - local.set $11 - local.get $17 + local.set $var$17 + local.get $var$12 + local.set $var$11 + local.get $var$17 i64.const 4294967295 i64.and - local.set $23 - local.get $11 + local.set $var$23 + local.get $var$11 i64.const 4294967295 i64.and - local.set $22 - local.get $17 + local.set $var$22 + local.get $var$17 i64.const 32 i64.shr_u - local.set $21 - local.get $11 + local.set $var$21 + local.get $var$11 i64.const 32 i64.shr_u - local.set $20 - local.get $23 - local.get $22 + local.set $var$20 + local.get $var$23 + local.get $var$22 i64.mul - local.set $19 - local.get $21 - local.get $22 + local.set $var$19 + local.get $var$21 + local.get $var$22 i64.mul - local.get $19 + local.get $var$19 i64.const 32 i64.shr_u i64.add - local.set $18 - local.get $23 - local.get $20 + local.set $var$18 + local.get $var$23 + local.get $var$20 i64.mul - local.get $18 + local.get $var$18 i64.const 4294967295 i64.and i64.add - local.set $25 - local.get $25 + local.set $var$25 + local.get $var$25 i64.const 2147483647 i64.add - local.set $25 - local.get $18 + local.set $var$25 + local.get $var$18 i64.const 32 i64.shr_u - local.set $18 - local.get $25 + local.set $var$18 + local.get $var$25 i64.const 32 i64.shr_u - local.set $25 - local.get $21 - local.get $20 + local.set $var$25 + local.get $var$21 + local.get $var$20 i64.mul - local.get $18 + local.get $var$18 i64.add - local.get $25 + local.get $var$25 i64.add i64.const 1 i64.sub - local.set $25 + local.set $var$25 global.get $~lib/util/number/_exp - local.set $26 - local.get $15 - local.set $13 - local.get $26 - local.get $13 + local.set $var$26 + local.get $var$15 + local.set $var$13 + local.get $var$26 + local.get $var$13 i32.add i32.const 64 i32.add - local.set $26 + local.set $var$26 global.get $~lib/util/number/_frc_minus - local.set $17 - local.get $12 - local.set $11 - local.get $17 + local.set $var$17 + local.get $var$12 + local.set $var$11 + local.get $var$17 i64.const 4294967295 i64.and - local.set $18 - local.get $11 + local.set $var$18 + local.get $var$11 i64.const 4294967295 i64.and - local.set $19 - local.get $17 + local.set $var$19 + local.get $var$17 i64.const 32 i64.shr_u - local.set $20 - local.get $11 + local.set $var$20 + local.get $var$11 i64.const 32 i64.shr_u - local.set $21 - local.get $18 - local.get $19 + local.set $var$21 + local.get $var$18 + local.get $var$19 i64.mul - local.set $22 - local.get $20 - local.get $19 + local.set $var$22 + local.get $var$20 + local.get $var$19 i64.mul - local.get $22 + local.get $var$22 i64.const 32 i64.shr_u i64.add - local.set $23 - local.get $18 - local.get $21 + local.set $var$23 + local.get $var$18 + local.get $var$21 i64.mul - local.get $23 + local.get $var$23 i64.const 4294967295 i64.and i64.add - local.set $27 - local.get $27 + local.set $var$27 + local.get $var$27 i64.const 2147483647 i64.add - local.set $27 - local.get $23 + local.set $var$27 + local.get $var$23 i64.const 32 i64.shr_u - local.set $23 - local.get $27 + local.set $var$23 + local.get $var$27 i64.const 32 i64.shr_u - local.set $27 - local.get $20 - local.get $21 + local.set $var$27 + local.get $var$20 + local.get $var$21 i64.mul - local.get $23 + local.get $var$23 i64.add - local.get $27 + local.get $var$27 i64.add i64.const 1 i64.add - local.set $27 - local.get $25 - local.get $27 + local.set $var$27 + local.get $var$25 + local.get $var$27 i64.sub - local.set $23 - local.get $4 - local.get $24 - local.get $10 - local.get $25 - local.get $26 - local.get $23 - local.get $3 + local.set $var$23 + local.get $var$4 + local.get $var$24 + local.get $var$10 + local.get $var$25 + local.get $var$26 + local.get $var$23 + local.get $var$3 call $~lib/util/number/genDigits - local.set $28 - local.get $0 - local.get $2 + local.set $len + local.get $buffer + local.get $sign i32.const 1 i32.shl i32.add - local.get $28 - local.get $2 + local.get $len + local.get $sign i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.set $28 - local.get $28 - local.get $2 + local.set $len + local.get $len + local.get $sign i32.add ) - (func $~lib/util/number/dtoa_buffered (param $0 i32) (param $1 f64) (result i32) - (local $2 i32) - local.get $1 + (func $~lib/util/number/dtoa_buffered (param $buffer i32) (param $value f64) (result i32) + (local $var$2 i32) + local.get $value f64.const 0 f64.eq if - local.get $0 + local.get $buffer i32.const 48 i32.store16 - local.get $0 + local.get $buffer i32.const 46 i32.store16 offset=2 - local.get $0 + local.get $buffer i32.const 48 i32.store16 offset=4 i32.const 3 return end - local.get $1 - local.get $1 + local.get $value + local.get $value f64.sub f64.const 0 f64.eq i32.eqz if - local.get $1 - local.get $1 + local.get $value + local.get $value f64.ne if - local.get $0 + local.get $buffer i32.const 78 i32.store16 - local.get $0 + local.get $buffer i32.const 97 i32.store16 offset=2 - local.get $0 + local.get $buffer i32.const 78 i32.store16 offset=4 i32.const 3 return else - local.get $1 + local.get $value f64.const 0 f64.lt - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $buffer i32.const 45 i32.store16 - local.get $0 + local.get $buffer i32.const 2 i32.add - local.set $0 + local.set $buffer end - local.get $0 + local.get $buffer i64.const 29555310648492105 i64.store - local.get $0 + local.get $buffer i64.const 34058970405077102 i64.store offset=8 i32.const 8 - local.get $2 + local.get $var$2 i32.add return end unreachable end - local.get $0 - local.get $1 + local.get $buffer + local.get $value call $~lib/util/number/dtoa_core ) - (func $~lib/array/Array#join (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/array/Array#join (param $this i32) (param $separator i32) (result i32) + (local $ptr i32) + (local $len i32) + local.get $this i32.load offset=4 - local.set $2 - local.get $0 + local.set $ptr + local.get $this i32.load offset=12 - local.set $3 + local.set $len i32.const 0 drop i32.const 0 drop i32.const 1 drop - local.get $2 - local.get $3 - local.get $1 + local.get $ptr + local.get $len + local.get $separator call $~lib/util/string/joinFloatArray return ) - (func $~lib/array/Array<~lib/string/String|null>#join (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/array/Array<~lib/string/String|null>#join (param $this i32) (param $separator i32) (result i32) + (local $ptr i32) + (local $len i32) + local.get $this i32.load offset=4 - local.set $2 - local.get $0 + local.set $ptr + local.get $this i32.load offset=12 - local.set $3 + local.set $len i32.const 0 drop i32.const 0 @@ -16640,24 +16640,24 @@ drop i32.const 1 drop - local.get $2 - local.get $3 - local.get $1 + local.get $ptr + local.get $len + local.get $separator call $~lib/util/string/joinStringArray return ) - (func $std/array/Ref#toString (param $0 i32) (result i32) + (func $std/array/Ref#toString (param $this i32) (result i32) i32.const 12512 ) - (func $~lib/array/Array#join (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/array/Array#join (param $this i32) (param $separator i32) (result i32) + (local $ptr i32) + (local $len i32) + local.get $this i32.load offset=4 - local.set $2 - local.get $0 + local.set $ptr + local.get $this i32.load offset=12 - local.set $3 + local.set $len i32.const 0 drop i32.const 0 @@ -16672,21 +16672,21 @@ drop i32.const 1 drop - local.get $2 - local.get $3 - local.get $1 + local.get $ptr + local.get $len + local.get $separator call $~lib/util/string/joinReferenceArray return ) - (func $~lib/array/Array#join (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/array/Array#join (param $this i32) (param $separator i32) (result i32) + (local $ptr i32) + (local $len i32) + local.get $this i32.load offset=4 - local.set $2 - local.get $0 + local.set $ptr + local.get $this i32.load offset=12 - local.set $3 + local.set $len i32.const 0 drop i32.const 0 @@ -16701,41 +16701,41 @@ drop i32.const 1 drop - local.get $2 - local.get $3 - local.get $1 + local.get $ptr + local.get $len + local.get $separator call $~lib/util/string/joinReferenceArray return ) - (func $~lib/util/number/itoa_buffered (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) + (func $~lib/util/number/itoa_buffered (param $buffer i32) (param $value i32) (result i32) + (local $sign i32) + (local $dest i32) + (local $decimals i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) i32.const 0 - local.set $2 + local.set $sign i32.const 1 drop - local.get $1 + local.get $value i32.extend8_s i32.const 0 i32.lt_s - local.set $2 - local.get $2 + local.set $sign + local.get $sign if i32.const 1 i32.const 1 i32.eq drop - local.get $1 + local.get $value i32.extend8_s i32.const -128 i32.eq if - local.get $0 + local.get $buffer i32.const 45 i64.extend_i32_s i32.const 48 @@ -16767,20 +16767,20 @@ i32.const 2 i32.eq drop - local.get $0 + local.get $buffer i32.const 45 i32.store16 i32.const 0 - local.get $1 + local.get $value i32.sub - local.set $1 + local.set $value end - local.get $0 - local.get $2 + local.get $buffer + local.get $sign i32.const 1 i32.shl i32.add - local.set $3 + local.set $dest i32.const 0 i32.const 1 i32.le_s @@ -16791,103 +16791,103 @@ i32.const 4 i32.le_u drop - local.get $1 + local.get $value i32.extend8_s i32.const 10 i32.lt_u if - local.get $3 - local.get $1 + local.get $dest + local.get $value i32.extend8_s i32.const 48 i32.or i32.store16 i32.const 1 - local.get $2 + local.get $sign i32.add return end i32.const 0 - local.set $4 + local.set $decimals i32.const 1 i32.const 4 i32.le_u drop - local.get $1 + local.get $value i32.extend8_s - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 call $~lib/util/number/decimalCount32 - local.set $4 - local.get $3 - local.set $8 - local.get $5 - local.set $7 - local.get $4 - local.set $6 + local.set $decimals + local.get $dest + local.set $var$8 + local.get $var$5 + local.set $var$7 + local.get $decimals + local.set $var$6 i32.const 0 i32.const 1 i32.ge_s drop - local.get $8 - local.get $7 - local.get $6 + local.get $var$8 + local.get $var$7 + local.get $var$6 call $~lib/util/number/utoa32_dec_lut - local.get $2 - local.get $4 + local.get $sign + local.get $decimals i32.add ) - (func $~lib/array/Array#join (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/array/Array#join (param $this i32) (param $separator i32) (result i32) + (local $ptr i32) + (local $len i32) + local.get $this i32.load offset=4 - local.set $2 - local.get $0 + local.set $ptr + local.get $this i32.load offset=12 - local.set $3 + local.set $len i32.const 0 drop i32.const 1 drop - local.get $2 - local.get $3 - local.get $1 + local.get $ptr + local.get $len + local.get $separator call $~lib/util/string/joinIntegerArray return ) - (func $~lib/util/number/itoa_buffered (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) + (func $~lib/util/number/itoa_buffered (param $buffer i32) (param $value i32) (result i32) + (local $sign i32) + (local $dest i32) + (local $decimals i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) i32.const 0 - local.set $2 + local.set $sign i32.const 0 drop - local.get $0 - local.get $2 + local.get $buffer + local.get $sign i32.const 1 i32.shl i32.add - local.set $3 + local.set $dest i32.const 0 i32.const 1 i32.le_s drop i32.const 0 drop - local.get $1 + local.get $value i32.const 65535 i32.and i32.const 10 i32.lt_u if - local.get $0 - local.get $1 + local.get $buffer + local.get $value i32.const 65535 i32.and i32.const 48 @@ -16897,73 +16897,73 @@ return end i32.const 0 - local.set $4 + local.set $decimals i32.const 2 i32.const 4 i32.le_u drop - local.get $1 + local.get $value i32.const 65535 i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 call $~lib/util/number/decimalCount32 - local.set $4 - local.get $3 - local.set $8 - local.get $5 - local.set $7 - local.get $4 - local.set $6 + local.set $decimals + local.get $dest + local.set $var$8 + local.get $var$5 + local.set $var$7 + local.get $decimals + local.set $var$6 i32.const 0 i32.const 1 i32.ge_s drop - local.get $8 - local.get $7 - local.get $6 + local.get $var$8 + local.get $var$7 + local.get $var$6 call $~lib/util/number/utoa32_dec_lut - local.get $2 - local.get $4 + local.get $sign + local.get $decimals i32.add ) - (func $~lib/array/Array#join (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/array/Array#join (param $this i32) (param $separator i32) (result i32) + (local $ptr i32) + (local $len i32) + local.get $this i32.load offset=4 - local.set $2 - local.get $0 + local.set $ptr + local.get $this i32.load offset=12 - local.set $3 + local.set $len i32.const 0 drop i32.const 1 drop - local.get $2 - local.get $3 - local.get $1 + local.get $ptr + local.get $len + local.get $separator call $~lib/util/string/joinIntegerArray return ) - (func $~lib/util/number/itoa_buffered (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) + (func $~lib/util/number/itoa_buffered (param $buffer i32) (param $value i32) (result i32) + (local $sign i32) + (local $dest i32) + (local $decimals i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) i32.const 0 - local.set $2 + local.set $sign i32.const 1 drop - local.get $1 + local.get $value i32.extend16_s i32.const 0 i32.lt_s - local.set $2 - local.get $2 + local.set $sign + local.get $sign if i32.const 2 i32.const 1 @@ -16973,12 +16973,12 @@ i32.const 2 i32.eq drop - local.get $1 + local.get $value i32.extend16_s i32.const -32768 i32.eq if - local.get $0 + local.get $buffer i32.const 45 i64.extend_i32_s i32.const 48 @@ -17003,7 +17003,7 @@ i64.shl i64.or i64.store - local.get $0 + local.get $buffer i32.const 8 i32.add i32.const 48 @@ -17021,20 +17021,20 @@ i32.const 6 return end - local.get $0 + local.get $buffer i32.const 45 i32.store16 i32.const 0 - local.get $1 + local.get $value i32.sub - local.set $1 + local.set $value end - local.get $0 - local.get $2 + local.get $buffer + local.get $sign i32.const 1 i32.shl i32.add - local.set $3 + local.set $dest i32.const 0 i32.const 1 i32.le_s @@ -17045,97 +17045,97 @@ i32.const 4 i32.le_u drop - local.get $1 + local.get $value i32.extend16_s i32.const 10 i32.lt_u if - local.get $3 - local.get $1 + local.get $dest + local.get $value i32.extend16_s i32.const 48 i32.or i32.store16 i32.const 1 - local.get $2 + local.get $sign i32.add return end i32.const 0 - local.set $4 + local.set $decimals i32.const 2 i32.const 4 i32.le_u drop - local.get $1 + local.get $value i32.extend16_s - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 call $~lib/util/number/decimalCount32 - local.set $4 - local.get $3 - local.set $8 - local.get $5 - local.set $7 - local.get $4 - local.set $6 + local.set $decimals + local.get $dest + local.set $var$8 + local.get $var$5 + local.set $var$7 + local.get $decimals + local.set $var$6 i32.const 0 i32.const 1 i32.ge_s drop - local.get $8 - local.get $7 - local.get $6 + local.get $var$8 + local.get $var$7 + local.get $var$6 call $~lib/util/number/utoa32_dec_lut - local.get $2 - local.get $4 + local.get $sign + local.get $decimals i32.add ) - (func $~lib/array/Array#join (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/array/Array#join (param $this i32) (param $separator i32) (result i32) + (local $ptr i32) + (local $len i32) + local.get $this i32.load offset=4 - local.set $2 - local.get $0 + local.set $ptr + local.get $this i32.load offset=12 - local.set $3 + local.set $len i32.const 0 drop i32.const 1 drop - local.get $2 - local.get $3 - local.get $1 + local.get $ptr + local.get $len + local.get $separator call $~lib/util/string/joinIntegerArray return ) - (func $~lib/util/number/decimalCount64High (param $0 i64) (result i32) - local.get $0 + (func $~lib/util/number/decimalCount64High (param $value i64) (result i32) + local.get $value i64.const 1000000000000000 i64.lt_u if - local.get $0 + local.get $value i64.const 1000000000000 i64.lt_u if i32.const 10 - local.get $0 + local.get $value i64.const 100000000000 i64.ge_u i32.add - local.get $0 + local.get $value i64.const 10000000000 i64.ge_u i32.add return else i32.const 13 - local.get $0 + local.get $value i64.const 100000000000000 i64.ge_u i32.add - local.get $0 + local.get $value i64.const 10000000000000 i64.ge_u i32.add @@ -17143,23 +17143,23 @@ end unreachable else - local.get $0 + local.get $value i64.const 100000000000000000 i64.lt_u if i32.const 16 - local.get $0 + local.get $value i64.const 10000000000000000 i64.ge_u i32.add return else i32.const 18 - local.get $0 + local.get $value i64.const -8446744073709551616 i64.ge_u i32.add - local.get $0 + local.get $value i64.const 1000000000000000000 i64.ge_u i32.add @@ -17169,116 +17169,116 @@ end unreachable ) - (func $~lib/util/number/utoa64_dec_lut (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i32) - (local $4 i64) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i64) - (local $13 i64) + (func $~lib/util/number/utoa64_dec_lut (param $buffer i32) (param $num i64) (param $offset i32) + (local $var$3 i32) + (local $t i64) + (local $r i32) + (local $b i32) + (local $c i32) + (local $b1 i32) + (local $b2 i32) + (local $c1 i32) + (local $c2 i32) + (local $digits1 i64) + (local $digits2 i64) loop $while-continue|0 - local.get $1 + local.get $num i64.const 100000000 i64.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $1 + local.get $num i64.const 100000000 i64.div_u - local.set $4 - local.get $1 - local.get $4 + local.set $t + local.get $num + local.get $t i64.const 100000000 i64.mul i64.sub i32.wrap_i64 - local.set $5 - local.get $4 - local.set $1 - local.get $5 + local.set $r + local.get $t + local.set $num + local.get $r i32.const 10000 i32.div_u - local.set $6 - local.get $5 + local.set $b + local.get $r i32.const 10000 i32.rem_u - local.set $7 - local.get $6 + local.set $c + local.get $b i32.const 100 i32.div_u - local.set $8 - local.get $6 + local.set $b1 + local.get $b i32.const 100 i32.rem_u - local.set $9 - local.get $7 + local.set $b2 + local.get $c i32.const 100 i32.div_u - local.set $10 - local.get $7 + local.set $c1 + local.get $c i32.const 100 i32.rem_u - local.set $11 + local.set $c2 i32.const 9276 - local.get $10 + local.get $c1 i32.const 2 i32.shl i32.add i64.load32_u - local.set $12 + local.set $digits1 i32.const 9276 - local.get $11 + local.get $c2 i32.const 2 i32.shl i32.add i64.load32_u - local.set $13 - local.get $2 + local.set $digits2 + local.get $offset i32.const 4 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $12 - local.get $13 + local.get $digits1 + local.get $digits2 i64.const 32 i64.shl i64.or i64.store i32.const 9276 - local.get $8 + local.get $b1 i32.const 2 i32.shl i32.add i64.load32_u - local.set $12 + local.set $digits1 i32.const 9276 - local.get $9 + local.get $b2 i32.const 2 i32.shl i32.add i64.load32_u - local.set $13 - local.get $2 + local.set $digits2 + local.get $offset i32.const 4 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $12 - local.get $13 + local.get $digits1 + local.get $digits2 i64.const 32 i64.shl i64.or @@ -17286,44 +17286,44 @@ br $while-continue|0 end end - local.get $0 - local.get $1 + local.get $buffer + local.get $num i32.wrap_i64 - local.get $2 - call $~lib/util/number/utoa32_dec_lut - ) - (func $~lib/util/number/itoa_buffered (param $0 i32) (param $1 i64) (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 i64) - (local $10 i64) + local.get $offset + call $~lib/util/number/utoa32_dec_lut + ) + (func $~lib/util/number/itoa_buffered (param $buffer i32) (param $value i64) (result i32) + (local $sign i32) + (local $dest i32) + (local $decimals i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i64) + (local $var$10 i64) i32.const 0 - local.set $2 + local.set $sign i32.const 0 drop - local.get $0 - local.get $2 + local.get $buffer + local.get $sign i32.const 1 i32.shl i32.add - local.set $3 + local.set $dest i32.const 0 i32.const 1 i32.le_s drop i32.const 0 drop - local.get $1 + local.get $value i64.const 10 i64.lt_u if - local.get $0 - local.get $1 + local.get $buffer + local.get $value i32.const 48 i64.extend_i32_s i64.or @@ -17332,99 +17332,99 @@ return end i32.const 0 - local.set $4 + local.set $decimals i32.const 8 i32.const 4 i32.le_u drop - local.get $1 + local.get $value global.get $~lib/builtins/u32.MAX_VALUE i64.extend_i32_u i64.le_u if - local.get $1 + local.get $value i32.wrap_i64 - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 call $~lib/util/number/decimalCount32 - local.set $4 - local.get $3 - local.set $8 - local.get $5 - local.set $7 - local.get $4 - local.set $6 + local.set $decimals + local.get $dest + local.set $var$8 + local.get $var$5 + local.set $var$7 + local.get $decimals + local.set $var$6 i32.const 0 i32.const 1 i32.ge_s drop - local.get $8 - local.get $7 - local.get $6 + local.get $var$8 + local.get $var$7 + local.get $var$6 call $~lib/util/number/utoa32_dec_lut else - local.get $1 - local.set $9 - local.get $9 + local.get $value + local.set $var$9 + local.get $var$9 call $~lib/util/number/decimalCount64High - local.set $4 - local.get $3 - local.set $7 - local.get $9 - local.set $10 - local.get $4 - local.set $6 + local.set $decimals + local.get $dest + local.set $var$7 + local.get $var$9 + local.set $var$10 + local.get $decimals + local.set $var$6 i32.const 0 i32.const 1 i32.ge_s drop - local.get $7 - local.get $10 - local.get $6 + local.get $var$7 + local.get $var$10 + local.get $var$6 call $~lib/util/number/utoa64_dec_lut end - local.get $2 - local.get $4 + local.get $sign + local.get $decimals i32.add ) - (func $~lib/array/Array#join (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/array/Array#join (param $this i32) (param $separator i32) (result i32) + (local $ptr i32) + (local $len i32) + local.get $this i32.load offset=4 - local.set $2 - local.get $0 + local.set $ptr + local.get $this i32.load offset=12 - local.set $3 + local.set $len i32.const 0 drop i32.const 1 drop - local.get $2 - local.get $3 - local.get $1 + local.get $ptr + local.get $len + local.get $separator call $~lib/util/string/joinIntegerArray return ) - (func $~lib/util/number/itoa_buffered (param $0 i32) (param $1 i64) (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 i64) - (local $10 i64) + (func $~lib/util/number/itoa_buffered (param $buffer i32) (param $value i64) (result i32) + (local $sign i32) + (local $dest i32) + (local $decimals i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i64) + (local $var$10 i64) i32.const 0 - local.set $2 + local.set $sign i32.const 1 drop - local.get $1 + local.get $value i64.const 0 i64.lt_s - local.set $2 - local.get $2 + local.set $sign + local.get $sign if i32.const 8 i32.const 1 @@ -17434,20 +17434,20 @@ i32.const 2 i32.eq drop - local.get $0 + local.get $buffer i32.const 45 i32.store16 i64.const 0 - local.get $1 + local.get $value i64.sub - local.set $1 + local.set $value end - local.get $0 - local.get $2 + local.get $buffer + local.get $sign i32.const 1 i32.shl i32.add - local.set $3 + local.set $dest i32.const 0 i32.const 1 i32.le_s @@ -17458,105 +17458,105 @@ i32.const 4 i32.le_u drop - local.get $1 + local.get $value i64.const 10 i64.lt_u if - local.get $3 - local.get $1 + local.get $dest + local.get $value i32.const 48 i64.extend_i32_s i64.or i64.store16 i32.const 1 - local.get $2 + local.get $sign i32.add return end i32.const 0 - local.set $4 + local.set $decimals i32.const 8 i32.const 4 i32.le_u drop - local.get $1 + local.get $value global.get $~lib/builtins/u32.MAX_VALUE i64.extend_i32_u i64.le_u if - local.get $1 + local.get $value i32.wrap_i64 - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 call $~lib/util/number/decimalCount32 - local.set $4 - local.get $3 - local.set $8 - local.get $5 - local.set $7 - local.get $4 - local.set $6 + local.set $decimals + local.get $dest + local.set $var$8 + local.get $var$5 + local.set $var$7 + local.get $decimals + local.set $var$6 i32.const 0 i32.const 1 i32.ge_s drop - local.get $8 - local.get $7 - local.get $6 + local.get $var$8 + local.get $var$7 + local.get $var$6 call $~lib/util/number/utoa32_dec_lut else - local.get $1 - local.set $9 - local.get $9 + local.get $value + local.set $var$9 + local.get $var$9 call $~lib/util/number/decimalCount64High - local.set $4 - local.get $3 - local.set $7 - local.get $9 - local.set $10 - local.get $4 - local.set $6 + local.set $decimals + local.get $dest + local.set $var$7 + local.get $var$9 + local.set $var$10 + local.get $decimals + local.set $var$6 i32.const 0 i32.const 1 i32.ge_s drop - local.get $7 - local.get $10 - local.get $6 + local.get $var$7 + local.get $var$10 + local.get $var$6 call $~lib/util/number/utoa64_dec_lut end - local.get $2 - local.get $4 + local.get $sign + local.get $decimals i32.add ) - (func $~lib/array/Array#join (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/array/Array#join (param $this i32) (param $separator i32) (result i32) + (local $ptr i32) + (local $len i32) + local.get $this i32.load offset=4 - local.set $2 - local.get $0 + local.set $ptr + local.get $this i32.load offset=12 - local.set $3 + local.set $len i32.const 0 drop i32.const 1 drop - local.get $2 - local.get $3 - local.get $1 + local.get $ptr + local.get $len + local.get $separator call $~lib/util/string/joinIntegerArray return ) - (func $~lib/array/Array<~lib/array/Array>#join (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/array/Array<~lib/array/Array>#join (param $this i32) (param $separator i32) (result i32) + (local $ptr i32) + (local $len i32) + local.get $this i32.load offset=4 - local.set $2 - local.get $0 + local.set $ptr + local.get $this i32.load offset=12 - local.set $3 + local.set $len i32.const 0 drop i32.const 0 @@ -17571,60 +17571,60 @@ drop i32.const 1 drop - local.get $2 - local.get $3 - local.get $1 + local.get $ptr + local.get $len + local.get $separator call $~lib/util/string/joinReferenceArray<~lib/array/Array> return ) - (func $~lib/array/Array<~lib/array/Array>#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array<~lib/array/Array>#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store i32.const 1 drop - local.get $0 - local.get $2 + local.get $this + local.get $value i32.const 1 call $~lib/rt/itcms/__link ) - (func $~lib/util/number/itoa_buffered (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) + (func $~lib/util/number/itoa_buffered (param $buffer i32) (param $value i32) (result i32) + (local $sign i32) + (local $dest i32) + (local $decimals i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) i32.const 0 - local.set $2 + local.set $sign i32.const 0 drop - local.get $0 - local.get $2 + local.get $buffer + local.get $sign i32.const 1 i32.shl i32.add - local.set $3 + local.set $dest i32.const 0 i32.const 1 i32.le_s drop i32.const 0 drop - local.get $1 + local.get $value i32.const 255 i32.and i32.const 10 i32.lt_u if - local.get $0 - local.get $1 + local.get $buffer + local.get $value i32.const 255 i32.and i32.const 48 @@ -17634,64 +17634,64 @@ return end i32.const 0 - local.set $4 + local.set $decimals i32.const 1 i32.const 4 i32.le_u drop - local.get $1 + local.get $value i32.const 255 i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 call $~lib/util/number/decimalCount32 - local.set $4 - local.get $3 - local.set $8 - local.get $5 - local.set $7 - local.get $4 - local.set $6 + local.set $decimals + local.get $dest + local.set $var$8 + local.get $var$5 + local.set $var$7 + local.get $decimals + local.set $var$6 i32.const 0 i32.const 1 i32.ge_s drop - local.get $8 - local.get $7 - local.get $6 + local.get $var$8 + local.get $var$7 + local.get $var$6 call $~lib/util/number/utoa32_dec_lut - local.get $2 - local.get $4 + local.get $sign + local.get $decimals i32.add ) - (func $~lib/array/Array#join (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/array/Array#join (param $this i32) (param $separator i32) (result i32) + (local $ptr i32) + (local $len i32) + local.get $this i32.load offset=4 - local.set $2 - local.get $0 + local.set $ptr + local.get $this i32.load offset=12 - local.set $3 + local.set $len i32.const 0 drop i32.const 1 drop - local.get $2 - local.get $3 - local.get $1 + local.get $ptr + local.get $len + local.get $separator call $~lib/util/string/joinIntegerArray return ) - (func $~lib/array/Array<~lib/array/Array>#join (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/array/Array<~lib/array/Array>#join (param $this i32) (param $separator i32) (result i32) + (local $ptr i32) + (local $len i32) + local.get $this i32.load offset=4 - local.set $2 - local.get $0 + local.set $ptr + local.get $this i32.load offset=12 - local.set $3 + local.set $len i32.const 0 drop i32.const 0 @@ -17706,53 +17706,53 @@ drop i32.const 1 drop - local.get $2 - local.get $3 - local.get $1 + local.get $ptr + local.get $len + local.get $separator call $~lib/util/string/joinReferenceArray<~lib/array/Array> return ) - (func $~lib/array/Array<~lib/array/Array>#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array<~lib/array/Array>#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store i32.const 1 drop - local.get $0 - local.get $2 + local.get $this + local.get $value i32.const 1 call $~lib/rt/itcms/__link ) - (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store i32.const 1 drop - local.get $0 - local.get $2 + local.get $this + local.get $value i32.const 1 call $~lib/rt/itcms/__link ) - (func $~lib/array/Array<~lib/array/Array>#join (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/array/Array<~lib/array/Array>#join (param $this i32) (param $separator i32) (result i32) + (local $ptr i32) + (local $len i32) + local.get $this i32.load offset=4 - local.set $2 - local.get $0 + local.set $ptr + local.get $this i32.load offset=12 - local.set $3 + local.set $len i32.const 0 drop i32.const 0 @@ -17767,21 +17767,21 @@ drop i32.const 1 drop - local.get $2 - local.get $3 - local.get $1 + local.get $ptr + local.get $len + local.get $separator call $~lib/util/string/joinReferenceArray<~lib/array/Array> return ) - (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join (param $this i32) (param $separator i32) (result i32) + (local $ptr i32) + (local $len i32) + local.get $this i32.load offset=4 - local.set $2 - local.get $0 + local.set $ptr + local.get $this i32.load offset=12 - local.set $3 + local.set $len i32.const 0 drop i32.const 0 @@ -17796,30 +17796,30 @@ drop i32.const 1 drop - local.get $2 - local.get $3 - local.get $1 + local.get $ptr + local.get $len + local.get $separator call $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> return ) - (func $~lib/array/Array<~lib/array/Array<~lib/string/String|null>>#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array<~lib/array/Array<~lib/string/String|null>>#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store i32.const 1 drop - local.get $0 - local.get $2 + local.get $this + local.get $value i32.const 1 call $~lib/rt/itcms/__link ) - (func $start:std/array~anonymous|53 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $start:std/array~anonymous|53 (param $nestedArray i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $nestedArray call $~lib/array/Array#get:length i32.const 1 i32.eq @@ -17832,11 +17832,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $nestedArray i32.const 3 call $~lib/array/Array#push drop - local.get $0 + local.get $nestedArray call $~lib/array/Array#get:length i32.const 2 i32.eq @@ -17849,10 +17849,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $nestedArray ) (func $~lib/rt/itcms/__collect - (local $0 i32) + (local $var$0 i32) i32.const 0 drop global.get $~lib/rt/itcms/state @@ -17863,8 +17863,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -17878,8 +17878,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -17965,12 +17965,12 @@ call $~lib/rt/itcms/__visit end ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -17983,12 +17983,12 @@ local.get $1 call $~lib/arraybuffer/ArrayBufferView~visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -17996,12 +17996,12 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -18009,12 +18009,12 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -18022,49 +18022,49 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $val i32) i32.const 1 drop - local.get $0 + local.get $this i32.load offset=4 - local.set $2 - local.get $2 - local.get $0 + local.set $var$2 + local.get $var$2 + local.get $this i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $var$2 i32.load - local.set $5 - local.get $5 + local.set $val + local.get $val if - local.get $5 - local.get $1 + local.get $val + local.get $cookie call $~lib/rt/itcms/__visit end - local.get $2 + local.get $var$2 i32.const 4 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -18072,12 +18072,12 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -18085,12 +18085,12 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -18098,49 +18098,49 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $val i32) i32.const 1 - drop - local.get $0 - i32.load offset=4 - local.set $2 - local.get $2 - local.get $0 + drop + local.get $this + i32.load offset=4 + local.set $var$2 + local.get $var$2 + local.get $this i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $var$2 i32.load - local.set $5 - local.get $5 + local.set $val + local.get $val if - local.get $5 - local.get $1 + local.get $val + local.get $cookie call $~lib/rt/itcms/__visit end - local.get $2 + local.get $var$2 i32.const 4 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -18148,10 +18148,10 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/function/Function<%28i32%2Ci32%2C~lib/array/Array%29=>bool>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i32%2Ci32%2C~lib/array/Array%29=>bool>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i32%2Ci32%2C~lib/array/Array%29=>bool>~visit (param $0 i32) (param $1 i32) @@ -18159,10 +18159,10 @@ local.get $1 call $~lib/function/Function<%28i32%2Ci32%2C~lib/array/Array%29=>bool>#__visit ) - (func $~lib/function/Function<%28i32%2Ci32%2C~lib/array/Array%29=>void>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i32%2Ci32%2C~lib/array/Array%29=>void>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i32%2Ci32%2C~lib/array/Array%29=>void>~visit (param $0 i32) (param $1 i32) @@ -18170,10 +18170,10 @@ local.get $1 call $~lib/function/Function<%28i32%2Ci32%2C~lib/array/Array%29=>void>#__visit ) - (func $~lib/function/Function<%28i32%2Ci32%2C~lib/array/Array%29=>f32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i32%2Ci32%2C~lib/array/Array%29=>f32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i32%2Ci32%2C~lib/array/Array%29=>f32>~visit (param $0 i32) (param $1 i32) @@ -18181,10 +18181,10 @@ local.get $1 call $~lib/function/Function<%28i32%2Ci32%2C~lib/array/Array%29=>f32>#__visit ) - (func $~lib/function/Function<%28i32%2Ci32%2C~lib/array/Array%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i32%2Ci32%2C~lib/array/Array%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i32%2Ci32%2C~lib/array/Array%29=>i32>~visit (param $0 i32) (param $1 i32) @@ -18192,10 +18192,10 @@ local.get $1 call $~lib/function/Function<%28i32%2Ci32%2C~lib/array/Array%29=>i32>#__visit ) - (func $~lib/function/Function<%28i32%2Ci32%2Ci32%2C~lib/array/Array%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i32%2Ci32%2Ci32%2C~lib/array/Array%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i32%2Ci32%2Ci32%2C~lib/array/Array%29=>i32>~visit (param $0 i32) (param $1 i32) @@ -18203,10 +18203,10 @@ local.get $1 call $~lib/function/Function<%28i32%2Ci32%2Ci32%2C~lib/array/Array%29=>i32>#__visit ) - (func $~lib/function/Function<%28bool%2Ci32%2Ci32%2C~lib/array/Array%29=>bool>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28bool%2Ci32%2Ci32%2C~lib/array/Array%29=>bool>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28bool%2Ci32%2Ci32%2C~lib/array/Array%29=>bool>~visit (param $0 i32) (param $1 i32) @@ -18214,49 +18214,49 @@ local.get $1 call $~lib/function/Function<%28bool%2Ci32%2Ci32%2C~lib/array/Array%29=>bool>#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $val i32) i32.const 1 drop - local.get $0 + local.get $this i32.load offset=4 - local.set $2 - local.get $2 - local.get $0 + local.set $var$2 + local.get $var$2 + local.get $this i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $var$2 i32.load - local.set $5 - local.get $5 + local.set $val + local.get $val if - local.get $5 - local.get $1 + local.get $val + local.get $cookie call $~lib/rt/itcms/__visit end - local.get $2 + local.get $var$2 i32.const 4 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -18264,10 +18264,10 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/function/Function<%28f32%2Cf32%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28f32%2Cf32%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28f32%2Cf32%29=>i32>~visit (param $0 i32) (param $1 i32) @@ -18275,10 +18275,10 @@ local.get $1 call $~lib/function/Function<%28f32%2Cf32%29=>i32>#__visit ) - (func $~lib/function/Function<%28f64%2Cf64%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28f64%2Cf64%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28f64%2Cf64%29=>i32>~visit (param $0 i32) (param $1 i32) @@ -18286,10 +18286,10 @@ local.get $1 call $~lib/function/Function<%28f64%2Cf64%29=>i32>#__visit ) - (func $~lib/function/Function<%28i32%2Ci32%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i32%2Ci32%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i32%2Ci32%29=>i32>~visit (param $0 i32) (param $1 i32) @@ -18297,10 +18297,10 @@ local.get $1 call $~lib/function/Function<%28i32%2Ci32%29=>i32>#__visit ) - (func $~lib/function/Function<%28u32%2Cu32%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28u32%2Cu32%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28u32%2Cu32%29=>i32>~visit (param $0 i32) (param $1 i32) @@ -18308,10 +18308,10 @@ local.get $1 call $~lib/function/Function<%28u32%2Cu32%29=>i32>#__visit ) - (func $~lib/function/Function<%28std/array/Dim%2Cstd/array/Dim%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28std/array/Dim%2Cstd/array/Dim%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28std/array/Dim%2Cstd/array/Dim%29=>i32>~visit (param $0 i32) (param $1 i32) @@ -18319,49 +18319,49 @@ local.get $1 call $~lib/function/Function<%28std/array/Dim%2Cstd/array/Dim%29=>i32>#__visit ) - (func $~lib/array/Array<~lib/array/Array>#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array<~lib/array/Array>#__visit (param $this i32) (param $cookie i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $val i32) i32.const 1 drop - local.get $0 + local.get $this i32.load offset=4 - local.set $2 - local.get $2 - local.get $0 + local.set $var$2 + local.get $var$2 + local.get $this i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $var$2 i32.load - local.set $5 - local.get $5 + local.set $val + local.get $val if - local.get $5 - local.get $1 + local.get $val + local.get $cookie call $~lib/rt/itcms/__visit end - local.get $2 + local.get $var$2 i32.const 4 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array<~lib/array/Array>~visit (param $0 i32) (param $1 i32) @@ -18369,10 +18369,10 @@ local.get $1 call $~lib/array/Array<~lib/array/Array>#__visit ) - (func $~lib/function/Function<%28~lib/array/Array%2C~lib/array/Array%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28~lib/array/Array%2C~lib/array/Array%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28~lib/array/Array%2C~lib/array/Array%29=>i32>~visit (param $0 i32) (param $1 i32) @@ -18380,49 +18380,49 @@ local.get $1 call $~lib/function/Function<%28~lib/array/Array%2C~lib/array/Array%29=>i32>#__visit ) - (func $~lib/array/Array>#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array>#__visit (param $this i32) (param $cookie i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $val i32) i32.const 1 drop - local.get $0 + local.get $this i32.load offset=4 - local.set $2 - local.get $2 - local.get $0 + local.set $var$2 + local.get $var$2 + local.get $this i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $var$2 i32.load - local.set $5 - local.get $5 + local.set $val + local.get $val if - local.get $5 - local.get $1 + local.get $val + local.get $cookie call $~lib/rt/itcms/__visit end - local.get $2 + local.get $var$2 i32.const 4 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array>~visit (param $0 i32) (param $1 i32) @@ -18430,10 +18430,10 @@ local.get $1 call $~lib/array/Array>#__visit ) - (func $~lib/function/Function<%28std/array/Proxy%2Cstd/array/Proxy%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28std/array/Proxy%2Cstd/array/Proxy%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28std/array/Proxy%2Cstd/array/Proxy%29=>i32>~visit (param $0 i32) (param $1 i32) @@ -18441,49 +18441,49 @@ local.get $1 call $~lib/function/Function<%28std/array/Proxy%2Cstd/array/Proxy%29=>i32>#__visit ) - (func $~lib/array/Array<~lib/string/String|null>#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array<~lib/string/String|null>#__visit (param $this i32) (param $cookie i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $val i32) i32.const 1 drop - local.get $0 + local.get $this i32.load offset=4 - local.set $2 - local.get $2 - local.get $0 + local.set $var$2 + local.get $var$2 + local.get $this i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $var$2 i32.load - local.set $5 - local.get $5 + local.set $val + local.get $val if - local.get $5 - local.get $1 + local.get $val + local.get $cookie call $~lib/rt/itcms/__visit end - local.get $2 + local.get $var$2 i32.const 4 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array<~lib/string/String|null>~visit (param $0 i32) (param $1 i32) @@ -18491,10 +18491,10 @@ local.get $1 call $~lib/array/Array<~lib/string/String|null>#__visit ) - (func $~lib/function/Function<%28~lib/string/String|null%2C~lib/string/String|null%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28~lib/string/String|null%2C~lib/string/String|null%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28~lib/string/String|null%2C~lib/string/String|null%29=>i32>~visit (param $0 i32) (param $1 i32) @@ -18502,49 +18502,49 @@ local.get $1 call $~lib/function/Function<%28~lib/string/String|null%2C~lib/string/String|null%29=>i32>#__visit ) - (func $~lib/array/Array<~lib/string/String>#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array<~lib/string/String>#__visit (param $this i32) (param $cookie i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $val i32) i32.const 1 drop - local.get $0 + local.get $this i32.load offset=4 - local.set $2 - local.get $2 - local.get $0 + local.set $var$2 + local.get $var$2 + local.get $this i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $var$2 i32.load - local.set $5 - local.get $5 + local.set $val + local.get $val if - local.get $5 - local.get $1 + local.get $val + local.get $cookie call $~lib/rt/itcms/__visit end - local.get $2 + local.get $var$2 i32.const 4 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array<~lib/string/String>~visit (param $0 i32) (param $1 i32) @@ -18552,10 +18552,10 @@ local.get $1 call $~lib/array/Array<~lib/string/String>#__visit ) - (func $~lib/function/Function<%28~lib/string/String%2C~lib/string/String%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28~lib/string/String%2C~lib/string/String%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28~lib/string/String%2C~lib/string/String%29=>i32>~visit (param $0 i32) (param $1 i32) @@ -18563,12 +18563,12 @@ local.get $1 call $~lib/function/Function<%28~lib/string/String%2C~lib/string/String%29=>i32>#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -18576,12 +18576,12 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -18589,12 +18589,12 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -18602,12 +18602,12 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -18615,12 +18615,12 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -18628,49 +18628,49 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array<~lib/array/Array>#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array<~lib/array/Array>#__visit (param $this i32) (param $cookie i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $val i32) i32.const 1 drop - local.get $0 + local.get $this i32.load offset=4 - local.set $2 - local.get $2 - local.get $0 + local.set $var$2 + local.get $var$2 + local.get $this i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $var$2 i32.load - local.set $5 - local.get $5 + local.set $val + local.get $val if - local.get $5 - local.get $1 + local.get $val + local.get $cookie call $~lib/rt/itcms/__visit end - local.get $2 + local.get $var$2 i32.const 4 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array<~lib/array/Array>~visit (param $0 i32) (param $1 i32) @@ -18678,49 +18678,49 @@ local.get $1 call $~lib/array/Array<~lib/array/Array>#__visit ) - (func $~lib/array/Array<~lib/array/Array>#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array<~lib/array/Array>#__visit (param $this i32) (param $cookie i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $val i32) i32.const 1 drop - local.get $0 + local.get $this i32.load offset=4 - local.set $2 - local.get $2 - local.get $0 + local.set $var$2 + local.get $var$2 + local.get $this i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $var$2 i32.load - local.set $5 - local.get $5 + local.set $val + local.get $val if - local.get $5 - local.get $1 + local.get $val + local.get $cookie call $~lib/rt/itcms/__visit end - local.get $2 + local.get $var$2 i32.const 4 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array<~lib/array/Array>~visit (param $0 i32) (param $1 i32) @@ -18728,49 +18728,49 @@ local.get $1 call $~lib/array/Array<~lib/array/Array>#__visit ) - (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#__visit (param $this i32) (param $cookie i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $val i32) i32.const 1 drop - local.get $0 + local.get $this i32.load offset=4 - local.set $2 - local.get $2 - local.get $0 + local.set $var$2 + local.get $var$2 + local.get $this i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $var$2 i32.load - local.set $5 - local.get $5 + local.set $val + local.get $val if - local.get $5 - local.get $1 + local.get $val + local.get $cookie call $~lib/rt/itcms/__visit end - local.get $2 + local.get $var$2 i32.const 4 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>~visit (param $0 i32) (param $1 i32) @@ -18778,49 +18778,49 @@ local.get $1 call $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#__visit ) - (func $~lib/array/Array<~lib/array/Array<~lib/string/String|null>>#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array<~lib/array/Array<~lib/string/String|null>>#__visit (param $this i32) (param $cookie i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $val i32) i32.const 1 drop - local.get $0 + local.get $this i32.load offset=4 - local.set $2 - local.get $2 - local.get $0 + local.set $var$2 + local.get $var$2 + local.get $this i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $var$2 i32.load - local.set $5 - local.get $5 + local.set $val + local.get $val if - local.get $5 - local.get $1 + local.get $val + local.get $cookie call $~lib/rt/itcms/__visit end - local.get $2 + local.get $var$2 i32.const 4 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array<~lib/array/Array<~lib/string/String|null>>~visit (param $0 i32) (param $1 i32) @@ -18828,10 +18828,10 @@ local.get $1 call $~lib/array/Array<~lib/array/Array<~lib/string/String|null>>#__visit ) - (func $~lib/function/Function<%28~lib/array/Array%2Ci32%2C~lib/array/Array<~lib/array/Array>%29=>~lib/array/Array>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28~lib/array/Array%2Ci32%2C~lib/array/Array<~lib/array/Array>%29=>~lib/array/Array>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28~lib/array/Array%2Ci32%2C~lib/array/Array<~lib/array/Array>%29=>~lib/array/Array>~visit (param $0 i32) (param $1 i32) diff --git a/tests/compiler/std/arraybuffer.debug.wat b/tests/compiler/std/arraybuffer.debug.wat index 98e170b2ab..55d3e6cb0f 100644 --- a/tests/compiler/std/arraybuffer.debug.wat +++ b/tests/compiler/std/arraybuffer.debug.wat @@ -59,50 +59,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -115,58 +115,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -183,12 +183,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -198,19 +198,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -221,27 +221,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -249,35 +249,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -287,15 +287,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -305,25 +305,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -331,33 +331,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -385,23 +385,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -413,15 +413,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -433,33 +433,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -467,21 +467,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -496,36 +496,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -533,67 +533,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -603,22 +603,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -628,12 +628,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -645,75 +645,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -725,38 +725,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -770,12 +770,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -786,38 +786,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -825,21 +825,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -854,101 +854,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -959,7 +959,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -970,26 +970,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1002,27 +1002,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1036,11 +1036,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1051,66 +1051,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1120,10 +1120,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1134,13 +1134,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1151,109 +1151,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1261,7 +1261,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1278,23 +1278,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1306,54 +1306,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1374,30 +1374,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1407,9 +1407,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1419,8 +1419,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1428,43 +1428,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1476,17 +1476,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1500,7 +1500,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1518,7 +1518,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1528,12 +1528,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1555,7 +1555,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1575,14 +1575,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1595,8 +1595,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1607,37 +1607,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1645,16 +1645,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1662,21 +1662,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1691,12 +1691,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1704,49 +1704,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1756,90 +1756,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1848,22 +1848,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1872,27 +1872,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1907,69 +1907,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1984,29 +1984,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2019,13 +2019,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2036,25 +2036,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2069,10 +2069,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2090,47 +2090,47 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (param $0 i32) (result i32) - local.get $0 + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 ) - (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/array/Array|null> (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/array/Array|null> (param $value i32) (result i32) i32.const 1 drop - local.get $0 + local.get $value i32.const 0 i32.eq if @@ -2163,7 +2163,7 @@ drop i32.const 0 ) - (func $~lib/arraybuffer/ArrayBuffer.isView (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer.isView (param $value i32) (result i32) i32.const 0 drop i32.const 0 @@ -2192,10 +2192,10 @@ drop i32.const 0 ) - (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array|null> (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array|null> (param $value i32) (result i32) i32.const 1 drop - local.get $0 + local.get $value i32.const 0 i32.eq if @@ -2209,10 +2209,10 @@ i32.const 1 return ) - (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Int32Array|null> (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Int32Array|null> (param $value i32) (result i32) i32.const 1 drop - local.get $0 + local.get $value i32.const 0 i32.eq if @@ -2234,10 +2234,10 @@ i32.const 1 return ) - (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/dataview/DataView|null> (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/dataview/DataView|null> (param $value i32) (result i32) i32.const 1 drop - local.get $0 + local.get $value i32.const 0 i32.eq if @@ -2271,18 +2271,18 @@ i32.const 1 return ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32) + (local $child i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $childPtr i32.eqz if return end i32.const 1 drop - local.get $0 + local.get $parentPtr i32.eqz if i32.const 0 @@ -2292,37 +2292,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $childPtr i32.const 20 i32.sub - local.set $3 - local.get $3 + local.set $child + local.get $child call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $0 + local.get $parentPtr i32.const 20 i32.sub - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 call $~lib/rt/itcms/Object#get:color - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $2 + local.get $expectMultiple if - local.get $4 + local.get $var$4 call $~lib/rt/itcms/Object#makeGray else - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end else - local.get $5 + local.get $var$5 i32.const 3 i32.eq if (result i32) @@ -2333,7 +2333,7 @@ i32.const 0 end if - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end end @@ -2358,22 +2358,22 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/__newBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - local.get $1 + (func $~lib/rt/__newBuffer (param $size i32) (param $id i32) (param $data i32) (result i32) + (local $buffer i32) + local.get $size + local.get $id call $~lib/rt/itcms/__new - local.set $3 - local.get $2 + local.set $buffer + local.get $data if - local.get $3 - local.get $2 - local.get $0 + local.get $buffer + local.get $data + local.get $size memory.copy end - local.get $3 + local.get $buffer ) - (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/array/Array> (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/array/Array> (param $value i32) (result i32) i32.const 0 drop i32.const 0 @@ -2402,7 +2402,7 @@ drop i32.const 0 ) - (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array> (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array> (param $value i32) (result i32) i32.const 0 drop i32.const 0 @@ -2412,7 +2412,7 @@ i32.const 1 return ) - (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Int32Array> (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Int32Array> (param $value i32) (result i32) i32.const 0 drop i32.const 0 @@ -2449,7 +2449,7 @@ local.get $1 i32.store offset=8 ) - (func $~lib/dataview/DataView#constructor@varargs (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/dataview/DataView#constructor@varargs (param $this i32) (param $buffer i32) (param $byteOffset i32) (param $byteLength i32) (result i32) block $2of2 block $1of2 block $0of2 @@ -2462,19 +2462,19 @@ unreachable end i32.const 0 - local.set $2 + local.set $byteOffset end - local.get $1 + local.get $buffer call $~lib/arraybuffer/ArrayBuffer#get:byteLength - local.set $3 + local.set $byteLength end - local.get $0 - local.get $1 - local.get $2 - local.get $3 + local.get $this + local.get $buffer + local.get $byteOffset + local.get $byteLength call $~lib/dataview/DataView#constructor ) - (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/dataview/DataView> (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/dataview/DataView> (param $value i32) (result i32) i32.const 0 drop i32.const 0 @@ -2505,7 +2505,7 @@ return ) (func $~lib/rt/itcms/__collect - (local $0 i32) + (local $var$0 i32) i32.const 0 drop global.get $~lib/rt/itcms/state @@ -2516,8 +2516,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -2531,8 +2531,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -2578,12 +2578,12 @@ call $~lib/rt/itcms/__visit end ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) diff --git a/tests/compiler/std/console.debug.wat b/tests/compiler/std/console.debug.wat index a22d7f7361..eecb0509f2 100644 --- a/tests/compiler/std/console.debug.wat +++ b/tests/compiler/std/console.debug.wat @@ -35,43 +35,43 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (start $~start) - (func $~lib/console/console.assert (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/console/console.assert (param $condition i32) (param $message i32) + local.get $condition i32.eqz i32.eqz - local.get $1 + local.get $message call $~lib/bindings/dom/console.assert ) - (func $~lib/console/console.log (param $0 i32) - local.get $0 + (func $~lib/console/console.log (param $message i32) + local.get $message call $~lib/bindings/dom/console.log ) - (func $~lib/console/console.debug (param $0 i32) - local.get $0 + (func $~lib/console/console.debug (param $message i32) + local.get $message call $~lib/bindings/dom/console.debug ) - (func $~lib/console/console.info (param $0 i32) - local.get $0 + (func $~lib/console/console.info (param $message i32) + local.get $message call $~lib/bindings/dom/console.info ) - (func $~lib/console/console.warn (param $0 i32) - local.get $0 + (func $~lib/console/console.warn (param $message i32) + local.get $message call $~lib/bindings/dom/console.warn ) - (func $~lib/console/console.error (param $0 i32) - local.get $0 + (func $~lib/console/console.error (param $message i32) + local.get $message call $~lib/bindings/dom/console.error ) - (func $~lib/console/console.time (param $0 i32) - local.get $0 + (func $~lib/console/console.time (param $label i32) + local.get $label call $~lib/bindings/dom/console.time ) - (func $~lib/console/console.timeLog (param $0 i32) - local.get $0 + (func $~lib/console/console.timeLog (param $label i32) + local.get $label call $~lib/bindings/dom/console.timeLog ) - (func $~lib/console/console.timeEnd (param $0 i32) - local.get $0 + (func $~lib/console/console.timeEnd (param $label i32) + local.get $label call $~lib/bindings/dom/console.timeEnd ) (func $~start diff --git a/tests/compiler/std/dataview.debug.wat b/tests/compiler/std/dataview.debug.wat index 33cc41a8e5..e28ab3a499 100644 --- a/tests/compiler/std/dataview.debug.wat +++ b/tests/compiler/std/dataview.debug.wat @@ -65,50 +65,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -121,58 +121,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -189,12 +189,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -204,19 +204,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -227,27 +227,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -255,35 +255,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -293,15 +293,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -311,25 +311,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -337,33 +337,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -391,23 +391,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -419,15 +419,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -439,33 +439,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -473,21 +473,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -502,36 +502,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -539,67 +539,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -609,22 +609,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -634,12 +634,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -651,75 +651,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -731,38 +731,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -776,12 +776,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -792,38 +792,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -831,21 +831,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -860,101 +860,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -965,7 +965,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -976,26 +976,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1008,27 +1008,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1042,11 +1042,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1057,66 +1057,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1126,10 +1126,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1140,13 +1140,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1157,109 +1157,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1267,7 +1267,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1284,23 +1284,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1312,54 +1312,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1380,30 +1380,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1413,9 +1413,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1425,8 +1425,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1434,43 +1434,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1482,17 +1482,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1506,7 +1506,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1524,7 +1524,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1534,12 +1534,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1561,7 +1561,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1581,14 +1581,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1601,8 +1601,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1613,37 +1613,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1651,16 +1651,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1668,21 +1668,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1697,12 +1697,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1710,49 +1710,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1762,90 +1762,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1854,22 +1854,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1878,27 +1878,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1913,69 +1913,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1990,29 +1990,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2025,13 +2025,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2042,25 +2042,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2075,10 +2075,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2096,49 +2096,49 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32) + (local $child i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $childPtr i32.eqz if return end i32.const 1 drop - local.get $0 + local.get $parentPtr i32.eqz if i32.const 0 @@ -2148,37 +2148,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $childPtr i32.const 20 i32.sub - local.set $3 - local.get $3 + local.set $child + local.get $child call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $0 + local.get $parentPtr i32.const 20 i32.sub - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 call $~lib/rt/itcms/Object#get:color - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $2 + local.get $expectMultiple if - local.get $4 + local.get $var$4 call $~lib/rt/itcms/Object#makeGray else - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end else - local.get $5 + local.get $var$5 i32.const 3 i32.eq if (result i32) @@ -2189,7 +2189,7 @@ i32.const 0 end if - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end end @@ -2214,9 +2214,9 @@ local.get $1 i32.store offset=8 ) - (func $~lib/typedarray/Uint8Array#__set (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - local.get $0 + (func $~lib/typedarray/Uint8Array#__set (param $this i32) (param $index i32) (param $value i32) + local.get $index + local.get $this i32.load offset=8 i32.ge_u if @@ -2227,15 +2227,15 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.add - local.get $2 + local.get $value i32.store8 ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (param $0 i32) (result i32) - local.get $0 + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 @@ -2259,22 +2259,22 @@ local.get $1 i32.store offset=8 ) - (func $~lib/arraybuffer/ArrayBufferView#get:byteOffset (param $0 i32) (result i32) - local.get $0 + (func $~lib/arraybuffer/ArrayBufferView#get:byteOffset (param $this i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this i32.load i32.sub ) - (func $~lib/dataview/DataView#getFloat32 (param $0 i32) (param $1 i32) (param $2 i32) (result f32) - (local $3 i32) - local.get $1 + (func $~lib/dataview/DataView#getFloat32 (param $this i32) (param $byteOffset i32) (param $littleEndian i32) (result f32) + (local $var$3 i32) + local.get $byteOffset i32.const 31 i32.shr_u - local.get $1 + local.get $byteOffset i32.const 4 i32.add - local.get $0 + local.get $this i32.load offset=8 i32.gt_s i32.or @@ -2286,25 +2286,25 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $littleEndian if (result f32) - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $byteOffset i32.add f32.load else - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $byteOffset i32.add i32.load - local.tee $3 + local.tee $var$3 i32.const -16711936 i32.and i32.const 8 i32.rotl - local.get $3 + local.get $var$3 i32.const 16711935 i32.and i32.const 8 @@ -2313,16 +2313,16 @@ f32.reinterpret_i32 end ) - (func $~lib/dataview/DataView#getFloat64 (param $0 i32) (param $1 i32) (param $2 i32) (result f64) - (local $3 i64) - (local $4 i64) - local.get $1 + (func $~lib/dataview/DataView#getFloat64 (param $this i32) (param $byteOffset i32) (param $littleEndian i32) (result f64) + (local $var$3 i64) + (local $var$4 i64) + local.get $byteOffset i32.const 31 i32.shr_u - local.get $1 + local.get $byteOffset i32.const 8 i32.add - local.get $0 + local.get $this i32.load offset=8 i32.gt_s i32.or @@ -2334,36 +2334,36 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $littleEndian if (result f64) - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $byteOffset i32.add f64.load else - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $byteOffset i32.add i64.load - local.tee $3 + local.tee $var$3 i64.const 8 i64.shr_u i64.const 71777214294589695 i64.and - local.get $3 + local.get $var$3 i64.const 71777214294589695 i64.and i64.const 8 i64.shl i64.or - local.tee $4 + local.tee $var$4 i64.const 16 i64.shr_u i64.const 281470681808895 i64.and - local.get $4 + local.get $var$4 i64.const 281470681808895 i64.and i64.const 16 @@ -2374,9 +2374,9 @@ f64.reinterpret_i64 end ) - (func $~lib/dataview/DataView#getInt8 (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 + (func $~lib/dataview/DataView#getInt8 (param $this i32) (param $byteOffset i32) (result i32) + local.get $byteOffset + local.get $this i32.load offset=8 i32.ge_u if @@ -2387,22 +2387,22 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $byteOffset i32.add i32.load8_s ) - (func $~lib/dataview/DataView#getInt16 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $1 + (func $~lib/dataview/DataView#getInt16 (param $this i32) (param $byteOffset i32) (param $littleEndian i32) (result i32) + (local $result i32) + (local $var$4 i32) + local.get $byteOffset i32.const 31 i32.shr_u - local.get $1 + local.get $byteOffset i32.const 2 i32.add - local.get $0 + local.get $this i32.load offset=8 i32.gt_s i32.or @@ -2414,38 +2414,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $byteOffset i32.add i32.load16_s - local.set $3 - local.get $2 + local.set $result + local.get $littleEndian if (result i32) - local.get $3 + local.get $result else - local.get $3 + local.get $result i32.const 65535 i32.and - local.tee $4 + local.tee $var$4 i32.const 8 i32.shl - local.get $4 + local.get $var$4 i32.const 8 i32.shr_u i32.or end ) - (func $~lib/dataview/DataView#getInt32 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $1 + (func $~lib/dataview/DataView#getInt32 (param $this i32) (param $byteOffset i32) (param $littleEndian i32) (result i32) + (local $result i32) + (local $var$4 i32) + local.get $byteOffset i32.const 31 i32.shr_u - local.get $1 + local.get $byteOffset i32.const 4 i32.add - local.get $0 + local.get $this i32.load offset=8 i32.gt_s i32.or @@ -2457,23 +2457,23 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $byteOffset i32.add i32.load - local.set $3 - local.get $2 + local.set $result + local.get $littleEndian if (result i32) - local.get $3 + local.get $result else - local.get $3 - local.tee $4 + local.get $result + local.tee $var$4 i32.const -16711936 i32.and i32.const 8 i32.rotl - local.get $4 + local.get $var$4 i32.const 16711935 i32.and i32.const 8 @@ -2481,17 +2481,17 @@ i32.or end ) - (func $~lib/dataview/DataView#getInt64 (param $0 i32) (param $1 i32) (param $2 i32) (result i64) - (local $3 i64) - (local $4 i64) - (local $5 i64) - local.get $1 + (func $~lib/dataview/DataView#getInt64 (param $this i32) (param $byteOffset i32) (param $littleEndian i32) (result i64) + (local $result i64) + (local $var$4 i64) + (local $var$5 i64) + local.get $byteOffset i32.const 31 i32.shr_u - local.get $1 + local.get $byteOffset i32.const 8 i32.add - local.get $0 + local.get $this i32.load offset=8 i32.gt_s i32.or @@ -2503,34 +2503,34 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $byteOffset i32.add i64.load - local.set $3 - local.get $2 + local.set $result + local.get $littleEndian if (result i64) - local.get $3 + local.get $result else - local.get $3 - local.tee $4 + local.get $result + local.tee $var$4 i64.const 8 i64.shr_u i64.const 71777214294589695 i64.and - local.get $4 + local.get $var$4 i64.const 71777214294589695 i64.and i64.const 8 i64.shl i64.or - local.tee $5 + local.tee $var$5 i64.const 16 i64.shr_u i64.const 281470681808895 i64.and - local.get $5 + local.get $var$5 i64.const 281470681808895 i64.and i64.const 16 @@ -2540,9 +2540,9 @@ i64.rotr end ) - (func $~lib/dataview/DataView#getUint8 (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 + (func $~lib/dataview/DataView#getUint8 (param $this i32) (param $byteOffset i32) (result i32) + local.get $byteOffset + local.get $this i32.load offset=8 i32.ge_u if @@ -2553,22 +2553,22 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $byteOffset i32.add i32.load8_u ) - (func $~lib/dataview/DataView#getUint16 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $1 + (func $~lib/dataview/DataView#getUint16 (param $this i32) (param $byteOffset i32) (param $littleEndian i32) (result i32) + (local $result i32) + (local $var$4 i32) + local.get $byteOffset i32.const 31 i32.shr_u - local.get $1 + local.get $byteOffset i32.const 2 i32.add - local.get $0 + local.get $this i32.load offset=8 i32.gt_s i32.or @@ -2580,36 +2580,36 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $byteOffset i32.add i32.load16_u - local.set $3 - local.get $2 + local.set $result + local.get $littleEndian if (result i32) - local.get $3 + local.get $result else - local.get $3 - local.tee $4 + local.get $result + local.tee $var$4 i32.const 8 i32.shl - local.get $4 + local.get $var$4 i32.const 8 i32.shr_u i32.or end ) - (func $~lib/dataview/DataView#getUint32 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $1 + (func $~lib/dataview/DataView#getUint32 (param $this i32) (param $byteOffset i32) (param $littleEndian i32) (result i32) + (local $result i32) + (local $var$4 i32) + local.get $byteOffset i32.const 31 i32.shr_u - local.get $1 + local.get $byteOffset i32.const 4 i32.add - local.get $0 + local.get $this i32.load offset=8 i32.gt_s i32.or @@ -2621,23 +2621,23 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $byteOffset i32.add i32.load - local.set $3 - local.get $2 + local.set $result + local.get $littleEndian if (result i32) - local.get $3 + local.get $result else - local.get $3 - local.tee $4 + local.get $result + local.tee $var$4 i32.const -16711936 i32.and i32.const 8 i32.rotl - local.get $4 + local.get $var$4 i32.const 16711935 i32.and i32.const 8 @@ -2645,17 +2645,17 @@ i32.or end ) - (func $~lib/dataview/DataView#getUint64 (param $0 i32) (param $1 i32) (param $2 i32) (result i64) - (local $3 i64) - (local $4 i64) - (local $5 i64) - local.get $1 + (func $~lib/dataview/DataView#getUint64 (param $this i32) (param $byteOffset i32) (param $littleEndian i32) (result i64) + (local $result i64) + (local $var$4 i64) + (local $var$5 i64) + local.get $byteOffset i32.const 31 i32.shr_u - local.get $1 + local.get $byteOffset i32.const 8 i32.add - local.get $0 + local.get $this i32.load offset=8 i32.gt_s i32.or @@ -2667,34 +2667,34 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $byteOffset i32.add i64.load - local.set $3 - local.get $2 + local.set $result + local.get $littleEndian if (result i64) - local.get $3 + local.get $result else - local.get $3 - local.tee $4 + local.get $result + local.tee $var$4 i64.const 8 i64.shr_u i64.const 71777214294589695 i64.and - local.get $4 + local.get $var$4 i64.const 71777214294589695 i64.and i64.const 8 i64.shl i64.or - local.tee $5 + local.tee $var$5 i64.const 16 i64.shr_u i64.const 281470681808895 i64.and - local.get $5 + local.get $var$5 i64.const 281470681808895 i64.and i64.const 16 @@ -2704,15 +2704,15 @@ i64.rotr end ) - (func $~lib/dataview/DataView#setFloat32 (param $0 i32) (param $1 i32) (param $2 f32) (param $3 i32) - (local $4 i32) - local.get $1 + (func $~lib/dataview/DataView#setFloat32 (param $this i32) (param $byteOffset i32) (param $value f32) (param $littleEndian i32) + (local $var$4 i32) + local.get $byteOffset i32.const 31 i32.shr_u - local.get $1 + local.get $byteOffset i32.const 4 i32.add - local.get $0 + local.get $this i32.load offset=8 i32.gt_s i32.or @@ -2724,27 +2724,27 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $littleEndian if - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $byteOffset i32.add - local.get $2 + local.get $value f32.store else - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $byteOffset i32.add - local.get $2 + local.get $value i32.reinterpret_f32 - local.tee $4 + local.tee $var$4 i32.const -16711936 i32.and i32.const 8 i32.rotl - local.get $4 + local.get $var$4 i32.const 16711935 i32.and i32.const 8 @@ -2753,16 +2753,16 @@ i32.store end ) - (func $~lib/dataview/DataView#setFloat64 (param $0 i32) (param $1 i32) (param $2 f64) (param $3 i32) - (local $4 i64) - (local $5 i64) - local.get $1 + (func $~lib/dataview/DataView#setFloat64 (param $this i32) (param $byteOffset i32) (param $value f64) (param $littleEndian i32) + (local $var$4 i64) + (local $var$5 i64) + local.get $byteOffset i32.const 31 i32.shr_u - local.get $1 + local.get $byteOffset i32.const 8 i32.add - local.get $0 + local.get $this i32.load offset=8 i32.gt_s i32.or @@ -2774,38 +2774,38 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $littleEndian if - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $byteOffset i32.add - local.get $2 + local.get $value f64.store else - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $byteOffset i32.add - local.get $2 + local.get $value i64.reinterpret_f64 - local.tee $4 + local.tee $var$4 i64.const 8 i64.shr_u i64.const 71777214294589695 i64.and - local.get $4 + local.get $var$4 i64.const 71777214294589695 i64.and i64.const 8 i64.shl i64.or - local.tee $5 + local.tee $var$5 i64.const 16 i64.shr_u i64.const 281470681808895 i64.and - local.get $5 + local.get $var$5 i64.const 281470681808895 i64.and i64.const 16 @@ -2816,9 +2816,9 @@ i64.store end ) - (func $~lib/dataview/DataView#setInt8 (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - local.get $0 + (func $~lib/dataview/DataView#setInt8 (param $this i32) (param $byteOffset i32) (param $value i32) + local.get $byteOffset + local.get $this i32.load offset=8 i32.ge_u if @@ -2829,22 +2829,22 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $byteOffset i32.add - local.get $2 + local.get $value i32.store8 ) - (func $~lib/dataview/DataView#setInt16 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - local.get $1 + (func $~lib/dataview/DataView#setInt16 (param $this i32) (param $byteOffset i32) (param $value i32) (param $littleEndian i32) + (local $var$4 i32) + local.get $byteOffset i32.const 31 i32.shr_u - local.get $1 + local.get $byteOffset i32.const 2 i32.add - local.get $0 + local.get $this i32.load offset=8 i32.gt_s i32.or @@ -2856,36 +2856,36 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $byteOffset i32.add - local.get $3 + local.get $littleEndian if (result i32) - local.get $2 + local.get $value else - local.get $2 + local.get $value i32.const 65535 i32.and - local.tee $4 + local.tee $var$4 i32.const 8 i32.shl - local.get $4 + local.get $var$4 i32.const 8 i32.shr_u i32.or end i32.store16 ) - (func $~lib/dataview/DataView#setInt32 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - local.get $1 + (func $~lib/dataview/DataView#setInt32 (param $this i32) (param $byteOffset i32) (param $value i32) (param $littleEndian i32) + (local $var$4 i32) + local.get $byteOffset i32.const 31 i32.shr_u - local.get $1 + local.get $byteOffset i32.const 4 i32.add - local.get $0 + local.get $this i32.load offset=8 i32.gt_s i32.or @@ -2897,21 +2897,21 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $byteOffset i32.add - local.get $3 + local.get $littleEndian if (result i32) - local.get $2 + local.get $value else - local.get $2 - local.tee $4 + local.get $value + local.tee $var$4 i32.const -16711936 i32.and i32.const 8 i32.rotl - local.get $4 + local.get $var$4 i32.const 16711935 i32.and i32.const 8 @@ -2920,16 +2920,16 @@ end i32.store ) - (func $~lib/dataview/DataView#setInt64 (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) - (local $4 i64) - (local $5 i64) - local.get $1 + (func $~lib/dataview/DataView#setInt64 (param $this i32) (param $byteOffset i32) (param $value i64) (param $littleEndian i32) + (local $var$4 i64) + (local $var$5 i64) + local.get $byteOffset i32.const 31 i32.shr_u - local.get $1 + local.get $byteOffset i32.const 8 i32.add - local.get $0 + local.get $this i32.load offset=8 i32.gt_s i32.or @@ -2941,32 +2941,32 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $byteOffset i32.add - local.get $3 + local.get $littleEndian if (result i64) - local.get $2 + local.get $value else - local.get $2 - local.tee $4 + local.get $value + local.tee $var$4 i64.const 8 i64.shr_u i64.const 71777214294589695 i64.and - local.get $4 + local.get $var$4 i64.const 71777214294589695 i64.and i64.const 8 i64.shl i64.or - local.tee $5 + local.tee $var$5 i64.const 16 i64.shr_u i64.const 281470681808895 i64.and - local.get $5 + local.get $var$5 i64.const 281470681808895 i64.and i64.const 16 @@ -2977,9 +2977,9 @@ end i64.store ) - (func $~lib/dataview/DataView#setUint8 (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - local.get $0 + (func $~lib/dataview/DataView#setUint8 (param $this i32) (param $byteOffset i32) (param $value i32) + local.get $byteOffset + local.get $this i32.load offset=8 i32.ge_u if @@ -2990,22 +2990,22 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $byteOffset i32.add - local.get $2 + local.get $value i32.store8 ) - (func $~lib/dataview/DataView#setUint16 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - local.get $1 + (func $~lib/dataview/DataView#setUint16 (param $this i32) (param $byteOffset i32) (param $value i32) (param $littleEndian i32) + (local $var$4 i32) + local.get $byteOffset i32.const 31 i32.shr_u - local.get $1 + local.get $byteOffset i32.const 2 i32.add - local.get $0 + local.get $this i32.load offset=8 i32.gt_s i32.or @@ -3017,36 +3017,36 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $byteOffset i32.add - local.get $3 + local.get $littleEndian if (result i32) - local.get $2 + local.get $value else - local.get $2 + local.get $value i32.const 65535 i32.and - local.tee $4 + local.tee $var$4 i32.const 8 i32.shl - local.get $4 + local.get $var$4 i32.const 8 i32.shr_u i32.or end i32.store16 ) - (func $~lib/dataview/DataView#setUint32 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - local.get $1 + (func $~lib/dataview/DataView#setUint32 (param $this i32) (param $byteOffset i32) (param $value i32) (param $littleEndian i32) + (local $var$4 i32) + local.get $byteOffset i32.const 31 i32.shr_u - local.get $1 + local.get $byteOffset i32.const 4 i32.add - local.get $0 + local.get $this i32.load offset=8 i32.gt_s i32.or @@ -3058,21 +3058,21 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $byteOffset i32.add - local.get $3 + local.get $littleEndian if (result i32) - local.get $2 + local.get $value else - local.get $2 - local.tee $4 + local.get $value + local.tee $var$4 i32.const -16711936 i32.and i32.const 8 i32.rotl - local.get $4 + local.get $var$4 i32.const 16711935 i32.and i32.const 8 @@ -3081,16 +3081,16 @@ end i32.store ) - (func $~lib/dataview/DataView#setUint64 (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) - (local $4 i64) - (local $5 i64) - local.get $1 + (func $~lib/dataview/DataView#setUint64 (param $this i32) (param $byteOffset i32) (param $value i64) (param $littleEndian i32) + (local $var$4 i64) + (local $var$5 i64) + local.get $byteOffset i32.const 31 i32.shr_u - local.get $1 + local.get $byteOffset i32.const 8 i32.add - local.get $0 + local.get $this i32.load offset=8 i32.gt_s i32.or @@ -3102,32 +3102,32 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $byteOffset i32.add - local.get $3 + local.get $littleEndian if (result i64) - local.get $2 + local.get $value else - local.get $2 - local.tee $4 + local.get $value + local.tee $var$4 i64.const 8 i64.shr_u i64.const 71777214294589695 i64.and - local.get $4 + local.get $var$4 i64.const 71777214294589695 i64.and i64.const 8 i64.shl i64.or - local.tee $5 + local.tee $var$5 i64.const 16 i64.shr_u i64.const 281470681808895 i64.and - local.get $5 + local.get $var$5 i64.const 281470681808895 i64.and i64.const 16 @@ -3138,7 +3138,7 @@ end i64.store ) - (func $~lib/dataview/DataView#constructor@varargs (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/dataview/DataView#constructor@varargs (param $this i32) (param $buffer i32) (param $byteOffset i32) (param $byteLength i32) (result i32) block $2of2 block $1of2 block $0of2 @@ -3151,27 +3151,27 @@ unreachable end i32.const 0 - local.set $2 + local.set $byteOffset end - local.get $1 + local.get $buffer call $~lib/arraybuffer/ArrayBuffer#get:byteLength - local.set $3 + local.set $byteLength end - local.get $0 - local.get $1 - local.get $2 - local.get $3 + local.get $this + local.get $buffer + local.get $byteOffset + local.get $byteLength call $~lib/dataview/DataView#constructor ) - (func $~lib/dataview/DataView#get:byteOffset (param $0 i32) (result i32) - local.get $0 + (func $~lib/dataview/DataView#get:byteOffset (param $this i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this i32.load i32.sub ) (func $~lib/rt/itcms/__collect - (local $0 i32) + (local $var$0 i32) i32.const 0 drop global.get $~lib/rt/itcms/state @@ -3182,8 +3182,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -3197,8 +3197,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop diff --git a/tests/compiler/std/date.debug.wat b/tests/compiler/std/date.debug.wat index 5a5484b126..36eb5d5931 100644 --- a/tests/compiler/std/date.debug.wat +++ b/tests/compiler/std/date.debug.wat @@ -161,47 +161,47 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (export "_start" (func $~start)) - (func $~lib/date/daysSinceEpoch (param $0 i32) (param $1 i32) (param $2 i32) (result i64) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $0 - local.get $1 + (func $~lib/date/daysSinceEpoch (param $y i32) (param $m i32) (param $d i32) (result i64) + (local $var$3 i32) + (local $var$4 i32) + (local $era i32) + (local $yoe i32) + (local $doy i32) + (local $doe i32) + local.get $y + local.get $m i32.const 2 i32.le_s i32.sub - local.set $0 - local.get $0 - local.set $4 + local.set $y + local.get $y + local.set $var$4 i32.const 400 - local.set $3 - local.get $4 - local.get $4 + local.set $var$3 + local.get $var$4 + local.get $var$4 i32.const 0 i32.lt_s if (result i32) - local.get $3 + local.get $var$3 i32.const 1 i32.sub else i32.const 0 end i32.sub - local.get $3 + local.get $var$3 i32.div_s - local.set $5 - local.get $0 - local.get $5 + local.set $era + local.get $y + local.get $era i32.const 400 i32.mul i32.sub - local.set $6 + local.set $yoe i32.const 153 - local.get $1 - local.get $1 + local.get $m + local.get $m i32.const 2 i32.gt_s if (result i32) @@ -215,103 +215,103 @@ i32.add i32.const 5 i32.div_u - local.get $2 + local.get $d i32.add i32.const 1 i32.sub - local.set $7 - local.get $6 + local.set $doy + local.get $yoe i32.const 365 i32.mul - local.get $6 + local.get $yoe i32.const 4 i32.div_u i32.add - local.get $6 + local.get $yoe i32.const 100 i32.div_u i32.sub - local.get $7 + local.get $doy i32.add - local.set $8 - local.get $5 + local.set $doe + local.get $era i32.const 146097 i32.mul - local.get $8 + local.get $doe i32.add i32.const 719468 i32.sub i64.extend_i32_s ) - (func $~lib/date/epochMillis (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) (param $6 i32) (result i64) - local.get $0 - local.get $1 - local.get $2 + (func $~lib/date/epochMillis (param $year i32) (param $month i32) (param $day i32) (param $hour i32) (param $minute i32) (param $second i32) (param $milliseconds i32) (result i64) + local.get $year + local.get $month + local.get $day call $~lib/date/daysSinceEpoch i32.const 86400000 i64.extend_i32_s i64.mul - local.get $3 + local.get $hour i32.const 3600000 i32.mul i64.extend_i32_s i64.add - local.get $4 + local.get $minute i32.const 60000 i32.mul i64.extend_i32_s i64.add - local.get $5 + local.get $second i32.const 1000 i32.mul i64.extend_i32_s i64.add - local.get $6 + local.get $milliseconds i64.extend_i32_s i64.add ) - (func $~lib/date/invalidDate (param $0 i64) (result i32) - local.get $0 + (func $~lib/date/invalidDate (param $millis i64) (result i32) + local.get $millis i64.const 0 i64.const 8640000000000000 i64.sub i64.lt_s - local.get $0 + local.get $millis i64.const 8640000000000000 i64.gt_s i32.or ) - (func $~lib/date/dateFromEpoch (param $0 i64) (result i32) - (local $1 i64) - (local $2 i64) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i64) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - local.get $0 - local.set $2 + (func $~lib/date/dateFromEpoch (param $ms i64) (result i32) + (local $var$1 i64) + (local $var$2 i64) + (local $da i32) + (local $var$4 i32) + (local $var$5 i32) + (local $q0 i32) + (local $r1 i32) + (local $u1 i64) + (local $dm1 i32) + (local $n1 i32) + (local $year i32) + (local $mo i32) + local.get $ms + local.set $var$2 i32.const 86400000 i64.extend_i32_s - local.set $1 - local.get $2 - local.get $2 + local.set $var$1 + local.get $var$2 + local.get $var$2 i64.const 0 i64.lt_s if (result i64) - local.get $1 + local.get $var$1 i64.const 1 i64.sub else i64.const 0 end i64.sub - local.get $1 + local.get $var$1 i64.div_s i32.wrap_i64 i32.const 4 @@ -322,64 +322,64 @@ i32.add i32.const 3 i32.or - local.set $3 - local.get $3 - local.set $5 + local.set $da + local.get $da + local.set $var$5 i32.const 146097 - local.set $4 - local.get $5 - local.get $5 + local.set $var$4 + local.get $var$5 + local.get $var$5 i32.const 0 i32.lt_s if (result i32) - local.get $4 + local.get $var$4 i32.const 1 i32.sub else i32.const 0 end i32.sub - local.get $4 + local.get $var$4 i32.div_s - local.set $6 - local.get $3 - local.get $6 + local.set $q0 + local.get $da + local.get $q0 i32.const 146097 i32.mul i32.sub - local.set $7 - local.get $7 + local.set $r1 + local.get $r1 i32.const 3 i32.or i64.extend_i32_u i64.const 2939745 i64.mul - local.set $8 - local.get $8 + local.set $u1 + local.get $u1 i32.wrap_i64 i32.const 11758980 i32.div_u - local.set $9 + local.set $dm1 i32.const 2141 - local.get $9 + local.get $dm1 i32.mul i32.const 197913 i32.add - local.set $10 + local.set $n1 i32.const 100 - local.get $6 + local.get $q0 i32.mul - local.get $8 + local.get $u1 i64.const 32 i64.shr_u i32.wrap_i64 i32.add - local.set $11 - local.get $10 + local.set $year + local.get $n1 i32.const 16 i32.shr_u - local.set $12 - local.get $10 + local.set $mo + local.get $n1 i32.const 65535 i32.and i32.const 2141 @@ -387,22 +387,22 @@ i32.const 1 i32.add global.set $~lib/date/_day - local.get $9 + local.get $dm1 i32.const 306 i32.ge_u if - local.get $12 + local.get $mo i32.const 12 i32.sub - local.set $12 - local.get $11 + local.set $mo + local.get $year i32.const 1 i32.add - local.set $11 + local.set $year end - local.get $12 + local.get $mo global.set $~lib/date/_month - local.get $11 + local.get $year ) (func $~lib/date/Date#set:year (param $0 i32) (param $1 i32) local.get $0 @@ -429,50 +429,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -485,58 +485,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -553,12 +553,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -568,19 +568,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -591,27 +591,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -619,35 +619,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -657,15 +657,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -675,25 +675,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -701,33 +701,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -755,23 +755,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -783,15 +783,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -803,33 +803,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -837,21 +837,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -866,36 +866,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -903,67 +903,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -973,22 +973,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -998,12 +998,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -1015,75 +1015,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -1095,38 +1095,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -1140,12 +1140,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -1156,38 +1156,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1195,21 +1195,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -1224,101 +1224,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -1329,7 +1329,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1340,26 +1340,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1372,27 +1372,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1406,11 +1406,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1421,66 +1421,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1490,10 +1490,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1504,13 +1504,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1521,109 +1521,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1631,7 +1631,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1648,23 +1648,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1676,54 +1676,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1744,30 +1744,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1777,9 +1777,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1789,8 +1789,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1798,43 +1798,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1846,17 +1846,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1870,7 +1870,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1888,7 +1888,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1898,12 +1898,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1925,7 +1925,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1945,14 +1945,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1965,8 +1965,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1977,37 +1977,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -2015,16 +2015,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -2032,21 +2032,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -2061,12 +2061,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -2074,49 +2074,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -2126,90 +2126,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -2218,22 +2218,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -2242,27 +2242,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -2277,69 +2277,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2354,29 +2354,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2389,13 +2389,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2406,25 +2406,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2439,10 +2439,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2460,44 +2460,44 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) (func $~lib/date/Date#set:epochMillis (param $0 i32) (param $1 i64) local.get $0 local.get $1 i64.store offset=16 ) - (func $~lib/date/Date#setTime (param $0 i32) (param $1 i64) (result i64) - local.get $1 + (func $~lib/date/Date#setTime (param $this i32) (param $time i64) (result i64) + local.get $time call $~lib/date/invalidDate if i32.const 32 @@ -2507,41 +2507,41 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $this + local.get $time call $~lib/date/Date#set:epochMillis - local.get $0 - local.get $1 + local.get $this + local.get $time call $~lib/date/dateFromEpoch call $~lib/date/Date#set:year - local.get $0 + local.get $this global.get $~lib/date/_month call $~lib/date/Date#set:month - local.get $0 + local.get $this global.get $~lib/date/_day call $~lib/date/Date#set:day - local.get $1 + local.get $time ) - (func $~lib/date/Date#getUTCHours (param $0 i32) (result i32) - (local $1 i64) - (local $2 i64) - (local $3 i64) - local.get $0 + (func $~lib/date/Date#getUTCHours (param $this i32) (result i32) + (local $var$1 i64) + (local $var$2 i64) + (local $var$3 i64) + local.get $this i64.load offset=16 - local.set $2 + local.set $var$2 i32.const 86400000 i64.extend_i32_s - local.set $1 - local.get $2 - local.get $1 + local.set $var$1 + local.get $var$2 + local.get $var$1 i64.rem_s - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i64.const 0 i64.lt_s if (result i64) - local.get $1 + local.get $var$1 else i64.const 0 end @@ -2550,26 +2550,26 @@ i32.const 3600000 i32.div_s ) - (func $~lib/date/Date#getUTCMinutes (param $0 i32) (result i32) - (local $1 i64) - (local $2 i64) - (local $3 i64) - local.get $0 + (func $~lib/date/Date#getUTCMinutes (param $this i32) (result i32) + (local $var$1 i64) + (local $var$2 i64) + (local $var$3 i64) + local.get $this i64.load offset=16 - local.set $2 + local.set $var$2 i32.const 3600000 i64.extend_i32_s - local.set $1 - local.get $2 - local.get $1 + local.set $var$1 + local.get $var$2 + local.get $var$1 i64.rem_s - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i64.const 0 i64.lt_s if (result i64) - local.get $1 + local.get $var$1 else i64.const 0 end @@ -2578,26 +2578,26 @@ i32.const 60000 i32.div_s ) - (func $~lib/date/Date#getUTCSeconds (param $0 i32) (result i32) - (local $1 i64) - (local $2 i64) - (local $3 i64) - local.get $0 + (func $~lib/date/Date#getUTCSeconds (param $this i32) (result i32) + (local $var$1 i64) + (local $var$2 i64) + (local $var$3 i64) + local.get $this i64.load offset=16 - local.set $2 + local.set $var$2 i32.const 60000 i64.extend_i32_s - local.set $1 - local.get $2 - local.get $1 + local.set $var$1 + local.get $var$2 + local.get $var$1 i64.rem_s - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i64.const 0 i64.lt_s if (result i64) - local.get $1 + local.get $var$1 else i64.const 0 end @@ -2606,38 +2606,38 @@ i32.const 1000 i32.div_s ) - (func $~lib/date/Date#getUTCMilliseconds (param $0 i32) (result i32) - (local $1 i64) - (local $2 i64) - (local $3 i64) - local.get $0 + (func $~lib/date/Date#getUTCMilliseconds (param $this i32) (result i32) + (local $var$1 i64) + (local $var$2 i64) + (local $var$3 i64) + local.get $this i64.load offset=16 - local.set $2 + local.set $var$2 i32.const 1000 i64.extend_i32_s - local.set $1 - local.get $2 - local.get $1 + local.set $var$1 + local.get $var$2 + local.get $var$1 i64.rem_s - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i64.const 0 i64.lt_s if (result i64) - local.get $1 + local.get $var$1 else i64.const 0 end i64.add i32.wrap_i64 ) - (func $~lib/date/Date#setUTCMilliseconds (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/date/Date#setUTCMilliseconds (param $this i32) (param $millis i32) + local.get $this + local.get $this i64.load offset=16 - local.get $1 - local.get $0 + local.get $millis + local.get $this call $~lib/date/Date#getUTCMilliseconds i32.sub i64.extend_i32_s @@ -2645,12 +2645,12 @@ call $~lib/date/Date#setTime drop ) - (func $~lib/date/Date#setUTCSeconds (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/date/Date#setUTCSeconds (param $this i32) (param $seconds i32) + local.get $this + local.get $this i64.load offset=16 - local.get $1 - local.get $0 + local.get $seconds + local.get $this call $~lib/date/Date#getUTCSeconds i32.sub i32.const 1000 @@ -2660,12 +2660,12 @@ call $~lib/date/Date#setTime drop ) - (func $~lib/date/Date#setUTCMinutes (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/date/Date#setUTCMinutes (param $this i32) (param $minutes i32) + local.get $this + local.get $this i64.load offset=16 - local.get $1 - local.get $0 + local.get $minutes + local.get $this call $~lib/date/Date#getUTCMinutes i32.sub i32.const 60000 @@ -2675,12 +2675,12 @@ call $~lib/date/Date#setTime drop ) - (func $~lib/date/Date#setUTCHours (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/date/Date#setUTCHours (param $this i32) (param $hours i32) + local.get $this + local.get $this i64.load offset=16 - local.get $1 - local.get $0 + local.get $hours + local.get $this call $~lib/date/Date#getUTCHours i32.sub i32.const 3600000 @@ -2690,82 +2690,82 @@ call $~lib/date/Date#setTime drop ) - (func $~lib/date/join (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i64) (result i64) - (local $4 i64) - (local $5 i64) - (local $6 i64) - local.get $0 - local.get $1 - local.get $2 + (func $~lib/date/join (param $year i32) (param $month i32) (param $day i32) (param $ms i64) (result i64) + (local $var$4 i64) + (local $var$5 i64) + (local $var$6 i64) + local.get $year + local.get $month + local.get $day call $~lib/date/daysSinceEpoch i32.const 86400000 i64.extend_i32_s i64.mul - local.get $3 - local.set $5 + local.get $ms + local.set $var$5 i32.const 86400000 i64.extend_i32_s - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i64.rem_s - local.set $6 - local.get $6 - local.get $6 + local.set $var$6 + local.get $var$6 + local.get $var$6 i64.const 0 i64.lt_s if (result i64) - local.get $4 + local.get $var$4 else i64.const 0 end i64.add i64.add ) - (func $~lib/date/Date#setUTCDate (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/date/Date#setUTCDate (param $this i32) (param $day i32) + local.get $this i32.load offset=8 - local.get $1 + local.get $day i32.eq if return end - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load - local.get $0 + local.get $this i32.load offset=4 - local.get $1 - local.get $0 + local.get $day + local.get $this i64.load offset=16 call $~lib/date/join call $~lib/date/Date#setTime drop ) - (func $~lib/date/Date#setUTCMonth (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/date/Date#setUTCMonth (param $this i32) (param $month i32) (param $day i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $month i32.const 1 i32.add i32.eq if return end - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load - local.get $1 + local.get $month i32.const 1 i32.add - local.get $2 - local.get $0 + local.get $day + local.get $this i64.load offset=16 call $~lib/date/join call $~lib/date/Date#setTime drop ) - (func $~lib/date/Date#setUTCMonth@varargs (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/date/Date#setUTCMonth@varargs (param $this i32) (param $month i32) (param $day i32) block $1of1 block $0of1 block $outOfRange @@ -2776,156 +2776,156 @@ end unreachable end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $day end - local.get $0 - local.get $1 - local.get $2 + local.get $this + local.get $month + local.get $day call $~lib/date/Date#setUTCMonth ) - (func $~lib/date/Date#setUTCFullYear (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/date/Date#setUTCFullYear (param $this i32) (param $year i32) + local.get $this i32.load - local.get $1 + local.get $year i32.eq if return end - local.get $0 - local.get $1 - local.get $0 + local.get $this + local.get $year + local.get $this i32.load offset=4 - local.get $0 + local.get $this i32.load offset=8 - local.get $0 + local.get $this i64.load offset=16 call $~lib/date/join call $~lib/date/Date#setTime drop ) - (func $~lib/date/dayOfWeek (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - local.get $1 + (func $~lib/date/dayOfWeek (param $year i32) (param $month i32) (param $day i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $year + local.get $month i32.const 3 i32.lt_s i32.sub - local.set $0 - local.get $0 - local.get $0 - local.set $4 + local.set $year + local.get $year + local.get $year + local.set $var$4 i32.const 4 - local.set $3 - local.get $4 - local.get $4 + local.set $var$3 + local.get $var$4 + local.get $var$4 i32.const 0 i32.lt_s if (result i32) - local.get $3 + local.get $var$3 i32.const 1 i32.sub else i32.const 0 end i32.sub - local.get $3 + local.get $var$3 i32.div_s - local.get $0 - local.set $4 + local.get $year + local.set $var$4 i32.const 100 - local.set $3 - local.get $4 - local.get $4 + local.set $var$3 + local.get $var$4 + local.get $var$4 i32.const 0 i32.lt_s if (result i32) - local.get $3 + local.get $var$3 i32.const 1 i32.sub else i32.const 0 end i32.sub - local.get $3 + local.get $var$3 i32.div_s i32.sub - local.get $0 - local.set $4 + local.get $year + local.set $var$4 i32.const 400 - local.set $3 - local.get $4 - local.get $4 + local.set $var$3 + local.get $var$4 + local.get $var$4 i32.const 0 i32.lt_s if (result i32) - local.get $3 + local.get $var$3 i32.const 1 i32.sub else i32.const 0 end i32.sub - local.get $3 + local.get $var$3 i32.div_s i32.add i32.add - local.set $0 + local.set $year i32.const 556 - local.get $1 + local.get $month i32.add i32.const 1 i32.sub i32.load8_u - local.set $1 - local.get $0 - local.get $1 + local.set $month + local.get $year + local.get $month i32.add - local.get $2 + local.get $day i32.add - local.set $4 + local.set $var$4 i32.const 7 - local.set $3 - local.get $4 - local.get $3 + local.set $var$3 + local.get $var$4 + local.get $var$3 i32.rem_s - local.set $5 - local.get $5 - local.get $5 + local.set $var$5 + local.get $var$5 + local.get $var$5 i32.const 0 i32.lt_s if (result i32) - local.get $3 + local.get $var$3 else i32.const 0 end i32.add ) - (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) - local.get $0 + (func $~lib/util/number/decimalCount32 (param $value i32) (result i32) + local.get $value i32.const 100000 i32.lt_u if - local.get $0 + local.get $value i32.const 100 i32.lt_u if i32.const 1 - local.get $0 + local.get $value i32.const 10 i32.ge_u i32.add return else i32.const 3 - local.get $0 + local.get $value i32.const 10000 i32.ge_u i32.add - local.get $0 + local.get $value i32.const 1000 i32.ge_u i32.add @@ -2933,23 +2933,23 @@ end unreachable else - local.get $0 + local.get $value i32.const 10000000 i32.lt_u if i32.const 6 - local.get $0 + local.get $value i32.const 1000000 i32.ge_u i32.add return else i32.const 8 - local.get $0 + local.get $value i32.const 1000000000 i32.ge_u i32.add - local.get $0 + local.get $value i32.const 100000000 i32.ge_u i32.add @@ -2959,66 +2959,66 @@ end unreachable ) - (func $~lib/util/number/utoa32_dec_lut (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 i64) - (local $9 i64) - (local $10 i32) - (local $11 i32) + (func $~lib/util/number/utoa32_dec_lut (param $buffer i32) (param $num i32) (param $offset i32) + (local $var$3 i32) + (local $t i32) + (local $r i32) + (local $d1 i32) + (local $d2 i32) + (local $digits1 i64) + (local $digits2 i64) + (local $var$10 i32) + (local $var$11 i32) loop $while-continue|0 - local.get $1 + local.get $num i32.const 10000 i32.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $1 + local.get $num i32.const 10000 i32.div_u - local.set $4 - local.get $1 + local.set $t + local.get $num i32.const 10000 i32.rem_u - local.set $5 - local.get $4 - local.set $1 - local.get $5 + local.set $r + local.get $t + local.set $num + local.get $r i32.const 100 i32.div_u - local.set $6 - local.get $5 + local.set $d1 + local.get $r i32.const 100 i32.rem_u - local.set $7 + local.set $d2 i32.const 860 - local.get $6 + local.get $d1 i32.const 2 i32.shl i32.add i64.load32_u - local.set $8 + local.set $digits1 i32.const 860 - local.get $7 + local.get $d2 i32.const 2 i32.shl i32.add i64.load32_u - local.set $9 - local.get $2 + local.set $digits2 + local.get $offset i32.const 4 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $8 - local.get $9 + local.get $digits1 + local.get $digits2 i64.const 32 i64.shl i64.or @@ -3026,99 +3026,99 @@ br $while-continue|0 end end - local.get $1 + local.get $num i32.const 100 i32.ge_u if - local.get $1 + local.get $num i32.const 100 i32.div_u - local.set $3 - local.get $1 + local.set $var$3 + local.get $num i32.const 100 i32.rem_u - local.set $10 - local.get $3 - local.set $1 - local.get $2 + local.set $var$10 + local.get $var$3 + local.set $num + local.get $offset i32.const 2 i32.sub - local.set $2 + local.set $offset i32.const 860 - local.get $10 + local.get $var$10 i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store end - local.get $1 + local.get $num i32.const 10 i32.ge_u if - local.get $2 + local.get $offset i32.const 2 i32.sub - local.set $2 + local.set $offset i32.const 860 - local.get $1 + local.get $num i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store else - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 + local.set $offset i32.const 48 - local.get $1 + local.get $num i32.add - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store16 end ) - (func $~lib/util/number/utoa_hex_lut (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i32) + (func $~lib/util/number/utoa_hex_lut (param $buffer i32) (param $num i64) (param $offset i32) + (local $var$3 i32) loop $while-continue|0 - local.get $2 + local.get $offset i32.const 2 i32.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $2 + local.get $offset i32.const 2 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 1280 - local.get $1 + local.get $num i32.wrap_i64 i32.const 255 i32.and @@ -3127,20 +3127,20 @@ i32.add i32.load i32.store - local.get $1 + local.get $num i64.const 8 i64.shr_u - local.set $1 + local.set $num br $while-continue|0 end end - local.get $2 + local.get $offset i32.const 1 i32.and if - local.get $0 + local.get $buffer i32.const 1280 - local.get $1 + local.get $num i32.wrap_i64 i32.const 6 i32.shl @@ -3149,25 +3149,25 @@ i32.store16 end ) - (func $~lib/util/number/ulog_base (param $0 i64) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) - (local $4 i64) - (local $5 i32) - local.get $1 - local.set $2 - local.get $2 + (func $~lib/util/number/ulog_base (param $num i64) (param $base i32) (result i32) + (local $var$2 i32) + (local $b64 i64) + (local $b i64) + (local $e i32) + local.get $base + local.set $var$2 + local.get $var$2 i32.popcnt i32.const 1 i32.eq if i32.const 63 - local.get $0 + local.get $num i64.clz i32.wrap_i64 i32.sub i32.const 31 - local.get $1 + local.get $base i32.clz i32.sub i32.div_u @@ -3175,95 +3175,95 @@ i32.add return end - local.get $1 + local.get $base i64.extend_i32_s - local.set $3 - local.get $3 - local.set $4 + local.set $b64 + local.get $b64 + local.set $b i32.const 1 - local.set $5 + local.set $e loop $while-continue|0 - local.get $0 - local.get $4 + local.get $num + local.get $b i64.ge_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 - local.get $4 + local.get $num + local.get $b i64.div_u - local.set $0 - local.get $4 - local.get $4 + local.set $num + local.get $b + local.get $b i64.mul - local.set $4 - local.get $5 + local.set $b + local.get $e i32.const 1 i32.shl - local.set $5 + local.set $e br $while-continue|0 end end loop $while-continue|1 - local.get $0 + local.get $num i64.const 1 i64.ge_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 - local.get $3 + local.get $num + local.get $b64 i64.div_u - local.set $0 - local.get $5 + local.set $num + local.get $e i32.const 1 i32.add - local.set $5 + local.set $e br $while-continue|1 end end - local.get $5 + local.get $e i32.const 1 i32.sub ) - (func $~lib/util/number/utoa64_any_core (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i32) - (local $4 i64) - (local $5 i64) - (local $6 i64) - local.get $3 + (func $~lib/util/number/utoa64_any_core (param $buffer i32) (param $num i64) (param $offset i32) (param $radix i32) + (local $base i64) + (local $var$5 i64) + (local $q i64) + local.get $radix i64.extend_i32_s - local.set $4 - local.get $3 - local.get $3 + local.set $base + local.get $radix + local.get $radix i32.const 1 i32.sub i32.and i32.const 0 i32.eq if - local.get $3 + local.get $radix i32.ctz i32.const 7 i32.and i64.extend_i32_s - local.set $5 - local.get $4 + local.set $var$5 + local.get $base i64.const 1 i64.sub - local.set $6 + local.set $q loop $do-loop|0 - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 2336 - local.get $1 - local.get $6 + local.get $num + local.get $q i64.and i32.wrap_i64 i32.const 1 @@ -3271,34 +3271,34 @@ i32.add i32.load16_u i32.store16 - local.get $1 - local.get $5 + local.get $num + local.get $var$5 i64.shr_u - local.set $1 - local.get $1 + local.set $num + local.get $num i64.const 0 i64.ne br_if $do-loop|0 end else loop $do-loop|1 - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 - local.get $1 - local.get $4 + local.set $offset + local.get $num + local.get $base i64.div_u - local.set $6 - local.get $0 - local.get $2 + local.set $q + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 2336 - local.get $1 - local.get $6 - local.get $4 + local.get $num + local.get $q + local.get $base i64.mul i64.sub i32.wrap_i64 @@ -3307,76 +3307,76 @@ i32.add i32.load16_u i32.store16 - local.get $6 - local.set $1 - local.get $1 + local.get $q + local.set $num + local.get $num i64.const 0 i64.ne br_if $do-loop|1 end end ) - (func $~lib/number/I32#toString (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/number/I32#toString (param $this i32) (param $radix i32) (result i32) + local.get $this + local.get $radix call $~lib/util/number/itoa32 ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u ) - (func $~lib/memory/memory.repeat (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - i32.const 0 - local.set $4 - local.get $2 - local.get $3 + (func $~lib/memory/memory.repeat (param $dst i32) (param $src i32) (param $srcLength i32) (param $count i32) + (local $index i32) + (local $total i32) + (local $var$6 i32) + i32.const 0 + local.set $index + local.get $srcLength + local.get $count i32.mul - local.set $5 + local.set $total loop $while-continue|0 - local.get $4 - local.get $5 + local.get $index + local.get $total i32.lt_u - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $4 + local.get $dst + local.get $index i32.add - local.get $1 - local.get $2 + local.get $src + local.get $srcLength memory.copy - local.get $4 - local.get $2 + local.get $index + local.get $srcLength i32.add - local.set $4 + local.set $index br $while-continue|0 end end ) - (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__concat (param $left i32) (param $right i32) (result i32) + local.get $left + local.get $right call $~lib/string/String#concat ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32) + (local $child i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $childPtr i32.eqz if return end i32.const 1 drop - local.get $0 + local.get $parentPtr i32.eqz if i32.const 0 @@ -3386,37 +3386,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $childPtr i32.const 20 i32.sub - local.set $3 - local.get $3 + local.set $child + local.get $child call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $0 + local.get $parentPtr i32.const 20 i32.sub - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 call $~lib/rt/itcms/Object#get:color - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $2 + local.get $expectMultiple if - local.get $4 + local.get $var$4 call $~lib/rt/itcms/Object#makeGray else - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end else - local.get $5 + local.get $var$5 i32.const 3 i32.eq if (result i32) @@ -3427,36 +3427,36 @@ i32.const 0 end if - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end end end ) - (func $~lib/staticarray/StaticArray<~lib/string/String>#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 + (func $~lib/staticarray/StaticArray<~lib/string/String>#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store i32.const 1 drop - local.get $0 - local.get $2 + local.get $this + local.get $value i32.const 1 call $~lib/rt/itcms/__link ) - (func $~lib/staticarray/StaticArray<~lib/string/String>#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/staticarray/StaticArray<~lib/string/String>#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 2 i32.shr_u ) - (func $~lib/staticarray/StaticArray<~lib/string/String>#join (param $0 i32) (param $1 i32) (result i32) + (func $~lib/staticarray/StaticArray<~lib/string/String>#join (param $this i32) (param $separator i32) (result i32) i32.const 0 drop i32.const 0 @@ -3469,43 +3469,43 @@ drop i32.const 1 drop - local.get $0 - local.get $0 + local.get $this + local.get $this call $~lib/staticarray/StaticArray<~lib/string/String>#get:length - local.get $1 + local.get $separator call $~lib/util/string/joinStringArray return ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.get $1 + (func $~lib/util/string/compareImpl (param $str1 i32) (param $index1 i32) (param $str2 i32) (param $index2 i32) (param $len i32) (result i32) + (local $ptr1 i32) + (local $ptr2 i32) + (local $var$7 i32) + (local $a i32) + (local $b i32) + local.get $str1 + local.get $index1 i32.const 1 i32.shl i32.add - local.set $5 - local.get $2 - local.get $3 + local.set $ptr1 + local.get $str2 + local.get $index2 i32.const 1 i32.shl i32.add - local.set $6 + local.set $ptr2 i32.const 0 i32.const 2 i32.lt_s drop - local.get $4 + local.get $len i32.const 4 i32.ge_u if (result i32) - local.get $5 + local.get $ptr1 i32.const 7 i32.and - local.get $6 + local.get $ptr2 i32.const 7 i32.and i32.or @@ -3516,27 +3516,27 @@ if block $do-break|0 loop $do-loop|0 - local.get $5 + local.get $ptr1 i64.load - local.get $6 + local.get $ptr2 i64.load i64.ne if br $do-break|0 end - local.get $5 + local.get $ptr1 i32.const 8 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 8 i32.add - local.set $6 - local.get $4 + local.set $ptr2 + local.get $len i32.const 4 i32.sub - local.set $4 - local.get $4 + local.set $len + local.get $len i32.const 4 i32.ge_u br_if $do-loop|0 @@ -3544,59 +3544,59 @@ end end loop $while-continue|1 - local.get $4 - local.tee $7 + local.get $len + local.tee $var$7 i32.const 1 i32.sub - local.set $4 - local.get $7 - local.set $7 - local.get $7 + local.set $len + local.get $var$7 + local.set $var$7 + local.get $var$7 if - local.get $5 + local.get $ptr1 i32.load16_u - local.set $8 - local.get $6 + local.set $a + local.get $ptr2 i32.load16_u - local.set $9 - local.get $8 - local.get $9 + local.set $b + local.get $a + local.get $b i32.ne if - local.get $8 - local.get $9 + local.get $a + local.get $b i32.sub return end - local.get $5 + local.get $ptr1 i32.const 2 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 2 i32.add - local.set $6 + local.set $ptr2 br $while-continue|1 end end i32.const 0 ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__eq (param $left i32) (param $right i32) (result i32) + (local $leftLength i32) + local.get $left + local.get $right i32.eq if i32.const 1 return end - local.get $0 + local.get $left i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $1 + local.get $right i32.const 0 i32.eq end @@ -3604,146 +3604,146 @@ i32.const 0 return end - local.get $0 + local.get $left call $~lib/string/String#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $leftLength + local.get $leftLength + local.get $right call $~lib/string/String#get:length i32.ne if i32.const 0 return end - local.get $0 + local.get $left i32.const 0 - local.get $1 + local.get $right i32.const 0 - local.get $2 + local.get $leftLength call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/rt/__newBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - local.get $1 + (func $~lib/rt/__newBuffer (param $size i32) (param $id i32) (param $data i32) (result i32) + (local $buffer i32) + local.get $size + local.get $id call $~lib/rt/itcms/__new - local.set $3 - local.get $2 + local.set $buffer + local.get $data if - local.get $3 - local.get $2 - local.get $0 + local.get $buffer + local.get $data + local.get $size memory.copy end - local.get $3 + local.get $buffer ) - (func $~lib/staticarray/StaticArray<~lib/string/String>#__uget (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/staticarray/StaticArray<~lib/string/String>#__uget (param $this i32) (param $index i32) (result i32) + local.get $this + local.get $index i32.const 2 i32.shl i32.add i32.load ) - (func $~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 $7 i32) - local.get $1 + (func $~lib/string/String#indexOf (param $this i32) (param $search i32) (param $start i32) (result i32) + (local $searchLen i32) + (local $len i32) + (local $var$5 i32) + (local $var$6 i32) + (local $searchStart i32) + local.get $search call $~lib/string/String#get:length - local.set $3 - local.get $3 + local.set $searchLen + local.get $searchLen i32.eqz if i32.const 0 return end - local.get $0 + local.get $this call $~lib/string/String#get:length - local.set $4 - local.get $4 + local.set $len + local.get $len i32.eqz if i32.const -1 return end - local.get $2 - local.tee $5 + local.get $start + local.tee $var$5 i32.const 0 - local.tee $6 - local.get $5 - local.get $6 + local.tee $var$6 + local.get $var$5 + local.get $var$6 i32.gt_s select - local.tee $6 - local.get $4 - local.tee $5 - local.get $6 - local.get $5 + local.tee $var$6 + local.get $len + local.tee $var$5 + local.get $var$6 + local.get $var$5 i32.lt_s select - local.set $7 - local.get $4 - local.get $3 + local.set $searchStart + local.get $len + local.get $searchLen i32.sub - local.set $4 + local.set $len loop $for-loop|0 - local.get $7 - local.get $4 + local.get $searchStart + local.get $len i32.le_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $7 - local.get $1 + local.get $this + local.get $searchStart + local.get $search i32.const 0 - local.get $3 + local.get $searchLen call $~lib/util/string/compareImpl i32.eqz if - local.get $7 + local.get $searchStart return end - local.get $7 + local.get $searchStart i32.const 1 i32.add - local.set $7 + local.set $searchStart br $for-loop|0 end end i32.const -1 ) - (func $~lib/array/Array<~lib/string/String>#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array<~lib/string/String>#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store i32.const 1 drop - local.get $0 - local.get $2 + local.get $this + local.get $value i32.const 1 call $~lib/rt/itcms/__link ) - (func $~lib/rt/itcms/__renew (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/rt/itcms/__renew (param $oldPtr i32) (param $size i32) (result i32) + (local $oldObj i32) + (local $newPtr i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $oldPtr i32.const 20 i32.sub - local.set $2 - local.get $1 - local.get $2 + local.set $oldObj + local.get $size + local.get $oldObj i32.load i32.const 3 i32.const -1 @@ -3753,49 +3753,49 @@ i32.sub i32.le_u if - local.get $2 - local.get $1 + local.get $oldObj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $0 + local.get $oldPtr return end - local.get $1 - local.get $2 + local.get $size + local.get $oldObj i32.load offset=12 call $~lib/rt/itcms/__new - local.set $3 - local.get $3 - local.get $0 - local.get $1 - local.tee $4 - local.get $2 + local.set $newPtr + local.get $newPtr + local.get $oldPtr + local.get $size + local.tee $var$4 + local.get $oldObj i32.load offset=16 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.lt_u select memory.copy - local.get $3 + local.get $newPtr ) - (func $~lib/array/ensureCapacity (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $0 + (func $~lib/array/ensureCapacity (param $array i32) (param $newSize i32) (param $alignLog2 i32) (param $canGrow i32) + (local $oldCapacity i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $array i32.load offset=8 - local.set $4 - local.get $1 - local.get $4 - local.get $2 + local.set $oldCapacity + local.get $newSize + local.get $oldCapacity + local.get $alignLog2 i32.shr_u i32.gt_u if - local.get $1 + local.get $newSize i32.const 1073741820 - local.get $2 + local.get $alignLog2 i32.shr_u i32.gt_u if @@ -3806,66 +3806,66 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.load - local.set $5 - local.get $1 - local.tee $6 + local.set $var$5 + local.get $newSize + local.tee $var$6 i32.const 8 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.gt_u select - local.get $2 + local.get $alignLog2 i32.shl - local.set $6 - local.get $3 + local.set $var$6 + local.get $canGrow if - local.get $4 + local.get $oldCapacity i32.const 1 i32.shl - local.tee $7 + local.tee $var$7 i32.const 1073741820 - local.tee $8 - local.get $7 - local.get $8 + local.tee $var$8 + local.get $var$7 + local.get $var$8 i32.lt_u select - local.tee $8 - local.get $6 - local.tee $7 - local.get $8 - local.get $7 + local.tee $var$8 + local.get $var$6 + local.tee $var$7 + local.get $var$8 + local.get $var$7 i32.gt_u select - local.set $6 + local.set $var$6 end - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 call $~lib/rt/itcms/__renew - local.set $8 + local.set $var$8 i32.const 2 global.get $~lib/shared/runtime/Runtime.Incremental i32.ne drop - local.get $8 - local.get $5 + local.get $var$8 + local.get $var$5 i32.ne if - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.store - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.store offset=4 - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.const 0 call $~lib/rt/itcms/__link end - local.get $0 - local.get $6 + local.get $array + local.get $var$6 i32.store offset=8 end ) @@ -3874,51 +3874,51 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array<~lib/string/String>#push (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/array/Array<~lib/string/String>#push (param $this i32) (param $value i32) (result i32) + (local $oldLen i32) + (local $len i32) + local.get $this i32.load offset=12 - local.set $2 - local.get $2 + local.set $oldLen + local.get $oldLen i32.const 1 i32.add - local.set $3 - local.get $0 - local.get $3 + local.set $len + local.get $this + local.get $len i32.const 2 i32.const 1 call $~lib/array/ensureCapacity i32.const 1 drop - local.get $0 + local.get $this i32.load offset=4 - local.get $2 + local.get $oldLen i32.const 2 i32.shl i32.add - local.get $1 + local.get $value i32.store - local.get $0 - local.get $1 + local.get $this + local.get $value i32.const 1 call $~lib/rt/itcms/__link - local.get $0 - local.get $3 + local.get $this + local.get $len call $~lib/array/Array<~lib/string/String>#set:length_ - local.get $3 + local.get $len ) - (func $~lib/array/Array<~lib/string/String>#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array<~lib/string/String>#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/util/string/isSpace (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/util/string/isSpace (param $c i32) (result i32) + (local $var$1 i32) + local.get $c i32.const 5760 i32.lt_u if - local.get $0 + local.get $c i32.const 128 i32.or i32.const 160 @@ -3926,7 +3926,7 @@ if (result i32) i32.const 1 else - local.get $0 + local.get $c i32.const 9 i32.sub i32.const 13 @@ -3936,7 +3936,7 @@ end return end - local.get $0 + local.get $c i32.const 8192 i32.sub i32.const 8202 @@ -3955,33 +3955,33 @@ block $case2|0 block $case1|0 block $case0|0 - local.get $0 - local.set $1 - local.get $1 + local.get $c + local.set $var$1 + local.get $var$1 i32.const 5760 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 8232 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 8233 i32.eq br_if $case2|0 - local.get $1 + local.get $var$1 i32.const 8239 i32.eq br_if $case3|0 - local.get $1 + local.get $var$1 i32.const 8287 i32.eq br_if $case4|0 - local.get $1 + local.get $var$1 i32.const 12288 i32.eq br_if $case5|0 - local.get $1 + local.get $var$1 i32.const 65279 i32.eq br_if $case6|0 @@ -3998,18 +3998,18 @@ end i32.const 0 ) - (func $~lib/util/string/strtol (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 + (func $~lib/util/string/strtol (param $str i32) (param $radix i32) (result i32) + (local $len i32) + (local $ptr i32) + (local $code i32) + (local $var$5 i32) + (local $sign i32) + (local $num i32) + (local $initial i32) + local.get $str call $~lib/string/String#get:length - local.set $2 - local.get $2 + local.set $len + local.get $len i32.eqz if i32.const 0 @@ -4017,47 +4017,47 @@ i32.const 0 return end - local.get $0 - local.set $3 - local.get $3 + local.get $str + local.set $ptr + local.get $ptr i32.load16_u - local.set $4 + local.set $code loop $while-continue|0 - local.get $4 + local.get $code call $~lib/util/string/isSpace - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $3 + local.get $ptr i32.const 2 i32.add - local.tee $3 + local.tee $ptr i32.load16_u - local.set $4 - local.get $2 + local.set $code + local.get $len i32.const 1 i32.sub - local.set $2 + local.set $len br $while-continue|0 end end i32.const 1 - local.set $6 - local.get $4 + local.set $sign + local.get $code i32.const 45 i32.eq if (result i32) i32.const 1 else - local.get $4 + local.get $code i32.const 43 i32.eq end if - local.get $2 + local.get $len i32.const 1 i32.sub - local.tee $2 + local.tee $len i32.eqz if i32.const 0 @@ -4065,29 +4065,29 @@ i32.const 0 return end - local.get $4 + local.get $code i32.const 45 i32.eq if i32.const -1 - local.set $6 + local.set $sign end - local.get $3 + local.get $ptr i32.const 2 i32.add - local.tee $3 + local.tee $ptr i32.load16_u - local.set $4 + local.set $code end - local.get $1 + local.get $radix if - local.get $1 + local.get $radix i32.const 2 i32.lt_s if (result i32) i32.const 1 else - local.get $1 + local.get $radix i32.const 36 i32.gt_s end @@ -4097,22 +4097,22 @@ i32.const 0 return end - local.get $1 + local.get $radix i32.const 16 i32.eq if - local.get $2 + local.get $len i32.const 2 i32.gt_s if (result i32) - local.get $4 + local.get $code i32.const 48 i32.eq else i32.const 0 end if (result i32) - local.get $3 + local.get $ptr i32.load16_u offset=2 i32.const 32 i32.or @@ -4122,22 +4122,22 @@ i32.const 0 end if - local.get $3 + local.get $ptr i32.const 4 i32.add - local.set $3 - local.get $2 + local.set $ptr + local.get $len i32.const 2 i32.sub - local.set $2 + local.set $len end end else - local.get $4 + local.get $code i32.const 48 i32.eq if (result i32) - local.get $2 + local.get $len i32.const 2 i32.gt_s else @@ -4148,101 +4148,101 @@ block $case2|1 block $case1|1 block $case0|1 - local.get $3 + local.get $ptr i32.load16_u offset=2 i32.const 32 i32.or - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.const 98 i32.eq br_if $case0|1 - local.get $5 + local.get $var$5 i32.const 111 i32.eq br_if $case1|1 - local.get $5 + local.get $var$5 i32.const 120 i32.eq br_if $case2|1 br $break|1 end - local.get $3 + local.get $ptr i32.const 4 i32.add - local.set $3 - local.get $2 + local.set $ptr + local.get $len i32.const 2 i32.sub - local.set $2 + local.set $len i32.const 2 - local.set $1 + local.set $radix br $break|1 end - local.get $3 + local.get $ptr i32.const 4 i32.add - local.set $3 - local.get $2 + local.set $ptr + local.get $len i32.const 2 i32.sub - local.set $2 + local.set $len i32.const 8 - local.set $1 + local.set $radix br $break|1 end - local.get $3 + local.get $ptr i32.const 4 i32.add - local.set $3 - local.get $2 + local.set $ptr + local.get $len i32.const 2 i32.sub - local.set $2 + local.set $len i32.const 16 - local.set $1 + local.set $radix br $break|1 end end - local.get $1 + local.get $radix i32.eqz if i32.const 10 - local.set $1 + local.set $radix end end i32.const 0 - local.set $7 - local.get $2 + local.set $num + local.get $len i32.const 1 i32.sub - local.set $8 + local.set $initial block $while-break|2 loop $while-continue|2 - local.get $2 - local.tee $5 + local.get $len + local.tee $var$5 i32.const 1 i32.sub - local.set $2 - local.get $5 - local.set $5 - local.get $5 + local.set $len + local.get $var$5 + local.set $var$5 + local.get $var$5 if - local.get $3 + local.get $ptr i32.load16_u - local.set $4 - local.get $4 + local.set $code + local.get $code i32.const 48 i32.sub i32.const 10 i32.lt_u if - local.get $4 + local.get $code i32.const 48 i32.sub - local.set $4 + local.set $code else - local.get $4 + local.get $code i32.const 65 i32.sub i32.const 90 @@ -4250,14 +4250,14 @@ i32.sub i32.le_u if - local.get $4 + local.get $code i32.const 65 i32.const 10 i32.sub i32.sub - local.set $4 + local.set $code else - local.get $4 + local.get $code i32.const 97 i32.sub i32.const 122 @@ -4265,21 +4265,21 @@ i32.sub i32.le_u if - local.get $4 + local.get $code i32.const 97 i32.const 10 i32.sub i32.sub - local.set $4 + local.set $code end end end - local.get $4 - local.get $1 + local.get $code + local.get $radix i32.ge_u if - local.get $8 - local.get $2 + local.get $initial + local.get $len i32.eq if i32.const 0 @@ -4289,27 +4289,27 @@ end br $while-break|2 end - local.get $7 - local.get $1 + local.get $num + local.get $radix i32.mul - local.get $4 + local.get $code i32.add - local.set $7 - local.get $3 + local.set $num + local.get $ptr i32.const 2 i32.add - local.set $3 + local.set $ptr br $while-continue|2 end end end - local.get $6 - local.get $7 + local.get $sign + local.get $num i32.mul ) - (func $~lib/number/I32.parseInt (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/number/I32.parseInt (param $value i32) (param $radix i32) (result i32) + local.get $value + local.get $radix call $~lib/util/string/strtol ) (func $~lib/rt/__visit_globals (param $0 i32) @@ -4347,42 +4347,42 @@ call $~lib/rt/itcms/__visit end ) - (func $~lib/staticarray/StaticArray<~lib/string/String>#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/staticarray/StaticArray<~lib/string/String>#__visit (param $this i32) (param $cookie i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $val i32) i32.const 1 drop - local.get $0 - local.set $2 - local.get $2 - local.get $0 + local.get $this + local.set $var$2 + local.get $var$2 + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.add - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $var$2 i32.load - local.set $5 - local.get $5 + local.set $val + local.get $val if - local.get $5 - local.get $1 + local.get $val + local.get $cookie call $~lib/rt/itcms/__visit end - local.get $2 + local.get $var$2 i32.const 4 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end @@ -4392,49 +4392,49 @@ local.get $1 call $~lib/staticarray/StaticArray<~lib/string/String>#__visit ) - (func $~lib/array/Array<~lib/string/String>#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array<~lib/string/String>#__visit (param $this i32) (param $cookie i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $val i32) i32.const 1 drop - local.get $0 + local.get $this i32.load offset=4 - local.set $2 - local.get $2 - local.get $0 + local.set $var$2 + local.get $var$2 + local.get $this i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $var$2 i32.load - local.set $5 - local.get $5 + local.set $val + local.get $val if - local.get $5 - local.get $1 + local.get $val + local.get $cookie call $~lib/rt/itcms/__visit end - local.get $2 + local.get $var$2 i32.const 4 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array<~lib/string/String>~visit (param $0 i32) (param $1 i32) @@ -4442,12 +4442,12 @@ local.get $1 call $~lib/array/Array<~lib/string/String>#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) diff --git a/tests/compiler/std/hash.debug.wat b/tests/compiler/std/hash.debug.wat index f68f762b9d..e067db31b2 100644 --- a/tests/compiler/std/hash.debug.wat +++ b/tests/compiler/std/hash.debug.wat @@ -26,49 +26,49 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (start $~start) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u ) - (func $~lib/util/hash/HASH<~lib/string/String|null> (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (func $~lib/util/hash/HASH<~lib/string/String|null> (param $key i32) (result i32) + (local $var$1 i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) i32.const 1 drop block $~lib/util/hash/hashStr|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 + local.get $key + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq if i32.const 0 br $~lib/util/hash/hashStr|inlined.0 end - local.get $1 + local.get $var$1 call $~lib/string/String#get:length i32.const 1 i32.shl - local.set $2 - local.get $2 - local.set $3 - local.get $1 - local.set $4 - local.get $3 + local.set $var$2 + local.get $var$2 + local.set $var$3 + local.get $var$1 + local.set $var$4 + local.get $var$3 i32.const 16 i32.ge_u if @@ -77,37 +77,37 @@ i32.add i32.const -2048144777 i32.add - local.set $5 + local.set $var$5 i32.const 0 i32.const -2048144777 i32.add - local.set $6 + local.set $var$6 i32.const 0 - local.set $7 + local.set $var$7 i32.const 0 i32.const -1640531535 i32.sub - local.set $8 - local.get $3 - local.get $4 + local.set $var$8 + local.get $var$3 + local.get $var$4 i32.add i32.const 16 i32.sub - local.set $9 + local.set $var$9 loop $while-continue|0 - local.get $4 - local.get $9 + local.get $var$4 + local.get $var$9 i32.le_u - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $5 - local.set $12 - local.get $4 + local.get $var$5 + local.set $var$12 + local.get $var$4 i32.load - local.set $11 - local.get $12 - local.get $11 + local.set $var$11 + local.get $var$12 + local.get $var$11 i32.const -2048144777 i32.mul i32.add @@ -115,14 +115,14 @@ i32.rotl i32.const -1640531535 i32.mul - local.set $5 - local.get $6 - local.set $12 - local.get $4 + local.set $var$5 + local.get $var$6 + local.set $var$12 + local.get $var$4 i32.load offset=4 - local.set $11 - local.get $12 - local.get $11 + local.set $var$11 + local.get $var$12 + local.get $var$11 i32.const -2048144777 i32.mul i32.add @@ -130,14 +130,14 @@ i32.rotl i32.const -1640531535 i32.mul - local.set $6 - local.get $7 - local.set $12 - local.get $4 + local.set $var$6 + local.get $var$7 + local.set $var$12 + local.get $var$4 i32.load offset=8 - local.set $11 - local.get $12 - local.get $11 + local.set $var$11 + local.get $var$12 + local.get $var$11 i32.const -2048144777 i32.mul i32.add @@ -145,14 +145,14 @@ i32.rotl i32.const -1640531535 i32.mul - local.set $7 - local.get $8 - local.set $12 - local.get $4 + local.set $var$7 + local.get $var$8 + local.set $var$12 + local.get $var$4 i32.load offset=12 - local.set $11 - local.get $12 - local.get $11 + local.set $var$11 + local.get $var$12 + local.get $var$11 i32.const -2048144777 i32.mul i32.add @@ -160,172 +160,172 @@ i32.rotl i32.const -1640531535 i32.mul - local.set $8 - local.get $4 + local.set $var$8 + local.get $var$4 i32.const 16 i32.add - local.set $4 + local.set $var$4 br $while-continue|0 end end - local.get $2 - local.get $5 + local.get $var$2 + local.get $var$5 i32.const 1 i32.rotl - local.get $6 + local.get $var$6 i32.const 7 i32.rotl i32.add - local.get $7 + local.get $var$7 i32.const 12 i32.rotl i32.add - local.get $8 + local.get $var$8 i32.const 18 i32.rotl i32.add i32.add - local.set $2 + local.set $var$2 else - local.get $2 + local.get $var$2 i32.const 0 i32.const 374761393 i32.add i32.add - local.set $2 + local.set $var$2 end - local.get $1 - local.get $3 + local.get $var$1 + local.get $var$3 i32.add i32.const 4 i32.sub - local.set $9 + local.set $var$9 loop $while-continue|1 - local.get $4 - local.get $9 + local.get $var$4 + local.get $var$9 i32.le_u - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 if - local.get $2 - local.get $4 + local.get $var$2 + local.get $var$4 i32.load i32.const -1028477379 i32.mul i32.add - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $2 - local.get $4 + local.set $var$2 + local.get $var$4 i32.const 4 i32.add - local.set $4 + local.set $var$4 br $while-continue|1 end end - local.get $1 - local.get $3 + local.get $var$1 + local.get $var$3 i32.add - local.set $9 + local.set $var$9 loop $while-continue|2 - local.get $4 - local.get $9 + local.get $var$4 + local.get $var$9 i32.lt_u - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 if - local.get $2 - local.get $4 + local.get $var$2 + local.get $var$4 i32.load8_u i32.const 374761393 i32.mul i32.add - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const 11 i32.rotl i32.const -1640531535 i32.mul - local.set $2 - local.get $4 + local.set $var$2 + local.get $var$4 i32.const 1 i32.add - local.set $4 + local.set $var$4 br $while-continue|2 end end - local.get $2 - local.get $2 + local.get $var$2 + local.get $var$2 i32.const 15 i32.shr_u i32.xor - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const -2048144777 i32.mul - local.set $2 - local.get $2 - local.get $2 + local.set $var$2 + local.get $var$2 + local.get $var$2 i32.const 13 i32.shr_u i32.xor - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const -1028477379 i32.mul - local.set $2 - local.get $2 - local.get $2 + local.set $var$2 + local.get $var$2 + local.get $var$2 i32.const 16 i32.shr_u i32.xor - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 end return ) - (func $std/hash/check (param $0 i32) (result i32) + (func $std/hash/check (param $hash i32) (result i32) i32.const 1 ) - (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (func $~lib/util/hash/HASH<~lib/string/String> (param $key i32) (result i32) + (local $var$1 i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) i32.const 1 drop block $~lib/util/hash/hashStr|inlined.1 (result i32) - local.get $0 - local.set $1 - local.get $1 + local.get $key + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq if i32.const 0 br $~lib/util/hash/hashStr|inlined.1 end - local.get $1 + local.get $var$1 call $~lib/string/String#get:length i32.const 1 i32.shl - local.set $2 - local.get $2 - local.set $3 - local.get $1 - local.set $4 - local.get $3 + local.set $var$2 + local.get $var$2 + local.set $var$3 + local.get $var$1 + local.set $var$4 + local.get $var$3 i32.const 16 i32.ge_u if @@ -334,37 +334,37 @@ i32.add i32.const -2048144777 i32.add - local.set $5 + local.set $var$5 i32.const 0 i32.const -2048144777 i32.add - local.set $6 + local.set $var$6 i32.const 0 - local.set $7 + local.set $var$7 i32.const 0 i32.const -1640531535 i32.sub - local.set $8 - local.get $3 - local.get $4 + local.set $var$8 + local.get $var$3 + local.get $var$4 i32.add i32.const 16 i32.sub - local.set $9 + local.set $var$9 loop $while-continue|0 - local.get $4 - local.get $9 + local.get $var$4 + local.get $var$9 i32.le_u - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $5 - local.set $12 - local.get $4 + local.get $var$5 + local.set $var$12 + local.get $var$4 i32.load - local.set $11 - local.get $12 - local.get $11 + local.set $var$11 + local.get $var$12 + local.get $var$11 i32.const -2048144777 i32.mul i32.add @@ -372,14 +372,14 @@ i32.rotl i32.const -1640531535 i32.mul - local.set $5 - local.get $6 - local.set $12 - local.get $4 + local.set $var$5 + local.get $var$6 + local.set $var$12 + local.get $var$4 i32.load offset=4 - local.set $11 - local.get $12 - local.get $11 + local.set $var$11 + local.get $var$12 + local.get $var$11 i32.const -2048144777 i32.mul i32.add @@ -387,14 +387,14 @@ i32.rotl i32.const -1640531535 i32.mul - local.set $6 - local.get $7 - local.set $12 - local.get $4 + local.set $var$6 + local.get $var$7 + local.set $var$12 + local.get $var$4 i32.load offset=8 - local.set $11 - local.get $12 - local.get $11 + local.set $var$11 + local.get $var$12 + local.get $var$11 i32.const -2048144777 i32.mul i32.add @@ -402,14 +402,14 @@ i32.rotl i32.const -1640531535 i32.mul - local.set $7 - local.get $8 - local.set $12 - local.get $4 + local.set $var$7 + local.get $var$8 + local.set $var$12 + local.get $var$4 i32.load offset=12 - local.set $11 - local.get $12 - local.get $11 + local.set $var$11 + local.get $var$12 + local.get $var$11 i32.const -2048144777 i32.mul i32.add @@ -417,138 +417,138 @@ i32.rotl i32.const -1640531535 i32.mul - local.set $8 - local.get $4 + local.set $var$8 + local.get $var$4 i32.const 16 i32.add - local.set $4 + local.set $var$4 br $while-continue|0 end end - local.get $2 - local.get $5 + local.get $var$2 + local.get $var$5 i32.const 1 i32.rotl - local.get $6 + local.get $var$6 i32.const 7 i32.rotl i32.add - local.get $7 + local.get $var$7 i32.const 12 i32.rotl i32.add - local.get $8 + local.get $var$8 i32.const 18 i32.rotl i32.add i32.add - local.set $2 + local.set $var$2 else - local.get $2 + local.get $var$2 i32.const 0 i32.const 374761393 i32.add i32.add - local.set $2 + local.set $var$2 end - local.get $1 - local.get $3 + local.get $var$1 + local.get $var$3 i32.add i32.const 4 i32.sub - local.set $9 + local.set $var$9 loop $while-continue|1 - local.get $4 - local.get $9 + local.get $var$4 + local.get $var$9 i32.le_u - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 if - local.get $2 - local.get $4 + local.get $var$2 + local.get $var$4 i32.load i32.const -1028477379 i32.mul i32.add - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $2 - local.get $4 + local.set $var$2 + local.get $var$4 i32.const 4 i32.add - local.set $4 + local.set $var$4 br $while-continue|1 end end - local.get $1 - local.get $3 + local.get $var$1 + local.get $var$3 i32.add - local.set $9 + local.set $var$9 loop $while-continue|2 - local.get $4 - local.get $9 + local.get $var$4 + local.get $var$9 i32.lt_u - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 if - local.get $2 - local.get $4 + local.get $var$2 + local.get $var$4 i32.load8_u i32.const 374761393 i32.mul i32.add - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const 11 i32.rotl i32.const -1640531535 i32.mul - local.set $2 - local.get $4 + local.set $var$2 + local.get $var$4 i32.const 1 i32.add - local.set $4 + local.set $var$4 br $while-continue|2 end end - local.get $2 - local.get $2 + local.get $var$2 + local.get $var$2 i32.const 15 i32.shr_u i32.xor - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const -2048144777 i32.mul - local.set $2 - local.get $2 - local.get $2 + local.set $var$2 + local.get $var$2 + local.get $var$2 i32.const 13 i32.shr_u i32.xor - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const -1028477379 i32.mul - local.set $2 - local.get $2 - local.get $2 + local.set $var$2 + local.get $var$2 + local.get $var$2 i32.const 16 i32.shr_u i32.xor - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 end return ) - (func $~lib/util/hash/HASH (param $0 f32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + (func $~lib/util/hash/HASH (param $key f32) (result i32) + (local $var$1 i32) + (local $var$2 i32) + (local $var$3 i32) i32.const 0 drop i32.const 0 @@ -559,61 +559,61 @@ i32.const 4 i32.eq drop - local.get $0 + local.get $key i32.reinterpret_f32 - local.set $1 + local.set $var$1 i32.const 4 - local.set $2 + local.set $var$2 i32.const 0 i32.const 374761393 i32.add - local.get $2 + local.get $var$2 i32.add - local.set $3 - local.get $3 - local.get $1 + local.set $var$3 + local.get $var$3 + local.get $var$1 i32.const -1028477379 i32.mul i32.add - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 15 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const -2048144777 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 13 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const -1028477379 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 16 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 return ) - (func $~lib/util/hash/HASH (param $0 f64) (result i32) - (local $1 i64) - (local $2 i32) + (func $~lib/util/hash/HASH (param $key f64) (result i32) + (local $var$1 i64) + (local $var$2 i32) i32.const 0 drop i32.const 0 @@ -628,70 +628,70 @@ i32.const 8 i32.eq drop - local.get $0 + local.get $key i64.reinterpret_f64 - local.set $1 + local.set $var$1 i32.const 0 i32.const 374761393 i32.add i32.const 8 i32.add - local.set $2 - local.get $2 - local.get $1 + local.set $var$2 + local.get $var$2 + local.get $var$1 i32.wrap_i64 i32.const -1028477379 i32.mul i32.add - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $2 - local.get $2 - local.get $1 + local.set $var$2 + local.get $var$2 + local.get $var$1 i64.const 32 i64.shr_u i32.wrap_i64 i32.const -1028477379 i32.mul i32.add - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $2 - local.get $2 - local.get $2 + local.set $var$2 + local.get $var$2 + local.get $var$2 i32.const 15 i32.shr_u i32.xor - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const -2048144777 i32.mul - local.set $2 - local.get $2 - local.get $2 + local.set $var$2 + local.get $var$2 + local.get $var$2 i32.const 13 i32.shr_u i32.xor - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const -1028477379 i32.mul - local.set $2 - local.get $2 - local.get $2 + local.set $var$2 + local.get $var$2 + local.get $var$2 i32.const 16 i32.shr_u i32.xor - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 return ) (func $~start diff --git a/tests/compiler/std/map.debug.wat b/tests/compiler/std/map.debug.wat index 85735d5257..391a9dbf8b 100644 --- a/tests/compiler/std/map.debug.wat +++ b/tests/compiler/std/map.debug.wat @@ -79,50 +79,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -135,58 +135,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -203,12 +203,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -218,19 +218,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -241,27 +241,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -269,35 +269,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -307,15 +307,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -325,25 +325,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -351,33 +351,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -405,23 +405,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -433,15 +433,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -453,33 +453,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -487,21 +487,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -516,36 +516,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -553,67 +553,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -623,22 +623,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -648,12 +648,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -665,75 +665,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -745,38 +745,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -790,12 +790,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -806,38 +806,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -845,21 +845,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -874,101 +874,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -979,7 +979,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -990,26 +990,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1022,27 +1022,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1056,11 +1056,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1071,66 +1071,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1140,10 +1140,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1154,13 +1154,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1171,109 +1171,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1281,7 +1281,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1298,23 +1298,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1326,54 +1326,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1394,30 +1394,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1427,9 +1427,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1439,8 +1439,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1448,43 +1448,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1496,17 +1496,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1520,7 +1520,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1538,7 +1538,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1548,12 +1548,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1575,7 +1575,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1595,14 +1595,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1615,8 +1615,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1627,37 +1627,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1665,16 +1665,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1682,21 +1682,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1711,12 +1711,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1724,49 +1724,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1776,90 +1776,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1868,22 +1868,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1892,27 +1892,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1927,69 +1927,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2004,29 +2004,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2039,13 +2039,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2056,25 +2056,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2089,10 +2089,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2110,49 +2110,49 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32) + (local $child i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $childPtr i32.eqz if return end i32.const 1 drop - local.get $0 + local.get $parentPtr i32.eqz if i32.const 0 @@ -2162,37 +2162,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $childPtr i32.const 20 i32.sub - local.set $3 - local.get $3 + local.set $child + local.get $child call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $0 + local.get $parentPtr i32.const 20 i32.sub - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 call $~lib/rt/itcms/Object#get:color - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $2 + local.get $expectMultiple if - local.get $4 + local.get $var$4 call $~lib/rt/itcms/Object#makeGray else - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end else - local.get $5 + local.get $var$5 i32.const 3 i32.eq if (result i32) @@ -2203,7 +2203,7 @@ i32.const 0 end if - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end end @@ -2247,10 +2247,10 @@ local.get $1 i32.store offset=20 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + (func $~lib/util/hash/HASH (param $key i32) (result i32) + (local $var$1 i32) + (local $var$2 i32) + (local $var$3 i32) i32.const 0 drop i32.const 0 @@ -2261,113 +2261,113 @@ i32.const 4 i32.le_u drop - local.get $0 + local.get $key i32.extend8_s - local.set $2 + local.set $var$2 i32.const 1 - local.set $1 + local.set $var$1 i32.const 0 i32.const 374761393 i32.add - local.get $1 + local.get $var$1 i32.add - local.set $3 - local.get $3 - local.get $2 + local.set $var$3 + local.get $var$3 + local.get $var$2 i32.const -1028477379 i32.mul i32.add - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 15 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const -2048144777 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 13 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const -1028477379 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 16 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 return ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/map/Map#find (param $this i32) (param $key i32) (param $hashCode i32) (result i32) + (local $entry i32) + (local $var$4 i32) + (local $taggedNext i32) + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add i32.load - local.set $3 + local.set $entry loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + local.get $entry + local.set $var$4 + local.get $var$4 if - local.get $3 + local.get $entry i32.load offset=8 - local.set $5 - local.get $5 + local.set $taggedNext + local.get $taggedNext i32.const 1 i32.and i32.eqz if (result i32) - local.get $3 + local.get $entry i32.load8_s - local.get $1 + local.get $key i32.extend8_s i32.eq else i32.const 0 end if - local.get $3 + local.get $entry return end - local.get $5 + local.get $taggedNext i32.const 1 i32.const -1 i32.xor i32.and - local.set $3 + local.set $entry br $while-continue|0 end end i32.const 0 ) - (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map#has (param $this i32) (param $key i32) (result i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 @@ -2388,20 +2388,20 @@ local.get $1 i32.store offset=8 ) - (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) + (func $~lib/map/Map#rehash (param $this i32) (param $newBucketsMask i32) + (local $newBucketsCapacity i32) + (local $newBuckets i32) + (local $newEntriesCapacity i32) + (local $newEntries i32) + (local $oldPtr i32) + (local $oldEnd i32) + (local $newPtr i32) + (local $var$9 i32) + (local $oldEntry i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) + (local $var$14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -2410,115 +2410,115 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $1 + local.get $newBucketsMask i32.const 1 i32.add - local.set $2 + local.set $newBucketsCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 + local.get $newBucketsCapacity i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $newBuckets i32.store - local.get $2 + local.get $newBucketsCapacity i32.const 8 i32.mul i32.const 3 i32.div_s - local.set $4 + local.set $newEntriesCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 + local.get $newEntriesCapacity i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $newEntries i32.store offset=4 - local.get $0 + local.get $this i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 + local.set $oldPtr + local.get $oldPtr + local.get $this i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $7 - local.get $5 - local.set $8 + local.set $oldEnd + local.get $newEntries + local.set $newPtr loop $while-continue|0 - local.get $6 - local.get $7 + local.get $oldPtr + local.get $oldEnd i32.ne - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $6 - local.set $10 - local.get $10 + local.get $oldPtr + local.set $oldEntry + local.get $oldEntry i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $8 - local.set $11 - local.get $10 + local.get $newPtr + local.set $var$11 + local.get $oldEntry i32.load8_s - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 call $~lib/map/MapEntry#set:key - local.get $11 - local.get $10 + local.get $var$11 + local.get $oldEntry i32.load offset=4 call $~lib/map/MapEntry#set:value - local.get $12 + local.get $var$12 call $~lib/util/hash/HASH - local.get $1 + local.get $newBucketsMask i32.and - local.set $13 - local.get $3 - local.get $13 + local.set $var$13 + local.get $newBuckets + local.get $var$13 i32.const 4 i32.mul i32.add - local.set $14 - local.get $11 - local.get $14 + local.set $var$14 + local.get $var$11 + local.get $var$14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $14 - local.get $8 + local.get $var$14 + local.get $newPtr i32.store - local.get $8 + local.get $newPtr i32.const 12 i32.add - local.set $8 + local.set $newPtr end - local.get $6 + local.get $oldPtr i32.const 12 i32.add - local.set $6 + local.set $oldPtr br $while-continue|0 end end - local.get $0 - local.get $3 + local.get $this + local.get $newBuckets call $~lib/map/Map#set:buckets - local.get $0 - local.get $1 + local.get $this + local.get $newBucketsMask call $~lib/map/Map#set:bucketsMask - local.get $0 - local.get $5 + local.get $this + local.get $newEntries call $~lib/map/Map#set:entries - local.get $0 - local.get $4 + local.get $this + local.get $newEntriesCapacity call $~lib/map/Map#set:entriesCapacity - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer @@ -2526,15 +2526,15 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map#get (param $this i32) (param $key i32) (result i32) + (local $entry i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $entry + local.get $entry i32.eqz if i32.const 592 @@ -2544,11 +2544,11 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $entry i32.load offset=4 ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 + (func $~lib/map/Map#get:size (param $this i32) (result i32) + local.get $this i32.load offset=20 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) @@ -2575,29 +2575,29 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 0 i32.shl i32.add - local.get $2 + local.get $value i32.store8 i32.const 0 drop ) - (func $~lib/rt/itcms/__renew (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/rt/itcms/__renew (param $oldPtr i32) (param $size i32) (result i32) + (local $oldObj i32) + (local $newPtr i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $oldPtr i32.const 20 i32.sub - local.set $2 - local.get $1 - local.get $2 + local.set $oldObj + local.get $size + local.get $oldObj i32.load i32.const 3 i32.const -1 @@ -2607,49 +2607,49 @@ i32.sub i32.le_u if - local.get $2 - local.get $1 + local.get $oldObj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $0 + local.get $oldPtr return end - local.get $1 - local.get $2 + local.get $size + local.get $oldObj i32.load offset=12 call $~lib/rt/itcms/__new - local.set $3 - local.get $3 - local.get $0 - local.get $1 - local.tee $4 - local.get $2 + local.set $newPtr + local.get $newPtr + local.get $oldPtr + local.get $size + local.tee $var$4 + local.get $oldObj i32.load offset=16 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.lt_u select memory.copy - local.get $3 - ) - (func $~lib/array/ensureCapacity (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $0 + local.get $newPtr + ) + (func $~lib/array/ensureCapacity (param $array i32) (param $newSize i32) (param $alignLog2 i32) (param $canGrow i32) + (local $oldCapacity i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $array i32.load offset=8 - local.set $4 - local.get $1 - local.get $4 - local.get $2 + local.set $oldCapacity + local.get $newSize + local.get $oldCapacity + local.get $alignLog2 i32.shr_u i32.gt_u if - local.get $1 + local.get $newSize i32.const 1073741820 - local.get $2 + local.get $alignLog2 i32.shr_u i32.gt_u if @@ -2660,77 +2660,77 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.load - local.set $5 - local.get $1 - local.tee $6 + local.set $var$5 + local.get $newSize + local.tee $var$6 i32.const 8 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.gt_u select - local.get $2 + local.get $alignLog2 i32.shl - local.set $6 - local.get $3 + local.set $var$6 + local.get $canGrow if - local.get $4 + local.get $oldCapacity i32.const 1 i32.shl - local.tee $7 + local.tee $var$7 i32.const 1073741820 - local.tee $8 - local.get $7 - local.get $8 + local.tee $var$8 + local.get $var$7 + local.get $var$8 i32.lt_u select - local.tee $8 - local.get $6 - local.tee $7 - local.get $8 - local.get $7 + local.tee $var$8 + local.get $var$6 + local.tee $var$7 + local.get $var$8 + local.get $var$7 i32.gt_u select - local.set $6 + local.set $var$6 end - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 call $~lib/rt/itcms/__renew - local.set $8 + local.set $var$8 i32.const 2 global.get $~lib/shared/runtime/Runtime.Incremental i32.ne drop - local.get $8 - local.get $5 + local.get $var$8 + local.get $var$5 i32.ne if - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.store - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.store offset=4 - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.const 0 call $~lib/rt/itcms/__link end - local.get $0 - local.get $6 + local.get $array + local.get $var$6 i32.store offset=8 end ) - (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 + (func $~lib/array/Array#set:length (param $this i32) (param $newLength i32) + local.get $this + local.get $newLength i32.const 0 i32.const 0 call $~lib/array/ensureCapacity - local.get $0 - local.get $1 + local.get $this + local.get $newLength call $~lib/array/Array#set:length_ ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) @@ -2757,26 +2757,26 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store i32.const 0 drop ) - (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 + (func $~lib/array/Array#set:length (param $this i32) (param $newLength i32) + local.get $this + local.get $newLength i32.const 2 i32.const 0 call $~lib/array/ensureCapacity - local.get $0 - local.get $1 + local.get $this + local.get $newLength call $~lib/array/Array#set:length_ ) (func $~lib/map/Map#set:buckets (param $0 i32) (param $1 i32) @@ -2855,14 +2855,14 @@ local.get $1 i32.store offset=20 ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i32) + (local $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -2873,22 +2873,22 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 0 i32.shl i32.add i32.load8_s - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i32) + (local $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -2899,64 +2899,64 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add i32.load - local.set $2 + local.set $value i32.const 0 - drop - local.get $2 - ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + drop + local.get $value + ) + (func $~lib/map/Map#find (param $this i32) (param $key i32) (param $hashCode i32) (result i32) + (local $entry i32) + (local $var$4 i32) + (local $taggedNext i32) + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add i32.load - local.set $3 + local.set $entry loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + local.get $entry + local.set $var$4 + local.get $var$4 if - local.get $3 + local.get $entry i32.load offset=4 - local.set $5 - local.get $5 + local.set $taggedNext + local.get $taggedNext i32.const 1 i32.and i32.eqz if (result i32) - local.get $3 + local.get $entry i32.load8_s - local.get $1 + local.get $key i32.extend8_s i32.eq else i32.const 0 end if - local.get $3 + local.get $entry return end - local.get $5 + local.get $taggedNext i32.const 1 i32.const -1 i32.xor i32.and - local.set $3 + local.set $entry br $while-continue|0 end end @@ -2977,20 +2977,20 @@ local.get $1 i32.store offset=4 ) - (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) + (func $~lib/map/Map#rehash (param $this i32) (param $newBucketsMask i32) + (local $newBucketsCapacity i32) + (local $newBuckets i32) + (local $newEntriesCapacity i32) + (local $newEntries i32) + (local $oldPtr i32) + (local $oldEnd i32) + (local $newPtr i32) + (local $var$9 i32) + (local $oldEntry i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) + (local $var$14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -2999,115 +2999,115 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $1 + local.get $newBucketsMask i32.const 1 i32.add - local.set $2 + local.set $newBucketsCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 + local.get $newBucketsCapacity i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $newBuckets i32.store - local.get $2 + local.get $newBucketsCapacity i32.const 8 i32.mul i32.const 3 i32.div_s - local.set $4 + local.set $newEntriesCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 + local.get $newEntriesCapacity i32.const 8 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $newEntries i32.store offset=4 - local.get $0 + local.get $this i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 + local.set $oldPtr + local.get $oldPtr + local.get $this i32.load offset=16 i32.const 8 i32.mul i32.add - local.set $7 - local.get $5 - local.set $8 + local.set $oldEnd + local.get $newEntries + local.set $newPtr loop $while-continue|0 - local.get $6 - local.get $7 + local.get $oldPtr + local.get $oldEnd i32.ne - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $6 - local.set $10 - local.get $10 + local.get $oldPtr + local.set $oldEntry + local.get $oldEntry i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $8 - local.set $11 - local.get $10 + local.get $newPtr + local.set $var$11 + local.get $oldEntry i32.load8_s - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 call $~lib/map/MapEntry#set:key - local.get $11 - local.get $10 + local.get $var$11 + local.get $oldEntry i32.load8_s offset=1 call $~lib/map/MapEntry#set:value - local.get $12 + local.get $var$12 call $~lib/util/hash/HASH - local.get $1 + local.get $newBucketsMask i32.and - local.set $13 - local.get $3 - local.get $13 + local.set $var$13 + local.get $newBuckets + local.get $var$13 i32.const 4 i32.mul i32.add - local.set $14 - local.get $11 - local.get $14 + local.set $var$14 + local.get $var$11 + local.get $var$14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $14 - local.get $8 + local.get $var$14 + local.get $newPtr i32.store - local.get $8 + local.get $newPtr i32.const 8 i32.add - local.set $8 + local.set $newPtr end - local.get $6 + local.get $oldPtr i32.const 8 i32.add - local.set $6 + local.set $oldPtr br $while-continue|0 end end - local.get $0 - local.get $3 + local.get $this + local.get $newBuckets call $~lib/map/Map#set:buckets - local.get $0 - local.get $1 + local.get $this + local.get $newBucketsMask call $~lib/map/Map#set:bucketsMask - local.get $0 - local.get $5 + local.get $this + local.get $newEntries call $~lib/map/Map#set:entries - local.get $0 - local.get $4 + local.get $this + local.get $newEntriesCapacity call $~lib/map/Map#set:entriesCapacity - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer @@ -3115,10 +3115,10 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/util/hash/HASH (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + (func $~lib/util/hash/HASH (param $key i32) (result i32) + (local $var$1 i32) + (local $var$2 i32) + (local $var$3 i32) i32.const 0 drop i32.const 0 @@ -3129,102 +3129,102 @@ i32.const 4 i32.le_u drop - local.get $0 - local.set $2 + local.get $key + local.set $var$2 i32.const 4 - local.set $1 + local.set $var$1 i32.const 0 i32.const 374761393 i32.add - local.get $1 + local.get $var$1 i32.add - local.set $3 - local.get $3 - local.get $2 + local.set $var$3 + local.get $var$3 + local.get $var$2 i32.const -1028477379 i32.mul i32.add - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 15 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const -2048144777 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 13 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const -1028477379 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 16 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 return ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/map/Map#find (param $this i32) (param $key i32) (param $hashCode i32) (result i32) + (local $entry i32) + (local $var$4 i32) + (local $taggedNext i32) + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add i32.load - local.set $3 + local.set $entry loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + local.get $entry + local.set $var$4 + local.get $var$4 if - local.get $3 + local.get $entry i32.load offset=8 - local.set $5 - local.get $5 + local.set $taggedNext + local.get $taggedNext i32.const 1 i32.and i32.eqz if (result i32) - local.get $3 + local.get $entry i32.load - local.get $1 + local.get $key i32.eq else i32.const 0 end if - local.get $3 + local.get $entry return end - local.get $5 + local.get $taggedNext i32.const 1 i32.const -1 i32.xor i32.and - local.set $3 + local.set $entry br $while-continue|0 end end @@ -3245,20 +3245,20 @@ local.get $1 i32.store offset=8 ) - (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) + (func $~lib/map/Map#rehash (param $this i32) (param $newBucketsMask i32) + (local $newBucketsCapacity i32) + (local $newBuckets i32) + (local $newEntriesCapacity i32) + (local $newEntries i32) + (local $oldPtr i32) + (local $oldEnd i32) + (local $newPtr i32) + (local $var$9 i32) + (local $oldEntry i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) + (local $var$14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -3267,115 +3267,115 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $1 + local.get $newBucketsMask i32.const 1 i32.add - local.set $2 + local.set $newBucketsCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 + local.get $newBucketsCapacity i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $newBuckets i32.store - local.get $2 + local.get $newBucketsCapacity i32.const 8 i32.mul i32.const 3 i32.div_s - local.set $4 + local.set $newEntriesCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 + local.get $newEntriesCapacity i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $newEntries i32.store offset=4 - local.get $0 + local.get $this i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 + local.set $oldPtr + local.get $oldPtr + local.get $this i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $7 - local.get $5 - local.set $8 + local.set $oldEnd + local.get $newEntries + local.set $newPtr loop $while-continue|0 - local.get $6 - local.get $7 + local.get $oldPtr + local.get $oldEnd i32.ne - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $6 - local.set $10 - local.get $10 + local.get $oldPtr + local.set $oldEntry + local.get $oldEntry i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $8 - local.set $11 - local.get $10 + local.get $newPtr + local.set $var$11 + local.get $oldEntry i32.load - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 call $~lib/map/MapEntry#set:key - local.get $11 - local.get $10 + local.get $var$11 + local.get $oldEntry i32.load offset=4 call $~lib/map/MapEntry#set:value - local.get $12 + local.get $var$12 call $~lib/util/hash/HASH - local.get $1 + local.get $newBucketsMask i32.and - local.set $13 - local.get $3 - local.get $13 + local.set $var$13 + local.get $newBuckets + local.get $var$13 i32.const 4 i32.mul i32.add - local.set $14 - local.get $11 - local.get $14 + local.set $var$14 + local.get $var$11 + local.get $var$14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $14 - local.get $8 + local.get $var$14 + local.get $newPtr i32.store - local.get $8 + local.get $newPtr i32.const 12 i32.add - local.set $8 + local.set $newPtr end - local.get $6 + local.get $oldPtr i32.const 12 i32.add - local.set $6 + local.set $oldPtr br $while-continue|0 end end - local.get $0 - local.get $3 + local.get $this + local.get $newBuckets call $~lib/map/Map#set:buckets - local.get $0 - local.get $1 + local.get $this + local.get $newBucketsMask call $~lib/map/Map#set:bucketsMask - local.get $0 - local.get $5 + local.get $this + local.get $newEntries call $~lib/map/Map#set:entries - local.get $0 - local.get $4 + local.get $this + local.get $newEntriesCapacity call $~lib/map/Map#set:entriesCapacity - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer @@ -3383,65 +3383,65 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 + (func $~lib/map/Map#get:size (param $this i32) (result i32) + local.get $this i32.load offset=20 ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 + (func $~lib/map/Map#get:size (param $this i32) (result i32) + local.get $this i32.load offset=20 ) - (func $~lib/map/Map#delete (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map#delete (param $this i32) (param $key i32) (result i32) + (local $entry i32) + (local $halfBucketsMask i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $entry + local.get $entry i32.eqz if i32.const 0 return end - local.get $2 - local.get $2 + local.get $entry + local.get $entry i32.load offset=8 i32.const 1 i32.or call $~lib/map/MapEntry#set:taggedNext - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 i32.const 1 i32.sub call $~lib/map/Map#set:entriesCount - local.get $0 + local.get $this i32.load offset=4 i32.const 1 i32.shr_u - local.set $3 - local.get $3 + local.set $halfBucketsMask + local.get $halfBucketsMask i32.const 1 i32.add i32.const 4 - local.tee $4 - local.get $0 + local.tee $var$4 + local.get $this i32.load offset=20 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.gt_u select i32.ge_u if (result i32) - local.get $0 + local.get $this i32.load offset=20 - local.get $0 + local.get $this i32.load offset=12 i32.const 3 i32.mul @@ -3452,54 +3452,54 @@ i32.const 0 end if - local.get $0 - local.get $3 + local.get $this + local.get $halfBucketsMask call $~lib/map/Map#rehash end i32.const 1 ) - (func $~lib/map/Map#clear (param $0 i32) - local.get $0 + (func $~lib/map/Map#clear (param $this i32) + local.get $this i32.const 0 i32.const 4 i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets - local.get $0 + local.get $this i32.const 4 i32.const 1 i32.sub call $~lib/map/Map#set:bucketsMask - local.get $0 + local.get $this i32.const 0 i32.const 4 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:entries - local.get $0 + local.get $this i32.const 4 call $~lib/map/Map#set:entriesCapacity - local.get $0 + local.get $this i32.const 0 call $~lib/map/Map#set:entriesOffset - local.get $0 + local.get $this i32.const 0 call $~lib/map/Map#set:entriesCount ) (func $std/map/testNumeric - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) + (local $map i32) + (local $keys i32) + (local $var$2 i32) + (local $var$3 i32) + (local $vals i32) + (local $keyMap i32) + (local $valMap i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) global.get $~lib/memory/__stack_pointer i32.const 20 i32.sub @@ -3512,20 +3512,20 @@ global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor - local.tee $0 + local.tee $map i32.store i32.const 0 - local.set $1 + local.set $keys loop $for-loop|1 - local.get $1 + local.get $keys i32.extend8_s i32.const 100 i32.lt_s - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#has i32.eqz i32.eqz @@ -3537,16 +3537,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $keys i32.const 10 - local.get $1 + local.get $keys i32.extend8_s i32.add call $~lib/map/Map#set drop - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#has i32.eqz if @@ -3557,11 +3557,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#get i32.const 10 - local.get $1 + local.get $keys i32.extend8_s i32.add i32.eq @@ -3574,14 +3574,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $keys i32.const 1 i32.add - local.set $1 + local.set $keys br $for-loop|1 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -3595,17 +3595,17 @@ unreachable end i32.const 0 - local.set $1 + local.set $keys loop $for-loop|3 - local.get $1 + local.get $keys i32.extend8_s i32.const 100 i32.lt_s - local.set $4 - local.get $4 + local.set $vals + local.get $vals if - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#has i32.eqz if @@ -3616,11 +3616,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#get i32.const 10 - local.get $1 + local.get $keys i32.extend8_s i32.add i32.eq @@ -3633,16 +3633,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $keys i32.const 20 - local.get $1 + local.get $keys i32.extend8_s i32.add call $~lib/map/Map#set drop - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#has i32.eqz if @@ -3653,11 +3653,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#get i32.const 20 - local.get $1 + local.get $keys i32.extend8_s i32.add i32.eq @@ -3670,14 +3670,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $keys i32.const 1 i32.add - local.set $1 + local.set $keys br $for-loop|3 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -3691,45 +3691,45 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $map call $~lib/map/Map#keys - local.tee $1 + local.tee $keys i32.store offset=4 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $map call $~lib/map/Map#values - local.tee $4 + local.tee $vals i32.store offset=8 global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor - local.tee $5 + local.tee $keyMap i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor - local.tee $6 + local.tee $valMap i32.store offset=16 i32.const 0 - local.set $7 + local.set $var$7 loop $for-loop|4 - local.get $7 - local.get $1 + local.get $var$7 + local.get $keys call $~lib/array/Array#get:length i32.lt_s - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 if - local.get $1 - local.get $7 + local.get $keys + local.get $var$7 call $~lib/array/Array#__get - local.set $9 - local.get $4 - local.get $7 + local.set $var$9 + local.get $vals + local.get $var$7 call $~lib/array/Array#__get - local.set $10 - local.get $0 - local.get $9 + local.set $var$10 + local.get $map + local.get $var$9 call $~lib/map/Map#has i32.eqz if @@ -3740,8 +3740,8 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $10 + local.get $map + local.get $var$10 i32.const 20 i32.sub call $~lib/map/Map#has @@ -3754,28 +3754,28 @@ call $~lib/builtins/abort unreachable end - local.get $5 - local.get $9 - local.get $9 + local.get $keyMap + local.get $var$9 + local.get $var$9 call $~lib/map/Map#set drop - local.get $6 - local.get $10 + local.get $valMap + local.get $var$10 i32.const 20 i32.sub - local.get $10 + local.get $var$10 i32.const 20 i32.sub call $~lib/map/Map#set drop - local.get $7 + local.get $var$7 i32.const 1 i32.add - local.set $7 + local.set $var$7 br $for-loop|4 end end - local.get $5 + local.get $keyMap call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -3788,7 +3788,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $valMap call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -3802,17 +3802,17 @@ unreachable end i32.const 0 - local.set $7 + local.set $var$7 loop $for-loop|6 - local.get $7 + local.get $var$7 i32.extend8_s i32.const 50 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $0 - local.get $7 + local.get $map + local.get $var$7 call $~lib/map/Map#has i32.eqz if @@ -3823,11 +3823,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $7 + local.get $map + local.get $var$7 call $~lib/map/Map#get i32.const 20 - local.get $7 + local.get $var$7 i32.extend8_s i32.add i32.eq @@ -3840,12 +3840,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $7 + local.get $map + local.get $var$7 call $~lib/map/Map#delete drop - local.get $0 - local.get $7 + local.get $map + local.get $var$7 call $~lib/map/Map#has i32.eqz i32.eqz @@ -3857,14 +3857,14 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $var$7 i32.const 1 i32.add - local.set $7 + local.set $var$7 br $for-loop|6 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 50 i32.eq @@ -3878,17 +3878,17 @@ unreachable end i32.const 0 - local.set $7 + local.set $var$7 loop $for-loop|8 - local.get $7 + local.get $var$7 i32.extend8_s i32.const 50 i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $0 - local.get $7 + local.get $map + local.get $var$7 call $~lib/map/Map#has i32.eqz i32.eqz @@ -3900,16 +3900,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $7 + local.get $map + local.get $var$7 i32.const 10 - local.get $7 + local.get $var$7 i32.extend8_s i32.add call $~lib/map/Map#set drop - local.get $0 - local.get $7 + local.get $map + local.get $var$7 call $~lib/map/Map#has i32.eqz if @@ -3920,12 +3920,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $7 + local.get $map + local.get $var$7 call $~lib/map/Map#delete drop - local.get $0 - local.get $7 + local.get $map + local.get $var$7 call $~lib/map/Map#has i32.eqz i32.eqz @@ -3937,14 +3937,14 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $var$7 i32.const 1 i32.add - local.set $7 + local.set $var$7 br $for-loop|8 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 50 i32.eq @@ -3957,9 +3957,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $map call $~lib/map/Map#clear - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 0 i32.eq @@ -4015,10 +4015,10 @@ local.get $1 i32.store offset=20 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + (func $~lib/util/hash/HASH (param $key i32) (result i32) + (local $var$1 i32) + (local $var$2 i32) + (local $var$3 i32) i32.const 0 drop i32.const 0 @@ -4029,90 +4029,90 @@ i32.const 4 i32.le_u drop - local.get $0 + local.get $key i32.const 255 i32.and - local.set $2 + local.set $var$2 i32.const 1 - local.set $1 + local.set $var$1 i32.const 0 i32.const 374761393 i32.add - local.get $1 + local.get $var$1 i32.add - local.set $3 - local.get $3 - local.get $2 + local.set $var$3 + local.get $var$3 + local.get $var$2 i32.const -1028477379 i32.mul i32.add - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 15 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const -2048144777 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 13 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const -1028477379 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 16 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 return ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/map/Map#find (param $this i32) (param $key i32) (param $hashCode i32) (result i32) + (local $entry i32) + (local $var$4 i32) + (local $taggedNext i32) + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add i32.load - local.set $3 + local.set $entry loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + local.get $entry + local.set $var$4 + local.get $var$4 if - local.get $3 + local.get $entry i32.load offset=8 - local.set $5 - local.get $5 + local.set $taggedNext + local.get $taggedNext i32.const 1 i32.and i32.eqz if (result i32) - local.get $3 + local.get $entry i32.load8_u - local.get $1 + local.get $key i32.const 255 i32.and i32.eq @@ -4120,24 +4120,24 @@ i32.const 0 end if - local.get $3 + local.get $entry return end - local.get $5 + local.get $taggedNext i32.const 1 i32.const -1 i32.xor i32.and - local.set $3 + local.set $entry br $while-continue|0 end end i32.const 0 ) - (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map#has (param $this i32) (param $key i32) (result i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 @@ -4158,20 +4158,20 @@ local.get $1 i32.store offset=8 ) - (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) + (func $~lib/map/Map#rehash (param $this i32) (param $newBucketsMask i32) + (local $newBucketsCapacity i32) + (local $newBuckets i32) + (local $newEntriesCapacity i32) + (local $newEntries i32) + (local $oldPtr i32) + (local $oldEnd i32) + (local $newPtr i32) + (local $var$9 i32) + (local $oldEntry i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) + (local $var$14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -4180,115 +4180,115 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $1 + local.get $newBucketsMask i32.const 1 i32.add - local.set $2 + local.set $newBucketsCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 + local.get $newBucketsCapacity i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $newBuckets i32.store - local.get $2 + local.get $newBucketsCapacity i32.const 8 i32.mul i32.const 3 i32.div_s - local.set $4 + local.set $newEntriesCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 + local.get $newEntriesCapacity i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $newEntries i32.store offset=4 - local.get $0 + local.get $this i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 + local.set $oldPtr + local.get $oldPtr + local.get $this i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $7 - local.get $5 - local.set $8 + local.set $oldEnd + local.get $newEntries + local.set $newPtr loop $while-continue|0 - local.get $6 - local.get $7 + local.get $oldPtr + local.get $oldEnd i32.ne - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $6 - local.set $10 - local.get $10 + local.get $oldPtr + local.set $oldEntry + local.get $oldEntry i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $8 - local.set $11 - local.get $10 + local.get $newPtr + local.set $var$11 + local.get $oldEntry i32.load8_u - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 call $~lib/map/MapEntry#set:key - local.get $11 - local.get $10 + local.get $var$11 + local.get $oldEntry i32.load offset=4 call $~lib/map/MapEntry#set:value - local.get $12 + local.get $var$12 call $~lib/util/hash/HASH - local.get $1 + local.get $newBucketsMask i32.and - local.set $13 - local.get $3 - local.get $13 + local.set $var$13 + local.get $newBuckets + local.get $var$13 i32.const 4 i32.mul i32.add - local.set $14 - local.get $11 - local.get $14 + local.set $var$14 + local.get $var$11 + local.get $var$14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $14 - local.get $8 + local.get $var$14 + local.get $newPtr i32.store - local.get $8 + local.get $newPtr i32.const 12 i32.add - local.set $8 + local.set $newPtr end - local.get $6 + local.get $oldPtr i32.const 12 i32.add - local.set $6 + local.set $oldPtr br $while-continue|0 end end - local.get $0 - local.get $3 + local.get $this + local.get $newBuckets call $~lib/map/Map#set:buckets - local.get $0 - local.get $1 + local.get $this + local.get $newBucketsMask call $~lib/map/Map#set:bucketsMask - local.get $0 - local.get $5 + local.get $this + local.get $newEntries call $~lib/map/Map#set:entries - local.get $0 - local.get $4 + local.get $this + local.get $newEntriesCapacity call $~lib/map/Map#set:entriesCapacity - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer @@ -4296,15 +4296,15 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map#get (param $this i32) (param $key i32) (result i32) + (local $entry i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $entry + local.get $entry i32.eqz if i32.const 592 @@ -4314,11 +4314,11 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $entry i32.load offset=4 ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 + (func $~lib/map/Map#get:size (param $this i32) (result i32) + local.get $this i32.load offset=20 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) @@ -4345,26 +4345,26 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 0 i32.shl i32.add - local.get $2 + local.get $value i32.store8 i32.const 0 drop ) - (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 + (func $~lib/array/Array#set:length (param $this i32) (param $newLength i32) + local.get $this + local.get $newLength i32.const 0 i32.const 0 call $~lib/array/ensureCapacity - local.get $0 - local.get $1 + local.get $this + local.get $newLength call $~lib/array/Array#set:length_ ) (func $~lib/map/Map#set:buckets (param $0 i32) (param $1 i32) @@ -4405,14 +4405,14 @@ local.get $1 i32.store offset=20 ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i32) + (local $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -4423,49 +4423,49 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 0 i32.shl i32.add i32.load8_u - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/map/Map#find (param $this i32) (param $key i32) (param $hashCode i32) (result i32) + (local $entry i32) + (local $var$4 i32) + (local $taggedNext i32) + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add i32.load - local.set $3 + local.set $entry loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + local.get $entry + local.set $var$4 + local.get $var$4 if - local.get $3 + local.get $entry i32.load offset=4 - local.set $5 - local.get $5 + local.set $taggedNext + local.get $taggedNext i32.const 1 i32.and i32.eqz if (result i32) - local.get $3 + local.get $entry i32.load8_u - local.get $1 + local.get $key i32.const 255 i32.and i32.eq @@ -4473,15 +4473,15 @@ i32.const 0 end if - local.get $3 + local.get $entry return end - local.get $5 + local.get $taggedNext i32.const 1 i32.const -1 i32.xor i32.and - local.set $3 + local.set $entry br $while-continue|0 end end @@ -4502,20 +4502,20 @@ local.get $1 i32.store offset=4 ) - (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) + (func $~lib/map/Map#rehash (param $this i32) (param $newBucketsMask i32) + (local $newBucketsCapacity i32) + (local $newBuckets i32) + (local $newEntriesCapacity i32) + (local $newEntries i32) + (local $oldPtr i32) + (local $oldEnd i32) + (local $newPtr i32) + (local $var$9 i32) + (local $oldEntry i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) + (local $var$14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -4524,115 +4524,115 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $1 + local.get $newBucketsMask i32.const 1 i32.add - local.set $2 + local.set $newBucketsCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 + local.get $newBucketsCapacity i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $newBuckets i32.store - local.get $2 + local.get $newBucketsCapacity i32.const 8 i32.mul i32.const 3 i32.div_s - local.set $4 + local.set $newEntriesCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 + local.get $newEntriesCapacity i32.const 8 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $newEntries i32.store offset=4 - local.get $0 + local.get $this i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 + local.set $oldPtr + local.get $oldPtr + local.get $this i32.load offset=16 i32.const 8 i32.mul i32.add - local.set $7 - local.get $5 - local.set $8 + local.set $oldEnd + local.get $newEntries + local.set $newPtr loop $while-continue|0 - local.get $6 - local.get $7 + local.get $oldPtr + local.get $oldEnd i32.ne - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $6 - local.set $10 - local.get $10 + local.get $oldPtr + local.set $oldEntry + local.get $oldEntry i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $8 - local.set $11 - local.get $10 + local.get $newPtr + local.set $var$11 + local.get $oldEntry i32.load8_u - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 call $~lib/map/MapEntry#set:key - local.get $11 - local.get $10 + local.get $var$11 + local.get $oldEntry i32.load8_u offset=1 call $~lib/map/MapEntry#set:value - local.get $12 + local.get $var$12 call $~lib/util/hash/HASH - local.get $1 + local.get $newBucketsMask i32.and - local.set $13 - local.get $3 - local.get $13 + local.set $var$13 + local.get $newBuckets + local.get $var$13 i32.const 4 i32.mul i32.add - local.set $14 - local.get $11 - local.get $14 + local.set $var$14 + local.get $var$11 + local.get $var$14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $14 - local.get $8 + local.get $var$14 + local.get $newPtr i32.store - local.get $8 + local.get $newPtr i32.const 8 i32.add - local.set $8 + local.set $newPtr end - local.get $6 + local.get $oldPtr i32.const 8 i32.add - local.set $6 + local.set $oldPtr br $while-continue|0 end end - local.get $0 - local.get $3 + local.get $this + local.get $newBuckets call $~lib/map/Map#set:buckets - local.get $0 - local.get $1 + local.get $this + local.get $newBucketsMask call $~lib/map/Map#set:bucketsMask - local.get $0 - local.get $5 + local.get $this + local.get $newEntries call $~lib/map/Map#set:entries - local.get $0 - local.get $4 + local.get $this + local.get $newEntriesCapacity call $~lib/map/Map#set:entriesCapacity - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer @@ -4640,61 +4640,61 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 + (func $~lib/map/Map#get:size (param $this i32) (result i32) + local.get $this i32.load offset=20 ) - (func $~lib/map/Map#delete (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map#delete (param $this i32) (param $key i32) (result i32) + (local $entry i32) + (local $halfBucketsMask i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $entry + local.get $entry i32.eqz if i32.const 0 return end - local.get $2 - local.get $2 + local.get $entry + local.get $entry i32.load offset=8 i32.const 1 i32.or call $~lib/map/MapEntry#set:taggedNext - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 i32.const 1 i32.sub call $~lib/map/Map#set:entriesCount - local.get $0 + local.get $this i32.load offset=4 i32.const 1 i32.shr_u - local.set $3 - local.get $3 + local.set $halfBucketsMask + local.get $halfBucketsMask i32.const 1 i32.add i32.const 4 - local.tee $4 - local.get $0 + local.tee $var$4 + local.get $this i32.load offset=20 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.gt_u select i32.ge_u if (result i32) - local.get $0 + local.get $this i32.load offset=20 - local.get $0 + local.get $this i32.load offset=12 i32.const 3 i32.mul @@ -4705,54 +4705,54 @@ i32.const 0 end if - local.get $0 - local.get $3 + local.get $this + local.get $halfBucketsMask call $~lib/map/Map#rehash end i32.const 1 ) - (func $~lib/map/Map#clear (param $0 i32) - local.get $0 + (func $~lib/map/Map#clear (param $this i32) + local.get $this i32.const 0 i32.const 4 i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets - local.get $0 + local.get $this i32.const 4 i32.const 1 i32.sub call $~lib/map/Map#set:bucketsMask - local.get $0 + local.get $this i32.const 0 i32.const 4 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:entries - local.get $0 + local.get $this i32.const 4 call $~lib/map/Map#set:entriesCapacity - local.get $0 + local.get $this i32.const 0 call $~lib/map/Map#set:entriesOffset - local.get $0 + local.get $this i32.const 0 call $~lib/map/Map#set:entriesCount ) (func $std/map/testNumeric - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) + (local $map i32) + (local $keys i32) + (local $var$2 i32) + (local $var$3 i32) + (local $vals i32) + (local $keyMap i32) + (local $valMap i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) global.get $~lib/memory/__stack_pointer i32.const 20 i32.sub @@ -4765,21 +4765,21 @@ global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor - local.tee $0 + local.tee $map i32.store i32.const 0 - local.set $1 + local.set $keys loop $for-loop|1 - local.get $1 + local.get $keys i32.const 255 i32.and i32.const 100 i32.lt_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#has i32.eqz i32.eqz @@ -4791,17 +4791,17 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $keys i32.const 10 - local.get $1 + local.get $keys i32.const 255 i32.and i32.add call $~lib/map/Map#set drop - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#has i32.eqz if @@ -4812,11 +4812,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#get i32.const 10 - local.get $1 + local.get $keys i32.const 255 i32.and i32.add @@ -4830,14 +4830,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $keys i32.const 1 i32.add - local.set $1 + local.set $keys br $for-loop|1 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -4851,18 +4851,18 @@ unreachable end i32.const 0 - local.set $1 + local.set $keys loop $for-loop|3 - local.get $1 + local.get $keys i32.const 255 i32.and i32.const 100 i32.lt_u - local.set $4 - local.get $4 + local.set $vals + local.get $vals if - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#has i32.eqz if @@ -4873,11 +4873,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#get i32.const 10 - local.get $1 + local.get $keys i32.const 255 i32.and i32.add @@ -4891,17 +4891,17 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $keys i32.const 20 - local.get $1 + local.get $keys i32.const 255 i32.and i32.add call $~lib/map/Map#set drop - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#has i32.eqz if @@ -4912,11 +4912,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#get i32.const 20 - local.get $1 + local.get $keys i32.const 255 i32.and i32.add @@ -4930,14 +4930,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $keys i32.const 1 i32.add - local.set $1 + local.set $keys br $for-loop|3 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -4951,45 +4951,45 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $map call $~lib/map/Map#keys - local.tee $1 + local.tee $keys i32.store offset=4 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $map call $~lib/map/Map#values - local.tee $4 + local.tee $vals i32.store offset=8 global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor - local.tee $5 + local.tee $keyMap i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor - local.tee $6 + local.tee $valMap i32.store offset=16 i32.const 0 - local.set $7 + local.set $var$7 loop $for-loop|4 - local.get $7 - local.get $1 + local.get $var$7 + local.get $keys call $~lib/array/Array#get:length i32.lt_s - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 if - local.get $1 - local.get $7 + local.get $keys + local.get $var$7 call $~lib/array/Array#__get - local.set $9 - local.get $4 - local.get $7 + local.set $var$9 + local.get $vals + local.get $var$7 call $~lib/array/Array#__get - local.set $10 - local.get $0 - local.get $9 + local.set $var$10 + local.get $map + local.get $var$9 call $~lib/map/Map#has i32.eqz if @@ -5000,8 +5000,8 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $10 + local.get $map + local.get $var$10 i32.const 20 i32.sub call $~lib/map/Map#has @@ -5014,28 +5014,28 @@ call $~lib/builtins/abort unreachable end - local.get $5 - local.get $9 - local.get $9 + local.get $keyMap + local.get $var$9 + local.get $var$9 call $~lib/map/Map#set drop - local.get $6 - local.get $10 + local.get $valMap + local.get $var$10 i32.const 20 i32.sub - local.get $10 + local.get $var$10 i32.const 20 i32.sub call $~lib/map/Map#set drop - local.get $7 + local.get $var$7 i32.const 1 i32.add - local.set $7 + local.set $var$7 br $for-loop|4 end end - local.get $5 + local.get $keyMap call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -5048,7 +5048,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $valMap call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -5062,18 +5062,18 @@ unreachable end i32.const 0 - local.set $7 + local.set $var$7 loop $for-loop|6 - local.get $7 + local.get $var$7 i32.const 255 i32.and i32.const 50 i32.lt_u - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $0 - local.get $7 + local.get $map + local.get $var$7 call $~lib/map/Map#has i32.eqz if @@ -5084,11 +5084,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $7 + local.get $map + local.get $var$7 call $~lib/map/Map#get i32.const 20 - local.get $7 + local.get $var$7 i32.const 255 i32.and i32.add @@ -5101,13 +5101,13 @@ i32.const 5 call $~lib/builtins/abort unreachable - end - local.get $0 - local.get $7 + end + local.get $map + local.get $var$7 call $~lib/map/Map#delete drop - local.get $0 - local.get $7 + local.get $map + local.get $var$7 call $~lib/map/Map#has i32.eqz i32.eqz @@ -5119,14 +5119,14 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $var$7 i32.const 1 i32.add - local.set $7 + local.set $var$7 br $for-loop|6 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 50 i32.eq @@ -5140,18 +5140,18 @@ unreachable end i32.const 0 - local.set $7 + local.set $var$7 loop $for-loop|8 - local.get $7 + local.get $var$7 i32.const 255 i32.and i32.const 50 i32.lt_u - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $0 - local.get $7 + local.get $map + local.get $var$7 call $~lib/map/Map#has i32.eqz i32.eqz @@ -5163,17 +5163,17 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $7 + local.get $map + local.get $var$7 i32.const 10 - local.get $7 + local.get $var$7 i32.const 255 i32.and i32.add call $~lib/map/Map#set drop - local.get $0 - local.get $7 + local.get $map + local.get $var$7 call $~lib/map/Map#has i32.eqz if @@ -5184,12 +5184,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $7 + local.get $map + local.get $var$7 call $~lib/map/Map#delete drop - local.get $0 - local.get $7 + local.get $map + local.get $var$7 call $~lib/map/Map#has i32.eqz i32.eqz @@ -5201,14 +5201,14 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $var$7 i32.const 1 i32.add - local.set $7 + local.set $var$7 br $for-loop|8 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 50 i32.eq @@ -5221,9 +5221,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $map call $~lib/map/Map#clear - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 0 i32.eq @@ -5279,10 +5279,10 @@ local.get $1 i32.store offset=20 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + (func $~lib/util/hash/HASH (param $key i32) (result i32) + (local $var$1 i32) + (local $var$2 i32) + (local $var$3 i32) i32.const 0 drop i32.const 0 @@ -5293,113 +5293,113 @@ i32.const 4 i32.le_u drop - local.get $0 + local.get $key i32.extend16_s - local.set $2 + local.set $var$2 i32.const 2 - local.set $1 + local.set $var$1 i32.const 0 i32.const 374761393 i32.add - local.get $1 + local.get $var$1 i32.add - local.set $3 - local.get $3 - local.get $2 + local.set $var$3 + local.get $var$3 + local.get $var$2 i32.const -1028477379 i32.mul i32.add - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 15 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const -2048144777 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 13 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const -1028477379 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 16 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 return ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/map/Map#find (param $this i32) (param $key i32) (param $hashCode i32) (result i32) + (local $entry i32) + (local $var$4 i32) + (local $taggedNext i32) + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add i32.load - local.set $3 + local.set $entry loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + local.get $entry + local.set $var$4 + local.get $var$4 if - local.get $3 + local.get $entry i32.load offset=8 - local.set $5 - local.get $5 + local.set $taggedNext + local.get $taggedNext i32.const 1 i32.and i32.eqz if (result i32) - local.get $3 + local.get $entry i32.load16_s - local.get $1 + local.get $key i32.extend16_s i32.eq else i32.const 0 end if - local.get $3 + local.get $entry return end - local.get $5 + local.get $taggedNext i32.const 1 i32.const -1 i32.xor i32.and - local.set $3 + local.set $entry br $while-continue|0 end end i32.const 0 ) - (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map#has (param $this i32) (param $key i32) (result i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 @@ -5420,20 +5420,20 @@ local.get $1 i32.store offset=8 ) - (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) + (func $~lib/map/Map#rehash (param $this i32) (param $newBucketsMask i32) + (local $newBucketsCapacity i32) + (local $newBuckets i32) + (local $newEntriesCapacity i32) + (local $newEntries i32) + (local $oldPtr i32) + (local $oldEnd i32) + (local $newPtr i32) + (local $var$9 i32) + (local $oldEntry i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) + (local $var$14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -5442,115 +5442,115 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $1 + local.get $newBucketsMask i32.const 1 i32.add - local.set $2 + local.set $newBucketsCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 + local.get $newBucketsCapacity i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $newBuckets i32.store - local.get $2 + local.get $newBucketsCapacity i32.const 8 i32.mul i32.const 3 i32.div_s - local.set $4 + local.set $newEntriesCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 + local.get $newEntriesCapacity i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $newEntries i32.store offset=4 - local.get $0 + local.get $this i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 + local.set $oldPtr + local.get $oldPtr + local.get $this i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $7 - local.get $5 - local.set $8 + local.set $oldEnd + local.get $newEntries + local.set $newPtr loop $while-continue|0 - local.get $6 - local.get $7 + local.get $oldPtr + local.get $oldEnd i32.ne - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $6 - local.set $10 - local.get $10 + local.get $oldPtr + local.set $oldEntry + local.get $oldEntry i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $8 - local.set $11 - local.get $10 + local.get $newPtr + local.set $var$11 + local.get $oldEntry i32.load16_s - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 call $~lib/map/MapEntry#set:key - local.get $11 - local.get $10 + local.get $var$11 + local.get $oldEntry i32.load offset=4 call $~lib/map/MapEntry#set:value - local.get $12 + local.get $var$12 call $~lib/util/hash/HASH - local.get $1 + local.get $newBucketsMask i32.and - local.set $13 - local.get $3 - local.get $13 + local.set $var$13 + local.get $newBuckets + local.get $var$13 i32.const 4 i32.mul i32.add - local.set $14 - local.get $11 - local.get $14 + local.set $var$14 + local.get $var$11 + local.get $var$14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $14 - local.get $8 + local.get $var$14 + local.get $newPtr i32.store - local.get $8 + local.get $newPtr i32.const 12 i32.add - local.set $8 + local.set $newPtr end - local.get $6 + local.get $oldPtr i32.const 12 i32.add - local.set $6 + local.set $oldPtr br $while-continue|0 end end - local.get $0 - local.get $3 + local.get $this + local.get $newBuckets call $~lib/map/Map#set:buckets - local.get $0 - local.get $1 + local.get $this + local.get $newBucketsMask call $~lib/map/Map#set:bucketsMask - local.get $0 - local.get $5 + local.get $this + local.get $newEntries call $~lib/map/Map#set:entries - local.get $0 - local.get $4 + local.get $this + local.get $newEntriesCapacity call $~lib/map/Map#set:entriesCapacity - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer @@ -5558,15 +5558,15 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map#get (param $this i32) (param $key i32) (result i32) + (local $entry i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $entry + local.get $entry i32.eqz if i32.const 592 @@ -5576,11 +5576,11 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $entry i32.load offset=4 ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 + (func $~lib/map/Map#get:size (param $this i32) (result i32) + local.get $this i32.load offset=20 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) @@ -5607,26 +5607,26 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 1 i32.shl i32.add - local.get $2 + local.get $value i32.store16 i32.const 0 drop ) - (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 + (func $~lib/array/Array#set:length (param $this i32) (param $newLength i32) + local.get $this + local.get $newLength i32.const 1 i32.const 0 call $~lib/array/ensureCapacity - local.get $0 - local.get $1 + local.get $this + local.get $newLength call $~lib/array/Array#set:length_ ) (func $~lib/map/Map#set:buckets (param $0 i32) (param $1 i32) @@ -5667,14 +5667,14 @@ local.get $1 i32.store offset=20 ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i32) + (local $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -5685,64 +5685,64 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 1 i32.shl i32.add i32.load16_s - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/map/Map#find (param $this i32) (param $key i32) (param $hashCode i32) (result i32) + (local $entry i32) + (local $var$4 i32) + (local $taggedNext i32) + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add i32.load - local.set $3 + local.set $entry loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + local.get $entry + local.set $var$4 + local.get $var$4 if - local.get $3 + local.get $entry i32.load offset=4 - local.set $5 - local.get $5 + local.set $taggedNext + local.get $taggedNext i32.const 1 i32.and i32.eqz if (result i32) - local.get $3 + local.get $entry i32.load16_s - local.get $1 + local.get $key i32.extend16_s i32.eq else i32.const 0 end if - local.get $3 + local.get $entry return end - local.get $5 + local.get $taggedNext i32.const 1 i32.const -1 i32.xor i32.and - local.set $3 + local.set $entry br $while-continue|0 end end @@ -5763,20 +5763,20 @@ local.get $1 i32.store offset=4 ) - (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) + (func $~lib/map/Map#rehash (param $this i32) (param $newBucketsMask i32) + (local $newBucketsCapacity i32) + (local $newBuckets i32) + (local $newEntriesCapacity i32) + (local $newEntries i32) + (local $oldPtr i32) + (local $oldEnd i32) + (local $newPtr i32) + (local $var$9 i32) + (local $oldEntry i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) + (local $var$14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -5785,115 +5785,115 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $1 + local.get $newBucketsMask i32.const 1 i32.add - local.set $2 + local.set $newBucketsCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 + local.get $newBucketsCapacity i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $newBuckets i32.store - local.get $2 + local.get $newBucketsCapacity i32.const 8 i32.mul i32.const 3 i32.div_s - local.set $4 + local.set $newEntriesCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 + local.get $newEntriesCapacity i32.const 8 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $newEntries i32.store offset=4 - local.get $0 + local.get $this i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 + local.set $oldPtr + local.get $oldPtr + local.get $this i32.load offset=16 i32.const 8 i32.mul i32.add - local.set $7 - local.get $5 - local.set $8 + local.set $oldEnd + local.get $newEntries + local.set $newPtr loop $while-continue|0 - local.get $6 - local.get $7 + local.get $oldPtr + local.get $oldEnd i32.ne - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $6 - local.set $10 - local.get $10 + local.get $oldPtr + local.set $oldEntry + local.get $oldEntry i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $8 - local.set $11 - local.get $10 + local.get $newPtr + local.set $var$11 + local.get $oldEntry i32.load16_s - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 call $~lib/map/MapEntry#set:key - local.get $11 - local.get $10 + local.get $var$11 + local.get $oldEntry i32.load16_s offset=2 call $~lib/map/MapEntry#set:value - local.get $12 + local.get $var$12 call $~lib/util/hash/HASH - local.get $1 + local.get $newBucketsMask i32.and - local.set $13 - local.get $3 - local.get $13 + local.set $var$13 + local.get $newBuckets + local.get $var$13 i32.const 4 i32.mul i32.add - local.set $14 - local.get $11 - local.get $14 + local.set $var$14 + local.get $var$11 + local.get $var$14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $14 - local.get $8 + local.get $var$14 + local.get $newPtr i32.store - local.get $8 + local.get $newPtr i32.const 8 i32.add - local.set $8 + local.set $newPtr end - local.get $6 + local.get $oldPtr i32.const 8 i32.add - local.set $6 + local.set $oldPtr br $while-continue|0 end end - local.get $0 - local.get $3 + local.get $this + local.get $newBuckets call $~lib/map/Map#set:buckets - local.get $0 - local.get $1 + local.get $this + local.get $newBucketsMask call $~lib/map/Map#set:bucketsMask - local.get $0 - local.get $5 + local.get $this + local.get $newEntries call $~lib/map/Map#set:entries - local.get $0 - local.get $4 + local.get $this + local.get $newEntriesCapacity call $~lib/map/Map#set:entriesCapacity - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer @@ -5901,61 +5901,61 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 + (func $~lib/map/Map#get:size (param $this i32) (result i32) + local.get $this i32.load offset=20 ) - (func $~lib/map/Map#delete (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map#delete (param $this i32) (param $key i32) (result i32) + (local $entry i32) + (local $halfBucketsMask i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $entry + local.get $entry i32.eqz if i32.const 0 return end - local.get $2 - local.get $2 + local.get $entry + local.get $entry i32.load offset=8 i32.const 1 i32.or call $~lib/map/MapEntry#set:taggedNext - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 i32.const 1 i32.sub call $~lib/map/Map#set:entriesCount - local.get $0 + local.get $this i32.load offset=4 i32.const 1 i32.shr_u - local.set $3 - local.get $3 + local.set $halfBucketsMask + local.get $halfBucketsMask i32.const 1 i32.add i32.const 4 - local.tee $4 - local.get $0 + local.tee $var$4 + local.get $this i32.load offset=20 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.gt_u select i32.ge_u if (result i32) - local.get $0 + local.get $this i32.load offset=20 - local.get $0 + local.get $this i32.load offset=12 i32.const 3 i32.mul @@ -5966,54 +5966,54 @@ i32.const 0 end if - local.get $0 - local.get $3 + local.get $this + local.get $halfBucketsMask call $~lib/map/Map#rehash end i32.const 1 ) - (func $~lib/map/Map#clear (param $0 i32) - local.get $0 + (func $~lib/map/Map#clear (param $this i32) + local.get $this i32.const 0 i32.const 4 i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets - local.get $0 + local.get $this i32.const 4 i32.const 1 i32.sub call $~lib/map/Map#set:bucketsMask - local.get $0 + local.get $this i32.const 0 i32.const 4 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:entries - local.get $0 + local.get $this i32.const 4 call $~lib/map/Map#set:entriesCapacity - local.get $0 + local.get $this i32.const 0 call $~lib/map/Map#set:entriesOffset - local.get $0 + local.get $this i32.const 0 call $~lib/map/Map#set:entriesCount ) (func $std/map/testNumeric - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) + (local $map i32) + (local $keys i32) + (local $var$2 i32) + (local $var$3 i32) + (local $vals i32) + (local $keyMap i32) + (local $valMap i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) global.get $~lib/memory/__stack_pointer i32.const 20 i32.sub @@ -6026,20 +6026,20 @@ global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor - local.tee $0 + local.tee $map i32.store i32.const 0 - local.set $1 + local.set $keys loop $for-loop|1 - local.get $1 + local.get $keys i32.extend16_s i32.const 100 i32.lt_s - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#has i32.eqz i32.eqz @@ -6051,16 +6051,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $keys i32.const 10 - local.get $1 + local.get $keys i32.extend16_s i32.add call $~lib/map/Map#set drop - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#has i32.eqz if @@ -6071,11 +6071,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#get i32.const 10 - local.get $1 + local.get $keys i32.extend16_s i32.add i32.eq @@ -6088,14 +6088,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $keys i32.const 1 i32.add - local.set $1 + local.set $keys br $for-loop|1 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -6109,17 +6109,17 @@ unreachable end i32.const 0 - local.set $1 + local.set $keys loop $for-loop|3 - local.get $1 + local.get $keys i32.extend16_s i32.const 100 i32.lt_s - local.set $4 - local.get $4 + local.set $vals + local.get $vals if - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#has i32.eqz if @@ -6130,11 +6130,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#get i32.const 10 - local.get $1 + local.get $keys i32.extend16_s i32.add i32.eq @@ -6147,16 +6147,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $keys i32.const 20 - local.get $1 + local.get $keys i32.extend16_s i32.add call $~lib/map/Map#set drop - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#has i32.eqz if @@ -6166,12 +6166,12 @@ i32.const 5 call $~lib/builtins/abort unreachable - end - local.get $0 - local.get $1 + end + local.get $map + local.get $keys call $~lib/map/Map#get i32.const 20 - local.get $1 + local.get $keys i32.extend16_s i32.add i32.eq @@ -6184,14 +6184,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $keys i32.const 1 i32.add - local.set $1 + local.set $keys br $for-loop|3 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -6205,45 +6205,45 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $map call $~lib/map/Map#keys - local.tee $1 + local.tee $keys i32.store offset=4 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $map call $~lib/map/Map#values - local.tee $4 + local.tee $vals i32.store offset=8 global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor - local.tee $5 + local.tee $keyMap i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor - local.tee $6 + local.tee $valMap i32.store offset=16 i32.const 0 - local.set $7 + local.set $var$7 loop $for-loop|4 - local.get $7 - local.get $1 + local.get $var$7 + local.get $keys call $~lib/array/Array#get:length i32.lt_s - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 if - local.get $1 - local.get $7 + local.get $keys + local.get $var$7 call $~lib/array/Array#__get - local.set $9 - local.get $4 - local.get $7 + local.set $var$9 + local.get $vals + local.get $var$7 call $~lib/array/Array#__get - local.set $10 - local.get $0 - local.get $9 + local.set $var$10 + local.get $map + local.get $var$9 call $~lib/map/Map#has i32.eqz if @@ -6254,8 +6254,8 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $10 + local.get $map + local.get $var$10 i32.const 20 i32.sub call $~lib/map/Map#has @@ -6268,28 +6268,28 @@ call $~lib/builtins/abort unreachable end - local.get $5 - local.get $9 - local.get $9 + local.get $keyMap + local.get $var$9 + local.get $var$9 call $~lib/map/Map#set drop - local.get $6 - local.get $10 + local.get $valMap + local.get $var$10 i32.const 20 i32.sub - local.get $10 + local.get $var$10 i32.const 20 i32.sub call $~lib/map/Map#set drop - local.get $7 + local.get $var$7 i32.const 1 i32.add - local.set $7 + local.set $var$7 br $for-loop|4 end end - local.get $5 + local.get $keyMap call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -6302,7 +6302,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $valMap call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -6316,17 +6316,17 @@ unreachable end i32.const 0 - local.set $7 + local.set $var$7 loop $for-loop|6 - local.get $7 + local.get $var$7 i32.extend16_s i32.const 50 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $0 - local.get $7 + local.get $map + local.get $var$7 call $~lib/map/Map#has i32.eqz if @@ -6337,11 +6337,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $7 + local.get $map + local.get $var$7 call $~lib/map/Map#get i32.const 20 - local.get $7 + local.get $var$7 i32.extend16_s i32.add i32.eq @@ -6354,12 +6354,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $7 + local.get $map + local.get $var$7 call $~lib/map/Map#delete drop - local.get $0 - local.get $7 + local.get $map + local.get $var$7 call $~lib/map/Map#has i32.eqz i32.eqz @@ -6371,14 +6371,14 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $var$7 i32.const 1 i32.add - local.set $7 + local.set $var$7 br $for-loop|6 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 50 i32.eq @@ -6392,17 +6392,17 @@ unreachable end i32.const 0 - local.set $7 + local.set $var$7 loop $for-loop|8 - local.get $7 + local.get $var$7 i32.extend16_s i32.const 50 i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $0 - local.get $7 + local.get $map + local.get $var$7 call $~lib/map/Map#has i32.eqz i32.eqz @@ -6414,16 +6414,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $7 + local.get $map + local.get $var$7 i32.const 10 - local.get $7 + local.get $var$7 i32.extend16_s i32.add call $~lib/map/Map#set drop - local.get $0 - local.get $7 + local.get $map + local.get $var$7 call $~lib/map/Map#has i32.eqz if @@ -6434,12 +6434,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $7 + local.get $map + local.get $var$7 call $~lib/map/Map#delete drop - local.get $0 - local.get $7 + local.get $map + local.get $var$7 call $~lib/map/Map#has i32.eqz i32.eqz @@ -6451,14 +6451,14 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $var$7 i32.const 1 i32.add - local.set $7 + local.set $var$7 br $for-loop|8 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 50 i32.eq @@ -6471,9 +6471,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $map call $~lib/map/Map#clear - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 0 i32.eq @@ -6529,10 +6529,10 @@ local.get $1 i32.store offset=20 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + (func $~lib/util/hash/HASH (param $key i32) (result i32) + (local $var$1 i32) + (local $var$2 i32) + (local $var$3 i32) i32.const 0 drop i32.const 0 @@ -6543,90 +6543,90 @@ i32.const 4 i32.le_u drop - local.get $0 + local.get $key i32.const 65535 i32.and - local.set $2 + local.set $var$2 i32.const 2 - local.set $1 + local.set $var$1 i32.const 0 i32.const 374761393 i32.add - local.get $1 + local.get $var$1 i32.add - local.set $3 - local.get $3 - local.get $2 + local.set $var$3 + local.get $var$3 + local.get $var$2 i32.const -1028477379 i32.mul i32.add - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 15 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const -2048144777 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 13 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const -1028477379 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 16 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 return ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/map/Map#find (param $this i32) (param $key i32) (param $hashCode i32) (result i32) + (local $entry i32) + (local $var$4 i32) + (local $taggedNext i32) + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add i32.load - local.set $3 + local.set $entry loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + local.get $entry + local.set $var$4 + local.get $var$4 if - local.get $3 + local.get $entry i32.load offset=8 - local.set $5 - local.get $5 + local.set $taggedNext + local.get $taggedNext i32.const 1 i32.and i32.eqz if (result i32) - local.get $3 + local.get $entry i32.load16_u - local.get $1 + local.get $key i32.const 65535 i32.and i32.eq @@ -6634,24 +6634,24 @@ i32.const 0 end if - local.get $3 + local.get $entry return end - local.get $5 + local.get $taggedNext i32.const 1 i32.const -1 i32.xor i32.and - local.set $3 + local.set $entry br $while-continue|0 end end i32.const 0 ) - (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map#has (param $this i32) (param $key i32) (result i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 @@ -6672,20 +6672,20 @@ local.get $1 i32.store offset=8 ) - (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) + (func $~lib/map/Map#rehash (param $this i32) (param $newBucketsMask i32) + (local $newBucketsCapacity i32) + (local $newBuckets i32) + (local $newEntriesCapacity i32) + (local $newEntries i32) + (local $oldPtr i32) + (local $oldEnd i32) + (local $newPtr i32) + (local $var$9 i32) + (local $oldEntry i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) + (local $var$14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -6694,115 +6694,115 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $1 + local.get $newBucketsMask i32.const 1 i32.add - local.set $2 + local.set $newBucketsCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 + local.get $newBucketsCapacity i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $newBuckets i32.store - local.get $2 + local.get $newBucketsCapacity i32.const 8 i32.mul i32.const 3 i32.div_s - local.set $4 + local.set $newEntriesCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 + local.get $newEntriesCapacity i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $newEntries i32.store offset=4 - local.get $0 + local.get $this i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 + local.set $oldPtr + local.get $oldPtr + local.get $this i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $7 - local.get $5 - local.set $8 + local.set $oldEnd + local.get $newEntries + local.set $newPtr loop $while-continue|0 - local.get $6 - local.get $7 + local.get $oldPtr + local.get $oldEnd i32.ne - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $6 - local.set $10 - local.get $10 + local.get $oldPtr + local.set $oldEntry + local.get $oldEntry i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $8 - local.set $11 - local.get $10 + local.get $newPtr + local.set $var$11 + local.get $oldEntry i32.load16_u - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 call $~lib/map/MapEntry#set:key - local.get $11 - local.get $10 + local.get $var$11 + local.get $oldEntry i32.load offset=4 call $~lib/map/MapEntry#set:value - local.get $12 + local.get $var$12 call $~lib/util/hash/HASH - local.get $1 + local.get $newBucketsMask i32.and - local.set $13 - local.get $3 - local.get $13 + local.set $var$13 + local.get $newBuckets + local.get $var$13 i32.const 4 i32.mul i32.add - local.set $14 - local.get $11 - local.get $14 + local.set $var$14 + local.get $var$11 + local.get $var$14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $14 - local.get $8 + local.get $var$14 + local.get $newPtr i32.store - local.get $8 + local.get $newPtr i32.const 12 i32.add - local.set $8 + local.set $newPtr end - local.get $6 + local.get $oldPtr i32.const 12 i32.add - local.set $6 + local.set $oldPtr br $while-continue|0 end end - local.get $0 - local.get $3 + local.get $this + local.get $newBuckets call $~lib/map/Map#set:buckets - local.get $0 - local.get $1 + local.get $this + local.get $newBucketsMask call $~lib/map/Map#set:bucketsMask - local.get $0 - local.get $5 + local.get $this + local.get $newEntries call $~lib/map/Map#set:entries - local.get $0 - local.get $4 + local.get $this + local.get $newEntriesCapacity call $~lib/map/Map#set:entriesCapacity - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer @@ -6810,15 +6810,15 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map#get (param $this i32) (param $key i32) (result i32) + (local $entry i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $entry + local.get $entry i32.eqz if i32.const 592 @@ -6828,11 +6828,11 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $entry i32.load offset=4 ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 + (func $~lib/map/Map#get:size (param $this i32) (result i32) + local.get $this i32.load offset=20 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) @@ -6859,26 +6859,26 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 1 i32.shl i32.add - local.get $2 + local.get $value i32.store16 i32.const 0 drop ) - (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 + (func $~lib/array/Array#set:length (param $this i32) (param $newLength i32) + local.get $this + local.get $newLength i32.const 1 i32.const 0 call $~lib/array/ensureCapacity - local.get $0 - local.get $1 + local.get $this + local.get $newLength call $~lib/array/Array#set:length_ ) (func $~lib/map/Map#set:buckets (param $0 i32) (param $1 i32) @@ -6919,14 +6919,14 @@ local.get $1 i32.store offset=20 ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i32) + (local $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -6937,49 +6937,49 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 1 i32.shl i32.add i32.load16_u - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/map/Map#find (param $this i32) (param $key i32) (param $hashCode i32) (result i32) + (local $entry i32) + (local $var$4 i32) + (local $taggedNext i32) + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add i32.load - local.set $3 + local.set $entry loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + local.get $entry + local.set $var$4 + local.get $var$4 if - local.get $3 + local.get $entry i32.load offset=4 - local.set $5 - local.get $5 + local.set $taggedNext + local.get $taggedNext i32.const 1 i32.and i32.eqz if (result i32) - local.get $3 + local.get $entry i32.load16_u - local.get $1 + local.get $key i32.const 65535 i32.and i32.eq @@ -6987,15 +6987,15 @@ i32.const 0 end if - local.get $3 + local.get $entry return end - local.get $5 + local.get $taggedNext i32.const 1 i32.const -1 i32.xor i32.and - local.set $3 + local.set $entry br $while-continue|0 end end @@ -7016,20 +7016,20 @@ local.get $1 i32.store offset=4 ) - (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) + (func $~lib/map/Map#rehash (param $this i32) (param $newBucketsMask i32) + (local $newBucketsCapacity i32) + (local $newBuckets i32) + (local $newEntriesCapacity i32) + (local $newEntries i32) + (local $oldPtr i32) + (local $oldEnd i32) + (local $newPtr i32) + (local $var$9 i32) + (local $oldEntry i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) + (local $var$14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -7038,115 +7038,115 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $1 + local.get $newBucketsMask i32.const 1 i32.add - local.set $2 + local.set $newBucketsCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 + local.get $newBucketsCapacity i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $newBuckets i32.store - local.get $2 + local.get $newBucketsCapacity i32.const 8 i32.mul i32.const 3 i32.div_s - local.set $4 + local.set $newEntriesCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 + local.get $newEntriesCapacity i32.const 8 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $newEntries i32.store offset=4 - local.get $0 + local.get $this i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 + local.set $oldPtr + local.get $oldPtr + local.get $this i32.load offset=16 i32.const 8 i32.mul i32.add - local.set $7 - local.get $5 - local.set $8 + local.set $oldEnd + local.get $newEntries + local.set $newPtr loop $while-continue|0 - local.get $6 - local.get $7 + local.get $oldPtr + local.get $oldEnd i32.ne - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $6 - local.set $10 - local.get $10 + local.get $oldPtr + local.set $oldEntry + local.get $oldEntry i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $8 - local.set $11 - local.get $10 + local.get $newPtr + local.set $var$11 + local.get $oldEntry i32.load16_u - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 call $~lib/map/MapEntry#set:key - local.get $11 - local.get $10 + local.get $var$11 + local.get $oldEntry i32.load16_u offset=2 call $~lib/map/MapEntry#set:value - local.get $12 + local.get $var$12 call $~lib/util/hash/HASH - local.get $1 + local.get $newBucketsMask i32.and - local.set $13 - local.get $3 - local.get $13 + local.set $var$13 + local.get $newBuckets + local.get $var$13 i32.const 4 i32.mul i32.add - local.set $14 - local.get $11 - local.get $14 + local.set $var$14 + local.get $var$11 + local.get $var$14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $14 - local.get $8 + local.get $var$14 + local.get $newPtr i32.store - local.get $8 + local.get $newPtr i32.const 8 i32.add - local.set $8 + local.set $newPtr end - local.get $6 + local.get $oldPtr i32.const 8 i32.add - local.set $6 + local.set $oldPtr br $while-continue|0 end end - local.get $0 - local.get $3 + local.get $this + local.get $newBuckets call $~lib/map/Map#set:buckets - local.get $0 - local.get $1 + local.get $this + local.get $newBucketsMask call $~lib/map/Map#set:bucketsMask - local.get $0 - local.get $5 + local.get $this + local.get $newEntries call $~lib/map/Map#set:entries - local.get $0 - local.get $4 + local.get $this + local.get $newEntriesCapacity call $~lib/map/Map#set:entriesCapacity - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer @@ -7154,61 +7154,61 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 + (func $~lib/map/Map#get:size (param $this i32) (result i32) + local.get $this i32.load offset=20 ) - (func $~lib/map/Map#delete (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map#delete (param $this i32) (param $key i32) (result i32) + (local $entry i32) + (local $halfBucketsMask i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $entry + local.get $entry i32.eqz if i32.const 0 return end - local.get $2 - local.get $2 + local.get $entry + local.get $entry i32.load offset=8 i32.const 1 i32.or call $~lib/map/MapEntry#set:taggedNext - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 i32.const 1 i32.sub call $~lib/map/Map#set:entriesCount - local.get $0 + local.get $this i32.load offset=4 i32.const 1 i32.shr_u - local.set $3 - local.get $3 + local.set $halfBucketsMask + local.get $halfBucketsMask i32.const 1 i32.add i32.const 4 - local.tee $4 - local.get $0 + local.tee $var$4 + local.get $this i32.load offset=20 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.gt_u select i32.ge_u if (result i32) - local.get $0 + local.get $this i32.load offset=20 - local.get $0 + local.get $this i32.load offset=12 i32.const 3 i32.mul @@ -7219,54 +7219,54 @@ i32.const 0 end if - local.get $0 - local.get $3 + local.get $this + local.get $halfBucketsMask call $~lib/map/Map#rehash end i32.const 1 ) - (func $~lib/map/Map#clear (param $0 i32) - local.get $0 + (func $~lib/map/Map#clear (param $this i32) + local.get $this i32.const 0 i32.const 4 i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets - local.get $0 + local.get $this i32.const 4 i32.const 1 i32.sub call $~lib/map/Map#set:bucketsMask - local.get $0 + local.get $this i32.const 0 i32.const 4 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:entries - local.get $0 + local.get $this i32.const 4 call $~lib/map/Map#set:entriesCapacity - local.get $0 + local.get $this i32.const 0 call $~lib/map/Map#set:entriesOffset - local.get $0 + local.get $this i32.const 0 call $~lib/map/Map#set:entriesCount ) (func $std/map/testNumeric - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) + (local $map i32) + (local $keys i32) + (local $var$2 i32) + (local $var$3 i32) + (local $vals i32) + (local $keyMap i32) + (local $valMap i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) global.get $~lib/memory/__stack_pointer i32.const 20 i32.sub @@ -7279,21 +7279,21 @@ global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor - local.tee $0 + local.tee $map i32.store i32.const 0 - local.set $1 + local.set $keys loop $for-loop|1 - local.get $1 + local.get $keys i32.const 65535 i32.and i32.const 100 i32.lt_u - local.set $3 - local.get $3 - if - local.get $0 - local.get $1 + local.set $var$3 + local.get $var$3 + if + local.get $map + local.get $keys call $~lib/map/Map#has i32.eqz i32.eqz @@ -7305,17 +7305,17 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $keys i32.const 10 - local.get $1 + local.get $keys i32.const 65535 i32.and i32.add call $~lib/map/Map#set drop - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#has i32.eqz if @@ -7326,11 +7326,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#get i32.const 10 - local.get $1 + local.get $keys i32.const 65535 i32.and i32.add @@ -7344,14 +7344,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $keys i32.const 1 i32.add - local.set $1 + local.set $keys br $for-loop|1 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -7365,18 +7365,18 @@ unreachable end i32.const 0 - local.set $1 + local.set $keys loop $for-loop|3 - local.get $1 + local.get $keys i32.const 65535 i32.and i32.const 100 i32.lt_u - local.set $4 - local.get $4 + local.set $vals + local.get $vals if - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#has i32.eqz if @@ -7387,11 +7387,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#get i32.const 10 - local.get $1 + local.get $keys i32.const 65535 i32.and i32.add @@ -7405,17 +7405,17 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $keys i32.const 20 - local.get $1 + local.get $keys i32.const 65535 i32.and i32.add call $~lib/map/Map#set drop - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#has i32.eqz if @@ -7426,11 +7426,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#get i32.const 20 - local.get $1 + local.get $keys i32.const 65535 i32.and i32.add @@ -7444,14 +7444,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $keys i32.const 1 i32.add - local.set $1 + local.set $keys br $for-loop|3 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -7465,45 +7465,45 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $map call $~lib/map/Map#keys - local.tee $1 + local.tee $keys i32.store offset=4 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $map call $~lib/map/Map#values - local.tee $4 + local.tee $vals i32.store offset=8 global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor - local.tee $5 + local.tee $keyMap i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor - local.tee $6 + local.tee $valMap i32.store offset=16 i32.const 0 - local.set $7 + local.set $var$7 loop $for-loop|4 - local.get $7 - local.get $1 + local.get $var$7 + local.get $keys call $~lib/array/Array#get:length i32.lt_s - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 if - local.get $1 - local.get $7 + local.get $keys + local.get $var$7 call $~lib/array/Array#__get - local.set $9 - local.get $4 - local.get $7 + local.set $var$9 + local.get $vals + local.get $var$7 call $~lib/array/Array#__get - local.set $10 - local.get $0 - local.get $9 + local.set $var$10 + local.get $map + local.get $var$9 call $~lib/map/Map#has i32.eqz if @@ -7514,8 +7514,8 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $10 + local.get $map + local.get $var$10 i32.const 20 i32.sub call $~lib/map/Map#has @@ -7528,28 +7528,28 @@ call $~lib/builtins/abort unreachable end - local.get $5 - local.get $9 - local.get $9 + local.get $keyMap + local.get $var$9 + local.get $var$9 call $~lib/map/Map#set drop - local.get $6 - local.get $10 + local.get $valMap + local.get $var$10 i32.const 20 i32.sub - local.get $10 + local.get $var$10 i32.const 20 i32.sub call $~lib/map/Map#set drop - local.get $7 + local.get $var$7 i32.const 1 i32.add - local.set $7 + local.set $var$7 br $for-loop|4 end end - local.get $5 + local.get $keyMap call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -7562,7 +7562,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $valMap call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -7576,18 +7576,18 @@ unreachable end i32.const 0 - local.set $7 + local.set $var$7 loop $for-loop|6 - local.get $7 + local.get $var$7 i32.const 65535 i32.and i32.const 50 i32.lt_u - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $0 - local.get $7 + local.get $map + local.get $var$7 call $~lib/map/Map#has i32.eqz if @@ -7598,11 +7598,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $7 + local.get $map + local.get $var$7 call $~lib/map/Map#get i32.const 20 - local.get $7 + local.get $var$7 i32.const 65535 i32.and i32.add @@ -7616,12 +7616,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $7 + local.get $map + local.get $var$7 call $~lib/map/Map#delete drop - local.get $0 - local.get $7 + local.get $map + local.get $var$7 call $~lib/map/Map#has i32.eqz i32.eqz @@ -7633,14 +7633,14 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $var$7 i32.const 1 i32.add - local.set $7 + local.set $var$7 br $for-loop|6 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 50 i32.eq @@ -7654,18 +7654,18 @@ unreachable end i32.const 0 - local.set $7 + local.set $var$7 loop $for-loop|8 - local.get $7 + local.get $var$7 i32.const 65535 i32.and i32.const 50 i32.lt_u - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $0 - local.get $7 + local.get $map + local.get $var$7 call $~lib/map/Map#has i32.eqz i32.eqz @@ -7677,17 +7677,17 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $7 + local.get $map + local.get $var$7 i32.const 10 - local.get $7 + local.get $var$7 i32.const 65535 i32.and i32.add call $~lib/map/Map#set drop - local.get $0 - local.get $7 + local.get $map + local.get $var$7 call $~lib/map/Map#has i32.eqz if @@ -7698,12 +7698,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $7 + local.get $map + local.get $var$7 call $~lib/map/Map#delete drop - local.get $0 - local.get $7 + local.get $map + local.get $var$7 call $~lib/map/Map#has i32.eqz i32.eqz @@ -7715,14 +7715,14 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $var$7 i32.const 1 i32.add - local.set $7 + local.set $var$7 br $for-loop|8 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 50 i32.eq @@ -7735,9 +7735,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $map call $~lib/map/Map#clear - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 0 i32.eq @@ -7755,24 +7755,24 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map#has (param $this i32) (param $key i32) (result i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map#get (param $this i32) (param $key i32) (result i32) + (local $entry i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $entry + local.get $entry i32.eqz if i32.const 592 @@ -7782,64 +7782,64 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $entry i32.load offset=4 ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/map/Map#delete (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map#delete (param $this i32) (param $key i32) (result i32) + (local $entry i32) + (local $halfBucketsMask i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $entry + local.get $entry i32.eqz if i32.const 0 return end - local.get $2 - local.get $2 + local.get $entry + local.get $entry i32.load offset=8 i32.const 1 i32.or call $~lib/map/MapEntry#set:taggedNext - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 i32.const 1 i32.sub call $~lib/map/Map#set:entriesCount - local.get $0 + local.get $this i32.load offset=4 i32.const 1 i32.shr_u - local.set $3 - local.get $3 + local.set $halfBucketsMask + local.get $halfBucketsMask i32.const 1 i32.add i32.const 4 - local.tee $4 - local.get $0 + local.tee $var$4 + local.get $this i32.load offset=20 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.gt_u select i32.ge_u if (result i32) - local.get $0 + local.get $this i32.load offset=20 - local.get $0 + local.get $this i32.load offset=12 i32.const 3 i32.mul @@ -7850,52 +7850,52 @@ i32.const 0 end if - local.get $0 - local.get $3 + local.get $this + local.get $halfBucketsMask call $~lib/map/Map#rehash end i32.const 1 ) - (func $~lib/map/Map#clear (param $0 i32) - local.get $0 + (func $~lib/map/Map#clear (param $this i32) + local.get $this i32.const 0 i32.const 4 i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets - local.get $0 + local.get $this i32.const 4 i32.const 1 i32.sub call $~lib/map/Map#set:bucketsMask - local.get $0 + local.get $this i32.const 0 i32.const 4 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:entries - local.get $0 + local.get $this i32.const 4 call $~lib/map/Map#set:entriesCapacity - local.get $0 + local.get $this i32.const 0 call $~lib/map/Map#set:entriesOffset - local.get $0 + local.get $this i32.const 0 call $~lib/map/Map#set:entriesCount ) (func $std/map/testNumeric - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) + (local $map i32) + (local $keys i32) + (local $vals i32) + (local $keyMap i32) + (local $valMap i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) global.get $~lib/memory/__stack_pointer i32.const 20 i32.sub @@ -7908,19 +7908,19 @@ global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor - local.tee $0 + local.tee $map i32.store i32.const 0 - local.set $1 + local.set $keys loop $for-loop|0 - local.get $1 + local.get $keys i32.const 100 i32.lt_s - local.set $2 - local.get $2 + local.set $vals + local.get $vals if - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#has i32.eqz i32.eqz @@ -7932,15 +7932,15 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $keys i32.const 10 - local.get $1 + local.get $keys i32.add call $~lib/map/Map#set drop - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#has i32.eqz if @@ -7951,11 +7951,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#get i32.const 10 - local.get $1 + local.get $keys i32.add i32.eq i32.eqz @@ -7967,14 +7967,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $keys i32.const 1 i32.add - local.set $1 + local.set $keys br $for-loop|0 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -7988,16 +7988,16 @@ unreachable end i32.const 0 - local.set $1 + local.set $keys loop $for-loop|1 - local.get $1 + local.get $keys i32.const 100 i32.lt_s - local.set $2 - local.get $2 + local.set $vals + local.get $vals if - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#has i32.eqz if @@ -8008,11 +8008,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#get i32.const 10 - local.get $1 + local.get $keys i32.add i32.eq i32.eqz @@ -8024,15 +8024,15 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $keys i32.const 20 - local.get $1 + local.get $keys i32.add call $~lib/map/Map#set drop - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#has i32.eqz if @@ -8043,11 +8043,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#get i32.const 20 - local.get $1 + local.get $keys i32.add i32.eq i32.eqz @@ -8059,14 +8059,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $keys i32.const 1 i32.add - local.set $1 + local.set $keys br $for-loop|1 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -8080,45 +8080,45 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $map call $~lib/map/Map#keys - local.tee $1 + local.tee $keys i32.store offset=4 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $map call $~lib/map/Map#values - local.tee $2 + local.tee $vals i32.store offset=8 global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor - local.tee $3 + local.tee $keyMap i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor - local.tee $4 + local.tee $valMap i32.store offset=16 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|2 - local.get $5 - local.get $1 + local.get $var$5 + local.get $keys call $~lib/array/Array#get:length i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $1 - local.get $5 + local.get $keys + local.get $var$5 call $~lib/array/Array#__get - local.set $7 - local.get $2 - local.get $5 + local.set $var$7 + local.get $vals + local.get $var$5 call $~lib/array/Array#__get - local.set $8 - local.get $0 - local.get $7 + local.set $var$8 + local.get $map + local.get $var$7 call $~lib/map/Map#has i32.eqz if @@ -8129,8 +8129,8 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $8 + local.get $map + local.get $var$8 i32.const 20 i32.sub call $~lib/map/Map#has @@ -8143,28 +8143,28 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $7 - local.get $7 + local.get $keyMap + local.get $var$7 + local.get $var$7 call $~lib/map/Map#set drop - local.get $4 - local.get $8 + local.get $valMap + local.get $var$8 i32.const 20 i32.sub - local.get $8 + local.get $var$8 i32.const 20 i32.sub call $~lib/map/Map#set drop - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|2 end end - local.get $3 + local.get $keyMap call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -8177,7 +8177,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $valMap call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -8191,16 +8191,16 @@ unreachable end i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|3 - local.get $5 + local.get $var$5 i32.const 50 i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $5 + local.get $map + local.get $var$5 call $~lib/map/Map#has i32.eqz if @@ -8211,11 +8211,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $5 + local.get $map + local.get $var$5 call $~lib/map/Map#get i32.const 20 - local.get $5 + local.get $var$5 i32.add i32.eq i32.eqz @@ -8227,12 +8227,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $5 + local.get $map + local.get $var$5 call $~lib/map/Map#delete drop - local.get $0 - local.get $5 + local.get $map + local.get $var$5 call $~lib/map/Map#has i32.eqz i32.eqz @@ -8244,14 +8244,14 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|3 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 50 i32.eq @@ -8265,16 +8265,16 @@ unreachable end i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|4 - local.get $5 + local.get $var$5 i32.const 50 i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $5 + local.get $map + local.get $var$5 call $~lib/map/Map#has i32.eqz i32.eqz @@ -8286,15 +8286,15 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $5 + local.get $map + local.get $var$5 i32.const 10 - local.get $5 + local.get $var$5 i32.add call $~lib/map/Map#set drop - local.get $0 - local.get $5 + local.get $map + local.get $var$5 call $~lib/map/Map#has i32.eqz if @@ -8305,12 +8305,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $5 + local.get $map + local.get $var$5 call $~lib/map/Map#delete drop - local.get $0 - local.get $5 + local.get $map + local.get $var$5 call $~lib/map/Map#has i32.eqz i32.eqz @@ -8322,14 +8322,14 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|4 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 50 i32.eq @@ -8342,9 +8342,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $map call $~lib/map/Map#clear - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 0 i32.eq @@ -8400,10 +8400,10 @@ local.get $1 i32.store offset=20 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + (func $~lib/util/hash/HASH (param $key i32) (result i32) + (local $var$1 i32) + (local $var$2 i32) + (local $var$3 i32) i32.const 0 drop i32.const 0 @@ -8414,111 +8414,111 @@ i32.const 4 i32.le_u drop - local.get $0 - local.set $2 + local.get $key + local.set $var$2 i32.const 4 - local.set $1 + local.set $var$1 i32.const 0 i32.const 374761393 i32.add - local.get $1 + local.get $var$1 i32.add - local.set $3 - local.get $3 - local.get $2 + local.set $var$3 + local.get $var$3 + local.get $var$2 i32.const -1028477379 i32.mul i32.add - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 15 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const -2048144777 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 13 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const -1028477379 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 16 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 return ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/map/Map#find (param $this i32) (param $key i32) (param $hashCode i32) (result i32) + (local $entry i32) + (local $var$4 i32) + (local $taggedNext i32) + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add i32.load - local.set $3 + local.set $entry loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + local.get $entry + local.set $var$4 + local.get $var$4 if - local.get $3 + local.get $entry i32.load offset=8 - local.set $5 - local.get $5 + local.set $taggedNext + local.get $taggedNext i32.const 1 i32.and i32.eqz if (result i32) - local.get $3 + local.get $entry i32.load - local.get $1 + local.get $key i32.eq else i32.const 0 end if - local.get $3 + local.get $entry return end - local.get $5 + local.get $taggedNext i32.const 1 i32.const -1 i32.xor i32.and - local.set $3 + local.set $entry br $while-continue|0 end end i32.const 0 ) - (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map#has (param $this i32) (param $key i32) (result i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 @@ -8539,20 +8539,20 @@ local.get $1 i32.store offset=8 ) - (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) + (func $~lib/map/Map#rehash (param $this i32) (param $newBucketsMask i32) + (local $newBucketsCapacity i32) + (local $newBuckets i32) + (local $newEntriesCapacity i32) + (local $newEntries i32) + (local $oldPtr i32) + (local $oldEnd i32) + (local $newPtr i32) + (local $var$9 i32) + (local $oldEntry i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) + (local $var$14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -8561,115 +8561,115 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $1 + local.get $newBucketsMask i32.const 1 i32.add - local.set $2 + local.set $newBucketsCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 + local.get $newBucketsCapacity i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $newBuckets i32.store - local.get $2 + local.get $newBucketsCapacity i32.const 8 i32.mul i32.const 3 i32.div_s - local.set $4 + local.set $newEntriesCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 + local.get $newEntriesCapacity i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $newEntries i32.store offset=4 - local.get $0 + local.get $this i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 + local.set $oldPtr + local.get $oldPtr + local.get $this i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $7 - local.get $5 - local.set $8 + local.set $oldEnd + local.get $newEntries + local.set $newPtr loop $while-continue|0 - local.get $6 - local.get $7 + local.get $oldPtr + local.get $oldEnd i32.ne - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $6 - local.set $10 - local.get $10 + local.get $oldPtr + local.set $oldEntry + local.get $oldEntry i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $8 - local.set $11 - local.get $10 + local.get $newPtr + local.set $var$11 + local.get $oldEntry i32.load - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 call $~lib/map/MapEntry#set:key - local.get $11 - local.get $10 + local.get $var$11 + local.get $oldEntry i32.load offset=4 call $~lib/map/MapEntry#set:value - local.get $12 + local.get $var$12 call $~lib/util/hash/HASH - local.get $1 + local.get $newBucketsMask i32.and - local.set $13 - local.get $3 - local.get $13 + local.set $var$13 + local.get $newBuckets + local.get $var$13 i32.const 4 i32.mul i32.add - local.set $14 - local.get $11 - local.get $14 + local.set $var$14 + local.get $var$11 + local.get $var$14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $14 - local.get $8 + local.get $var$14 + local.get $newPtr i32.store - local.get $8 + local.get $newPtr i32.const 12 i32.add - local.set $8 + local.set $newPtr end - local.get $6 + local.get $oldPtr i32.const 12 i32.add - local.set $6 + local.set $oldPtr br $while-continue|0 end end - local.get $0 - local.get $3 + local.get $this + local.get $newBuckets call $~lib/map/Map#set:buckets - local.get $0 - local.get $1 + local.get $this + local.get $newBucketsMask call $~lib/map/Map#set:bucketsMask - local.get $0 - local.get $5 + local.get $this + local.get $newEntries call $~lib/map/Map#set:entries - local.get $0 - local.get $4 + local.get $this + local.get $newEntriesCapacity call $~lib/map/Map#set:entriesCapacity - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer @@ -8677,15 +8677,15 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map#get (param $this i32) (param $key i32) (result i32) + (local $entry i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $entry + local.get $entry i32.eqz if i32.const 592 @@ -8695,11 +8695,11 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $entry i32.load offset=4 ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 + (func $~lib/map/Map#get:size (param $this i32) (result i32) + local.get $this i32.load offset=20 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) @@ -8726,26 +8726,26 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store i32.const 0 drop ) - (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 + (func $~lib/array/Array#set:length (param $this i32) (param $newLength i32) + local.get $this + local.get $newLength i32.const 2 i32.const 0 call $~lib/array/ensureCapacity - local.get $0 - local.get $1 + local.get $this + local.get $newLength call $~lib/array/Array#set:length_ ) (func $~lib/map/Map#set:buckets (param $0 i32) (param $1 i32) @@ -8786,14 +8786,14 @@ local.get $1 i32.store offset=20 ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i32) + (local $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -8804,63 +8804,63 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add i32.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/map/Map#find (param $this i32) (param $key i32) (param $hashCode i32) (result i32) + (local $entry i32) + (local $var$4 i32) + (local $taggedNext i32) + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add i32.load - local.set $3 + local.set $entry loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + local.get $entry + local.set $var$4 + local.get $var$4 if - local.get $3 + local.get $entry i32.load offset=8 - local.set $5 - local.get $5 + local.set $taggedNext + local.get $taggedNext i32.const 1 i32.and i32.eqz if (result i32) - local.get $3 + local.get $entry i32.load - local.get $1 + local.get $key i32.eq else i32.const 0 end if - local.get $3 + local.get $entry return end - local.get $5 + local.get $taggedNext i32.const 1 i32.const -1 i32.xor i32.and - local.set $3 + local.set $entry br $while-continue|0 end end @@ -8881,20 +8881,20 @@ local.get $1 i32.store offset=8 ) - (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) + (func $~lib/map/Map#rehash (param $this i32) (param $newBucketsMask i32) + (local $newBucketsCapacity i32) + (local $newBuckets i32) + (local $newEntriesCapacity i32) + (local $newEntries i32) + (local $oldPtr i32) + (local $oldEnd i32) + (local $newPtr i32) + (local $var$9 i32) + (local $oldEntry i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) + (local $var$14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -8903,115 +8903,115 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $1 + local.get $newBucketsMask i32.const 1 i32.add - local.set $2 + local.set $newBucketsCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 + local.get $newBucketsCapacity i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $newBuckets i32.store - local.get $2 + local.get $newBucketsCapacity i32.const 8 i32.mul i32.const 3 i32.div_s - local.set $4 + local.set $newEntriesCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 + local.get $newEntriesCapacity i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $newEntries i32.store offset=4 - local.get $0 + local.get $this i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 + local.set $oldPtr + local.get $oldPtr + local.get $this i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $7 - local.get $5 - local.set $8 + local.set $oldEnd + local.get $newEntries + local.set $newPtr loop $while-continue|0 - local.get $6 - local.get $7 + local.get $oldPtr + local.get $oldEnd i32.ne - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $6 - local.set $10 - local.get $10 + local.get $oldPtr + local.set $oldEntry + local.get $oldEntry i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $8 - local.set $11 - local.get $10 + local.get $newPtr + local.set $var$11 + local.get $oldEntry i32.load - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 call $~lib/map/MapEntry#set:key - local.get $11 - local.get $10 + local.get $var$11 + local.get $oldEntry i32.load offset=4 call $~lib/map/MapEntry#set:value - local.get $12 + local.get $var$12 call $~lib/util/hash/HASH - local.get $1 + local.get $newBucketsMask i32.and - local.set $13 - local.get $3 - local.get $13 + local.set $var$13 + local.get $newBuckets + local.get $var$13 i32.const 4 i32.mul i32.add - local.set $14 - local.get $11 - local.get $14 + local.set $var$14 + local.get $var$11 + local.get $var$14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $14 - local.get $8 + local.get $var$14 + local.get $newPtr i32.store - local.get $8 + local.get $newPtr i32.const 12 i32.add - local.set $8 + local.set $newPtr end - local.get $6 + local.get $oldPtr i32.const 12 i32.add - local.set $6 + local.set $oldPtr br $while-continue|0 end end - local.get $0 - local.get $3 + local.get $this + local.get $newBuckets call $~lib/map/Map#set:buckets - local.get $0 - local.get $1 + local.get $this + local.get $newBucketsMask call $~lib/map/Map#set:bucketsMask - local.get $0 - local.get $5 + local.get $this + local.get $newEntries call $~lib/map/Map#set:entries - local.get $0 - local.get $4 + local.get $this + local.get $newEntriesCapacity call $~lib/map/Map#set:entriesCapacity - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer @@ -9019,61 +9019,61 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 + (func $~lib/map/Map#get:size (param $this i32) (result i32) + local.get $this i32.load offset=20 ) - (func $~lib/map/Map#delete (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map#delete (param $this i32) (param $key i32) (result i32) + (local $entry i32) + (local $halfBucketsMask i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $entry + local.get $entry i32.eqz if i32.const 0 return end - local.get $2 - local.get $2 + local.get $entry + local.get $entry i32.load offset=8 i32.const 1 i32.or call $~lib/map/MapEntry#set:taggedNext - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 i32.const 1 i32.sub call $~lib/map/Map#set:entriesCount - local.get $0 + local.get $this i32.load offset=4 i32.const 1 i32.shr_u - local.set $3 - local.get $3 + local.set $halfBucketsMask + local.get $halfBucketsMask i32.const 1 i32.add i32.const 4 - local.tee $4 - local.get $0 + local.tee $var$4 + local.get $this i32.load offset=20 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.gt_u select i32.ge_u if (result i32) - local.get $0 + local.get $this i32.load offset=20 - local.get $0 + local.get $this i32.load offset=12 i32.const 3 i32.mul @@ -9084,52 +9084,52 @@ i32.const 0 end if - local.get $0 - local.get $3 + local.get $this + local.get $halfBucketsMask call $~lib/map/Map#rehash end i32.const 1 ) - (func $~lib/map/Map#clear (param $0 i32) - local.get $0 + (func $~lib/map/Map#clear (param $this i32) + local.get $this i32.const 0 i32.const 4 i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets - local.get $0 + local.get $this i32.const 4 i32.const 1 i32.sub call $~lib/map/Map#set:bucketsMask - local.get $0 + local.get $this i32.const 0 i32.const 4 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:entries - local.get $0 + local.get $this i32.const 4 call $~lib/map/Map#set:entriesCapacity - local.get $0 + local.get $this i32.const 0 call $~lib/map/Map#set:entriesOffset - local.get $0 + local.get $this i32.const 0 call $~lib/map/Map#set:entriesCount ) (func $std/map/testNumeric - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) + (local $map i32) + (local $keys i32) + (local $vals i32) + (local $keyMap i32) + (local $valMap i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) global.get $~lib/memory/__stack_pointer i32.const 20 i32.sub @@ -9142,19 +9142,19 @@ global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor - local.tee $0 + local.tee $map i32.store i32.const 0 - local.set $1 + local.set $keys loop $for-loop|0 - local.get $1 + local.get $keys i32.const 100 i32.lt_u - local.set $2 - local.get $2 + local.set $vals + local.get $vals if - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#has i32.eqz i32.eqz @@ -9166,15 +9166,15 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $keys i32.const 10 - local.get $1 + local.get $keys i32.add call $~lib/map/Map#set drop - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#has i32.eqz if @@ -9185,11 +9185,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#get i32.const 10 - local.get $1 + local.get $keys i32.add i32.eq i32.eqz @@ -9201,14 +9201,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $keys i32.const 1 i32.add - local.set $1 + local.set $keys br $for-loop|0 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -9222,16 +9222,16 @@ unreachable end i32.const 0 - local.set $1 + local.set $keys loop $for-loop|1 - local.get $1 + local.get $keys i32.const 100 i32.lt_u - local.set $2 - local.get $2 + local.set $vals + local.get $vals if - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#has i32.eqz if @@ -9242,11 +9242,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#get i32.const 10 - local.get $1 + local.get $keys i32.add i32.eq i32.eqz @@ -9258,15 +9258,15 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $keys i32.const 20 - local.get $1 + local.get $keys i32.add call $~lib/map/Map#set drop - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#has i32.eqz if @@ -9277,11 +9277,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $keys call $~lib/map/Map#get i32.const 20 - local.get $1 + local.get $keys i32.add i32.eq i32.eqz @@ -9293,14 +9293,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $keys i32.const 1 i32.add - local.set $1 + local.set $keys br $for-loop|1 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -9314,45 +9314,45 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $map call $~lib/map/Map#keys - local.tee $1 + local.tee $keys i32.store offset=4 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $map call $~lib/map/Map#values - local.tee $2 + local.tee $vals i32.store offset=8 global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor - local.tee $3 + local.tee $keyMap i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor - local.tee $4 + local.tee $valMap i32.store offset=16 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|2 - local.get $5 - local.get $1 + local.get $var$5 + local.get $keys call $~lib/array/Array#get:length i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $1 - local.get $5 + local.get $keys + local.get $var$5 call $~lib/array/Array#__get - local.set $7 - local.get $2 - local.get $5 + local.set $var$7 + local.get $vals + local.get $var$5 call $~lib/array/Array#__get - local.set $8 - local.get $0 - local.get $7 + local.set $var$8 + local.get $map + local.get $var$7 call $~lib/map/Map#has i32.eqz if @@ -9363,8 +9363,8 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $8 + local.get $map + local.get $var$8 i32.const 20 i32.sub call $~lib/map/Map#has @@ -9377,28 +9377,28 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $7 - local.get $7 + local.get $keyMap + local.get $var$7 + local.get $var$7 call $~lib/map/Map#set drop - local.get $4 - local.get $8 + local.get $valMap + local.get $var$8 i32.const 20 i32.sub - local.get $8 + local.get $var$8 i32.const 20 i32.sub call $~lib/map/Map#set drop - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|2 end end - local.get $3 + local.get $keyMap call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -9411,7 +9411,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $valMap call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -9425,16 +9425,16 @@ unreachable end i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|3 - local.get $5 + local.get $var$5 i32.const 50 i32.lt_u - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $5 + local.get $map + local.get $var$5 call $~lib/map/Map#has i32.eqz if @@ -9445,11 +9445,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $5 + local.get $map + local.get $var$5 call $~lib/map/Map#get i32.const 20 - local.get $5 + local.get $var$5 i32.add i32.eq i32.eqz @@ -9461,12 +9461,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $5 + local.get $map + local.get $var$5 call $~lib/map/Map#delete drop - local.get $0 - local.get $5 + local.get $map + local.get $var$5 call $~lib/map/Map#has i32.eqz i32.eqz @@ -9478,14 +9478,14 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|3 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 50 i32.eq @@ -9499,16 +9499,16 @@ unreachable end i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|4 - local.get $5 + local.get $var$5 i32.const 50 i32.lt_u - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $5 + local.get $map + local.get $var$5 call $~lib/map/Map#has i32.eqz i32.eqz @@ -9520,15 +9520,15 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $5 + local.get $map + local.get $var$5 i32.const 10 - local.get $5 + local.get $var$5 i32.add call $~lib/map/Map#set drop - local.get $0 - local.get $5 + local.get $map + local.get $var$5 call $~lib/map/Map#has i32.eqz if @@ -9539,12 +9539,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $5 + local.get $map + local.get $var$5 call $~lib/map/Map#delete drop - local.get $0 - local.get $5 + local.get $map + local.get $var$5 call $~lib/map/Map#has i32.eqz i32.eqz @@ -9556,14 +9556,14 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|4 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 50 i32.eq @@ -9576,9 +9576,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $map call $~lib/map/Map#clear - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 0 i32.eq @@ -9634,9 +9634,9 @@ local.get $1 i32.store offset=20 ) - (func $~lib/util/hash/HASH (param $0 i64) (result i32) - (local $1 i64) - (local $2 i32) + (func $~lib/util/hash/HASH (param $key i64) (result i32) + (local $var$1 i64) + (local $var$2 i32) i32.const 0 drop i32.const 0 @@ -9651,125 +9651,125 @@ i32.const 8 i32.eq drop - local.get $0 - local.set $1 + local.get $key + local.set $var$1 i32.const 0 i32.const 374761393 i32.add i32.const 8 i32.add - local.set $2 - local.get $2 - local.get $1 + local.set $var$2 + local.get $var$2 + local.get $var$1 i32.wrap_i64 i32.const -1028477379 i32.mul i32.add - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $2 - local.get $2 - local.get $1 + local.set $var$2 + local.get $var$2 + local.get $var$1 i64.const 32 i64.shr_u i32.wrap_i64 i32.const -1028477379 i32.mul i32.add - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $2 - local.get $2 - local.get $2 + local.set $var$2 + local.get $var$2 + local.get $var$2 i32.const 15 i32.shr_u i32.xor - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const -2048144777 i32.mul - local.set $2 - local.get $2 - local.get $2 + local.set $var$2 + local.get $var$2 + local.get $var$2 i32.const 13 i32.shr_u i32.xor - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const -1028477379 i32.mul - local.set $2 - local.get $2 - local.get $2 + local.set $var$2 + local.get $var$2 + local.get $var$2 i32.const 16 i32.shr_u i32.xor - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 return ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/map/Map#find (param $this i32) (param $key i64) (param $hashCode i32) (result i32) + (local $entry i32) + (local $var$4 i32) + (local $taggedNext i32) + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add i32.load - local.set $3 + local.set $entry loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + local.get $entry + local.set $var$4 + local.get $var$4 if - local.get $3 + local.get $entry i32.load offset=12 - local.set $5 - local.get $5 + local.set $taggedNext + local.get $taggedNext i32.const 1 i32.and i32.eqz if (result i32) - local.get $3 + local.get $entry i64.load - local.get $1 + local.get $key i64.eq else i32.const 0 end if - local.get $3 + local.get $entry return end - local.get $5 + local.get $taggedNext i32.const 1 i32.const -1 i32.xor i32.and - local.set $3 + local.set $entry br $while-continue|0 end end i32.const 0 ) - (func $~lib/map/Map#has (param $0 i32) (param $1 i64) (result i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map#has (param $this i32) (param $key i64) (result i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 @@ -9790,20 +9790,20 @@ local.get $1 i32.store offset=12 ) - (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i64) - (local $13 i32) - (local $14 i32) + (func $~lib/map/Map#rehash (param $this i32) (param $newBucketsMask i32) + (local $newBucketsCapacity i32) + (local $newBuckets i32) + (local $newEntriesCapacity i32) + (local $newEntries i32) + (local $oldPtr i32) + (local $oldEnd i32) + (local $newPtr i32) + (local $var$9 i32) + (local $oldEntry i32) + (local $var$11 i32) + (local $var$12 i64) + (local $var$13 i32) + (local $var$14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -9812,115 +9812,115 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $1 + local.get $newBucketsMask i32.const 1 i32.add - local.set $2 + local.set $newBucketsCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 + local.get $newBucketsCapacity i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $newBuckets i32.store - local.get $2 + local.get $newBucketsCapacity i32.const 8 i32.mul i32.const 3 i32.div_s - local.set $4 + local.set $newEntriesCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 + local.get $newEntriesCapacity i32.const 16 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $newEntries i32.store offset=4 - local.get $0 + local.get $this i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 + local.set $oldPtr + local.get $oldPtr + local.get $this i32.load offset=16 i32.const 16 i32.mul i32.add - local.set $7 - local.get $5 - local.set $8 + local.set $oldEnd + local.get $newEntries + local.set $newPtr loop $while-continue|0 - local.get $6 - local.get $7 + local.get $oldPtr + local.get $oldEnd i32.ne - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $6 - local.set $10 - local.get $10 + local.get $oldPtr + local.set $oldEntry + local.get $oldEntry i32.load offset=12 i32.const 1 i32.and i32.eqz if - local.get $8 - local.set $11 - local.get $10 + local.get $newPtr + local.set $var$11 + local.get $oldEntry i64.load - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 call $~lib/map/MapEntry#set:key - local.get $11 - local.get $10 + local.get $var$11 + local.get $oldEntry i32.load offset=8 call $~lib/map/MapEntry#set:value - local.get $12 + local.get $var$12 call $~lib/util/hash/HASH - local.get $1 + local.get $newBucketsMask i32.and - local.set $13 - local.get $3 - local.get $13 + local.set $var$13 + local.get $newBuckets + local.get $var$13 i32.const 4 i32.mul i32.add - local.set $14 - local.get $11 - local.get $14 + local.set $var$14 + local.get $var$11 + local.get $var$14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $14 - local.get $8 + local.get $var$14 + local.get $newPtr i32.store - local.get $8 + local.get $newPtr i32.const 16 i32.add - local.set $8 + local.set $newPtr end - local.get $6 + local.get $oldPtr i32.const 16 i32.add - local.set $6 + local.set $oldPtr br $while-continue|0 end end - local.get $0 - local.get $3 + local.get $this + local.get $newBuckets call $~lib/map/Map#set:buckets - local.get $0 - local.get $1 + local.get $this + local.get $newBucketsMask call $~lib/map/Map#set:bucketsMask - local.get $0 - local.get $5 + local.get $this + local.get $newEntries call $~lib/map/Map#set:entries - local.get $0 - local.get $4 + local.get $this + local.get $newEntriesCapacity call $~lib/map/Map#set:entriesCapacity - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer @@ -9928,15 +9928,15 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/map/Map#get (param $0 i32) (param $1 i64) (result i32) - (local $2 i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map#get (param $this i32) (param $key i64) (result i32) + (local $entry i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $entry + local.get $entry i32.eqz if i32.const 592 @@ -9946,11 +9946,11 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $entry i32.load offset=8 ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 + (func $~lib/map/Map#get:size (param $this i32) (result i32) + local.get $this i32.load offset=20 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) @@ -9977,26 +9977,26 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i64) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value i64) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add - local.get $2 + local.get $value i64.store i32.const 0 drop ) - (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 + (func $~lib/array/Array#set:length (param $this i32) (param $newLength i32) + local.get $this + local.get $newLength i32.const 3 i32.const 0 call $~lib/array/ensureCapacity - local.get $0 - local.get $1 + local.get $this + local.get $newLength call $~lib/array/Array#set:length_ ) (func $~lib/map/Map#set:buckets (param $0 i32) (param $1 i32) @@ -10037,14 +10037,14 @@ local.get $1 i32.store offset=20 ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i64) - (local $2 i64) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i64) + (local $value i64) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -10055,63 +10055,63 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add i64.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/map/Map#find (param $this i32) (param $key i64) (param $hashCode i32) (result i32) + (local $entry i32) + (local $var$4 i32) + (local $taggedNext i32) + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add i32.load - local.set $3 + local.set $entry loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + local.get $entry + local.set $var$4 + local.get $var$4 if - local.get $3 + local.get $entry i32.load offset=16 - local.set $5 - local.get $5 + local.set $taggedNext + local.get $taggedNext i32.const 1 i32.and i32.eqz if (result i32) - local.get $3 + local.get $entry i64.load - local.get $1 + local.get $key i64.eq else i32.const 0 end if - local.get $3 + local.get $entry return end - local.get $5 + local.get $taggedNext i32.const 1 i32.const -1 i32.xor i32.and - local.set $3 + local.set $entry br $while-continue|0 end end @@ -10132,20 +10132,20 @@ local.get $1 i32.store offset=16 ) - (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i64) - (local $13 i32) - (local $14 i32) + (func $~lib/map/Map#rehash (param $this i32) (param $newBucketsMask i32) + (local $newBucketsCapacity i32) + (local $newBuckets i32) + (local $newEntriesCapacity i32) + (local $newEntries i32) + (local $oldPtr i32) + (local $oldEnd i32) + (local $newPtr i32) + (local $var$9 i32) + (local $oldEntry i32) + (local $var$11 i32) + (local $var$12 i64) + (local $var$13 i32) + (local $var$14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -10154,115 +10154,115 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $1 + local.get $newBucketsMask i32.const 1 i32.add - local.set $2 + local.set $newBucketsCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 + local.get $newBucketsCapacity i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $newBuckets i32.store - local.get $2 + local.get $newBucketsCapacity i32.const 8 i32.mul i32.const 3 i32.div_s - local.set $4 + local.set $newEntriesCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 + local.get $newEntriesCapacity i32.const 24 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $newEntries i32.store offset=4 - local.get $0 + local.get $this i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 + local.set $oldPtr + local.get $oldPtr + local.get $this i32.load offset=16 i32.const 24 i32.mul i32.add - local.set $7 - local.get $5 - local.set $8 + local.set $oldEnd + local.get $newEntries + local.set $newPtr loop $while-continue|0 - local.get $6 - local.get $7 + local.get $oldPtr + local.get $oldEnd i32.ne - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $6 - local.set $10 - local.get $10 + local.get $oldPtr + local.set $oldEntry + local.get $oldEntry i32.load offset=16 i32.const 1 i32.and i32.eqz if - local.get $8 - local.set $11 - local.get $10 + local.get $newPtr + local.set $var$11 + local.get $oldEntry i64.load - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 call $~lib/map/MapEntry#set:key - local.get $11 - local.get $10 + local.get $var$11 + local.get $oldEntry i64.load offset=8 call $~lib/map/MapEntry#set:value - local.get $12 + local.get $var$12 call $~lib/util/hash/HASH - local.get $1 + local.get $newBucketsMask i32.and - local.set $13 - local.get $3 - local.get $13 + local.set $var$13 + local.get $newBuckets + local.get $var$13 i32.const 4 i32.mul i32.add - local.set $14 - local.get $11 - local.get $14 + local.set $var$14 + local.get $var$11 + local.get $var$14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $14 - local.get $8 + local.get $var$14 + local.get $newPtr i32.store - local.get $8 + local.get $newPtr i32.const 24 i32.add - local.set $8 + local.set $newPtr end - local.get $6 + local.get $oldPtr i32.const 24 i32.add - local.set $6 + local.set $oldPtr br $while-continue|0 end end - local.get $0 - local.get $3 + local.get $this + local.get $newBuckets call $~lib/map/Map#set:buckets - local.get $0 - local.get $1 + local.get $this + local.get $newBucketsMask call $~lib/map/Map#set:bucketsMask - local.get $0 - local.get $5 + local.get $this + local.get $newEntries call $~lib/map/Map#set:entries - local.get $0 - local.get $4 + local.get $this + local.get $newEntriesCapacity call $~lib/map/Map#set:entriesCapacity - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer @@ -10270,61 +10270,61 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 + (func $~lib/map/Map#get:size (param $this i32) (result i32) + local.get $this i32.load offset=20 ) - (func $~lib/map/Map#delete (param $0 i32) (param $1 i64) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map#delete (param $this i32) (param $key i64) (result i32) + (local $entry i32) + (local $halfBucketsMask i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $entry + local.get $entry i32.eqz if i32.const 0 return end - local.get $2 - local.get $2 + local.get $entry + local.get $entry i32.load offset=12 i32.const 1 i32.or call $~lib/map/MapEntry#set:taggedNext - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 i32.const 1 i32.sub call $~lib/map/Map#set:entriesCount - local.get $0 + local.get $this i32.load offset=4 i32.const 1 i32.shr_u - local.set $3 - local.get $3 + local.set $halfBucketsMask + local.get $halfBucketsMask i32.const 1 i32.add i32.const 4 - local.tee $4 - local.get $0 + local.tee $var$4 + local.get $this i32.load offset=20 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.gt_u select i32.ge_u if (result i32) - local.get $0 + local.get $this i32.load offset=20 - local.get $0 + local.get $this i32.load offset=12 i32.const 3 i32.mul @@ -10335,52 +10335,52 @@ i32.const 0 end if - local.get $0 - local.get $3 + local.get $this + local.get $halfBucketsMask call $~lib/map/Map#rehash end i32.const 1 ) - (func $~lib/map/Map#clear (param $0 i32) - local.get $0 + (func $~lib/map/Map#clear (param $this i32) + local.get $this i32.const 0 i32.const 4 i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets - local.get $0 + local.get $this i32.const 4 i32.const 1 i32.sub call $~lib/map/Map#set:bucketsMask - local.get $0 + local.get $this i32.const 0 i32.const 4 i32.const 16 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:entries - local.get $0 + local.get $this i32.const 4 call $~lib/map/Map#set:entriesCapacity - local.get $0 + local.get $this i32.const 0 call $~lib/map/Map#set:entriesOffset - local.get $0 + local.get $this i32.const 0 call $~lib/map/Map#set:entriesCount ) (func $std/map/testNumeric - (local $0 i32) - (local $1 i64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) + (local $map i32) + (local $var$1 i64) + (local $keys i32) + (local $vals i32) + (local $keyMap i32) + (local $valMap i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) global.get $~lib/memory/__stack_pointer i32.const 20 i32.sub @@ -10393,19 +10393,19 @@ global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor - local.tee $0 + local.tee $map i32.store i64.const 0 - local.set $1 + local.set $var$1 loop $for-loop|0 - local.get $1 + local.get $var$1 i64.const 100 i64.lt_s - local.set $2 - local.get $2 + local.set $keys + local.get $keys if - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz i32.eqz @@ -10417,16 +10417,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 i32.const 10 - local.get $1 + local.get $var$1 i32.wrap_i64 i32.add call $~lib/map/Map#set drop - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz if @@ -10437,11 +10437,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#get i32.const 10 - local.get $1 + local.get $var$1 i32.wrap_i64 i32.add i32.eq @@ -10454,14 +10454,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i64.const 1 i64.add - local.set $1 + local.set $var$1 br $for-loop|0 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -10475,16 +10475,16 @@ unreachable end i64.const 0 - local.set $1 + local.set $var$1 loop $for-loop|1 - local.get $1 + local.get $var$1 i64.const 100 i64.lt_s - local.set $2 - local.get $2 + local.set $keys + local.get $keys if - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz if @@ -10495,11 +10495,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#get i32.const 10 - local.get $1 + local.get $var$1 i32.wrap_i64 i32.add i32.eq @@ -10512,16 +10512,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 i32.const 20 - local.get $1 + local.get $var$1 i32.wrap_i64 i32.add call $~lib/map/Map#set drop - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz if @@ -10532,11 +10532,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#get i32.const 20 - local.get $1 + local.get $var$1 i32.wrap_i64 i32.add i32.eq @@ -10549,14 +10549,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i64.const 1 i64.add - local.set $1 + local.set $var$1 br $for-loop|1 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -10570,45 +10570,45 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $map call $~lib/map/Map#keys - local.tee $2 + local.tee $keys i32.store offset=4 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $map call $~lib/map/Map#values - local.tee $3 + local.tee $vals i32.store offset=8 global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor - local.tee $4 + local.tee $keyMap i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor - local.tee $5 + local.tee $valMap i32.store offset=16 i32.const 0 - local.set $6 + local.set $var$6 loop $for-loop|2 - local.get $6 - local.get $2 + local.get $var$6 + local.get $keys call $~lib/array/Array#get:length i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $2 - local.get $6 + local.get $keys + local.get $var$6 call $~lib/array/Array#__get - local.set $1 - local.get $3 - local.get $6 + local.set $var$1 + local.get $vals + local.get $var$6 call $~lib/array/Array#__get - local.set $8 - local.get $0 - local.get $1 + local.set $var$8 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz if @@ -10619,8 +10619,8 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $8 + local.get $map + local.get $var$8 i32.const 20 i32.sub i64.extend_i32_s @@ -10634,28 +10634,28 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $1 - local.get $1 + local.get $keyMap + local.get $var$1 + local.get $var$1 call $~lib/map/Map#set drop - local.get $5 - local.get $8 + local.get $valMap + local.get $var$8 i32.const 20 i32.sub - local.get $8 + local.get $var$8 i32.const 20 i32.sub call $~lib/map/Map#set drop - local.get $6 + local.get $var$6 i32.const 1 i32.add - local.set $6 + local.set $var$6 br $for-loop|2 end end - local.get $4 + local.get $keyMap call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -10668,7 +10668,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $valMap call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -10682,16 +10682,16 @@ unreachable end i64.const 0 - local.set $1 + local.set $var$1 loop $for-loop|3 - local.get $1 + local.get $var$1 i64.const 50 i64.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz if @@ -10702,11 +10702,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#get i32.const 20 - local.get $1 + local.get $var$1 i32.wrap_i64 i32.add i32.eq @@ -10719,12 +10719,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#delete - drop - local.get $0 - local.get $1 + drop + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz i32.eqz @@ -10736,14 +10736,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i64.const 1 i64.add - local.set $1 + local.set $var$1 br $for-loop|3 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 50 i32.eq @@ -10757,16 +10757,16 @@ unreachable end i64.const 0 - local.set $1 + local.set $var$1 loop $for-loop|4 - local.get $1 + local.get $var$1 i64.const 50 i64.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz i32.eqz @@ -10778,16 +10778,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 i32.const 10 - local.get $1 + local.get $var$1 i32.wrap_i64 i32.add call $~lib/map/Map#set drop - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz if @@ -10798,12 +10798,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#delete drop - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz i32.eqz @@ -10815,14 +10815,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i64.const 1 i64.add - local.set $1 + local.set $var$1 br $for-loop|4 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 50 i32.eq @@ -10835,9 +10835,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $map call $~lib/map/Map#clear - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 0 i32.eq @@ -10893,9 +10893,9 @@ local.get $1 i32.store offset=20 ) - (func $~lib/util/hash/HASH (param $0 i64) (result i32) - (local $1 i64) - (local $2 i32) + (func $~lib/util/hash/HASH (param $key i64) (result i32) + (local $var$1 i64) + (local $var$2 i32) i32.const 0 drop i32.const 0 @@ -10910,125 +10910,125 @@ i32.const 8 i32.eq drop - local.get $0 - local.set $1 + local.get $key + local.set $var$1 i32.const 0 i32.const 374761393 i32.add i32.const 8 i32.add - local.set $2 - local.get $2 - local.get $1 + local.set $var$2 + local.get $var$2 + local.get $var$1 i32.wrap_i64 i32.const -1028477379 i32.mul i32.add - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $2 - local.get $2 - local.get $1 + local.set $var$2 + local.get $var$2 + local.get $var$1 i64.const 32 i64.shr_u i32.wrap_i64 i32.const -1028477379 i32.mul i32.add - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $2 - local.get $2 - local.get $2 + local.set $var$2 + local.get $var$2 + local.get $var$2 i32.const 15 i32.shr_u i32.xor - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const -2048144777 i32.mul - local.set $2 - local.get $2 - local.get $2 + local.set $var$2 + local.get $var$2 + local.get $var$2 i32.const 13 i32.shr_u i32.xor - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const -1028477379 i32.mul - local.set $2 - local.get $2 - local.get $2 + local.set $var$2 + local.get $var$2 + local.get $var$2 i32.const 16 i32.shr_u i32.xor - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 return ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/map/Map#find (param $this i32) (param $key i64) (param $hashCode i32) (result i32) + (local $entry i32) + (local $var$4 i32) + (local $taggedNext i32) + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add i32.load - local.set $3 + local.set $entry loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + local.get $entry + local.set $var$4 + local.get $var$4 if - local.get $3 + local.get $entry i32.load offset=12 - local.set $5 - local.get $5 + local.set $taggedNext + local.get $taggedNext i32.const 1 i32.and i32.eqz if (result i32) - local.get $3 + local.get $entry i64.load - local.get $1 + local.get $key i64.eq else i32.const 0 end if - local.get $3 + local.get $entry return end - local.get $5 + local.get $taggedNext i32.const 1 i32.const -1 i32.xor i32.and - local.set $3 + local.set $entry br $while-continue|0 end end i32.const 0 ) - (func $~lib/map/Map#has (param $0 i32) (param $1 i64) (result i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map#has (param $this i32) (param $key i64) (result i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 @@ -11049,20 +11049,20 @@ local.get $1 i32.store offset=12 ) - (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i64) - (local $13 i32) - (local $14 i32) + (func $~lib/map/Map#rehash (param $this i32) (param $newBucketsMask i32) + (local $newBucketsCapacity i32) + (local $newBuckets i32) + (local $newEntriesCapacity i32) + (local $newEntries i32) + (local $oldPtr i32) + (local $oldEnd i32) + (local $newPtr i32) + (local $var$9 i32) + (local $oldEntry i32) + (local $var$11 i32) + (local $var$12 i64) + (local $var$13 i32) + (local $var$14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -11071,115 +11071,115 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $1 + local.get $newBucketsMask i32.const 1 i32.add - local.set $2 + local.set $newBucketsCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 + local.get $newBucketsCapacity i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $newBuckets i32.store - local.get $2 + local.get $newBucketsCapacity i32.const 8 i32.mul i32.const 3 i32.div_s - local.set $4 + local.set $newEntriesCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 + local.get $newEntriesCapacity i32.const 16 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $newEntries i32.store offset=4 - local.get $0 + local.get $this i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 + local.set $oldPtr + local.get $oldPtr + local.get $this i32.load offset=16 i32.const 16 i32.mul i32.add - local.set $7 - local.get $5 - local.set $8 + local.set $oldEnd + local.get $newEntries + local.set $newPtr loop $while-continue|0 - local.get $6 - local.get $7 + local.get $oldPtr + local.get $oldEnd i32.ne - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $6 - local.set $10 - local.get $10 + local.get $oldPtr + local.set $oldEntry + local.get $oldEntry i32.load offset=12 i32.const 1 i32.and i32.eqz if - local.get $8 - local.set $11 - local.get $10 + local.get $newPtr + local.set $var$11 + local.get $oldEntry i64.load - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 call $~lib/map/MapEntry#set:key - local.get $11 - local.get $10 + local.get $var$11 + local.get $oldEntry i32.load offset=8 call $~lib/map/MapEntry#set:value - local.get $12 + local.get $var$12 call $~lib/util/hash/HASH - local.get $1 + local.get $newBucketsMask i32.and - local.set $13 - local.get $3 - local.get $13 + local.set $var$13 + local.get $newBuckets + local.get $var$13 i32.const 4 i32.mul i32.add - local.set $14 - local.get $11 - local.get $14 + local.set $var$14 + local.get $var$11 + local.get $var$14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $14 - local.get $8 + local.get $var$14 + local.get $newPtr i32.store - local.get $8 + local.get $newPtr i32.const 16 i32.add - local.set $8 + local.set $newPtr end - local.get $6 + local.get $oldPtr i32.const 16 i32.add - local.set $6 + local.set $oldPtr br $while-continue|0 end end - local.get $0 - local.get $3 + local.get $this + local.get $newBuckets call $~lib/map/Map#set:buckets - local.get $0 - local.get $1 + local.get $this + local.get $newBucketsMask call $~lib/map/Map#set:bucketsMask - local.get $0 - local.get $5 + local.get $this + local.get $newEntries call $~lib/map/Map#set:entries - local.get $0 - local.get $4 + local.get $this + local.get $newEntriesCapacity call $~lib/map/Map#set:entriesCapacity - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer @@ -11187,15 +11187,15 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/map/Map#get (param $0 i32) (param $1 i64) (result i32) - (local $2 i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map#get (param $this i32) (param $key i64) (result i32) + (local $entry i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $entry + local.get $entry i32.eqz if i32.const 592 @@ -11205,11 +11205,11 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $entry i32.load offset=8 ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 + (func $~lib/map/Map#get:size (param $this i32) (result i32) + local.get $this i32.load offset=20 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) @@ -11236,26 +11236,26 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i64) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value i64) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add - local.get $2 + local.get $value i64.store i32.const 0 drop ) - (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 + (func $~lib/array/Array#set:length (param $this i32) (param $newLength i32) + local.get $this + local.get $newLength i32.const 3 i32.const 0 call $~lib/array/ensureCapacity - local.get $0 - local.get $1 + local.get $this + local.get $newLength call $~lib/array/Array#set:length_ ) (func $~lib/map/Map#set:buckets (param $0 i32) (param $1 i32) @@ -11296,14 +11296,14 @@ local.get $1 i32.store offset=20 ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i64) - (local $2 i64) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i64) + (local $value i64) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -11314,63 +11314,63 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add i64.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/map/Map#find (param $this i32) (param $key i64) (param $hashCode i32) (result i32) + (local $entry i32) + (local $var$4 i32) + (local $taggedNext i32) + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add i32.load - local.set $3 + local.set $entry loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + local.get $entry + local.set $var$4 + local.get $var$4 if - local.get $3 + local.get $entry i32.load offset=16 - local.set $5 - local.get $5 + local.set $taggedNext + local.get $taggedNext i32.const 1 i32.and i32.eqz if (result i32) - local.get $3 + local.get $entry i64.load - local.get $1 + local.get $key i64.eq else i32.const 0 end if - local.get $3 + local.get $entry return end - local.get $5 + local.get $taggedNext i32.const 1 i32.const -1 i32.xor i32.and - local.set $3 + local.set $entry br $while-continue|0 end end @@ -11391,20 +11391,20 @@ local.get $1 i32.store offset=16 ) - (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i64) - (local $13 i32) - (local $14 i32) + (func $~lib/map/Map#rehash (param $this i32) (param $newBucketsMask i32) + (local $newBucketsCapacity i32) + (local $newBuckets i32) + (local $newEntriesCapacity i32) + (local $newEntries i32) + (local $oldPtr i32) + (local $oldEnd i32) + (local $newPtr i32) + (local $var$9 i32) + (local $oldEntry i32) + (local $var$11 i32) + (local $var$12 i64) + (local $var$13 i32) + (local $var$14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -11413,115 +11413,115 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $1 + local.get $newBucketsMask i32.const 1 i32.add - local.set $2 + local.set $newBucketsCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 + local.get $newBucketsCapacity i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $newBuckets i32.store - local.get $2 + local.get $newBucketsCapacity i32.const 8 i32.mul i32.const 3 i32.div_s - local.set $4 + local.set $newEntriesCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 + local.get $newEntriesCapacity i32.const 24 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $newEntries i32.store offset=4 - local.get $0 + local.get $this i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 + local.set $oldPtr + local.get $oldPtr + local.get $this i32.load offset=16 i32.const 24 i32.mul i32.add - local.set $7 - local.get $5 - local.set $8 + local.set $oldEnd + local.get $newEntries + local.set $newPtr loop $while-continue|0 - local.get $6 - local.get $7 + local.get $oldPtr + local.get $oldEnd i32.ne - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $6 - local.set $10 - local.get $10 + local.get $oldPtr + local.set $oldEntry + local.get $oldEntry i32.load offset=16 i32.const 1 i32.and i32.eqz if - local.get $8 - local.set $11 - local.get $10 + local.get $newPtr + local.set $var$11 + local.get $oldEntry i64.load - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 call $~lib/map/MapEntry#set:key - local.get $11 - local.get $10 + local.get $var$11 + local.get $oldEntry i64.load offset=8 call $~lib/map/MapEntry#set:value - local.get $12 + local.get $var$12 call $~lib/util/hash/HASH - local.get $1 + local.get $newBucketsMask i32.and - local.set $13 - local.get $3 - local.get $13 + local.set $var$13 + local.get $newBuckets + local.get $var$13 i32.const 4 i32.mul i32.add - local.set $14 - local.get $11 - local.get $14 + local.set $var$14 + local.get $var$11 + local.get $var$14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $14 - local.get $8 + local.get $var$14 + local.get $newPtr i32.store - local.get $8 + local.get $newPtr i32.const 24 i32.add - local.set $8 + local.set $newPtr end - local.get $6 + local.get $oldPtr i32.const 24 i32.add - local.set $6 + local.set $oldPtr br $while-continue|0 end end - local.get $0 - local.get $3 + local.get $this + local.get $newBuckets call $~lib/map/Map#set:buckets - local.get $0 - local.get $1 + local.get $this + local.get $newBucketsMask call $~lib/map/Map#set:bucketsMask - local.get $0 - local.get $5 + local.get $this + local.get $newEntries call $~lib/map/Map#set:entries - local.get $0 - local.get $4 + local.get $this + local.get $newEntriesCapacity call $~lib/map/Map#set:entriesCapacity - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer @@ -11529,61 +11529,61 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 + (func $~lib/map/Map#get:size (param $this i32) (result i32) + local.get $this i32.load offset=20 ) - (func $~lib/map/Map#delete (param $0 i32) (param $1 i64) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map#delete (param $this i32) (param $key i64) (result i32) + (local $entry i32) + (local $halfBucketsMask i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $entry + local.get $entry i32.eqz if i32.const 0 return end - local.get $2 - local.get $2 + local.get $entry + local.get $entry i32.load offset=12 i32.const 1 i32.or call $~lib/map/MapEntry#set:taggedNext - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 i32.const 1 i32.sub call $~lib/map/Map#set:entriesCount - local.get $0 + local.get $this i32.load offset=4 i32.const 1 i32.shr_u - local.set $3 - local.get $3 + local.set $halfBucketsMask + local.get $halfBucketsMask i32.const 1 i32.add i32.const 4 - local.tee $4 - local.get $0 + local.tee $var$4 + local.get $this i32.load offset=20 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.gt_u select i32.ge_u if (result i32) - local.get $0 + local.get $this i32.load offset=20 - local.get $0 + local.get $this i32.load offset=12 i32.const 3 i32.mul @@ -11594,52 +11594,52 @@ i32.const 0 end if - local.get $0 - local.get $3 + local.get $this + local.get $halfBucketsMask call $~lib/map/Map#rehash end i32.const 1 ) - (func $~lib/map/Map#clear (param $0 i32) - local.get $0 + (func $~lib/map/Map#clear (param $this i32) + local.get $this i32.const 0 i32.const 4 i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets - local.get $0 + local.get $this i32.const 4 i32.const 1 i32.sub call $~lib/map/Map#set:bucketsMask - local.get $0 + local.get $this i32.const 0 i32.const 4 i32.const 16 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:entries - local.get $0 + local.get $this i32.const 4 call $~lib/map/Map#set:entriesCapacity - local.get $0 + local.get $this i32.const 0 call $~lib/map/Map#set:entriesOffset - local.get $0 + local.get $this i32.const 0 call $~lib/map/Map#set:entriesCount ) (func $std/map/testNumeric - (local $0 i32) - (local $1 i64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) + (local $map i32) + (local $var$1 i64) + (local $keys i32) + (local $vals i32) + (local $keyMap i32) + (local $valMap i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) global.get $~lib/memory/__stack_pointer i32.const 20 i32.sub @@ -11652,19 +11652,19 @@ global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor - local.tee $0 + local.tee $map i32.store i64.const 0 - local.set $1 + local.set $var$1 loop $for-loop|0 - local.get $1 + local.get $var$1 i64.const 100 i64.lt_u - local.set $2 - local.get $2 + local.set $keys + local.get $keys if - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz i32.eqz @@ -11676,16 +11676,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 i32.const 10 - local.get $1 + local.get $var$1 i32.wrap_i64 i32.add call $~lib/map/Map#set drop - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz if @@ -11696,11 +11696,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#get i32.const 10 - local.get $1 + local.get $var$1 i32.wrap_i64 i32.add i32.eq @@ -11713,14 +11713,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i64.const 1 i64.add - local.set $1 + local.set $var$1 br $for-loop|0 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -11734,16 +11734,16 @@ unreachable end i64.const 0 - local.set $1 + local.set $var$1 loop $for-loop|1 - local.get $1 + local.get $var$1 i64.const 100 i64.lt_u - local.set $2 - local.get $2 + local.set $keys + local.get $keys if - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz if @@ -11754,11 +11754,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#get i32.const 10 - local.get $1 + local.get $var$1 i32.wrap_i64 i32.add i32.eq @@ -11771,16 +11771,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 i32.const 20 - local.get $1 + local.get $var$1 i32.wrap_i64 i32.add call $~lib/map/Map#set drop - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz if @@ -11791,11 +11791,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#get i32.const 20 - local.get $1 + local.get $var$1 i32.wrap_i64 i32.add i32.eq @@ -11808,14 +11808,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i64.const 1 i64.add - local.set $1 + local.set $var$1 br $for-loop|1 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -11829,45 +11829,45 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $map call $~lib/map/Map#keys - local.tee $2 + local.tee $keys i32.store offset=4 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $map call $~lib/map/Map#values - local.tee $3 + local.tee $vals i32.store offset=8 global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor - local.tee $4 + local.tee $keyMap i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor - local.tee $5 + local.tee $valMap i32.store offset=16 i32.const 0 - local.set $6 + local.set $var$6 loop $for-loop|2 - local.get $6 - local.get $2 + local.get $var$6 + local.get $keys call $~lib/array/Array#get:length i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $2 - local.get $6 + local.get $keys + local.get $var$6 call $~lib/array/Array#__get - local.set $1 - local.get $3 - local.get $6 + local.set $var$1 + local.get $vals + local.get $var$6 call $~lib/array/Array#__get - local.set $8 - local.get $0 - local.get $1 + local.set $var$8 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz if @@ -11878,8 +11878,8 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $8 + local.get $map + local.get $var$8 i32.const 20 i32.sub i64.extend_i32_s @@ -11893,28 +11893,28 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $1 - local.get $1 + local.get $keyMap + local.get $var$1 + local.get $var$1 call $~lib/map/Map#set drop - local.get $5 - local.get $8 + local.get $valMap + local.get $var$8 i32.const 20 i32.sub - local.get $8 + local.get $var$8 i32.const 20 i32.sub call $~lib/map/Map#set drop - local.get $6 + local.get $var$6 i32.const 1 i32.add - local.set $6 + local.set $var$6 br $for-loop|2 end end - local.get $4 + local.get $keyMap call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -11927,7 +11927,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $valMap call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -11941,16 +11941,16 @@ unreachable end i64.const 0 - local.set $1 + local.set $var$1 loop $for-loop|3 - local.get $1 + local.get $var$1 i64.const 50 i64.lt_u - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz if @@ -11961,11 +11961,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#get i32.const 20 - local.get $1 + local.get $var$1 i32.wrap_i64 i32.add i32.eq @@ -11978,12 +11978,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#delete drop - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz i32.eqz @@ -11995,14 +11995,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i64.const 1 i64.add - local.set $1 + local.set $var$1 br $for-loop|3 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 50 i32.eq @@ -12016,16 +12016,16 @@ unreachable end i64.const 0 - local.set $1 + local.set $var$1 loop $for-loop|4 - local.get $1 + local.get $var$1 i64.const 50 i64.lt_u - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz i32.eqz @@ -12037,16 +12037,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 i32.const 10 - local.get $1 + local.get $var$1 i32.wrap_i64 i32.add call $~lib/map/Map#set drop - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz if @@ -12057,12 +12057,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#delete drop - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz i32.eqz @@ -12074,14 +12074,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i64.const 1 i64.add - local.set $1 + local.set $var$1 br $for-loop|4 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 50 i32.eq @@ -12094,9 +12094,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $map call $~lib/map/Map#clear - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 0 i32.eq @@ -12152,10 +12152,10 @@ local.get $1 i32.store offset=20 ) - (func $~lib/util/hash/HASH (param $0 f32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + (func $~lib/util/hash/HASH (param $key f32) (result i32) + (local $var$1 i32) + (local $var$2 i32) + (local $var$3 i32) i32.const 0 drop i32.const 0 @@ -12166,112 +12166,112 @@ i32.const 4 i32.eq drop - local.get $0 + local.get $key i32.reinterpret_f32 - local.set $1 + local.set $var$1 i32.const 4 - local.set $2 + local.set $var$2 i32.const 0 i32.const 374761393 i32.add - local.get $2 + local.get $var$2 i32.add - local.set $3 - local.get $3 - local.get $1 + local.set $var$3 + local.get $var$3 + local.get $var$1 i32.const -1028477379 i32.mul i32.add - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 15 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const -2048144777 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 13 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const -1028477379 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 16 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 return ) - (func $~lib/map/Map#find (param $0 i32) (param $1 f32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/map/Map#find (param $this i32) (param $key f32) (param $hashCode i32) (result i32) + (local $entry i32) + (local $var$4 i32) + (local $taggedNext i32) + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add i32.load - local.set $3 + local.set $entry loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + local.get $entry + local.set $var$4 + local.get $var$4 if - local.get $3 + local.get $entry i32.load offset=8 - local.set $5 - local.get $5 + local.set $taggedNext + local.get $taggedNext i32.const 1 i32.and i32.eqz if (result i32) - local.get $3 + local.get $entry f32.load - local.get $1 + local.get $key f32.eq else i32.const 0 end if - local.get $3 + local.get $entry return end - local.get $5 + local.get $taggedNext i32.const 1 i32.const -1 i32.xor i32.and - local.set $3 + local.set $entry br $while-continue|0 end end i32.const 0 ) - (func $~lib/map/Map#has (param $0 i32) (param $1 f32) (result i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map#has (param $this i32) (param $key f32) (result i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 @@ -12292,20 +12292,20 @@ local.get $1 i32.store offset=8 ) - (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 f32) - (local $13 i32) - (local $14 i32) + (func $~lib/map/Map#rehash (param $this i32) (param $newBucketsMask i32) + (local $newBucketsCapacity i32) + (local $newBuckets i32) + (local $newEntriesCapacity i32) + (local $newEntries i32) + (local $oldPtr i32) + (local $oldEnd i32) + (local $newPtr i32) + (local $var$9 i32) + (local $oldEntry i32) + (local $var$11 i32) + (local $var$12 f32) + (local $var$13 i32) + (local $var$14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -12314,115 +12314,115 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $1 + local.get $newBucketsMask i32.const 1 i32.add - local.set $2 + local.set $newBucketsCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 + local.get $newBucketsCapacity i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $newBuckets i32.store - local.get $2 + local.get $newBucketsCapacity i32.const 8 i32.mul i32.const 3 i32.div_s - local.set $4 + local.set $newEntriesCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 + local.get $newEntriesCapacity i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $newEntries i32.store offset=4 - local.get $0 + local.get $this i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 + local.set $oldPtr + local.get $oldPtr + local.get $this i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $7 - local.get $5 - local.set $8 + local.set $oldEnd + local.get $newEntries + local.set $newPtr loop $while-continue|0 - local.get $6 - local.get $7 + local.get $oldPtr + local.get $oldEnd i32.ne - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $6 - local.set $10 - local.get $10 + local.get $oldPtr + local.set $oldEntry + local.get $oldEntry i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $8 - local.set $11 - local.get $10 + local.get $newPtr + local.set $var$11 + local.get $oldEntry f32.load - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 call $~lib/map/MapEntry#set:key - local.get $11 - local.get $10 + local.get $var$11 + local.get $oldEntry i32.load offset=4 call $~lib/map/MapEntry#set:value - local.get $12 + local.get $var$12 call $~lib/util/hash/HASH - local.get $1 + local.get $newBucketsMask i32.and - local.set $13 - local.get $3 - local.get $13 + local.set $var$13 + local.get $newBuckets + local.get $var$13 i32.const 4 i32.mul i32.add - local.set $14 - local.get $11 - local.get $14 + local.set $var$14 + local.get $var$11 + local.get $var$14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $14 - local.get $8 + local.get $var$14 + local.get $newPtr i32.store - local.get $8 + local.get $newPtr i32.const 12 i32.add - local.set $8 + local.set $newPtr end - local.get $6 + local.get $oldPtr i32.const 12 i32.add - local.set $6 + local.set $oldPtr br $while-continue|0 end end - local.get $0 - local.get $3 + local.get $this + local.get $newBuckets call $~lib/map/Map#set:buckets - local.get $0 - local.get $1 + local.get $this + local.get $newBucketsMask call $~lib/map/Map#set:bucketsMask - local.get $0 - local.get $5 + local.get $this + local.get $newEntries call $~lib/map/Map#set:entries - local.get $0 - local.get $4 + local.get $this + local.get $newEntriesCapacity call $~lib/map/Map#set:entriesCapacity - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer @@ -12430,15 +12430,15 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/map/Map#get (param $0 i32) (param $1 f32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map#get (param $this i32) (param $key f32) (result i32) + (local $entry i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $entry + local.get $entry i32.eqz if i32.const 592 @@ -12448,11 +12448,11 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $entry i32.load offset=4 ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 + (func $~lib/map/Map#get:size (param $this i32) (result i32) + local.get $this i32.load offset=20 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) @@ -12479,26 +12479,26 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 f32) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value f32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value f32.store i32.const 0 drop ) - (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 + (func $~lib/array/Array#set:length (param $this i32) (param $newLength i32) + local.get $this + local.get $newLength i32.const 2 i32.const 0 call $~lib/array/ensureCapacity - local.get $0 - local.get $1 + local.get $this + local.get $newLength call $~lib/array/Array#set:length_ ) (func $~lib/map/Map#set:buckets (param $0 i32) (param $1 i32) @@ -12539,14 +12539,14 @@ local.get $1 i32.store offset=20 ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result f32) - (local $2 f32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result f32) + (local $value f32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -12557,63 +12557,63 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add f32.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) - (func $~lib/map/Map#find (param $0 i32) (param $1 f32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/map/Map#find (param $this i32) (param $key f32) (param $hashCode i32) (result i32) + (local $entry i32) + (local $var$4 i32) + (local $taggedNext i32) + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add i32.load - local.set $3 + local.set $entry loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + local.get $entry + local.set $var$4 + local.get $var$4 if - local.get $3 + local.get $entry i32.load offset=8 - local.set $5 - local.get $5 + local.set $taggedNext + local.get $taggedNext i32.const 1 i32.and i32.eqz if (result i32) - local.get $3 + local.get $entry f32.load - local.get $1 + local.get $key f32.eq else i32.const 0 end if - local.get $3 + local.get $entry return end - local.get $5 + local.get $taggedNext i32.const 1 i32.const -1 i32.xor i32.and - local.set $3 + local.set $entry br $while-continue|0 end end @@ -12634,20 +12634,20 @@ local.get $1 i32.store offset=8 ) - (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 f32) - (local $13 i32) - (local $14 i32) + (func $~lib/map/Map#rehash (param $this i32) (param $newBucketsMask i32) + (local $newBucketsCapacity i32) + (local $newBuckets i32) + (local $newEntriesCapacity i32) + (local $newEntries i32) + (local $oldPtr i32) + (local $oldEnd i32) + (local $newPtr i32) + (local $var$9 i32) + (local $oldEntry i32) + (local $var$11 i32) + (local $var$12 f32) + (local $var$13 i32) + (local $var$14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -12656,115 +12656,115 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $1 + local.get $newBucketsMask i32.const 1 i32.add - local.set $2 + local.set $newBucketsCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 + local.get $newBucketsCapacity i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $newBuckets i32.store - local.get $2 + local.get $newBucketsCapacity i32.const 8 i32.mul i32.const 3 i32.div_s - local.set $4 + local.set $newEntriesCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 + local.get $newEntriesCapacity i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $newEntries i32.store offset=4 - local.get $0 + local.get $this i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 + local.set $oldPtr + local.get $oldPtr + local.get $this i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $7 - local.get $5 - local.set $8 + local.set $oldEnd + local.get $newEntries + local.set $newPtr loop $while-continue|0 - local.get $6 - local.get $7 + local.get $oldPtr + local.get $oldEnd i32.ne - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $6 - local.set $10 - local.get $10 + local.get $oldPtr + local.set $oldEntry + local.get $oldEntry i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $8 - local.set $11 - local.get $10 + local.get $newPtr + local.set $var$11 + local.get $oldEntry f32.load - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 call $~lib/map/MapEntry#set:key - local.get $11 - local.get $10 + local.get $var$11 + local.get $oldEntry f32.load offset=4 call $~lib/map/MapEntry#set:value - local.get $12 + local.get $var$12 call $~lib/util/hash/HASH - local.get $1 + local.get $newBucketsMask i32.and - local.set $13 - local.get $3 - local.get $13 + local.set $var$13 + local.get $newBuckets + local.get $var$13 i32.const 4 i32.mul i32.add - local.set $14 - local.get $11 - local.get $14 + local.set $var$14 + local.get $var$11 + local.get $var$14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $14 - local.get $8 + local.get $var$14 + local.get $newPtr i32.store - local.get $8 + local.get $newPtr i32.const 12 i32.add - local.set $8 + local.set $newPtr end - local.get $6 + local.get $oldPtr i32.const 12 i32.add - local.set $6 + local.set $oldPtr br $while-continue|0 end end - local.get $0 - local.get $3 + local.get $this + local.get $newBuckets call $~lib/map/Map#set:buckets - local.get $0 - local.get $1 + local.get $this + local.get $newBucketsMask call $~lib/map/Map#set:bucketsMask - local.get $0 - local.get $5 + local.get $this + local.get $newEntries call $~lib/map/Map#set:entries - local.get $0 - local.get $4 + local.get $this + local.get $newEntriesCapacity call $~lib/map/Map#set:entriesCapacity - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer @@ -12772,61 +12772,61 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 + (func $~lib/map/Map#get:size (param $this i32) (result i32) + local.get $this i32.load offset=20 ) - (func $~lib/map/Map#delete (param $0 i32) (param $1 f32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map#delete (param $this i32) (param $key f32) (result i32) + (local $entry i32) + (local $halfBucketsMask i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $entry + local.get $entry i32.eqz if i32.const 0 return end - local.get $2 - local.get $2 + local.get $entry + local.get $entry i32.load offset=8 i32.const 1 i32.or call $~lib/map/MapEntry#set:taggedNext - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 i32.const 1 i32.sub call $~lib/map/Map#set:entriesCount - local.get $0 + local.get $this i32.load offset=4 i32.const 1 i32.shr_u - local.set $3 - local.get $3 + local.set $halfBucketsMask + local.get $halfBucketsMask i32.const 1 i32.add i32.const 4 - local.tee $4 - local.get $0 + local.tee $var$4 + local.get $this i32.load offset=20 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.gt_u select i32.ge_u if (result i32) - local.get $0 + local.get $this i32.load offset=20 - local.get $0 + local.get $this i32.load offset=12 i32.const 3 i32.mul @@ -12837,52 +12837,52 @@ i32.const 0 end if - local.get $0 - local.get $3 + local.get $this + local.get $halfBucketsMask call $~lib/map/Map#rehash end i32.const 1 ) - (func $~lib/map/Map#clear (param $0 i32) - local.get $0 + (func $~lib/map/Map#clear (param $this i32) + local.get $this i32.const 0 i32.const 4 i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets - local.get $0 + local.get $this i32.const 4 i32.const 1 i32.sub call $~lib/map/Map#set:bucketsMask - local.get $0 + local.get $this i32.const 0 i32.const 4 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:entries - local.get $0 + local.get $this i32.const 4 call $~lib/map/Map#set:entriesCapacity - local.get $0 + local.get $this i32.const 0 call $~lib/map/Map#set:entriesOffset - local.get $0 + local.get $this i32.const 0 call $~lib/map/Map#set:entriesCount ) (func $std/map/testNumeric - (local $0 i32) - (local $1 f32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) + (local $map i32) + (local $var$1 f32) + (local $keys i32) + (local $vals i32) + (local $keyMap i32) + (local $valMap i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) global.get $~lib/memory/__stack_pointer i32.const 20 i32.sub @@ -12895,19 +12895,19 @@ global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor - local.tee $0 + local.tee $map i32.store f32.const 0 - local.set $1 + local.set $var$1 loop $for-loop|0 - local.get $1 + local.get $var$1 f32.const 100 f32.lt - local.set $2 - local.get $2 + local.set $keys + local.get $keys if - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz i32.eqz @@ -12919,16 +12919,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 i32.const 10 - local.get $1 + local.get $var$1 i32.trunc_sat_f32_s i32.add call $~lib/map/Map#set drop - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz if @@ -12939,11 +12939,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#get i32.const 10 - local.get $1 + local.get $var$1 i32.trunc_sat_f32_s i32.add i32.eq @@ -12956,14 +12956,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 f32.const 1 f32.add - local.set $1 + local.set $var$1 br $for-loop|0 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -12977,16 +12977,16 @@ unreachable end f32.const 0 - local.set $1 + local.set $var$1 loop $for-loop|1 - local.get $1 + local.get $var$1 f32.const 100 f32.lt - local.set $2 - local.get $2 + local.set $keys + local.get $keys if - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz if @@ -12997,11 +12997,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#get i32.const 10 - local.get $1 + local.get $var$1 i32.trunc_sat_f32_s i32.add i32.eq @@ -13014,16 +13014,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 i32.const 20 - local.get $1 + local.get $var$1 i32.trunc_sat_f32_s i32.add call $~lib/map/Map#set drop - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz if @@ -13034,11 +13034,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#get i32.const 20 - local.get $1 + local.get $var$1 i32.trunc_sat_f32_s i32.add i32.eq @@ -13051,14 +13051,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 f32.const 1 f32.add - local.set $1 + local.set $var$1 br $for-loop|1 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -13072,45 +13072,45 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $map call $~lib/map/Map#keys - local.tee $2 + local.tee $keys i32.store offset=4 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $map call $~lib/map/Map#values - local.tee $3 + local.tee $vals i32.store offset=8 global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor - local.tee $4 + local.tee $keyMap i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor - local.tee $5 + local.tee $valMap i32.store offset=16 i32.const 0 - local.set $6 + local.set $var$6 loop $for-loop|2 - local.get $6 - local.get $2 + local.get $var$6 + local.get $keys call $~lib/array/Array#get:length i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $2 - local.get $6 + local.get $keys + local.get $var$6 call $~lib/array/Array#__get - local.set $1 - local.get $3 - local.get $6 + local.set $var$1 + local.get $vals + local.get $var$6 call $~lib/array/Array#__get - local.set $8 - local.get $0 - local.get $1 + local.set $var$8 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz if @@ -13121,8 +13121,8 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $8 + local.get $map + local.get $var$8 i32.const 20 i32.sub f32.convert_i32_s @@ -13136,28 +13136,28 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $1 - local.get $1 + local.get $keyMap + local.get $var$1 + local.get $var$1 call $~lib/map/Map#set drop - local.get $5 - local.get $8 + local.get $valMap + local.get $var$8 i32.const 20 i32.sub - local.get $8 + local.get $var$8 i32.const 20 i32.sub call $~lib/map/Map#set drop - local.get $6 + local.get $var$6 i32.const 1 i32.add - local.set $6 + local.set $var$6 br $for-loop|2 end end - local.get $4 + local.get $keyMap call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -13170,7 +13170,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $valMap call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -13184,16 +13184,16 @@ unreachable end f32.const 0 - local.set $1 + local.set $var$1 loop $for-loop|3 - local.get $1 + local.get $var$1 f32.const 50 f32.lt - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz if @@ -13204,11 +13204,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#get i32.const 20 - local.get $1 + local.get $var$1 i32.trunc_sat_f32_s i32.add i32.eq @@ -13221,12 +13221,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#delete drop - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz i32.eqz @@ -13238,14 +13238,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 f32.const 1 f32.add - local.set $1 + local.set $var$1 br $for-loop|3 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 50 i32.eq @@ -13259,16 +13259,16 @@ unreachable end f32.const 0 - local.set $1 + local.set $var$1 loop $for-loop|4 - local.get $1 + local.get $var$1 f32.const 50 f32.lt - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz i32.eqz @@ -13280,16 +13280,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 i32.const 10 - local.get $1 + local.get $var$1 i32.trunc_sat_f32_s i32.add call $~lib/map/Map#set drop - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz if @@ -13300,12 +13300,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#delete drop - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz i32.eqz @@ -13317,14 +13317,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 f32.const 1 f32.add - local.set $1 + local.set $var$1 br $for-loop|4 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 50 i32.eq @@ -13337,9 +13337,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $map call $~lib/map/Map#clear - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 0 i32.eq @@ -13395,9 +13395,9 @@ local.get $1 i32.store offset=20 ) - (func $~lib/util/hash/HASH (param $0 f64) (result i32) - (local $1 i64) - (local $2 i32) + (func $~lib/util/hash/HASH (param $key f64) (result i32) + (local $var$1 i64) + (local $var$2 i32) i32.const 0 drop i32.const 0 @@ -13412,126 +13412,126 @@ i32.const 8 i32.eq drop - local.get $0 + local.get $key i64.reinterpret_f64 - local.set $1 + local.set $var$1 i32.const 0 i32.const 374761393 i32.add i32.const 8 i32.add - local.set $2 - local.get $2 - local.get $1 + local.set $var$2 + local.get $var$2 + local.get $var$1 i32.wrap_i64 i32.const -1028477379 i32.mul i32.add - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $2 - local.get $2 - local.get $1 + local.set $var$2 + local.get $var$2 + local.get $var$1 i64.const 32 i64.shr_u i32.wrap_i64 i32.const -1028477379 i32.mul i32.add - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $2 - local.get $2 - local.get $2 + local.set $var$2 + local.get $var$2 + local.get $var$2 i32.const 15 i32.shr_u i32.xor - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const -2048144777 i32.mul - local.set $2 - local.get $2 - local.get $2 + local.set $var$2 + local.get $var$2 + local.get $var$2 i32.const 13 i32.shr_u i32.xor - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const -1028477379 i32.mul - local.set $2 - local.get $2 - local.get $2 + local.set $var$2 + local.get $var$2 + local.get $var$2 i32.const 16 i32.shr_u i32.xor - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 return ) - (func $~lib/map/Map#find (param $0 i32) (param $1 f64) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/map/Map#find (param $this i32) (param $key f64) (param $hashCode i32) (result i32) + (local $entry i32) + (local $var$4 i32) + (local $taggedNext i32) + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add i32.load - local.set $3 + local.set $entry loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + local.get $entry + local.set $var$4 + local.get $var$4 if - local.get $3 + local.get $entry i32.load offset=12 - local.set $5 - local.get $5 + local.set $taggedNext + local.get $taggedNext i32.const 1 i32.and i32.eqz if (result i32) - local.get $3 + local.get $entry f64.load - local.get $1 + local.get $key f64.eq else i32.const 0 end if - local.get $3 + local.get $entry return end - local.get $5 + local.get $taggedNext i32.const 1 i32.const -1 i32.xor i32.and - local.set $3 + local.set $entry br $while-continue|0 end end i32.const 0 ) - (func $~lib/map/Map#has (param $0 i32) (param $1 f64) (result i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map#has (param $this i32) (param $key f64) (result i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 @@ -13552,20 +13552,20 @@ local.get $1 i32.store offset=12 ) - (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 f64) - (local $13 i32) - (local $14 i32) + (func $~lib/map/Map#rehash (param $this i32) (param $newBucketsMask i32) + (local $newBucketsCapacity i32) + (local $newBuckets i32) + (local $newEntriesCapacity i32) + (local $newEntries i32) + (local $oldPtr i32) + (local $oldEnd i32) + (local $newPtr i32) + (local $var$9 i32) + (local $oldEntry i32) + (local $var$11 i32) + (local $var$12 f64) + (local $var$13 i32) + (local $var$14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -13574,115 +13574,115 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $1 + local.get $newBucketsMask i32.const 1 i32.add - local.set $2 + local.set $newBucketsCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 + local.get $newBucketsCapacity i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $newBuckets i32.store - local.get $2 + local.get $newBucketsCapacity i32.const 8 i32.mul i32.const 3 i32.div_s - local.set $4 + local.set $newEntriesCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 + local.get $newEntriesCapacity i32.const 16 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $newEntries i32.store offset=4 - local.get $0 + local.get $this i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 + local.set $oldPtr + local.get $oldPtr + local.get $this i32.load offset=16 i32.const 16 i32.mul i32.add - local.set $7 - local.get $5 - local.set $8 + local.set $oldEnd + local.get $newEntries + local.set $newPtr loop $while-continue|0 - local.get $6 - local.get $7 + local.get $oldPtr + local.get $oldEnd i32.ne - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $6 - local.set $10 - local.get $10 + local.get $oldPtr + local.set $oldEntry + local.get $oldEntry i32.load offset=12 i32.const 1 i32.and i32.eqz if - local.get $8 - local.set $11 - local.get $10 + local.get $newPtr + local.set $var$11 + local.get $oldEntry f64.load - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 call $~lib/map/MapEntry#set:key - local.get $11 - local.get $10 + local.get $var$11 + local.get $oldEntry i32.load offset=8 call $~lib/map/MapEntry#set:value - local.get $12 + local.get $var$12 call $~lib/util/hash/HASH - local.get $1 + local.get $newBucketsMask i32.and - local.set $13 - local.get $3 - local.get $13 + local.set $var$13 + local.get $newBuckets + local.get $var$13 i32.const 4 i32.mul i32.add - local.set $14 - local.get $11 - local.get $14 + local.set $var$14 + local.get $var$11 + local.get $var$14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $14 - local.get $8 + local.get $var$14 + local.get $newPtr i32.store - local.get $8 + local.get $newPtr i32.const 16 i32.add - local.set $8 + local.set $newPtr end - local.get $6 + local.get $oldPtr i32.const 16 i32.add - local.set $6 + local.set $oldPtr br $while-continue|0 end end - local.get $0 - local.get $3 + local.get $this + local.get $newBuckets call $~lib/map/Map#set:buckets - local.get $0 - local.get $1 + local.get $this + local.get $newBucketsMask call $~lib/map/Map#set:bucketsMask - local.get $0 - local.get $5 + local.get $this + local.get $newEntries call $~lib/map/Map#set:entries - local.get $0 - local.get $4 + local.get $this + local.get $newEntriesCapacity call $~lib/map/Map#set:entriesCapacity - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer @@ -13690,15 +13690,15 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/map/Map#get (param $0 i32) (param $1 f64) (result i32) - (local $2 i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map#get (param $this i32) (param $key f64) (result i32) + (local $entry i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $entry + local.get $entry i32.eqz if i32.const 592 @@ -13708,11 +13708,11 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $entry i32.load offset=8 ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 + (func $~lib/map/Map#get:size (param $this i32) (result i32) + local.get $this i32.load offset=20 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) @@ -13739,26 +13739,26 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 f64) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value f64) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add - local.get $2 + local.get $value f64.store i32.const 0 drop ) - (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 + (func $~lib/array/Array#set:length (param $this i32) (param $newLength i32) + local.get $this + local.get $newLength i32.const 3 i32.const 0 call $~lib/array/ensureCapacity - local.get $0 - local.get $1 + local.get $this + local.get $newLength call $~lib/array/Array#set:length_ ) (func $~lib/map/Map#set:buckets (param $0 i32) (param $1 i32) @@ -13799,14 +13799,14 @@ local.get $1 i32.store offset=20 ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result f64) - (local $2 f64) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result f64) + (local $value f64) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -13817,63 +13817,63 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add f64.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) - (func $~lib/map/Map#find (param $0 i32) (param $1 f64) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/map/Map#find (param $this i32) (param $key f64) (param $hashCode i32) (result i32) + (local $entry i32) + (local $var$4 i32) + (local $taggedNext i32) + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add i32.load - local.set $3 + local.set $entry loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + local.get $entry + local.set $var$4 + local.get $var$4 if - local.get $3 + local.get $entry i32.load offset=16 - local.set $5 - local.get $5 + local.set $taggedNext + local.get $taggedNext i32.const 1 i32.and i32.eqz if (result i32) - local.get $3 + local.get $entry f64.load - local.get $1 + local.get $key f64.eq else i32.const 0 end if - local.get $3 + local.get $entry return end - local.get $5 + local.get $taggedNext i32.const 1 i32.const -1 i32.xor i32.and - local.set $3 + local.set $entry br $while-continue|0 end end @@ -13894,20 +13894,20 @@ local.get $1 i32.store offset=16 ) - (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 f64) - (local $13 i32) - (local $14 i32) + (func $~lib/map/Map#rehash (param $this i32) (param $newBucketsMask i32) + (local $newBucketsCapacity i32) + (local $newBuckets i32) + (local $newEntriesCapacity i32) + (local $newEntries i32) + (local $oldPtr i32) + (local $oldEnd i32) + (local $newPtr i32) + (local $var$9 i32) + (local $oldEntry i32) + (local $var$11 i32) + (local $var$12 f64) + (local $var$13 i32) + (local $var$14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -13916,115 +13916,115 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $1 + local.get $newBucketsMask i32.const 1 i32.add - local.set $2 + local.set $newBucketsCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 + local.get $newBucketsCapacity i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $newBuckets i32.store - local.get $2 + local.get $newBucketsCapacity i32.const 8 i32.mul i32.const 3 i32.div_s - local.set $4 + local.set $newEntriesCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 + local.get $newEntriesCapacity i32.const 24 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $newEntries i32.store offset=4 - local.get $0 + local.get $this i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 + local.set $oldPtr + local.get $oldPtr + local.get $this i32.load offset=16 i32.const 24 i32.mul i32.add - local.set $7 - local.get $5 - local.set $8 + local.set $oldEnd + local.get $newEntries + local.set $newPtr loop $while-continue|0 - local.get $6 - local.get $7 + local.get $oldPtr + local.get $oldEnd i32.ne - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $6 - local.set $10 - local.get $10 + local.get $oldPtr + local.set $oldEntry + local.get $oldEntry i32.load offset=16 i32.const 1 i32.and i32.eqz if - local.get $8 - local.set $11 - local.get $10 + local.get $newPtr + local.set $var$11 + local.get $oldEntry f64.load - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 call $~lib/map/MapEntry#set:key - local.get $11 - local.get $10 + local.get $var$11 + local.get $oldEntry f64.load offset=8 call $~lib/map/MapEntry#set:value - local.get $12 + local.get $var$12 call $~lib/util/hash/HASH - local.get $1 + local.get $newBucketsMask i32.and - local.set $13 - local.get $3 - local.get $13 + local.set $var$13 + local.get $newBuckets + local.get $var$13 i32.const 4 i32.mul i32.add - local.set $14 - local.get $11 - local.get $14 + local.set $var$14 + local.get $var$11 + local.get $var$14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $14 - local.get $8 + local.get $var$14 + local.get $newPtr i32.store - local.get $8 + local.get $newPtr i32.const 24 i32.add - local.set $8 + local.set $newPtr end - local.get $6 + local.get $oldPtr i32.const 24 i32.add - local.set $6 + local.set $oldPtr br $while-continue|0 end end - local.get $0 - local.get $3 + local.get $this + local.get $newBuckets call $~lib/map/Map#set:buckets - local.get $0 - local.get $1 + local.get $this + local.get $newBucketsMask call $~lib/map/Map#set:bucketsMask - local.get $0 - local.get $5 + local.get $this + local.get $newEntries call $~lib/map/Map#set:entries - local.get $0 - local.get $4 + local.get $this + local.get $newEntriesCapacity call $~lib/map/Map#set:entriesCapacity - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer @@ -14032,61 +14032,61 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/map/Map#get:size (param $0 i32) (result i32) - local.get $0 + (func $~lib/map/Map#get:size (param $this i32) (result i32) + local.get $this i32.load offset=20 ) - (func $~lib/map/Map#delete (param $0 i32) (param $1 f64) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map#delete (param $this i32) (param $key f64) (result i32) + (local $entry i32) + (local $halfBucketsMask i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $entry + local.get $entry i32.eqz if i32.const 0 return end - local.get $2 - local.get $2 + local.get $entry + local.get $entry i32.load offset=12 i32.const 1 i32.or call $~lib/map/MapEntry#set:taggedNext - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 i32.const 1 i32.sub call $~lib/map/Map#set:entriesCount - local.get $0 + local.get $this i32.load offset=4 i32.const 1 i32.shr_u - local.set $3 - local.get $3 + local.set $halfBucketsMask + local.get $halfBucketsMask i32.const 1 i32.add i32.const 4 - local.tee $4 - local.get $0 - i32.load offset=20 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$4 + local.get $this + i32.load offset=20 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.gt_u select i32.ge_u if (result i32) - local.get $0 + local.get $this i32.load offset=20 - local.get $0 + local.get $this i32.load offset=12 i32.const 3 i32.mul @@ -14097,52 +14097,52 @@ i32.const 0 end if - local.get $0 - local.get $3 + local.get $this + local.get $halfBucketsMask call $~lib/map/Map#rehash end i32.const 1 ) - (func $~lib/map/Map#clear (param $0 i32) - local.get $0 + (func $~lib/map/Map#clear (param $this i32) + local.get $this i32.const 0 i32.const 4 i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:buckets - local.get $0 + local.get $this i32.const 4 i32.const 1 i32.sub call $~lib/map/Map#set:bucketsMask - local.get $0 + local.get $this i32.const 0 i32.const 4 i32.const 16 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/map/Map#set:entries - local.get $0 + local.get $this i32.const 4 call $~lib/map/Map#set:entriesCapacity - local.get $0 + local.get $this i32.const 0 call $~lib/map/Map#set:entriesOffset - local.get $0 + local.get $this i32.const 0 call $~lib/map/Map#set:entriesCount ) (func $std/map/testNumeric - (local $0 i32) - (local $1 f64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) + (local $map i32) + (local $var$1 f64) + (local $keys i32) + (local $vals i32) + (local $keyMap i32) + (local $valMap i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) global.get $~lib/memory/__stack_pointer i32.const 20 i32.sub @@ -14155,19 +14155,19 @@ global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor - local.tee $0 + local.tee $map i32.store f64.const 0 - local.set $1 + local.set $var$1 loop $for-loop|0 - local.get $1 + local.get $var$1 f64.const 100 f64.lt - local.set $2 - local.get $2 + local.set $keys + local.get $keys if - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz i32.eqz @@ -14179,16 +14179,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 i32.const 10 - local.get $1 + local.get $var$1 i32.trunc_sat_f64_s i32.add call $~lib/map/Map#set drop - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz if @@ -14199,11 +14199,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#get i32.const 10 - local.get $1 + local.get $var$1 i32.trunc_sat_f64_s i32.add i32.eq @@ -14216,14 +14216,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 f64.const 1 f64.add - local.set $1 + local.set $var$1 br $for-loop|0 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -14237,16 +14237,16 @@ unreachable end f64.const 0 - local.set $1 + local.set $var$1 loop $for-loop|1 - local.get $1 + local.get $var$1 f64.const 100 f64.lt - local.set $2 - local.get $2 + local.set $keys + local.get $keys if - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz if @@ -14257,11 +14257,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#get i32.const 10 - local.get $1 + local.get $var$1 i32.trunc_sat_f64_s i32.add i32.eq @@ -14274,16 +14274,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 i32.const 20 - local.get $1 + local.get $var$1 i32.trunc_sat_f64_s i32.add call $~lib/map/Map#set drop - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz if @@ -14294,11 +14294,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#get i32.const 20 - local.get $1 + local.get $var$1 i32.trunc_sat_f64_s i32.add i32.eq @@ -14311,14 +14311,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 f64.const 1 f64.add - local.set $1 + local.set $var$1 br $for-loop|1 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -14332,45 +14332,45 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $map call $~lib/map/Map#keys - local.tee $2 + local.tee $keys i32.store offset=4 global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $map call $~lib/map/Map#values - local.tee $3 + local.tee $vals i32.store offset=8 global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor - local.tee $4 + local.tee $keyMap i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/map/Map#constructor - local.tee $5 + local.tee $valMap i32.store offset=16 i32.const 0 - local.set $6 + local.set $var$6 loop $for-loop|2 - local.get $6 - local.get $2 + local.get $var$6 + local.get $keys call $~lib/array/Array#get:length i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $2 - local.get $6 + local.get $keys + local.get $var$6 call $~lib/array/Array#__get - local.set $1 - local.get $3 - local.get $6 + local.set $var$1 + local.get $vals + local.get $var$6 call $~lib/array/Array#__get - local.set $8 - local.get $0 - local.get $1 + local.set $var$8 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz if @@ -14381,8 +14381,8 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $8 + local.get $map + local.get $var$8 i32.const 20 i32.sub f64.convert_i32_s @@ -14396,28 +14396,28 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $1 - local.get $1 + local.get $keyMap + local.get $var$1 + local.get $var$1 call $~lib/map/Map#set drop - local.get $5 - local.get $8 + local.get $valMap + local.get $var$8 i32.const 20 i32.sub - local.get $8 + local.get $var$8 i32.const 20 i32.sub call $~lib/map/Map#set drop - local.get $6 + local.get $var$6 i32.const 1 i32.add - local.set $6 + local.set $var$6 br $for-loop|2 end end - local.get $4 + local.get $keyMap call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -14430,7 +14430,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $valMap call $~lib/map/Map#get:size i32.const 100 i32.eq @@ -14444,16 +14444,16 @@ unreachable end f64.const 0 - local.set $1 + local.set $var$1 loop $for-loop|3 - local.get $1 + local.get $var$1 f64.const 50 f64.lt - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz if @@ -14464,11 +14464,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#get i32.const 20 - local.get $1 + local.get $var$1 i32.trunc_sat_f64_s i32.add i32.eq @@ -14481,12 +14481,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#delete drop - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz i32.eqz @@ -14498,14 +14498,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 f64.const 1 f64.add - local.set $1 + local.set $var$1 br $for-loop|3 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 50 i32.eq @@ -14519,16 +14519,16 @@ unreachable end f64.const 0 - local.set $1 + local.set $var$1 loop $for-loop|4 - local.get $1 + local.get $var$1 f64.const 50 f64.lt - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz i32.eqz @@ -14540,16 +14540,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 i32.const 10 - local.get $1 + local.get $var$1 i32.trunc_sat_f64_s i32.add call $~lib/map/Map#set drop - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz if @@ -14560,12 +14560,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#delete drop - local.get $0 - local.get $1 + local.get $map + local.get $var$1 call $~lib/map/Map#has i32.eqz i32.eqz @@ -14577,14 +14577,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 f64.const 1 f64.add - local.set $1 + local.set $var$1 br $for-loop|4 end end - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 50 i32.eq @@ -14597,9 +14597,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $map call $~lib/map/Map#clear - local.get $0 + local.get $map call $~lib/map/Map#get:size i32.const 0 i32.eq @@ -14618,7 +14618,7 @@ global.set $~lib/memory/__stack_pointer ) (func $~lib/rt/itcms/__collect - (local $0 i32) + (local $var$0 i32) i32.const 0 drop global.get $~lib/rt/itcms/state @@ -14629,8 +14629,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -14644,8 +14644,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -14724,19 +14724,19 @@ call $~lib/rt/itcms/__visit end ) - (func $~lib/map/Map#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/map/Map#__visit (param $this i32) (param $cookie i32) + (local $entries i32) + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $entries i32.const 0 drop - local.get $2 - local.get $1 + local.get $entries + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/map/Map~visit (param $0 i32) (param $1 i32) @@ -14744,12 +14744,12 @@ local.get $1 call $~lib/map/Map#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -14757,12 +14757,12 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -14770,19 +14770,19 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/map/Map#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/map/Map#__visit (param $this i32) (param $cookie i32) + (local $entries i32) + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $entries i32.const 0 drop - local.get $2 - local.get $1 + local.get $entries + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/map/Map~visit (param $0 i32) (param $1 i32) @@ -14790,19 +14790,19 @@ local.get $1 call $~lib/map/Map#__visit ) - (func $~lib/map/Map#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/map/Map#__visit (param $this i32) (param $cookie i32) + (local $entries i32) + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $entries i32.const 0 drop - local.get $2 - local.get $1 + local.get $entries + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/map/Map~visit (param $0 i32) (param $1 i32) @@ -14810,19 +14810,19 @@ local.get $1 call $~lib/map/Map#__visit ) - (func $~lib/map/Map#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/map/Map#__visit (param $this i32) (param $cookie i32) + (local $entries i32) + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $entries i32.const 0 drop - local.get $2 - local.get $1 + local.get $entries + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/map/Map~visit (param $0 i32) (param $1 i32) @@ -14830,12 +14830,12 @@ local.get $1 call $~lib/map/Map#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -14843,19 +14843,19 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/map/Map#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/map/Map#__visit (param $this i32) (param $cookie i32) + (local $entries i32) + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $entries i32.const 0 drop - local.get $2 - local.get $1 + local.get $entries + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/map/Map~visit (param $0 i32) (param $1 i32) @@ -14863,19 +14863,19 @@ local.get $1 call $~lib/map/Map#__visit ) - (func $~lib/map/Map#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/map/Map#__visit (param $this i32) (param $cookie i32) + (local $entries i32) + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $entries i32.const 0 drop - local.get $2 - local.get $1 + local.get $entries + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/map/Map~visit (param $0 i32) (param $1 i32) @@ -14883,12 +14883,12 @@ local.get $1 call $~lib/map/Map#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -14896,19 +14896,19 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/map/Map#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/map/Map#__visit (param $this i32) (param $cookie i32) + (local $entries i32) + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $entries i32.const 0 drop - local.get $2 - local.get $1 + local.get $entries + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/map/Map~visit (param $0 i32) (param $1 i32) @@ -14916,19 +14916,19 @@ local.get $1 call $~lib/map/Map#__visit ) - (func $~lib/map/Map#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/map/Map#__visit (param $this i32) (param $cookie i32) + (local $entries i32) + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $entries i32.const 0 drop - local.get $2 - local.get $1 + local.get $entries + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/map/Map~visit (param $0 i32) (param $1 i32) @@ -14936,12 +14936,12 @@ local.get $1 call $~lib/map/Map#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -14949,19 +14949,19 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/map/Map#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/map/Map#__visit (param $this i32) (param $cookie i32) + (local $entries i32) + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $entries i32.const 0 drop - local.get $2 - local.get $1 + local.get $entries + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/map/Map~visit (param $0 i32) (param $1 i32) @@ -14969,19 +14969,19 @@ local.get $1 call $~lib/map/Map#__visit ) - (func $~lib/map/Map#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/map/Map#__visit (param $this i32) (param $cookie i32) + (local $entries i32) + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $entries i32.const 0 drop - local.get $2 - local.get $1 + local.get $entries + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/map/Map~visit (param $0 i32) (param $1 i32) @@ -14989,12 +14989,12 @@ local.get $1 call $~lib/map/Map#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -15002,19 +15002,19 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/map/Map#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/map/Map#__visit (param $this i32) (param $cookie i32) + (local $entries i32) + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $entries i32.const 0 drop - local.get $2 - local.get $1 + local.get $entries + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/map/Map~visit (param $0 i32) (param $1 i32) @@ -15022,19 +15022,19 @@ local.get $1 call $~lib/map/Map#__visit ) - (func $~lib/map/Map#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/map/Map#__visit (param $this i32) (param $cookie i32) + (local $entries i32) + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $entries i32.const 0 drop - local.get $2 - local.get $1 + local.get $entries + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/map/Map~visit (param $0 i32) (param $1 i32) @@ -15042,12 +15042,12 @@ local.get $1 call $~lib/map/Map#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -15055,19 +15055,19 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/map/Map#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/map/Map#__visit (param $this i32) (param $cookie i32) + (local $entries i32) + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $entries i32.const 0 drop - local.get $2 - local.get $1 + local.get $entries + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/map/Map~visit (param $0 i32) (param $1 i32) @@ -15075,19 +15075,19 @@ local.get $1 call $~lib/map/Map#__visit ) - (func $~lib/map/Map#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/map/Map#__visit (param $this i32) (param $cookie i32) + (local $entries i32) + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $entries i32.const 0 drop - local.get $2 - local.get $1 + local.get $entries + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/map/Map~visit (param $0 i32) (param $1 i32) @@ -15095,12 +15095,12 @@ local.get $1 call $~lib/map/Map#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -15108,19 +15108,19 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/map/Map#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/map/Map#__visit (param $this i32) (param $cookie i32) + (local $entries i32) + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $entries i32.const 0 drop - local.get $2 - local.get $1 + local.get $entries + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/map/Map~visit (param $0 i32) (param $1 i32) @@ -15128,19 +15128,19 @@ local.get $1 call $~lib/map/Map#__visit ) - (func $~lib/map/Map#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/map/Map#__visit (param $this i32) (param $cookie i32) + (local $entries i32) + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $entries i32.const 0 drop - local.get $2 - local.get $1 + local.get $entries + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/map/Map~visit (param $0 i32) (param $1 i32) @@ -15148,12 +15148,12 @@ local.get $1 call $~lib/map/Map#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -15161,19 +15161,19 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/map/Map#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/map/Map#__visit (param $this i32) (param $cookie i32) + (local $entries i32) + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $entries i32.const 0 drop - local.get $2 - local.get $1 + local.get $entries + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/map/Map~visit (param $0 i32) (param $1 i32) @@ -15181,19 +15181,19 @@ local.get $1 call $~lib/map/Map#__visit ) - (func $~lib/map/Map#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/map/Map#__visit (param $this i32) (param $cookie i32) + (local $entries i32) + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $entries i32.const 0 drop - local.get $2 - local.get $1 + local.get $entries + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/map/Map~visit (param $0 i32) (param $1 i32) @@ -15201,12 +15201,12 @@ local.get $1 call $~lib/map/Map#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -15214,19 +15214,19 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/map/Map#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/map/Map#__visit (param $this i32) (param $cookie i32) + (local $entries i32) + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $entries i32.const 0 drop - local.get $2 - local.get $1 + local.get $entries + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/map/Map~visit (param $0 i32) (param $1 i32) diff --git a/tests/compiler/std/math.debug.wat b/tests/compiler/std/math.debug.wat index 41c0fc8b70..7b22b65a7b 100644 --- a/tests/compiler/std/math.debug.wat +++ b/tests/compiler/std/math.debug.wat @@ -128,117 +128,117 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (start $~start) - (func $std/math/eulp (param $0 f64) (result i32) - (local $1 i64) - (local $2 i32) - local.get $0 + (func $std/math/eulp (param $x f64) (result i32) + (local $u i64) + (local $e i32) + local.get $x i64.reinterpret_f64 - local.set $1 - local.get $1 + local.set $u + local.get $u i64.const 52 i64.shr_u i64.const 2047 i64.and i32.wrap_i64 - local.set $2 - local.get $2 + local.set $e + local.get $e i32.eqz if - local.get $2 + local.get $e i32.const 1 i32.add - local.set $2 + local.set $e end - local.get $2 + local.get $e i32.const 1023 i32.sub i32.const 52 i32.sub ) - (func $~lib/math/NativeMath.scalbn (param $0 f64) (param $1 i32) (result f64) - (local $2 f64) - (local $3 i32) - (local $4 i32) - local.get $0 - local.set $2 - local.get $1 + (func $~lib/math/NativeMath.scalbn (param $x f64) (param $n i32) (result f64) + (local $y f64) + (local $var$3 i32) + (local $var$4 i32) + local.get $x + local.set $y + local.get $n i32.const 1023 i32.gt_s if - local.get $2 + local.get $y f64.const 8988465674311579538646525e283 f64.mul - local.set $2 - local.get $1 + local.set $y + local.get $n i32.const 1023 i32.sub - local.set $1 - local.get $1 + local.set $n + local.get $n i32.const 1023 i32.gt_s if - local.get $2 + local.get $y f64.const 8988465674311579538646525e283 f64.mul - local.set $2 - local.get $1 + local.set $y + local.get $n i32.const 1023 i32.sub - local.tee $3 + local.tee $var$3 i32.const 1023 - local.tee $4 - local.get $3 - local.get $4 + local.tee $var$4 + local.get $var$3 + local.get $var$4 i32.lt_s select - local.set $1 + local.set $n end else - local.get $1 + local.get $n i32.const -1022 i32.lt_s if - local.get $2 + local.get $y f64.const 2.2250738585072014e-308 f64.const 9007199254740992 f64.mul f64.mul - local.set $2 - local.get $1 + local.set $y + local.get $n i32.const 1022 i32.const 53 i32.sub i32.add - local.set $1 - local.get $1 + local.set $n + local.get $n i32.const -1022 i32.lt_s if - local.get $2 + local.get $y f64.const 2.2250738585072014e-308 f64.const 9007199254740992 f64.mul f64.mul - local.set $2 - local.get $1 + local.set $y + local.get $n i32.const 1022 i32.add i32.const 53 i32.sub - local.tee $4 + local.tee $var$4 i32.const -1022 - local.tee $3 - local.get $4 - local.get $3 + local.tee $var$3 + local.get $var$4 + local.get $var$3 i32.gt_s select - local.set $1 + local.set $n end end end - local.get $2 + local.get $y i64.const 1023 - local.get $1 + local.get $n i64.extend_i32_s i64.add i64.const 52 @@ -246,14 +246,14 @@ f64.reinterpret_i64 f64.mul ) - (func $std/math/ulperr (param $0 f64) (param $1 f64) (param $2 f64) (result f64) - (local $3 f64) - local.get $0 - local.get $0 + (func $std/math/ulperr (param $got f64) (param $want f64) (param $dwant f64) (result f64) + (local $var$3 f64) + local.get $got + local.get $got f64.ne if (result i32) - local.get $1 - local.get $1 + local.get $want + local.get $want f64.ne else i32.const 0 @@ -262,13 +262,13 @@ f64.const 0 return end - local.get $0 - local.get $1 + local.get $got + local.get $want f64.eq if - local.get $0 - local.set $3 - local.get $3 + local.get $got + local.set $var$3 + local.get $var$3 i64.reinterpret_f64 i64.const 63 i64.shr_u @@ -276,9 +276,9 @@ i64.ne i32.const 0 i32.ne - local.get $1 - local.set $3 - local.get $3 + local.get $want + local.set $var$3 + local.get $var$3 i64.reinterpret_f64 i64.const 63 i64.shr_u @@ -288,54 +288,54 @@ i32.ne i32.eq if - local.get $2 + local.get $dwant return end f64.const inf return end - local.get $0 - local.get $0 + local.get $got + local.get $got f64.sub f64.const 0 f64.eq i32.eqz if f64.const 8988465674311579538646525e283 - local.get $0 + local.get $got f64.copysign - local.set $0 - local.get $1 + local.set $got + local.get $want f64.const 0.5 f64.mul - local.set $1 + local.set $want end - local.get $0 - local.get $1 + local.get $got + local.get $want f64.sub i32.const 0 - local.get $1 + local.get $want call $std/math/eulp i32.sub call $~lib/math/NativeMath.scalbn - local.get $2 + local.get $dwant f64.add ) - (func $std/math/check (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 f64) - local.get $0 - local.get $1 + (func $std/math/check (param $actual f64) (param $expected f64) (param $dy f64) (param $flags i32) (result i32) + (local $d f64) + local.get $actual + local.get $expected f64.eq if i32.const 1 return end - local.get $1 - local.get $1 + local.get $expected + local.get $expected f64.ne if - local.get $0 - local.get $0 + local.get $actual + local.get $actual f64.ne return end @@ -343,12 +343,12 @@ i32.const 8 i32.eq drop - local.get $0 - local.get $1 - local.get $2 + local.get $actual + local.get $expected + local.get $dy call $std/math/ulperr - local.set $4 - local.get $4 + local.set $d + local.get $d f64.abs f64.const 1.5 f64.ge @@ -358,130 +358,130 @@ end i32.const 1 ) - (func $std/math/eulpf (param $0 f32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $std/math/eulpf (param $x f32) (result i32) + (local $u i32) + (local $e i32) + local.get $x i32.reinterpret_f32 - local.set $1 - local.get $1 + local.set $u + local.get $u i32.const 23 i32.shr_u i32.const 255 i32.and - local.set $2 - local.get $2 + local.set $e + local.get $e i32.eqz if - local.get $2 + local.get $e i32.const 1 i32.add - local.set $2 + local.set $e end - local.get $2 + local.get $e i32.const 127 i32.sub i32.const 23 i32.sub ) - (func $~lib/math/NativeMathf.scalbn (param $0 f32) (param $1 i32) (result f32) - (local $2 f32) - (local $3 i32) - (local $4 i32) - local.get $0 - local.set $2 - local.get $1 + (func $~lib/math/NativeMathf.scalbn (param $x f32) (param $n i32) (result f32) + (local $y f32) + (local $var$3 i32) + (local $var$4 i32) + local.get $x + local.set $y + local.get $n i32.const 127 i32.gt_s if - local.get $2 + local.get $y f32.const 1701411834604692317316873e14 f32.mul - local.set $2 - local.get $1 + local.set $y + local.get $n i32.const 127 i32.sub - local.set $1 - local.get $1 + local.set $n + local.get $n i32.const 127 i32.gt_s if - local.get $2 + local.get $y f32.const 1701411834604692317316873e14 f32.mul - local.set $2 - local.get $1 + local.set $y + local.get $n i32.const 127 i32.sub - local.tee $3 + local.tee $var$3 i32.const 127 - local.tee $4 - local.get $3 - local.get $4 + local.tee $var$4 + local.get $var$3 + local.get $var$4 i32.lt_s select - local.set $1 + local.set $n end else - local.get $1 + local.get $n i32.const -126 i32.lt_s if - local.get $2 + local.get $y f32.const 1.1754943508222875e-38 f32.const 16777216 f32.mul f32.mul - local.set $2 - local.get $1 + local.set $y + local.get $n i32.const 126 i32.const 24 i32.sub i32.add - local.set $1 - local.get $1 + local.set $n + local.get $n i32.const -126 i32.lt_s if - local.get $2 + local.get $y f32.const 1.1754943508222875e-38 f32.const 16777216 f32.mul f32.mul - local.set $2 - local.get $1 + local.set $y + local.get $n i32.const 126 i32.add i32.const 24 i32.sub - local.tee $4 + local.tee $var$4 i32.const -126 - local.tee $3 - local.get $4 - local.get $3 + local.tee $var$3 + local.get $var$4 + local.get $var$3 i32.gt_s select - local.set $1 + local.set $n end end end - local.get $2 + local.get $y i32.const 127 - local.get $1 + local.get $n i32.add i32.const 23 i32.shl f32.reinterpret_i32 f32.mul ) - (func $std/math/ulperrf (param $0 f32) (param $1 f32) (param $2 f32) (result f32) - (local $3 f32) - local.get $0 - local.get $0 + (func $std/math/ulperrf (param $got f32) (param $want f32) (param $dwant f32) (result f32) + (local $var$3 f32) + local.get $got + local.get $got f32.ne if (result i32) - local.get $1 - local.get $1 + local.get $want + local.get $want f32.ne else i32.const 0 @@ -490,21 +490,21 @@ f32.const 0 return end - local.get $0 - local.get $1 + local.get $got + local.get $want f32.eq if - local.get $0 - local.set $3 - local.get $3 + local.get $got + local.set $var$3 + local.get $var$3 i32.reinterpret_f32 i32.const 31 i32.shr_u i32.const 0 i32.ne - local.get $1 - local.set $3 - local.get $3 + local.get $want + local.set $var$3 + local.get $var$3 i32.reinterpret_f32 i32.const 31 i32.shr_u @@ -512,54 +512,54 @@ i32.ne i32.eq if - local.get $2 + local.get $dwant return end f32.const inf return end - local.get $0 - local.get $0 + local.get $got + local.get $got f32.sub f32.const 0 f32.eq i32.eqz if f32.const 1701411834604692317316873e14 - local.get $0 + local.get $got f32.copysign - local.set $0 - local.get $1 + local.set $got + local.get $want f32.const 0.5 f32.mul - local.set $1 + local.set $want end - local.get $0 - local.get $1 + local.get $got + local.get $want f32.sub i32.const 0 - local.get $1 + local.get $want call $std/math/eulpf i32.sub call $~lib/math/NativeMathf.scalbn - local.get $2 + local.get $dwant f32.add ) - (func $std/math/check (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - (local $4 f32) - local.get $0 - local.get $1 + (func $std/math/check (param $actual f32) (param $expected f32) (param $dy f32) (param $flags i32) (result i32) + (local $d f32) + local.get $actual + local.get $expected f32.eq if i32.const 1 return end - local.get $1 - local.get $1 + local.get $expected + local.get $expected f32.ne if - local.get $0 - local.get $0 + local.get $actual + local.get $actual f32.ne return end @@ -571,12 +571,12 @@ i32.const 4 i32.eq drop - local.get $0 - local.get $1 - local.get $2 + local.get $actual + local.get $expected + local.get $dy call $std/math/ulperrf - local.set $4 - local.get $4 + local.set $d + local.get $d f32.abs f32.const 1.5 f32.ge @@ -586,70 +586,70 @@ end i32.const 1 ) - (func $std/math/test_scalbn (param $0 f64) (param $1 i32) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) - local.get $0 - local.get $1 + (func $std/math/test_scalbn (param $value f64) (param $n i32) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + local.get $value + local.get $n call $~lib/math/NativeMath.scalbn - local.get $2 - local.get $3 - local.get $4 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $std/math/test_scalbnf (param $0 f32) (param $1 i32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) - local.get $0 - local.get $1 + (func $std/math/test_scalbnf (param $value f32) (param $n i32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + local.get $value + local.get $n call $~lib/math/NativeMathf.scalbn - local.get $2 - local.get $3 - local.get $4 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $std/math/test_abs (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 f64) - local.get $0 - local.set $4 - local.get $4 + (func $std/math/test_abs (param $value f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + (local $var$4 f64) + local.get $value + local.set $var$4 + local.get $var$4 f64.abs - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check if (result i32) - local.get $0 + local.get $value call $~lib/bindings/dom/Math.abs - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check else i32.const 0 end ) - (func $std/math/test_absf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - (local $4 f32) - local.get $0 - local.set $4 - local.get $4 + (func $std/math/test_absf (param $value f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + (local $var$4 f32) + local.get $value + local.set $var$4 + local.get $var$4 f32.abs - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $~lib/math/R (param $0 f64) (result f64) - (local $1 f64) - (local $2 f64) - local.get $0 + (func $~lib/math/R (param $z f64) (result f64) + (local $p f64) + (local $q f64) + local.get $z f64.const 0.16666666666666666 - local.get $0 + local.get $z f64.const -0.3255658186224009 - local.get $0 + local.get $z f64.const 0.20121253213486293 - local.get $0 + local.get $z f64.const -0.04005553450067941 - local.get $0 + local.get $z f64.const 7.915349942898145e-04 - local.get $0 + local.get $z f64.const 3.479331075960212e-05 f64.mul f64.add @@ -662,15 +662,15 @@ f64.mul f64.add f64.mul - local.set $1 + local.set $p f64.const 1 - local.get $0 + local.get $z f64.const -2.403394911734414 - local.get $0 + local.get $z f64.const 2.0209457602335057 - local.get $0 + local.get $z f64.const -0.6882839716054533 - local.get $0 + local.get $z f64.const 0.07703815055590194 f64.mul f64.add @@ -680,47 +680,47 @@ f64.add f64.mul f64.add - local.set $2 - local.get $1 - local.get $2 + local.set $q + local.get $p + local.get $q f64.div ) - (func $~lib/math/NativeMath.acos (param $0 f64) (result f64) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - local.get $0 + (func $~lib/math/NativeMath.acos (param $x f64) (result f64) + (local $hx i32) + (local $ix i32) + (local $var$3 i32) + (local $s f64) + (local $w f64) + (local $z f64) + (local $df f64) + (local $c f64) + local.get $x i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $1 - local.get $1 + local.set $hx + local.get $hx i32.const 2147483647 i32.and - local.set $2 - local.get $2 + local.set $ix + local.get $ix i32.const 1072693248 i32.ge_u if - local.get $0 + local.get $x i64.reinterpret_f64 i32.wrap_i64 - local.set $3 - local.get $2 + local.set $var$3 + local.get $ix i32.const 1072693248 i32.sub - local.get $3 + local.get $var$3 i32.or i32.const 0 i32.eq if - local.get $1 + local.get $hx i32.const 0 i32.lt_s if @@ -736,17 +736,17 @@ return end f64.const 0 - local.get $0 - local.get $0 + local.get $x + local.get $x f64.sub f64.div return end - local.get $2 + local.get $ix i32.const 1071644672 i32.lt_u if - local.get $2 + local.get $ix i32.const 1012924416 i32.le_u if @@ -757,11 +757,11 @@ return end f64.const 1.5707963267948966 - local.get $0 + local.get $x f64.const 6.123233995736766e-17 - local.get $0 - local.get $0 - local.get $0 + local.get $x + local.get $x + local.get $x f64.mul call $~lib/math/R f64.mul @@ -770,136 +770,136 @@ f64.sub return end - local.get $1 + local.get $hx i32.const 0 i32.lt_s if f64.const 0.5 - local.get $0 + local.get $x f64.const 0.5 f64.mul f64.add - local.set $6 - local.get $6 + local.set $z + local.get $z f64.sqrt - local.set $4 - local.get $6 + local.set $s + local.get $z call $~lib/math/R - local.get $4 + local.get $s f64.mul f64.const 6.123233995736766e-17 f64.sub - local.set $5 + local.set $w f64.const 2 f64.const 1.5707963267948966 - local.get $4 - local.get $5 + local.get $s + local.get $w f64.add f64.sub f64.mul return end f64.const 0.5 - local.get $0 + local.get $x f64.const 0.5 f64.mul f64.sub - local.set $6 - local.get $6 + local.set $z + local.get $z f64.sqrt - local.set $4 - local.get $4 + local.set $s + local.get $s i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $7 - local.get $6 - local.get $7 - local.get $7 + local.set $df + local.get $z + local.get $df + local.get $df f64.mul f64.sub - local.get $4 - local.get $7 + local.get $s + local.get $df f64.add f64.div - local.set $8 - local.get $6 + local.set $c + local.get $z call $~lib/math/R - local.get $4 + local.get $s f64.mul - local.get $8 + local.get $c f64.add - local.set $5 + local.set $w f64.const 2 - local.get $7 - local.get $5 + local.get $df + local.get $w f64.add f64.mul ) - (func $std/math/test_acos (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_acos (param $value f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMath.acos - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check if (result i32) - local.get $0 + local.get $value call $~lib/bindings/dom/Math.acos - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check else i32.const 0 end ) - (func $~lib/math/Rf (param $0 f32) (result f32) - (local $1 f32) - (local $2 f32) - local.get $0 + (func $~lib/math/Rf (param $z f32) (result f32) + (local $p f32) + (local $q f32) + local.get $z f32.const 0.16666586697101593 - local.get $0 + local.get $z f32.const -0.04274342209100723 - local.get $0 + local.get $z f32.const -0.008656363002955914 f32.mul f32.add f32.mul f32.add f32.mul - local.set $1 + local.set $p f32.const 1 - local.get $0 + local.get $z f32.const -0.7066296339035034 f32.mul f32.add - local.set $2 - local.get $1 - local.get $2 + local.set $q + local.get $p + local.get $q f32.div ) - (func $~lib/math/NativeMathf.acos (param $0 f32) (result f32) - (local $1 i32) - (local $2 i32) - (local $3 f32) - (local $4 f32) - (local $5 f32) - (local $6 f32) - (local $7 f32) - local.get $0 + (func $~lib/math/NativeMathf.acos (param $x f32) (result f32) + (local $hx i32) + (local $ix i32) + (local $z f32) + (local $w f32) + (local $s f32) + (local $df f32) + (local $c f32) + local.get $x i32.reinterpret_f32 - local.set $1 - local.get $1 + local.set $hx + local.get $hx i32.const 2147483647 i32.and - local.set $2 - local.get $2 + local.set $ix + local.get $ix i32.const 1065353216 i32.ge_u if - local.get $2 + local.get $ix i32.const 1065353216 i32.eq if @@ -909,24 +909,24 @@ f32.const 7.52316384526264e-37 f32.add f32.const 0 - local.get $1 + local.get $hx i32.const 0 i32.lt_s select return end f32.const 0 - local.get $0 - local.get $0 + local.get $x + local.get $x f32.sub f32.div return end - local.get $2 + local.get $ix i32.const 1056964608 i32.lt_u if - local.get $2 + local.get $ix i32.const 847249408 i32.le_u if @@ -936,11 +936,11 @@ return end f32.const 1.570796251296997 - local.get $0 + local.get $x f32.const 7.549789415861596e-08 - local.get $0 - local.get $0 - local.get $0 + local.get $x + local.get $x + local.get $x f32.mul call $~lib/math/Rf f32.mul @@ -949,145 +949,145 @@ f32.sub return end - local.get $1 + local.get $hx i32.const 0 i32.lt_s if f32.const 0.5 - local.get $0 + local.get $x f32.const 0.5 f32.mul f32.add - local.set $3 - local.get $3 + local.set $z + local.get $z f32.sqrt - local.set $5 - local.get $3 + local.set $s + local.get $z call $~lib/math/Rf - local.get $5 + local.get $s f32.mul f32.const 7.549789415861596e-08 f32.sub - local.set $4 + local.set $w f32.const 2 f32.const 1.570796251296997 - local.get $5 - local.get $4 + local.get $s + local.get $w f32.add f32.sub f32.mul return end f32.const 0.5 - local.get $0 + local.get $x f32.const 0.5 f32.mul f32.sub - local.set $3 - local.get $3 + local.set $z + local.get $z f32.sqrt - local.set $5 - local.get $5 + local.set $s + local.get $s i32.reinterpret_f32 - local.set $1 - local.get $1 + local.set $hx + local.get $hx i32.const -4096 i32.and f32.reinterpret_i32 - local.set $6 - local.get $3 - local.get $6 - local.get $6 + local.set $df + local.get $z + local.get $df + local.get $df f32.mul f32.sub - local.get $5 - local.get $6 + local.get $s + local.get $df f32.add f32.div - local.set $7 - local.get $3 + local.set $c + local.get $z call $~lib/math/Rf - local.get $5 + local.get $s f32.mul - local.get $7 + local.get $c f32.add - local.set $4 + local.set $w f32.const 2 - local.get $6 - local.get $4 + local.get $df + local.get $w f32.add f32.mul ) - (func $std/math/test_acosf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_acosf (param $value f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMathf.acos - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $~lib/math/NativeMath.log1p (param $0 f64) (result f64) - (local $1 i64) - (local $2 i32) - (local $3 i32) - (local $4 f64) - (local $5 f64) - (local $6 i32) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 f64) - (local $13 f64) - (local $14 f64) - (local $15 f64) - local.get $0 + (func $~lib/math/NativeMath.log1p (param $x f64) (result f64) + (local $u i64) + (local $hx i32) + (local $k i32) + (local $c f64) + (local $f f64) + (local $var$6 i32) + (local $var$7 f64) + (local $hfsq f64) + (local $s f64) + (local $z f64) + (local $w f64) + (local $t1 f64) + (local $t2 f64) + (local $r f64) + (local $dk f64) + local.get $x i64.reinterpret_f64 - local.set $1 - local.get $1 + local.set $u + local.get $u i64.const 32 i64.shr_u i32.wrap_i64 - local.set $2 + local.set $hx i32.const 1 - local.set $3 + local.set $k f64.const 0 - local.set $4 + local.set $c f64.const 0 - local.set $5 - local.get $2 + local.set $f + local.get $hx i32.const 1071284858 i32.lt_u if (result i32) i32.const 1 else - local.get $2 + local.get $hx i32.const 31 i32.shr_u end if - local.get $2 + local.get $hx i32.const -1074790400 i32.ge_u if - local.get $0 + local.get $x f64.const -1 f64.eq if - local.get $0 + local.get $x f64.const 0 f64.div return end - local.get $0 - local.get $0 + local.get $x + local.get $x f64.sub f64.const 0 f64.div return end - local.get $2 + local.get $hx i32.const 1 i32.shl i32.const 1017118720 @@ -1095,145 +1095,145 @@ i32.shl i32.lt_u if - local.get $0 + local.get $x return end - local.get $2 + local.get $hx i32.const -1076707644 i32.le_u if i32.const 0 - local.set $3 + local.set $k f64.const 0 - local.set $4 - local.get $0 - local.set $5 + local.set $c + local.get $x + local.set $f end else - local.get $2 + local.get $hx i32.const 2146435072 i32.ge_u if - local.get $0 + local.get $x return end end - local.get $3 + local.get $k if f64.const 1 - local.get $0 + local.get $x f64.add i64.reinterpret_f64 - local.set $1 - local.get $1 + local.set $u + local.get $u i64.const 32 i64.shr_u i32.wrap_i64 - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 i32.const 1072693248 i32.const 1072079006 i32.sub i32.add - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 i32.const 20 i32.shr_u i32.const 1023 i32.sub - local.set $3 - local.get $3 + local.set $k + local.get $k i32.const 54 i32.lt_s if - local.get $1 + local.get $u f64.reinterpret_i64 - local.set $7 - local.get $3 + local.set $var$7 + local.get $k i32.const 2 i32.ge_s if (result f64) f64.const 1 - local.get $7 - local.get $0 + local.get $var$7 + local.get $x f64.sub f64.sub else - local.get $0 - local.get $7 + local.get $x + local.get $var$7 f64.const 1 f64.sub f64.sub end - local.set $4 - local.get $4 - local.get $7 + local.set $c + local.get $c + local.get $var$7 f64.div - local.set $4 + local.set $c else f64.const 0 - local.set $4 + local.set $c end - local.get $6 + local.get $var$6 i32.const 1048575 i32.and i32.const 1072079006 i32.add - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 i64.extend_i32_u i64.const 32 i64.shl - local.get $1 + local.get $u i64.const 4294967295 i64.and i64.or - local.set $1 - local.get $1 + local.set $u + local.get $u f64.reinterpret_i64 f64.const 1 f64.sub - local.set $5 + local.set $f end f64.const 0.5 - local.get $5 + local.get $f f64.mul - local.get $5 + local.get $f f64.mul - local.set $8 - local.get $5 + local.set $hfsq + local.get $f f64.const 2 - local.get $5 + local.get $f f64.add f64.div - local.set $9 - local.get $9 - local.get $9 + local.set $s + local.get $s + local.get $s f64.mul - local.set $10 - local.get $10 - local.get $10 + local.set $z + local.get $z + local.get $z f64.mul - local.set $11 - local.get $11 + local.set $w + local.get $w f64.const 0.3999999999940942 - local.get $11 + local.get $w f64.const 0.22222198432149784 - local.get $11 + local.get $w f64.const 0.15313837699209373 f64.mul f64.add f64.mul f64.add f64.mul - local.set $12 - local.get $10 + local.set $t1 + local.get $z f64.const 0.6666666666666735 - local.get $11 + local.get $w f64.const 0.2857142874366239 - local.get $11 + local.get $w f64.const 0.1818357216161805 - local.get $11 + local.get $w f64.const 0.14798198605116586 f64.mul f64.add @@ -1242,64 +1242,64 @@ f64.mul f64.add f64.mul - local.set $13 - local.get $13 - local.get $12 + local.set $t2 + local.get $t2 + local.get $t1 f64.add - local.set $14 - local.get $3 + local.set $r + local.get $k f64.convert_i32_s - local.set $15 - local.get $9 - local.get $8 - local.get $14 + local.set $dk + local.get $s + local.get $hfsq + local.get $r f64.add f64.mul - local.get $15 + local.get $dk f64.const 1.9082149292705877e-10 f64.mul - local.get $4 + local.get $c f64.add f64.add - local.get $8 + local.get $hfsq f64.sub - local.get $5 + local.get $f f64.add - local.get $15 + local.get $dk f64.const 0.6931471803691238 f64.mul f64.add ) - (func $~lib/math/NativeMath.log (param $0 f64) (result f64) - (local $1 f64) - (local $2 i64) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 i32) - (local $13 i64) - (local $14 i32) - (local $15 i64) - (local $16 i64) - (local $17 f64) - (local $18 f64) + (func $~lib/math/NativeMath.log (param $x f64) (result f64) + (local $var$1 f64) + (local $var$2 i64) + (local $var$3 f64) + (local $var$4 f64) + (local $var$5 f64) + (local $var$6 f64) + (local $var$7 f64) + (local $var$8 f64) + (local $var$9 f64) + (local $var$10 f64) + (local $var$11 f64) + (local $var$12 i32) + (local $var$13 i64) + (local $var$14 i32) + (local $var$15 i64) + (local $var$16 i64) + (local $var$17 f64) + (local $var$18 f64) i32.const 0 i32.const 1 i32.lt_s drop block $~lib/util/math/log_lut|inlined.0 (result f64) - local.get $0 - local.set $1 - local.get $1 + local.get $x + local.set $var$1 + local.get $var$1 i64.reinterpret_f64 - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i64.const 4606619468846596096 i64.sub i64.const 4607473789381378048 @@ -1307,49 +1307,49 @@ i64.sub i64.lt_u if - local.get $1 + local.get $var$1 f64.const 1 f64.sub - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 f64.mul - local.set $4 - local.get $4 - local.get $3 + local.set $var$4 + local.get $var$4 + local.get $var$3 f64.mul - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 f64.const 0.3333333333333352 - local.get $3 + local.get $var$3 f64.const -0.24999999999998432 f64.mul f64.add - local.get $4 + local.get $var$4 f64.const 0.19999999999320328 f64.mul f64.add - local.get $5 + local.get $var$5 f64.const -0.16666666669929706 - local.get $3 + local.get $var$3 f64.const 0.14285715076560868 f64.mul f64.add - local.get $4 + local.get $var$4 f64.const -0.12499997863982555 f64.mul f64.add - local.get $5 + local.get $var$5 f64.const 0.11110712032936046 - local.get $3 + local.get $var$3 f64.const -0.10000486757818193 f64.mul f64.add - local.get $4 + local.get $var$4 f64.const 0.09181994006195467 f64.mul f64.add - local.get $5 + local.get $var$5 f64.const -0.08328363062289341 f64.mul f64.add @@ -1358,60 +1358,60 @@ f64.mul f64.add f64.mul - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 f64.const 134217728 f64.mul - local.set $7 - local.get $3 - local.get $7 + local.set $var$7 + local.get $var$3 + local.get $var$7 f64.add - local.get $7 + local.get $var$7 f64.sub - local.set $8 - local.get $3 - local.get $8 + local.set $var$8 + local.get $var$3 + local.get $var$8 f64.sub - local.set $9 - local.get $8 - local.get $8 + local.set $var$9 + local.get $var$8 + local.get $var$8 f64.mul f64.const -0.5 f64.mul - local.set $7 - local.get $3 - local.get $7 + local.set $var$7 + local.get $var$3 + local.get $var$7 f64.add - local.set $10 - local.get $3 - local.get $10 + local.set $var$10 + local.get $var$3 + local.get $var$10 f64.sub - local.get $7 + local.get $var$7 f64.add - local.set $11 - local.get $11 + local.set $var$11 + local.get $var$11 f64.const -0.5 - local.get $9 + local.get $var$9 f64.mul - local.get $8 - local.get $3 + local.get $var$8 + local.get $var$3 f64.add f64.mul f64.add - local.set $11 - local.get $6 - local.get $11 + local.set $var$11 + local.get $var$6 + local.get $var$11 f64.add - local.get $10 + local.get $var$10 f64.add br $~lib/util/math/log_lut|inlined.0 end - local.get $2 + local.get $var$2 i64.const 48 i64.shr_u i32.wrap_i64 - local.set $12 - local.get $12 + local.set $var$12 + local.get $var$12 i32.const 16 i32.sub i32.const 32752 @@ -1419,66 +1419,66 @@ i32.sub i32.ge_u if - local.get $2 + local.get $var$2 i64.const 1 i64.shl i64.const 0 i64.eq if f64.const -1 - local.get $1 - local.get $1 + local.get $var$1 + local.get $var$1 f64.mul f64.div br $~lib/util/math/log_lut|inlined.0 end - local.get $2 + local.get $var$2 f64.const inf i64.reinterpret_f64 i64.eq if - local.get $1 + local.get $var$1 br $~lib/util/math/log_lut|inlined.0 end - local.get $12 + local.get $var$12 i32.const 32768 i32.and if (result i32) i32.const 1 else - local.get $12 + local.get $var$12 i32.const 32752 i32.and i32.const 32752 i32.eq end if - local.get $1 - local.get $1 + local.get $var$1 + local.get $var$1 f64.sub - local.get $1 - local.get $1 + local.get $var$1 + local.get $var$1 f64.sub f64.div br $~lib/util/math/log_lut|inlined.0 end - local.get $1 + local.get $var$1 f64.const 4503599627370496 f64.mul i64.reinterpret_f64 - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i64.const 52 i64.const 52 i64.shl i64.sub - local.set $2 + local.set $var$2 end - local.get $2 + local.get $var$2 i64.const 4604367669032910848 i64.sub - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 i64.const 52 i32.const 7 i64.extend_i32_s @@ -1488,109 +1488,109 @@ i64.extend_i32_s i64.and i32.wrap_i64 - local.set $14 - local.get $13 + local.set $var$14 + local.get $var$13 i64.const 52 i64.shr_s - local.set $15 - local.get $2 - local.get $13 + local.set $var$15 + local.get $var$2 + local.get $var$13 i64.const 4095 i64.const 52 i64.shl i64.and i64.sub - local.set $16 + local.set $var$16 i32.const 64 - local.get $14 + local.get $var$14 i32.const 1 i32.const 3 i32.add i32.shl i32.add f64.load - local.set $11 + local.set $var$11 i32.const 64 - local.get $14 + local.get $var$14 i32.const 1 i32.const 3 i32.add i32.shl i32.add f64.load offset=8 - local.set $10 - local.get $16 + local.set $var$10 + local.get $var$16 f64.reinterpret_i64 - local.set $9 + local.set $var$9 i32.const 2112 - local.get $14 + local.get $var$14 i32.const 1 i32.const 3 i32.add i32.shl i32.add f64.load - local.set $8 + local.set $var$8 i32.const 2112 - local.get $14 + local.get $var$14 i32.const 1 i32.const 3 i32.add i32.shl i32.add f64.load offset=8 - local.set $7 - local.get $9 - local.get $8 + local.set $var$7 + local.get $var$9 + local.get $var$8 f64.sub - local.get $7 + local.get $var$7 f64.sub - local.get $11 + local.get $var$11 f64.mul - local.set $6 - local.get $15 + local.set $var$6 + local.get $var$15 f64.convert_i64_s - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 f64.const 0.6931471805598903 f64.mul - local.get $10 + local.get $var$10 f64.add - local.set $4 - local.get $4 - local.get $6 + local.set $var$4 + local.get $var$4 + local.get $var$6 f64.add - local.set $3 - local.get $4 - local.get $3 + local.set $var$3 + local.get $var$4 + local.get $var$3 f64.sub - local.get $6 + local.get $var$6 f64.add - local.get $5 + local.get $var$5 f64.const 5.497923018708371e-14 f64.mul f64.add - local.set $17 - local.get $6 - local.get $6 + local.set $var$17 + local.get $var$6 + local.get $var$6 f64.mul - local.set $18 - local.get $17 - local.get $18 + local.set $var$18 + local.get $var$17 + local.get $var$18 f64.const -0.5000000000000001 f64.mul f64.add - local.get $6 - local.get $18 + local.get $var$6 + local.get $var$18 f64.mul f64.const 0.33333333331825593 - local.get $6 + local.get $var$6 f64.const -0.2499999999622955 f64.mul f64.add - local.get $18 + local.get $var$18 f64.const 0.20000304511814496 - local.get $6 + local.get $var$6 f64.const -0.16667054827627667 f64.mul f64.add @@ -1598,52 +1598,52 @@ f64.add f64.mul f64.add - local.get $3 + local.get $var$3 f64.add end return ) - (func $~lib/math/NativeMath.acosh (param $0 f64) (result f64) - (local $1 i64) - (local $2 i64) - local.get $0 + (func $~lib/math/NativeMath.acosh (param $x f64) (result f64) + (local $u i64) + (local $e i64) + local.get $x i64.reinterpret_f64 - local.set $1 - local.get $1 + local.set $u + local.get $u i64.const 4607182418800017408 i64.lt_s if - local.get $0 - local.get $0 + local.get $x + local.get $x f64.sub f64.const 0 f64.div return end - local.get $1 + local.get $u i64.const 52 i64.shr_u i64.const 2047 i64.and - local.set $2 - local.get $2 + local.set $e + local.get $e i64.const 1023 i64.const 1 i64.add i64.lt_u if - local.get $0 + local.get $x f64.const 1 f64.sub - local.get $0 + local.get $x f64.const 1 f64.sub - local.get $0 + local.get $x f64.const 1 f64.sub f64.mul f64.const 2 - local.get $0 + local.get $x f64.const 1 f64.sub f64.mul @@ -1653,19 +1653,19 @@ call $~lib/math/NativeMath.log1p return end - local.get $2 + local.get $e i64.const 1023 i64.const 26 i64.add i64.lt_u if f64.const 2 - local.get $0 + local.get $x f64.mul f64.const 1 - local.get $0 - local.get $0 - local.get $0 + local.get $x + local.get $x + local.get $x f64.mul f64.const 1 f64.sub @@ -1676,85 +1676,85 @@ call $~lib/math/NativeMath.log return end - local.get $0 + local.get $x call $~lib/math/NativeMath.log f64.const 0.6931471805599453 f64.add ) - (func $std/math/test_acosh (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_acosh (param $value f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMath.acosh - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check if (result i32) - local.get $0 + local.get $value call $~lib/bindings/dom/Math.acosh - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check else i32.const 0 end ) - (func $~lib/math/NativeMathf.log1p (param $0 f32) (result f32) - (local $1 i32) - (local $2 f32) - (local $3 f32) - (local $4 i32) - (local $5 f32) - (local $6 i32) - (local $7 f32) - (local $8 f32) - (local $9 f32) - (local $10 f32) - (local $11 f32) - (local $12 f32) - (local $13 f32) - (local $14 f32) - local.get $0 + (func $~lib/math/NativeMathf.log1p (param $x f32) (result f32) + (local $ix i32) + (local $c f32) + (local $f f32) + (local $k i32) + (local $var$5 f32) + (local $var$6 i32) + (local $s f32) + (local $z f32) + (local $w f32) + (local $t1 f32) + (local $t2 f32) + (local $r f32) + (local $hfsq f32) + (local $dk f32) + local.get $x i32.reinterpret_f32 - local.set $1 + local.set $ix f32.const 0 - local.set $2 + local.set $c f32.const 0 - local.set $3 + local.set $f i32.const 1 - local.set $4 - local.get $1 + local.set $k + local.get $ix i32.const 1054086096 i32.lt_u if (result i32) i32.const 1 else - local.get $1 + local.get $ix i32.const 31 i32.shr_u end if - local.get $1 + local.get $ix i32.const -1082130432 i32.ge_u if - local.get $0 + local.get $x f32.const -1 f32.eq if - local.get $0 + local.get $x f32.const 0 f32.div return end - local.get $0 - local.get $0 + local.get $x + local.get $x f32.sub f32.const 0 f32.div return end - local.get $1 + local.get $ix i32.const 1 i32.shl i32.const 864026624 @@ -1762,179 +1762,179 @@ i32.shl i32.lt_u if - local.get $0 + local.get $x return end - local.get $1 + local.get $ix i32.const -1097468391 i32.le_u if i32.const 0 - local.set $4 + local.set $k f32.const 0 - local.set $2 - local.get $0 - local.set $3 + local.set $c + local.get $x + local.set $f end else - local.get $1 + local.get $ix i32.const 2139095040 i32.ge_u if - local.get $0 + local.get $x return end end - local.get $4 + local.get $k if f32.const 1 - local.get $0 + local.get $x f32.add - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.reinterpret_f32 - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 i32.const 1065353216 i32.const 1060439283 i32.sub i32.add - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 i32.const 23 i32.shr_u i32.const 127 i32.sub - local.set $4 - local.get $4 + local.set $k + local.get $k i32.const 25 i32.lt_s if - local.get $4 + local.get $k i32.const 2 i32.ge_s if (result f32) f32.const 1 - local.get $5 - local.get $0 + local.get $var$5 + local.get $x f32.sub f32.sub else - local.get $0 - local.get $5 + local.get $x + local.get $var$5 f32.const 1 f32.sub f32.sub end - local.set $2 - local.get $2 - local.get $5 + local.set $c + local.get $c + local.get $var$5 f32.div - local.set $2 + local.set $c else f32.const 0 - local.set $2 + local.set $c end - local.get $6 + local.get $var$6 i32.const 8388607 i32.and i32.const 1060439283 i32.add - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 f32.reinterpret_i32 f32.const 1 f32.sub - local.set $3 + local.set $f end - local.get $3 + local.get $f f32.const 2 - local.get $3 + local.get $f f32.add f32.div - local.set $7 - local.get $7 - local.get $7 + local.set $s + local.get $s + local.get $s f32.mul - local.set $8 - local.get $8 - local.get $8 + local.set $z + local.get $z + local.get $z f32.mul - local.set $9 - local.get $9 + local.set $w + local.get $w f32.const 0.40000972151756287 - local.get $9 + local.get $w f32.const 0.24279078841209412 f32.mul f32.add f32.mul - local.set $10 - local.get $8 + local.set $t1 + local.get $z f32.const 0.6666666269302368 - local.get $9 + local.get $w f32.const 0.2849878668785095 f32.mul f32.add f32.mul - local.set $11 - local.get $11 - local.get $10 + local.set $t2 + local.get $t2 + local.get $t1 f32.add - local.set $12 + local.set $r f32.const 0.5 - local.get $3 + local.get $f f32.mul - local.get $3 + local.get $f f32.mul - local.set $13 - local.get $4 + local.set $hfsq + local.get $k f32.convert_i32_s - local.set $14 - local.get $7 - local.get $13 - local.get $12 + local.set $dk + local.get $s + local.get $hfsq + local.get $r f32.add f32.mul - local.get $14 + local.get $dk f32.const 9.05800061445916e-06 f32.mul - local.get $2 + local.get $c f32.add f32.add - local.get $13 + local.get $hfsq f32.sub - local.get $3 + local.get $f f32.add - local.get $14 + local.get $dk f32.const 0.6931381225585938 f32.mul f32.add ) - (func $~lib/math/NativeMathf.log (param $0 f32) (result f32) - (local $1 f32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 f64) - (local $13 f64) + (func $~lib/math/NativeMathf.log (param $x f32) (result f32) + (local $var$1 f32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 f64) + (local $var$8 f64) + (local $var$9 f64) + (local $var$10 f64) + (local $var$11 f64) + (local $var$12 f64) + (local $var$13 f64) i32.const 0 i32.const 1 i32.lt_s drop block $~lib/util/math/logf_lut|inlined.0 (result f32) - local.get $0 - local.set $1 - local.get $1 + local.get $x + local.set $var$1 + local.get $var$1 i32.reinterpret_f32 - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const 8388608 i32.sub i32.const 2139095040 @@ -1942,7 +1942,7 @@ i32.sub i32.ge_u if - local.get $2 + local.get $var$2 i32.const 1 i32.shl i32.const 0 @@ -1952,147 +1952,147 @@ f32.neg br $~lib/util/math/logf_lut|inlined.0 end - local.get $2 + local.get $var$2 i32.const 2139095040 i32.eq if - local.get $1 + local.get $var$1 br $~lib/util/math/logf_lut|inlined.0 end - local.get $2 + local.get $var$2 i32.const 31 i32.shr_u if (result i32) i32.const 1 else - local.get $2 + local.get $var$2 i32.const 1 i32.shl i32.const -16777216 i32.ge_u end if - local.get $1 - local.get $1 + local.get $var$1 + local.get $var$1 f32.sub - local.get $1 - local.get $1 + local.get $var$1 + local.get $var$1 f32.sub f32.div br $~lib/util/math/logf_lut|inlined.0 end - local.get $1 + local.get $var$1 f32.const 8388608 f32.mul i32.reinterpret_f32 - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const 23 i32.const 23 i32.shl i32.sub - local.set $2 + local.set $var$2 end - local.get $2 + local.get $var$2 i32.const 1060306944 i32.sub - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const 23 i32.const 4 i32.sub i32.shr_u i32.const 15 i32.and - local.set $4 - local.get $3 + local.set $var$4 + local.get $var$3 i32.const 23 i32.shr_s - local.set $5 - local.get $2 - local.get $3 + local.set $var$5 + local.get $var$2 + local.get $var$3 i32.const 511 i32.const 23 i32.shl i32.and i32.sub - local.set $6 + local.set $var$6 i32.const 4160 - local.get $4 + local.get $var$4 i32.const 1 i32.const 3 i32.add i32.shl i32.add f64.load - local.set $7 + local.set $var$7 i32.const 4160 - local.get $4 + local.get $var$4 i32.const 1 i32.const 3 i32.add i32.shl i32.add f64.load offset=8 - local.set $8 - local.get $6 + local.set $var$8 + local.get $var$6 f32.reinterpret_i32 f64.promote_f32 - local.set $9 - local.get $9 - local.get $7 + local.set $var$9 + local.get $var$9 + local.get $var$7 f64.mul f64.const 1 f64.sub - local.set $10 - local.get $8 - local.get $5 + local.set $var$10 + local.get $var$8 + local.get $var$5 f64.convert_i32_s f64.const 0.6931471805599453 f64.mul f64.add - local.set $11 - local.get $10 - local.get $10 + local.set $var$11 + local.get $var$10 + local.get $var$10 f64.mul - local.set $12 + local.set $var$12 f64.const 0.333456765744066 - local.get $10 + local.get $var$10 f64.mul f64.const -0.4999997485802103 f64.add - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 f64.const -0.25089342214237154 - local.get $12 + local.get $var$12 f64.mul f64.add - local.set $13 - local.get $13 - local.get $12 + local.set $var$13 + local.get $var$13 + local.get $var$12 f64.mul - local.get $11 - local.get $10 + local.get $var$11 + local.get $var$10 f64.add f64.add - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 f32.demote_f64 end return ) - (func $~lib/math/NativeMathf.acosh (param $0 f32) (result f32) - (local $1 i32) - (local $2 i32) - (local $3 f32) - local.get $0 + (func $~lib/math/NativeMathf.acosh (param $x f32) (result f32) + (local $u i32) + (local $a i32) + (local $var$3 f32) + local.get $x i32.reinterpret_f32 - local.set $1 - local.get $1 + local.set $u + local.get $u i32.const 2147483647 i32.and - local.set $2 - local.get $2 + local.set $a + local.get $a i32.const 1065353216 i32.const 1 i32.const 23 @@ -2100,13 +2100,13 @@ i32.add i32.lt_u if - local.get $0 + local.get $x f32.const 1 f32.sub - local.set $3 - local.get $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 + local.get $var$3 f32.const 2 f32.add f32.mul @@ -2115,7 +2115,7 @@ call $~lib/math/NativeMathf.log1p return end - local.get $1 + local.get $u i32.const 1065353216 i32.const 12 i32.const 23 @@ -2124,12 +2124,12 @@ i32.lt_u if f32.const 2 - local.get $0 + local.get $x f32.mul f32.const 1 - local.get $0 - local.get $0 - local.get $0 + local.get $x + local.get $x + local.get $x f32.mul f32.const 1 f32.sub @@ -2140,55 +2140,55 @@ call $~lib/math/NativeMathf.log return end - local.get $0 + local.get $x call $~lib/math/NativeMathf.log f32.const 0.6931471824645996 f32.add ) - (func $std/math/test_acoshf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_acoshf (param $value f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMathf.acosh - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $~lib/math/NativeMath.asin (param $0 f64) (result f64) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - local.get $0 + (func $~lib/math/NativeMath.asin (param $x f64) (result f64) + (local $hx i32) + (local $ix i32) + (local $var$3 i32) + (local $z f64) + (local $s f64) + (local $r f64) + (local $var$7 f64) + (local $var$8 f64) + local.get $x i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $1 - local.get $1 + local.set $hx + local.get $hx i32.const 2147483647 i32.and - local.set $2 - local.get $2 + local.set $ix + local.get $ix i32.const 1072693248 i32.ge_u if - local.get $0 + local.get $x i64.reinterpret_f64 i32.wrap_i64 - local.set $3 - local.get $2 + local.set $var$3 + local.get $ix i32.const 1072693248 i32.sub - local.get $3 + local.get $var$3 i32.or i32.const 0 i32.eq if - local.get $0 + local.get $x f64.const 1.5707963267948966 f64.mul f32.const 7.52316384526264e-37 @@ -2197,34 +2197,34 @@ return end f64.const 0 - local.get $0 - local.get $0 + local.get $x + local.get $x f64.sub f64.div return end - local.get $2 + local.get $ix i32.const 1071644672 i32.lt_u if - local.get $2 + local.get $ix i32.const 1045430272 i32.lt_u if (result i32) - local.get $2 + local.get $ix i32.const 1048576 i32.ge_u else i32.const 0 end if - local.get $0 + local.get $x return end - local.get $0 - local.get $0 - local.get $0 - local.get $0 + local.get $x + local.get $x + local.get $x + local.get $x f64.mul call $~lib/math/R f64.mul @@ -2232,62 +2232,62 @@ return end f64.const 0.5 - local.get $0 + local.get $x f64.abs f64.const 0.5 f64.mul f64.sub - local.set $4 - local.get $4 + local.set $z + local.get $z f64.sqrt - local.set $5 - local.get $4 + local.set $s + local.get $z call $~lib/math/R - local.set $6 - local.get $2 + local.set $r + local.get $ix i32.const 1072640819 i32.ge_u if f64.const 1.5707963267948966 f64.const 2 - local.get $5 - local.get $5 - local.get $6 + local.get $s + local.get $s + local.get $r f64.mul f64.add f64.mul f64.const 6.123233995736766e-17 f64.sub f64.sub - local.set $0 + local.set $x else - local.get $5 + local.get $s i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $7 - local.get $4 - local.get $7 - local.get $7 + local.set $var$7 + local.get $z + local.get $var$7 + local.get $var$7 f64.mul f64.sub - local.get $5 - local.get $7 + local.get $s + local.get $var$7 f64.add f64.div - local.set $8 + local.set $var$8 f64.const 0.5 f64.const 1.5707963267948966 f64.mul f64.const 2 - local.get $5 + local.get $s f64.mul - local.get $6 + local.get $r f64.mul f64.const 6.123233995736766e-17 f64.const 2 - local.get $8 + local.get $var$8 f64.mul f64.sub f64.sub @@ -2295,60 +2295,60 @@ f64.const 1.5707963267948966 f64.mul f64.const 2 - local.get $7 + local.get $var$7 f64.mul f64.sub f64.sub f64.sub - local.set $0 + local.set $x end - local.get $0 + local.get $x f64.neg - local.get $0 - local.get $1 + local.get $x + local.get $hx i32.const 0 i32.lt_s select ) - (func $std/math/test_asin (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_asin (param $value f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMath.asin - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check if (result i32) - local.get $0 + local.get $value call $~lib/bindings/dom/Math.asin - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check else i32.const 0 end ) - (func $~lib/math/NativeMathf.asin (param $0 f32) (result f32) - (local $1 f32) - (local $2 i32) - (local $3 f32) - (local $4 f64) - local.get $0 - local.set $1 - local.get $0 + (func $~lib/math/NativeMathf.asin (param $x f32) (result f32) + (local $sx f32) + (local $hx i32) + (local $z f32) + (local $s f64) + local.get $x + local.set $sx + local.get $x i32.reinterpret_f32 i32.const 2147483647 i32.and - local.set $2 - local.get $2 + local.set $hx + local.get $hx i32.const 1065353216 i32.ge_u if - local.get $2 + local.get $hx i32.const 1065353216 i32.eq if - local.get $0 + local.get $x f32.const 1.5707963705062866 f32.mul f32.const 7.52316384526264e-37 @@ -2356,34 +2356,34 @@ return end f32.const 0 - local.get $0 - local.get $0 + local.get $x + local.get $x f32.sub f32.div return end - local.get $2 + local.get $hx i32.const 1056964608 i32.lt_u if - local.get $2 + local.get $hx i32.const 964689920 i32.lt_u if (result i32) - local.get $2 + local.get $hx i32.const 8388608 i32.ge_u else i32.const 0 end if - local.get $0 + local.get $x return end - local.get $0 - local.get $0 - local.get $0 - local.get $0 + local.get $x + local.get $x + local.get $x + local.get $x f32.mul call $~lib/math/Rf f32.mul @@ -2391,23 +2391,23 @@ return end f32.const 0.5 - local.get $0 + local.get $x f32.abs f32.const 0.5 f32.mul f32.sub - local.set $3 - local.get $3 + local.set $z + local.get $z f64.promote_f32 f64.sqrt - local.set $4 + local.set $s f32.const 1.5707963705062866 f64.promote_f32 f32.const 2 f64.promote_f32 - local.get $4 - local.get $4 - local.get $3 + local.get $s + local.get $s + local.get $z call $~lib/math/Rf f64.promote_f32 f64.mul @@ -2415,84 +2415,84 @@ f64.mul f64.sub f32.demote_f64 - local.set $0 - local.get $0 - local.get $1 + local.set $x + local.get $x + local.get $sx f32.copysign ) - (func $std/math/test_asinf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_asinf (param $value f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMathf.asin - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $~lib/math/NativeMath.asinh (param $0 f64) (result f64) - (local $1 i64) - (local $2 i64) - (local $3 f64) - local.get $0 + (func $~lib/math/NativeMath.asinh (param $x f64) (result f64) + (local $u i64) + (local $e i64) + (local $y f64) + local.get $x i64.reinterpret_f64 - local.set $1 - local.get $1 + local.set $u + local.get $u i64.const 52 i64.shr_u i64.const 2047 i64.and - local.set $2 - local.get $1 + local.set $e + local.get $u i64.const 9223372036854775807 i64.and f64.reinterpret_i64 - local.set $3 - local.get $2 + local.set $y + local.get $e i64.const 1023 i64.const 26 i64.add i64.ge_u if - local.get $3 + local.get $y call $~lib/math/NativeMath.log f64.const 0.6931471805599453 f64.add - local.set $3 + local.set $y else - local.get $2 + local.get $e i64.const 1023 i64.const 1 i64.add i64.ge_u if f64.const 2 - local.get $3 + local.get $y f64.mul f64.const 1 - local.get $3 - local.get $3 + local.get $y + local.get $y f64.mul f64.const 1 f64.add f64.sqrt - local.get $3 + local.get $y f64.add f64.div f64.add call $~lib/math/NativeMath.log - local.set $3 + local.set $y else - local.get $2 + local.get $e i64.const 1023 i64.const 26 i64.sub i64.ge_u if - local.get $3 - local.get $3 - local.get $3 + local.get $y + local.get $y + local.get $y f64.mul - local.get $3 - local.get $3 + local.get $y + local.get $y f64.mul f64.const 1 f64.add @@ -2502,44 +2502,44 @@ f64.div f64.add call $~lib/math/NativeMath.log1p - local.set $3 + local.set $y end end end - local.get $3 - local.get $0 + local.get $y + local.get $x f64.copysign ) - (func $std/math/test_asinh (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_asinh (param $value f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMath.asinh - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check if (result i32) - local.get $0 + local.get $value call $~lib/bindings/dom/Math.asinh - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check else i32.const 0 end ) - (func $~lib/math/NativeMathf.asinh (param $0 f32) (result f32) - (local $1 i32) - (local $2 f32) - local.get $0 + (func $~lib/math/NativeMathf.asinh (param $x f32) (result f32) + (local $u i32) + (local $y f32) + local.get $x i32.reinterpret_f32 i32.const 2147483647 i32.and - local.set $1 - local.get $1 + local.set $u + local.get $u f32.reinterpret_i32 - local.set $2 - local.get $1 + local.set $y + local.get $u i32.const 1065353216 i32.const 12 i32.const 23 @@ -2547,13 +2547,13 @@ i32.add i32.ge_u if - local.get $2 + local.get $y call $~lib/math/NativeMathf.log f32.const 0.6931471824645996 f32.add - local.set $2 + local.set $y else - local.get $1 + local.get $u i32.const 1065353216 i32.const 1 i32.const 23 @@ -2562,23 +2562,23 @@ i32.ge_u if f32.const 2 - local.get $2 + local.get $y f32.mul f32.const 1 - local.get $2 - local.get $2 + local.get $y + local.get $y f32.mul f32.const 1 f32.add f32.sqrt - local.get $2 + local.get $y f32.add f32.div f32.add call $~lib/math/NativeMathf.log - local.set $2 + local.set $y else - local.get $1 + local.get $u i32.const 1065353216 i32.const 12 i32.const 23 @@ -2586,12 +2586,12 @@ i32.sub i32.ge_u if - local.get $2 - local.get $2 - local.get $2 + local.get $y + local.get $y + local.get $y f32.mul - local.get $2 - local.get $2 + local.get $y + local.get $y f32.mul f32.const 1 f32.add @@ -2601,160 +2601,160 @@ f32.div f32.add call $~lib/math/NativeMathf.log1p - local.set $2 + local.set $y end end end - local.get $2 - local.get $0 + local.get $y + local.get $x f32.copysign ) - (func $std/math/test_asinhf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_asinhf (param $value f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMathf.asinh - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $~lib/math/NativeMath.atan (param $0 f64) (result f64) - (local $1 i32) - (local $2 f64) - (local $3 f64) - (local $4 i32) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 i32) - local.get $0 + (func $~lib/math/NativeMath.atan (param $x f64) (result f64) + (local $ix i32) + (local $sx f64) + (local $z f64) + (local $id i32) + (local $w f64) + (local $s1 f64) + (local $s2 f64) + (local $s3 f64) + (local $var$9 i32) + local.get $x i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $1 - local.get $0 - local.set $2 - local.get $1 + local.set $ix + local.get $x + local.set $sx + local.get $ix i32.const 2147483647 i32.and - local.set $1 - local.get $1 + local.set $ix + local.get $ix i32.const 1141899264 i32.ge_u if - local.get $0 - local.get $0 + local.get $x + local.get $x f64.ne if - local.get $0 + local.get $x return end f64.const 1.5707963267948966 f32.const 7.52316384526264e-37 f64.promote_f32 f64.add - local.set $3 - local.get $3 - local.get $2 + local.set $z + local.get $z + local.get $sx f64.copysign return end - local.get $1 + local.get $ix i32.const 1071382528 i32.lt_u if - local.get $1 + local.get $ix i32.const 1044381696 i32.lt_u if - local.get $0 + local.get $x return end i32.const -1 - local.set $4 + local.set $id else - local.get $0 + local.get $x f64.abs - local.set $0 - local.get $1 + local.set $x + local.get $ix i32.const 1072889856 i32.lt_u if - local.get $1 + local.get $ix i32.const 1072037888 i32.lt_u if i32.const 0 - local.set $4 + local.set $id f64.const 2 - local.get $0 + local.get $x f64.mul f64.const 1 f64.sub f64.const 2 - local.get $0 + local.get $x f64.add f64.div - local.set $0 + local.set $x else i32.const 1 - local.set $4 - local.get $0 + local.set $id + local.get $x f64.const 1 f64.sub - local.get $0 + local.get $x f64.const 1 f64.add f64.div - local.set $0 + local.set $x end else - local.get $1 + local.get $ix i32.const 1073971200 i32.lt_u if i32.const 2 - local.set $4 - local.get $0 + local.set $id + local.get $x f64.const 1.5 f64.sub f64.const 1 f64.const 1.5 - local.get $0 + local.get $x f64.mul f64.add f64.div - local.set $0 + local.set $x else i32.const 3 - local.set $4 + local.set $id f64.const -1 - local.get $0 + local.get $x f64.div - local.set $0 + local.set $x end end end - local.get $0 - local.get $0 + local.get $x + local.get $x f64.mul - local.set $3 - local.get $3 - local.get $3 + local.set $z + local.get $z + local.get $z f64.mul - local.set $5 - local.get $3 + local.set $w + local.get $z f64.const 0.3333333333333293 - local.get $5 + local.get $w f64.const 0.14285714272503466 - local.get $5 + local.get $w f64.const 0.09090887133436507 - local.get $5 + local.get $w f64.const 0.06661073137387531 - local.get $5 + local.get $w f64.const 0.049768779946159324 - local.get $5 + local.get $w f64.const 0.016285820115365782 f64.mul f64.add @@ -2767,16 +2767,16 @@ f64.mul f64.add f64.mul - local.set $6 - local.get $5 + local.set $s1 + local.get $w f64.const -0.19999999999876483 - local.get $5 + local.get $w f64.const -0.11111110405462356 - local.get $5 + local.get $w f64.const -0.0769187620504483 - local.get $5 + local.get $w f64.const -0.058335701337905735 - local.get $5 + local.get $w f64.const -0.036531572744216916 f64.mul f64.add @@ -2787,19 +2787,19 @@ f64.mul f64.add f64.mul - local.set $7 - local.get $0 - local.get $6 - local.get $7 + local.set $s2 + local.get $x + local.get $s1 + local.get $s2 f64.add f64.mul - local.set $8 - local.get $4 + local.set $s3 + local.get $id i32.const 0 i32.lt_s if - local.get $0 - local.get $8 + local.get $x + local.get $s3 f64.sub return end @@ -2809,245 +2809,245 @@ block $case2|0 block $case1|0 block $case0|0 - local.get $4 - local.set $9 - local.get $9 + local.get $id + local.set $var$9 + local.get $var$9 i32.const 0 i32.eq br_if $case0|0 - local.get $9 + local.get $var$9 i32.const 1 i32.eq br_if $case1|0 - local.get $9 + local.get $var$9 i32.const 2 i32.eq br_if $case2|0 - local.get $9 + local.get $var$9 i32.const 3 i32.eq br_if $case3|0 br $case4|0 end f64.const 0.4636476090008061 - local.get $8 + local.get $s3 f64.const 2.2698777452961687e-17 f64.sub - local.get $0 + local.get $x f64.sub f64.sub - local.set $3 + local.set $z br $break|0 end f64.const 0.7853981633974483 - local.get $8 + local.get $s3 f64.const 3.061616997868383e-17 f64.sub - local.get $0 + local.get $x f64.sub f64.sub - local.set $3 + local.set $z br $break|0 end f64.const 0.982793723247329 - local.get $8 + local.get $s3 f64.const 1.3903311031230998e-17 f64.sub - local.get $0 + local.get $x f64.sub f64.sub - local.set $3 + local.set $z br $break|0 end f64.const 1.5707963267948966 - local.get $8 + local.get $s3 f64.const 6.123233995736766e-17 f64.sub - local.get $0 + local.get $x f64.sub f64.sub - local.set $3 + local.set $z br $break|0 end unreachable end - local.get $3 - local.get $2 + local.get $z + local.get $sx f64.copysign ) - (func $std/math/test_atan (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_atan (param $value f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMath.atan - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check if (result i32) - local.get $0 + local.get $value call $~lib/bindings/dom/Math.atan - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check else i32.const 0 end ) - (func $~lib/math/NativeMathf.atan (param $0 f32) (result f32) - (local $1 i32) - (local $2 f32) - (local $3 f32) - (local $4 i32) - (local $5 f32) - (local $6 f32) - (local $7 f32) - (local $8 f32) - (local $9 i32) - local.get $0 + (func $~lib/math/NativeMathf.atan (param $x f32) (result f32) + (local $ix i32) + (local $sx f32) + (local $z f32) + (local $id i32) + (local $w f32) + (local $s1 f32) + (local $s2 f32) + (local $s3 f32) + (local $var$9 i32) + local.get $x i32.reinterpret_f32 - local.set $1 - local.get $0 - local.set $2 - local.get $1 + local.set $ix + local.get $x + local.set $sx + local.get $ix i32.const 2147483647 i32.and - local.set $1 - local.get $1 + local.set $ix + local.get $ix i32.const 1283457024 i32.ge_u if - local.get $0 - local.get $0 + local.get $x + local.get $x f32.ne if - local.get $0 + local.get $x return end f32.const 1.570796251296997 f32.const 7.52316384526264e-37 f32.add - local.set $3 - local.get $3 - local.get $2 + local.set $z + local.get $z + local.get $sx f32.copysign return end - local.get $1 + local.get $ix i32.const 1054867456 i32.lt_u if - local.get $1 + local.get $ix i32.const 964689920 i32.lt_u if - local.get $0 + local.get $x return end i32.const -1 - local.set $4 + local.set $id else - local.get $0 + local.get $x f32.abs - local.set $0 - local.get $1 + local.set $x + local.get $ix i32.const 1066926080 i32.lt_u if - local.get $1 + local.get $ix i32.const 1060110336 i32.lt_u if i32.const 0 - local.set $4 + local.set $id f32.const 2 - local.get $0 + local.get $x f32.mul f32.const 1 f32.sub f32.const 2 - local.get $0 + local.get $x f32.add f32.div - local.set $0 + local.set $x else i32.const 1 - local.set $4 - local.get $0 + local.set $id + local.get $x f32.const 1 f32.sub - local.get $0 + local.get $x f32.const 1 f32.add f32.div - local.set $0 + local.set $x end else - local.get $1 + local.get $ix i32.const 1075576832 i32.lt_u if i32.const 2 - local.set $4 - local.get $0 + local.set $id + local.get $x f32.const 1.5 f32.sub f32.const 1 f32.const 1.5 - local.get $0 + local.get $x f32.mul f32.add f32.div - local.set $0 + local.set $x else i32.const 3 - local.set $4 + local.set $id f32.const -1 - local.get $0 + local.get $x f32.div - local.set $0 + local.set $x end end end - local.get $0 - local.get $0 + local.get $x + local.get $x f32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $z + local.get $z + local.get $z f32.mul - local.set $5 - local.get $3 + local.set $w + local.get $z f32.const 0.333333283662796 - local.get $5 + local.get $w f32.const 0.14253635704517365 - local.get $5 + local.get $w f32.const 0.06168760731816292 f32.mul f32.add f32.mul f32.add f32.mul - local.set $6 - local.get $5 + local.set $s1 + local.get $w f32.const -0.19999158382415771 - local.get $5 + local.get $w f32.const -0.106480173766613 f32.mul f32.add f32.mul - local.set $7 - local.get $0 - local.get $6 - local.get $7 + local.set $s2 + local.get $x + local.get $s1 + local.get $s2 f32.add f32.mul - local.set $8 - local.get $4 + local.set $s3 + local.get $id i32.const 0 i32.lt_s if - local.get $0 - local.get $8 + local.get $x + local.get $s3 f32.sub return end @@ -3057,103 +3057,103 @@ block $case2|0 block $case1|0 block $case0|0 - local.get $4 - local.set $9 - local.get $9 + local.get $id + local.set $var$9 + local.get $var$9 i32.const 0 i32.eq br_if $case0|0 - local.get $9 + local.get $var$9 i32.const 1 i32.eq br_if $case1|0 - local.get $9 + local.get $var$9 i32.const 2 i32.eq br_if $case2|0 - local.get $9 + local.get $var$9 i32.const 3 i32.eq br_if $case3|0 br $case4|0 end f32.const 0.46364760398864746 - local.get $8 + local.get $s3 f32.const 5.01215824399992e-09 f32.sub - local.get $0 + local.get $x f32.sub f32.sub - local.set $3 + local.set $z br $break|0 end f32.const 0.7853981256484985 - local.get $8 + local.get $s3 f32.const 3.774894707930798e-08 f32.sub - local.get $0 + local.get $x f32.sub f32.sub - local.set $3 + local.set $z br $break|0 end f32.const 0.9827936887741089 - local.get $8 + local.get $s3 f32.const 3.447321716976148e-08 f32.sub - local.get $0 + local.get $x f32.sub f32.sub - local.set $3 + local.set $z br $break|0 end f32.const 1.570796251296997 - local.get $8 + local.get $s3 f32.const 7.549789415861596e-08 f32.sub - local.get $0 + local.get $x f32.sub f32.sub - local.set $3 + local.set $z br $break|0 end unreachable end - local.get $3 - local.get $2 + local.get $z + local.get $sx f32.copysign ) - (func $std/math/test_atanf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_atanf (param $value f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMathf.atan - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $~lib/math/NativeMath.atanh (param $0 f64) (result f64) - (local $1 i64) - (local $2 i64) - (local $3 f64) - local.get $0 + (func $~lib/math/NativeMath.atanh (param $x f64) (result f64) + (local $u i64) + (local $e i64) + (local $y f64) + local.get $x i64.reinterpret_f64 - local.set $1 - local.get $1 + local.set $u + local.get $u i64.const 52 i64.shr_u i64.const 2047 i64.and - local.set $2 - local.get $0 + local.set $e + local.get $x f64.abs - local.set $3 - local.get $2 + local.set $y + local.get $e i64.const 1023 i64.const 1 i64.sub i64.lt_u if - local.get $2 + local.get $e i64.const 1023 i64.const 32 i64.sub @@ -3161,67 +3161,67 @@ if f64.const 0.5 f64.const 2 - local.get $3 + local.get $y f64.mul f64.const 2 - local.get $3 + local.get $y f64.mul - local.get $3 + local.get $y f64.mul f64.const 1 - local.get $3 + local.get $y f64.sub f64.div f64.add call $~lib/math/NativeMath.log1p f64.mul - local.set $3 + local.set $y end else f64.const 0.5 f64.const 2 - local.get $3 + local.get $y f64.const 1 - local.get $3 + local.get $y f64.sub f64.div f64.mul call $~lib/math/NativeMath.log1p f64.mul - local.set $3 + local.set $y end - local.get $3 - local.get $0 + local.get $y + local.get $x f64.copysign ) - (func $std/math/test_atanh (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_atanh (param $value f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMath.atanh - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check if (result i32) - local.get $0 + local.get $value call $~lib/bindings/dom/Math.atanh - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check else i32.const 0 end ) - (func $~lib/math/NativeMathf.atanh (param $0 f32) (result f32) - (local $1 i32) - (local $2 f32) - local.get $0 + (func $~lib/math/NativeMathf.atanh (param $x f32) (result f32) + (local $u i32) + (local $y f32) + local.get $x i32.reinterpret_f32 - local.set $1 - local.get $0 + local.set $u + local.get $x f32.abs - local.set $2 - local.get $1 + local.set $y + local.get $u i32.const 1065353216 i32.const 1 i32.const 23 @@ -3229,7 +3229,7 @@ i32.sub i32.lt_u if - local.get $1 + local.get $u i32.const 1065353216 i32.const 32 i32.const 23 @@ -3239,127 +3239,127 @@ if f32.const 0.5 f32.const 2 - local.get $2 + local.get $y f32.mul f32.const 1 - local.get $2 + local.get $y f32.const 1 - local.get $2 + local.get $y f32.sub f32.div f32.add f32.mul call $~lib/math/NativeMathf.log1p f32.mul - local.set $2 + local.set $y end else f32.const 0.5 f32.const 2 - local.get $2 + local.get $y f32.const 1 - local.get $2 + local.get $y f32.sub f32.div f32.mul call $~lib/math/NativeMathf.log1p f32.mul - local.set $2 + local.set $y end - local.get $2 - local.get $0 + local.get $y + local.get $x f32.copysign ) - (func $std/math/test_atanhf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_atanhf (param $value f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMathf.atanh - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $~lib/math/NativeMath.atan2 (param $0 f64) (param $1 f64) (result f64) - (local $2 i64) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 f64) - (local $10 f64) - local.get $1 - local.get $1 + (func $~lib/math/NativeMath.atan2 (param $y f64) (param $x f64) (result f64) + (local $u i64) + (local $ix i32) + (local $lx i32) + (local $iy i32) + (local $ly i32) + (local $m i32) + (local $var$8 i32) + (local $var$9 f64) + (local $z f64) + local.get $x + local.get $x f64.ne if (result i32) i32.const 1 else - local.get $0 - local.get $0 + local.get $y + local.get $y f64.ne end if - local.get $1 - local.get $0 + local.get $x + local.get $y f64.add return end - local.get $1 + local.get $x i64.reinterpret_f64 - local.set $2 - local.get $2 + local.set $u + local.get $u i64.const 32 i64.shr_u i32.wrap_i64 - local.set $3 - local.get $2 + local.set $ix + local.get $u i32.wrap_i64 - local.set $4 - local.get $0 + local.set $lx + local.get $y i64.reinterpret_f64 - local.set $2 - local.get $2 + local.set $u + local.get $u i64.const 32 i64.shr_u i32.wrap_i64 - local.set $5 - local.get $2 + local.set $iy + local.get $u i32.wrap_i64 - local.set $6 - local.get $3 + local.set $ly + local.get $ix i32.const 1072693248 i32.sub - local.get $4 + local.get $lx i32.or i32.const 0 i32.eq if - local.get $0 + local.get $y call $~lib/math/NativeMath.atan return end - local.get $5 + local.get $iy i32.const 31 i32.shr_u i32.const 1 i32.and - local.get $3 + local.get $ix i32.const 30 i32.shr_u i32.const 2 i32.and i32.or - local.set $7 - local.get $3 + local.set $m + local.get $ix i32.const 2147483647 i32.and - local.set $3 - local.get $5 + local.set $ix + local.get $iy i32.const 2147483647 i32.and - local.set $5 - local.get $5 - local.get $6 + local.set $iy + local.get $iy + local.get $ly i32.or i32.const 0 i32.eq @@ -3369,28 +3369,28 @@ block $case2|0 block $case1|0 block $case0|0 - local.get $7 - local.set $8 - local.get $8 + local.get $m + local.set $var$8 + local.get $var$8 i32.const 0 i32.eq br_if $case0|0 - local.get $8 + local.get $var$8 i32.const 1 i32.eq br_if $case1|0 - local.get $8 + local.get $var$8 i32.const 2 i32.eq br_if $case2|0 - local.get $8 + local.get $var$8 i32.const 3 i32.eq br_if $case3|0 br $break|0 end end - local.get $0 + local.get $y return end global.get $~lib/math/NativeMath.PI @@ -3401,13 +3401,13 @@ return end end - local.get $3 - local.get $4 + local.get $ix + local.get $lx i32.or i32.const 0 i32.eq if - local.get $7 + local.get $m i32.const 1 i32.and if (result f64) @@ -3422,15 +3422,15 @@ end return end - local.get $3 + local.get $ix i32.const 2146435072 i32.eq if - local.get $5 + local.get $iy i32.const 2146435072 i32.eq if - local.get $7 + local.get $m i32.const 2 i32.and if (result f64) @@ -3445,19 +3445,19 @@ f64.const 4 f64.div end - local.set $9 - local.get $7 + local.set $var$9 + local.get $m i32.const 1 i32.and if (result f64) - local.get $9 + local.get $var$9 f64.neg else - local.get $9 + local.get $var$9 end return else - local.get $7 + local.get $m i32.const 2 i32.and if (result f64) @@ -3465,36 +3465,36 @@ else f64.const 0 end - local.set $9 - local.get $7 + local.set $var$9 + local.get $m i32.const 1 i32.and if (result f64) - local.get $9 + local.get $var$9 f64.neg else - local.get $9 + local.get $var$9 end return end unreachable end - local.get $3 + local.get $ix i32.const 64 i32.const 20 i32.shl i32.add - local.get $5 + local.get $iy i32.lt_u if (result i32) i32.const 1 else - local.get $5 + local.get $iy i32.const 2146435072 i32.eq end if - local.get $7 + local.get $m i32.const 1 i32.and if (result f64) @@ -3509,71 +3509,71 @@ end return end - local.get $7 + local.get $m i32.const 2 i32.and if (result i32) - local.get $5 + local.get $iy i32.const 64 i32.const 20 i32.shl i32.add - local.get $3 + local.get $ix i32.lt_u else i32.const 0 end if f64.const 0 - local.set $10 + local.set $z else - local.get $0 - local.get $1 + local.get $y + local.get $x f64.div f64.abs call $~lib/math/NativeMath.atan - local.set $10 + local.set $z end block $break|1 block $case3|1 block $case2|1 block $case1|1 block $case0|1 - local.get $7 - local.set $8 - local.get $8 + local.get $m + local.set $var$8 + local.get $var$8 i32.const 0 i32.eq br_if $case0|1 - local.get $8 + local.get $var$8 i32.const 1 i32.eq br_if $case1|1 - local.get $8 + local.get $var$8 i32.const 2 i32.eq br_if $case2|1 - local.get $8 + local.get $var$8 i32.const 3 i32.eq br_if $case3|1 br $break|1 end - local.get $10 + local.get $z return end - local.get $10 + local.get $z f64.neg return end global.get $~lib/math/NativeMath.PI - local.get $10 + local.get $z f64.const 1.2246467991473532e-16 f64.sub f64.sub return end - local.get $10 + local.get $z f64.const 1.2246467991473532e-16 f64.sub global.get $~lib/math/NativeMath.PI @@ -3582,84 +3582,84 @@ end unreachable ) - (func $std/math/test_atan2 (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) - local.get $0 - local.get $1 + (func $std/math/test_atan2 (param $value1 f64) (param $value2 f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + local.get $value1 + local.get $value2 call $~lib/math/NativeMath.atan2 - local.get $2 - local.get $3 - local.get $4 + local.get $expected + local.get $error + local.get $flags call $std/math/check if (result i32) - local.get $0 - local.get $1 + local.get $value1 + local.get $value2 call $~lib/bindings/dom/Math.atan2 - local.get $2 - local.get $3 - local.get $4 + local.get $expected + local.get $error + local.get $flags call $std/math/check else i32.const 0 end ) - (func $~lib/math/NativeMathf.atan2 (param $0 f32) (param $1 f32) (result f32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 f32) - (local $7 f32) - local.get $1 - local.get $1 + (func $~lib/math/NativeMathf.atan2 (param $y f32) (param $x f32) (result f32) + (local $ix i32) + (local $iy i32) + (local $m i32) + (local $var$5 i32) + (local $var$6 f32) + (local $z f32) + local.get $x + local.get $x f32.ne if (result i32) i32.const 1 else - local.get $0 - local.get $0 + local.get $y + local.get $y f32.ne end if - local.get $1 - local.get $0 + local.get $x + local.get $y f32.add return end - local.get $1 + local.get $x i32.reinterpret_f32 - local.set $2 - local.get $0 + local.set $ix + local.get $y i32.reinterpret_f32 - local.set $3 - local.get $2 + local.set $iy + local.get $ix i32.const 1065353216 i32.eq if - local.get $0 + local.get $y call $~lib/math/NativeMathf.atan return end - local.get $3 + local.get $iy i32.const 31 i32.shr_u i32.const 1 i32.and - local.get $2 + local.get $ix i32.const 30 i32.shr_u i32.const 2 i32.and i32.or - local.set $4 - local.get $2 + local.set $m + local.get $ix i32.const 2147483647 i32.and - local.set $2 - local.get $3 + local.set $ix + local.get $iy i32.const 2147483647 i32.and - local.set $3 - local.get $3 + local.set $iy + local.get $iy i32.const 0 i32.eq if @@ -3668,28 +3668,28 @@ block $case2|0 block $case1|0 block $case0|0 - local.get $4 - local.set $5 - local.get $5 + local.get $m + local.set $var$5 + local.get $var$5 i32.const 0 i32.eq br_if $case0|0 - local.get $5 + local.get $var$5 i32.const 1 i32.eq br_if $case1|0 - local.get $5 + local.get $var$5 i32.const 2 i32.eq br_if $case2|0 - local.get $5 + local.get $var$5 i32.const 3 i32.eq br_if $case3|0 br $break|0 end end - local.get $0 + local.get $y return end f32.const 3.1415927410125732 @@ -3700,11 +3700,11 @@ return end end - local.get $2 + local.get $ix i32.const 0 i32.eq if - local.get $4 + local.get $m i32.const 1 i32.and if (result f32) @@ -3719,15 +3719,15 @@ end return end - local.get $2 + local.get $ix i32.const 2139095040 i32.eq if - local.get $3 + local.get $iy i32.const 2139095040 i32.eq if - local.get $4 + local.get $m i32.const 2 i32.and if (result f32) @@ -3741,19 +3741,19 @@ f32.const 4 f32.div end - local.set $6 - local.get $4 + local.set $var$6 + local.get $m i32.const 1 i32.and if (result f32) - local.get $6 + local.get $var$6 f32.neg else - local.get $6 + local.get $var$6 end return else - local.get $4 + local.get $m i32.const 2 i32.and if (result f32) @@ -3761,36 +3761,36 @@ else f32.const 0 end - local.set $6 - local.get $4 + local.set $var$6 + local.get $m i32.const 1 i32.and if (result f32) - local.get $6 + local.get $var$6 f32.neg else - local.get $6 + local.get $var$6 end return end unreachable end - local.get $2 + local.get $ix i32.const 26 i32.const 23 i32.shl i32.add - local.get $3 + local.get $iy i32.lt_u if (result i32) i32.const 1 else - local.get $3 + local.get $iy i32.const 2139095040 i32.eq end if - local.get $4 + local.get $m i32.const 1 i32.and if (result f32) @@ -3805,71 +3805,71 @@ end return end - local.get $4 + local.get $m i32.const 2 i32.and if (result i32) - local.get $3 + local.get $iy i32.const 26 i32.const 23 i32.shl i32.add - local.get $2 + local.get $ix i32.lt_u else i32.const 0 end if f32.const 0 - local.set $7 + local.set $z else - local.get $0 - local.get $1 + local.get $y + local.get $x f32.div f32.abs call $~lib/math/NativeMathf.atan - local.set $7 + local.set $z end block $break|1 block $case3|1 block $case2|1 block $case1|1 block $case0|1 - local.get $4 - local.set $5 - local.get $5 + local.get $m + local.set $var$5 + local.get $var$5 i32.const 0 i32.eq br_if $case0|1 - local.get $5 + local.get $var$5 i32.const 1 i32.eq br_if $case1|1 - local.get $5 + local.get $var$5 i32.const 2 i32.eq br_if $case2|1 - local.get $5 + local.get $var$5 i32.const 3 i32.eq br_if $case3|1 br $break|1 end - local.get $7 + local.get $z return end - local.get $7 + local.get $z f32.neg return end f32.const 3.1415927410125732 - local.get $7 + local.get $z f32.const -8.742277657347586e-08 f32.sub f32.sub return end - local.get $7 + local.get $z f32.const -8.742277657347586e-08 f32.sub f32.const 3.1415927410125732 @@ -3878,808 +3878,808 @@ end unreachable ) - (func $std/math/test_atan2f (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) - local.get $0 - local.get $1 + (func $std/math/test_atan2f (param $value1 f32) (param $value2 f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + local.get $value1 + local.get $value2 call $~lib/math/NativeMathf.atan2 - local.get $2 - local.get $3 - local.get $4 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $~lib/math/NativeMath.cbrt (param $0 f64) (result f64) - (local $1 i64) - (local $2 i32) - (local $3 f64) - (local $4 f64) - (local $5 f64) - local.get $0 + (func $~lib/math/NativeMath.cbrt (param $x f64) (result f64) + (local $u i64) + (local $hx i32) + (local $t f64) + (local $r f64) + (local $s f64) + local.get $x i64.reinterpret_f64 - local.set $1 - local.get $1 + local.set $u + local.get $u i64.const 32 i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and - local.set $2 - local.get $2 + local.set $hx + local.get $hx i32.const 2146435072 i32.ge_u if - local.get $0 - local.get $0 + local.get $x + local.get $x f64.add return end - local.get $2 + local.get $hx i32.const 1048576 i32.lt_u if - local.get $0 + local.get $x f64.const 18014398509481984 f64.mul i64.reinterpret_f64 - local.set $1 - local.get $1 + local.set $u + local.get $u i64.const 32 i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and - local.set $2 - local.get $2 + local.set $hx + local.get $hx i32.const 0 i32.eq if - local.get $0 + local.get $x return end - local.get $2 + local.get $hx i32.const 3 i32.div_u i32.const 696219795 i32.add - local.set $2 + local.set $hx else - local.get $2 + local.get $hx i32.const 3 i32.div_u i32.const 715094163 i32.add - local.set $2 + local.set $hx end - local.get $1 + local.get $u i64.const 1 i64.const 63 i64.shl i64.and - local.set $1 - local.get $1 - local.get $2 + local.set $u + local.get $u + local.get $hx i64.extend_i32_u i64.const 32 i64.shl i64.or - local.set $1 - local.get $1 + local.set $u + local.get $u f64.reinterpret_i64 - local.set $3 - local.get $3 - local.get $3 + local.set $t + local.get $t + local.get $t f64.mul - local.get $3 - local.get $0 + local.get $t + local.get $x f64.div f64.mul - local.set $4 - local.get $3 + local.set $r + local.get $t f64.const 1.87595182427177 - local.get $4 + local.get $r f64.const -1.8849797954337717 - local.get $4 + local.get $r f64.const 1.6214297201053545 f64.mul f64.add f64.mul f64.add - local.get $4 - local.get $4 + local.get $r + local.get $r f64.mul - local.get $4 + local.get $r f64.mul f64.const -0.758397934778766 - local.get $4 + local.get $r f64.const 0.14599619288661245 f64.mul f64.add f64.mul f64.add f64.mul - local.set $3 - local.get $3 + local.set $t + local.get $t i64.reinterpret_f64 i64.const 2147483648 i64.add i64.const -1073741824 i64.and f64.reinterpret_i64 - local.set $3 - local.get $3 - local.get $3 + local.set $t + local.get $t + local.get $t f64.mul - local.set $5 - local.get $0 - local.get $5 + local.set $s + local.get $x + local.get $s f64.div - local.set $4 - local.get $4 - local.get $3 + local.set $r + local.get $r + local.get $t f64.sub f64.const 2 - local.get $3 + local.get $t f64.mul - local.get $4 + local.get $r f64.add f64.div - local.set $4 - local.get $3 - local.get $3 - local.get $4 + local.set $r + local.get $t + local.get $t + local.get $r f64.mul f64.add - local.set $3 - local.get $3 + local.set $t + local.get $t ) - (func $std/math/test_cbrt (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_cbrt (param $value f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMath.cbrt - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check if (result i32) - local.get $0 + local.get $value call $~lib/bindings/dom/Math.cbrt - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check else i32.const 0 end ) - (func $~lib/math/NativeMathf.cbrt (param $0 f32) (result f32) - (local $1 i32) - (local $2 i32) - (local $3 f64) - (local $4 f64) - local.get $0 + (func $~lib/math/NativeMathf.cbrt (param $x f32) (result f32) + (local $u i32) + (local $hx i32) + (local $t f64) + (local $r f64) + local.get $x i32.reinterpret_f32 - local.set $1 - local.get $1 + local.set $u + local.get $u i32.const 2147483647 i32.and - local.set $2 - local.get $2 + local.set $hx + local.get $hx i32.const 2139095040 i32.ge_u if - local.get $0 - local.get $0 + local.get $x + local.get $x f32.add return end - local.get $2 + local.get $hx i32.const 8388608 i32.lt_u if - local.get $2 + local.get $hx i32.const 0 i32.eq if - local.get $0 + local.get $x return end - local.get $0 + local.get $x f32.const 16777216 f32.mul i32.reinterpret_f32 - local.set $1 - local.get $1 + local.set $u + local.get $u i32.const 2147483647 i32.and - local.set $2 - local.get $2 + local.set $hx + local.get $hx i32.const 3 i32.div_u i32.const 642849266 i32.add - local.set $2 + local.set $hx else - local.get $2 + local.get $hx i32.const 3 i32.div_u i32.const 709958130 i32.add - local.set $2 + local.set $hx end - local.get $1 + local.get $u i32.const -2147483648 i32.and - local.set $1 - local.get $1 - local.get $2 + local.set $u + local.get $u + local.get $hx i32.or - local.set $1 - local.get $1 + local.set $u + local.get $u f32.reinterpret_i32 f64.promote_f32 - local.set $3 - local.get $3 - local.get $3 + local.set $t + local.get $t + local.get $t f64.mul - local.get $3 + local.get $t f64.mul - local.set $4 - local.get $3 - local.get $0 + local.set $r + local.get $t + local.get $x f64.promote_f32 - local.get $0 + local.get $x f64.promote_f32 f64.add - local.get $4 + local.get $r f64.add f64.mul - local.get $0 + local.get $x f64.promote_f32 - local.get $4 + local.get $r f64.add - local.get $4 + local.get $r f64.add f64.div - local.set $3 - local.get $3 - local.get $3 + local.set $t + local.get $t + local.get $t f64.mul - local.get $3 + local.get $t f64.mul - local.set $4 - local.get $3 - local.get $0 + local.set $r + local.get $t + local.get $x f64.promote_f32 - local.get $0 + local.get $x f64.promote_f32 f64.add - local.get $4 + local.get $r f64.add f64.mul - local.get $0 + local.get $x f64.promote_f32 - local.get $4 + local.get $r f64.add - local.get $4 + local.get $r f64.add f64.div - local.set $3 - local.get $3 + local.set $t + local.get $t f32.demote_f64 ) - (func $std/math/test_cbrtf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_cbrtf (param $value f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMathf.cbrt - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $std/math/test_ceil (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 f64) - local.get $0 - local.set $4 - local.get $4 + (func $std/math/test_ceil (param $value f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + (local $var$4 f64) + local.get $value + local.set $var$4 + local.get $var$4 f64.ceil - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check if (result i32) - local.get $0 + local.get $value call $~lib/bindings/dom/Math.ceil - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check else i32.const 0 end ) - (func $std/math/test_ceilf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - (local $4 f32) - local.get $0 - local.set $4 - local.get $4 + (func $std/math/test_ceilf (param $value f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + (local $var$4 f32) + local.get $value + local.set $var$4 + local.get $var$4 f32.ceil - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $~lib/math/pio2_large_quot (param $0 f64) (param $1 i64) (result i32) - (local $2 i64) - (local $3 i64) - (local $4 i64) - (local $5 i32) - (local $6 i64) - (local $7 i64) - (local $8 i64) - (local $9 i64) - (local $10 i64) - (local $11 i64) - (local $12 i64) - (local $13 i64) - (local $14 i64) - (local $15 i64) - (local $16 i64) - (local $17 i64) - (local $18 i64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i64) - (local $24 i64) - (local $25 i64) - (local $26 i64) - (local $27 i64) - (local $28 i64) - (local $29 i64) - (local $30 i64) - (local $31 i64) - (local $32 i64) - (local $33 i64) - (local $34 i64) - (local $35 i64) - (local $36 f64) - local.get $1 + (func $~lib/math/pio2_large_quot (param $x f64) (param $u i64) (result i32) + (local $magnitude i64) + (local $offset i64) + (local $shift i64) + (local $tblPtr i32) + (local $s0 i64) + (local $s1 i64) + (local $s2 i64) + (local $b0 i64) + (local $b1 i64) + (local $b2 i64) + (local $var$12 i64) + (local $var$13 i64) + (local $significand i64) + (local $var$15 i64) + (local $var$16 i64) + (local $var$17 i64) + (local $var$18 i64) + (local $var$19 i64) + (local $blo i64) + (local $bhi i64) + (local $ahi i64) + (local $clo i64) + (local $plo i64) + (local $phi i64) + (local $rlo i64) + (local $rhi i64) + (local $slo i64) + (local $shi i64) + (local $q i64) + (local $var$31 i64) + (local $var$32 i64) + (local $var$33 i64) + (local $shifter i64) + (local $signbit i64) + (local $coeff f64) + local.get $u i64.const 9223372036854775807 i64.and - local.set $2 - local.get $2 + local.set $magnitude + local.get $magnitude i64.const 52 i64.shr_s i64.const 1045 i64.sub - local.set $3 - local.get $3 + local.set $offset + local.get $offset i64.const 63 i64.and - local.set $4 + local.set $shift i32.const 4416 - local.get $3 + local.get $offset i64.const 6 i64.shr_s i32.wrap_i64 i32.const 3 i32.shl i32.add - local.set $5 - local.get $5 + local.set $tblPtr + local.get $tblPtr i64.load - local.set $9 - local.get $5 + local.set $b0 + local.get $tblPtr i64.load offset=8 - local.set $10 - local.get $5 + local.set $b1 + local.get $tblPtr i64.load offset=16 - local.set $11 - local.get $4 + local.set $b2 + local.get $shift i64.const 0 i64.ne if i32.const 64 i64.extend_i32_s - local.get $4 + local.get $shift i64.sub - local.set $12 - local.get $5 + local.set $var$12 + local.get $tblPtr i64.load offset=24 - local.set $13 - local.get $10 - local.get $12 + local.set $var$13 + local.get $b1 + local.get $var$12 i64.shr_u - local.get $9 - local.get $4 + local.get $b0 + local.get $shift i64.shl i64.or - local.set $6 - local.get $11 - local.get $12 + local.set $s0 + local.get $b2 + local.get $var$12 i64.shr_u - local.get $10 - local.get $4 + local.get $b1 + local.get $shift i64.shl i64.or - local.set $7 - local.get $13 - local.get $12 + local.set $s1 + local.get $var$13 + local.get $var$12 i64.shr_u - local.get $11 - local.get $4 + local.get $b2 + local.get $shift i64.shl i64.or - local.set $8 + local.set $s2 else - local.get $9 - local.set $6 - local.get $10 - local.set $7 - local.get $11 - local.set $8 - end - local.get $1 + local.get $b0 + local.set $s0 + local.get $b1 + local.set $s1 + local.get $b2 + local.set $s2 + end + local.get $u i64.const 4503599627370495 i64.and i64.const 4503599627370496 i64.or - local.set $14 - local.get $7 - local.set $13 - local.get $14 - local.set $12 - local.get $13 + local.set $significand + local.get $s1 + local.set $var$13 + local.get $significand + local.set $var$12 + local.get $var$13 i64.const 4294967295 i64.and - local.set $15 - local.get $12 + local.set $var$15 + local.get $var$12 i64.const 4294967295 i64.and - local.set $16 - local.get $13 + local.set $var$16 + local.get $var$13 i64.const 32 i64.shr_u - local.set $13 - local.get $12 + local.set $var$13 + local.get $var$12 i64.const 32 i64.shr_u - local.set $12 - local.get $15 - local.get $16 + local.set $var$12 + local.get $var$15 + local.get $var$16 i64.mul - local.set $19 - local.get $19 + local.set $var$19 + local.get $var$19 i64.const 4294967295 i64.and - local.set $17 - local.get $13 - local.get $16 + local.set $var$17 + local.get $var$13 + local.get $var$16 i64.mul - local.get $19 + local.get $var$19 i64.const 32 i64.shr_u i64.add - local.set $19 - local.get $19 + local.set $var$19 + local.get $var$19 i64.const 32 i64.shr_u - local.set $18 - local.get $15 - local.get $12 + local.set $var$18 + local.get $var$15 + local.get $var$12 i64.mul - local.get $19 + local.get $var$19 i64.const 4294967295 i64.and i64.add - local.set $19 - local.get $13 - local.get $12 + local.set $var$19 + local.get $var$13 + local.get $var$12 i64.mul - local.get $18 + local.get $var$18 i64.add - local.get $19 + local.get $var$19 i64.const 32 i64.shr_u i64.add global.set $~lib/math/res128_hi - local.get $19 + local.get $var$19 i64.const 32 i64.shl - local.get $17 + local.get $var$17 i64.add - local.set $20 + local.set $blo global.get $~lib/math/res128_hi - local.set $21 - local.get $6 - local.get $14 + local.set $bhi + local.get $s0 + local.get $significand i64.mul - local.set $22 - local.get $8 + local.set $ahi + local.get $s2 i64.const 32 i64.shr_u - local.get $14 + local.get $significand i64.const 32 i64.shr_s i64.mul - local.set $23 - local.get $20 - local.get $23 + local.set $clo + local.get $blo + local.get $clo i64.add - local.set $24 - local.get $22 - local.get $21 + local.set $plo + local.get $ahi + local.get $bhi i64.add - local.get $24 - local.get $23 + local.get $plo + local.get $clo i64.lt_u i64.extend_i32_u i64.add - local.set $25 - local.get $24 + local.set $phi + local.get $plo i64.const 2 i64.shl - local.set $26 - local.get $25 + local.set $rlo + local.get $phi i64.const 2 i64.shl - local.get $24 + local.get $plo i64.const 62 i64.shr_u i64.or - local.set $27 - local.get $27 + local.set $rhi + local.get $rhi i64.const 63 i64.shr_s - local.set $28 - local.get $28 + local.set $slo + local.get $slo i64.const 1 i64.shr_s - local.set $29 - local.get $25 + local.set $shi + local.get $phi i64.const 62 i64.shr_s - local.get $28 + local.get $slo i64.sub - local.set $30 + local.set $q i64.const 4372995238176751616 - local.get $26 - local.get $28 + local.get $rlo + local.get $slo i64.xor - local.set $13 - local.get $27 - local.get $29 + local.set $var$13 + local.get $rhi + local.get $shi i64.xor - local.set $12 - local.get $12 + local.set $var$12 + local.get $var$12 i64.clz - local.set $19 - local.get $12 - local.get $19 + local.set $var$19 + local.get $var$12 + local.get $var$19 i64.shl - local.get $13 + local.get $var$13 i64.const 64 - local.get $19 + local.get $var$19 i64.sub i64.shr_u i64.or - local.set $12 - local.get $13 - local.get $19 + local.set $var$12 + local.get $var$13 + local.get $var$19 i64.shl - local.set $13 + local.set $var$13 i64.const -3958705157555305932 - local.set $16 - local.get $12 - local.set $15 - local.get $16 + local.set $var$16 + local.get $var$12 + local.set $var$15 + local.get $var$16 i64.const 4294967295 i64.and - local.set $18 - local.get $15 + local.set $var$18 + local.get $var$15 i64.const 4294967295 i64.and - local.set $17 - local.get $16 + local.set $var$17 + local.get $var$16 i64.const 32 i64.shr_u - local.set $16 - local.get $15 + local.set $var$16 + local.get $var$15 i64.const 32 i64.shr_u - local.set $15 - local.get $18 - local.get $17 + local.set $var$15 + local.get $var$18 + local.get $var$17 i64.mul - local.set $33 - local.get $33 + local.set $var$33 + local.get $var$33 i64.const 4294967295 i64.and - local.set $31 - local.get $16 - local.get $17 + local.set $var$31 + local.get $var$16 + local.get $var$17 i64.mul - local.get $33 + local.get $var$33 i64.const 32 i64.shr_u i64.add - local.set $33 - local.get $33 + local.set $var$33 + local.get $var$33 i64.const 32 i64.shr_u - local.set $32 - local.get $18 - local.get $15 + local.set $var$32 + local.get $var$18 + local.get $var$15 i64.mul - local.get $33 + local.get $var$33 i64.const 4294967295 i64.and i64.add - local.set $33 - local.get $16 - local.get $15 + local.set $var$33 + local.get $var$16 + local.get $var$15 i64.mul - local.get $32 + local.get $var$32 i64.add - local.get $33 + local.get $var$33 i64.const 32 i64.shr_u i64.add global.set $~lib/math/res128_hi - local.get $33 + local.get $var$33 i64.const 32 i64.shl - local.get $31 + local.get $var$31 i64.add - local.set $33 + local.set $var$33 global.get $~lib/math/res128_hi - local.set $32 - local.get $32 + local.set $var$32 + local.get $var$32 i64.const 11 i64.shr_u - local.set $31 - local.get $33 + local.set $var$31 + local.get $var$33 i64.const 11 i64.shr_u - local.get $32 + local.get $var$32 i64.const 53 i64.shl i64.or - local.set $17 + local.set $var$17 f64.const 2.6469779601696886e-23 i64.const -4267615245585081135 f64.convert_i64_u f64.mul - local.get $12 + local.get $var$12 f64.convert_i64_u f64.mul f64.const 2.6469779601696886e-23 i64.const -3958705157555305932 f64.convert_i64_u f64.mul - local.get $13 + local.get $var$13 f64.convert_i64_u f64.mul f64.add i64.trunc_sat_f64_u - local.set $18 - local.get $31 - local.get $33 - local.get $18 + local.set $var$18 + local.get $var$31 + local.get $var$33 + local.get $var$18 i64.lt_u i64.extend_i32_u i64.add f64.convert_i64_u global.set $~lib/math/rempio2_y0 f64.const 5.421010862427522e-20 - local.get $17 - local.get $18 + local.get $var$17 + local.get $var$18 i64.add f64.convert_i64_u f64.mul global.set $~lib/math/rempio2_y1 - local.get $19 + local.get $var$19 i64.const 52 i64.shl i64.sub - local.set $34 - local.get $1 - local.get $27 + local.set $shifter + local.get $u + local.get $rhi i64.xor i64.const -9223372036854775808 i64.and - local.set $35 - local.get $34 - local.get $35 + local.set $signbit + local.get $shifter + local.get $signbit i64.or f64.reinterpret_i64 - local.set $36 + local.set $coeff global.get $~lib/math/rempio2_y0 - local.get $36 + local.get $coeff f64.mul global.set $~lib/math/rempio2_y0 global.get $~lib/math/rempio2_y1 - local.get $36 + local.get $coeff f64.mul global.set $~lib/math/rempio2_y1 - local.get $30 + local.get $q i32.wrap_i64 ) - (func $~lib/math/NativeMath.cos (param $0 f64) (result f64) - (local $1 i64) - (local $2 i32) - (local $3 i32) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 i32) - (local $11 i64) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 f64) - (local $17 i32) - (local $18 f64) - (local $19 f64) - local.get $0 + (func $~lib/math/NativeMath.cos (param $x f64) (result f64) + (local $u i64) + (local $ux i32) + (local $sign i32) + (local $var$4 f64) + (local $var$5 f64) + (local $var$6 f64) + (local $var$7 f64) + (local $var$8 f64) + (local $var$9 f64) + (local $var$10 i32) + (local $var$11 i64) + (local $var$12 i32) + (local $var$13 i32) + (local $var$14 i32) + (local $var$15 i32) + (local $var$16 f64) + (local $n i32) + (local $y0 f64) + (local $y1 f64) + local.get $x i64.reinterpret_f64 - local.set $1 - local.get $1 + local.set $u + local.get $u i64.const 32 i64.shr_u i32.wrap_i64 - local.set $2 - local.get $2 + local.set $ux + local.get $ux i32.const 31 i32.shr_u - local.set $3 - local.get $2 + local.set $sign + local.get $ux i32.const 2147483647 i32.and - local.set $2 - local.get $2 + local.set $ux + local.get $ux i32.const 1072243195 i32.le_u if - local.get $2 + local.get $ux i32.const 1044816030 i32.lt_u if f64.const 1 return end - local.get $0 - local.set $5 + local.get $x + local.set $var$5 f64.const 0 - local.set $4 - local.get $5 - local.get $5 + local.set $var$4 + local.get $var$5 + local.get $var$5 f64.mul - local.set $6 - local.get $6 - local.get $6 + local.set $var$6 + local.get $var$6 + local.get $var$6 f64.mul - local.set $7 - local.get $6 + local.set $var$7 + local.get $var$6 f64.const 0.0416666666666666 - local.get $6 + local.get $var$6 f64.const -0.001388888888887411 - local.get $6 + local.get $var$6 f64.const 2.480158728947673e-05 f64.mul f64.add f64.mul f64.add f64.mul - local.get $7 - local.get $7 + local.get $var$7 + local.get $var$7 f64.mul f64.const -2.7557314351390663e-07 - local.get $6 + local.get $var$6 f64.const 2.087572321298175e-09 - local.get $6 + local.get $var$6 f64.const -1.1359647557788195e-11 f64.mul f64.add @@ -4687,360 +4687,360 @@ f64.add f64.mul f64.add - local.set $8 + local.set $var$8 f64.const 0.5 - local.get $6 + local.get $var$6 f64.mul - local.set $9 + local.set $var$9 f64.const 1 - local.get $9 + local.get $var$9 f64.sub - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 f64.const 1 - local.get $7 + local.get $var$7 f64.sub - local.get $9 + local.get $var$9 f64.sub - local.get $6 - local.get $8 + local.get $var$6 + local.get $var$8 f64.mul - local.get $5 - local.get $4 + local.get $var$5 + local.get $var$4 f64.mul f64.sub f64.add f64.add return end - local.get $2 + local.get $ux i32.const 2146435072 i32.ge_u if - local.get $0 - local.get $0 + local.get $x + local.get $x f64.sub return end block $~lib/math/rempio2|inlined.0 (result i32) - local.get $0 - local.set $4 - local.get $1 - local.set $11 - local.get $3 - local.set $10 - local.get $11 + local.get $x + local.set $var$4 + local.get $u + local.set $var$11 + local.get $sign + local.set $var$10 + local.get $var$11 i64.const 32 i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and - local.set $12 + local.set $var$12 i32.const 0 i32.const 1 i32.lt_s drop - local.get $12 + local.get $var$12 i32.const 1073928572 i32.lt_u if i32.const 1 - local.set $13 - local.get $10 + local.set $var$13 + local.get $var$10 i32.eqz if - local.get $4 + local.get $var$4 f64.const 1.5707963267341256 f64.sub - local.set $9 - local.get $12 + local.set $var$9 + local.get $var$12 i32.const 1073291771 i32.ne if - local.get $9 + local.get $var$9 f64.const 6.077100506506192e-11 f64.sub - local.set $8 - local.get $9 - local.get $8 + local.set $var$8 + local.get $var$9 + local.get $var$8 f64.sub f64.const 6.077100506506192e-11 f64.sub - local.set $7 + local.set $var$7 else - local.get $9 + local.get $var$9 f64.const 6.077100506303966e-11 f64.sub - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 f64.const 2.0222662487959506e-21 f64.sub - local.set $8 - local.get $9 - local.get $8 + local.set $var$8 + local.get $var$9 + local.get $var$8 f64.sub f64.const 2.0222662487959506e-21 f64.sub - local.set $7 + local.set $var$7 end else - local.get $4 + local.get $var$4 f64.const 1.5707963267341256 f64.add - local.set $9 - local.get $12 + local.set $var$9 + local.get $var$12 i32.const 1073291771 i32.ne if - local.get $9 + local.get $var$9 f64.const 6.077100506506192e-11 f64.add - local.set $8 - local.get $9 - local.get $8 + local.set $var$8 + local.get $var$9 + local.get $var$8 f64.sub f64.const 6.077100506506192e-11 f64.add - local.set $7 + local.set $var$7 else - local.get $9 + local.get $var$9 f64.const 6.077100506303966e-11 f64.add - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 f64.const 2.0222662487959506e-21 f64.add - local.set $8 - local.get $9 - local.get $8 + local.set $var$8 + local.get $var$9 + local.get $var$8 f64.sub f64.const 2.0222662487959506e-21 f64.add - local.set $7 + local.set $var$7 end i32.const -1 - local.set $13 + local.set $var$13 end - local.get $8 + local.get $var$8 global.set $~lib/math/rempio2_y0 - local.get $7 + local.get $var$7 global.set $~lib/math/rempio2_y1 - local.get $13 + local.get $var$13 br $~lib/math/rempio2|inlined.0 end - local.get $12 + local.get $var$12 i32.const 1094263291 i32.lt_u if - local.get $4 + local.get $var$4 f64.const 0.6366197723675814 f64.mul f64.nearest - local.set $7 - local.get $4 - local.get $7 + local.set $var$7 + local.get $var$4 + local.get $var$7 f64.const 1.5707963267341256 f64.mul f64.sub - local.set $8 - local.get $7 + local.set $var$8 + local.get $var$7 f64.const 6.077100506506192e-11 f64.mul - local.set $9 - local.get $12 + local.set $var$9 + local.get $var$12 i32.const 20 i32.shr_u - local.set $13 - local.get $8 - local.get $9 + local.set $var$13 + local.get $var$8 + local.get $var$9 f64.sub - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $14 - local.get $13 - local.get $14 + local.set $var$14 + local.get $var$13 + local.get $var$14 i32.const 20 i32.shr_u i32.const 2047 i32.and i32.sub - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 i32.const 16 i32.gt_u if - local.get $8 - local.set $5 - local.get $7 + local.get $var$8 + local.set $var$5 + local.get $var$7 f64.const 6.077100506303966e-11 f64.mul - local.set $9 - local.get $5 - local.get $9 + local.set $var$9 + local.get $var$5 + local.get $var$9 f64.sub - local.set $8 - local.get $7 + local.set $var$8 + local.get $var$7 f64.const 2.0222662487959506e-21 f64.mul - local.get $5 - local.get $8 + local.get $var$5 + local.get $var$8 f64.sub - local.get $9 + local.get $var$9 f64.sub f64.sub - local.set $9 - local.get $8 - local.get $9 + local.set $var$9 + local.get $var$8 + local.get $var$9 f64.sub - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $14 - local.get $13 - local.get $14 + local.set $var$14 + local.get $var$13 + local.get $var$14 i32.const 20 i32.shr_u i32.const 2047 i32.and i32.sub - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 i32.const 49 i32.gt_u if - local.get $8 - local.set $16 - local.get $7 + local.get $var$8 + local.set $var$16 + local.get $var$7 f64.const 2.0222662487111665e-21 f64.mul - local.set $9 - local.get $16 - local.get $9 + local.set $var$9 + local.get $var$16 + local.get $var$9 f64.sub - local.set $8 - local.get $7 + local.set $var$8 + local.get $var$7 f64.const 8.4784276603689e-32 f64.mul - local.get $16 - local.get $8 + local.get $var$16 + local.get $var$8 f64.sub - local.get $9 + local.get $var$9 f64.sub f64.sub - local.set $9 - local.get $8 - local.get $9 + local.set $var$9 + local.get $var$8 + local.get $var$9 f64.sub - local.set $6 + local.set $var$6 end end - local.get $8 - local.get $6 + local.get $var$8 + local.get $var$6 f64.sub - local.get $9 + local.get $var$9 f64.sub - local.set $5 - local.get $6 + local.set $var$5 + local.get $var$6 global.set $~lib/math/rempio2_y0 - local.get $5 + local.get $var$5 global.set $~lib/math/rempio2_y1 - local.get $7 + local.get $var$7 i32.trunc_sat_f64_s br $~lib/math/rempio2|inlined.0 end - local.get $4 - local.get $11 + local.get $var$4 + local.get $var$11 call $~lib/math/pio2_large_quot - local.set $15 + local.set $var$15 i32.const 0 - local.get $15 + local.get $var$15 i32.sub - local.get $15 - local.get $10 + local.get $var$15 + local.get $var$10 select end - local.set $17 + local.set $n global.get $~lib/math/rempio2_y0 - local.set $18 + local.set $y0 global.get $~lib/math/rempio2_y1 - local.set $19 - local.get $17 + local.set $y1 + local.get $n i32.const 1 i32.and if (result f64) block $~lib/math/sin_kern|inlined.0 (result f64) - local.get $18 - local.set $7 - local.get $19 - local.set $16 + local.get $y0 + local.set $var$7 + local.get $y1 + local.set $var$16 i32.const 1 - local.set $13 - local.get $7 - local.get $7 + local.set $var$13 + local.get $var$7 + local.get $var$7 f64.mul - local.set $4 - local.get $4 - local.get $4 + local.set $var$4 + local.get $var$4 + local.get $var$4 f64.mul - local.set $5 + local.set $var$5 f64.const 0.00833333333332249 - local.get $4 + local.get $var$4 f64.const -1.984126982985795e-04 - local.get $4 + local.get $var$4 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 f64.mul f64.const -2.5050760253406863e-08 - local.get $4 + local.get $var$4 f64.const 1.58969099521155e-10 f64.mul f64.add f64.mul f64.add - local.set $6 - local.get $4 - local.get $7 + local.set $var$6 + local.get $var$4 + local.get $var$7 f64.mul - local.set $9 - local.get $13 + local.set $var$9 + local.get $var$13 i32.eqz if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 f64.const -0.16666666666666632 - local.get $4 - local.get $6 + local.get $var$4 + local.get $var$6 f64.mul f64.add f64.mul f64.add br $~lib/math/sin_kern|inlined.0 else - local.get $7 - local.get $4 + local.get $var$7 + local.get $var$4 f64.const 0.5 - local.get $16 + local.get $var$16 f64.mul - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 f64.mul f64.sub f64.mul - local.get $16 + local.get $var$16 f64.sub - local.get $9 + local.get $var$9 f64.const -0.16666666666666632 f64.mul f64.sub @@ -5050,36 +5050,36 @@ unreachable end else - local.get $18 - local.set $16 - local.get $19 - local.set $8 - local.get $16 - local.get $16 - f64.mul - local.set $9 - local.get $9 - local.get $9 - f64.mul - local.set $6 - local.get $9 + local.get $y0 + local.set $var$16 + local.get $y1 + local.set $var$8 + local.get $var$16 + local.get $var$16 + f64.mul + local.set $var$9 + local.get $var$9 + local.get $var$9 + f64.mul + local.set $var$6 + local.get $var$9 f64.const 0.0416666666666666 - local.get $9 + local.get $var$9 f64.const -0.001388888888887411 - local.get $9 + local.get $var$9 f64.const 2.480158728947673e-05 f64.mul f64.add f64.mul f64.add f64.mul - local.get $6 - local.get $6 + local.get $var$6 + local.get $var$6 f64.mul f64.const -2.7557314351390663e-07 - local.get $9 + local.get $var$9 f64.const 2.087572321298175e-09 - local.get $9 + local.get $var$9 f64.const -1.1359647557788195e-11 f64.mul f64.add @@ -5087,142 +5087,142 @@ f64.add f64.mul f64.add - local.set $5 + local.set $var$5 f64.const 0.5 - local.get $9 + local.get $var$9 f64.mul - local.set $4 + local.set $var$4 f64.const 1 - local.get $4 + local.get $var$4 f64.sub - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 f64.const 1 - local.get $6 + local.get $var$6 f64.sub - local.get $4 + local.get $var$4 f64.sub - local.get $9 - local.get $5 + local.get $var$9 + local.get $var$5 f64.mul - local.get $16 - local.get $8 + local.get $var$16 + local.get $var$8 f64.mul f64.sub f64.add f64.add end - local.set $0 - local.get $17 + local.set $x + local.get $n i32.const 1 i32.add i32.const 2 i32.and if (result f64) - local.get $0 + local.get $x f64.neg else - local.get $0 + local.get $x end ) - (func $std/math/test_cos (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_cos (param $value f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMath.cos - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check if (result i32) - local.get $0 + local.get $value call $~lib/bindings/dom/Math.cos - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check else i32.const 0 end ) - (func $~lib/math/NativeMathf.cos (param $0 f32) (result f32) - (local $1 i32) - (local $2 i32) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 i32) - (local $9 i32) - (local $10 f32) - (local $11 i32) - (local $12 f32) - (local $13 i32) - (local $14 i64) - (local $15 i32) - (local $16 i64) - (local $17 i64) - (local $18 i64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i32) - (local $24 i32) - (local $25 f64) - (local $26 f32) - local.get $0 + (func $~lib/math/NativeMathf.cos (param $x f32) (result f32) + (local $ux i32) + (local $sign i32) + (local $var$3 f64) + (local $var$4 f64) + (local $var$5 f64) + (local $var$6 f64) + (local $var$7 f64) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 f32) + (local $var$11 i32) + (local $var$12 f32) + (local $var$13 i32) + (local $var$14 i64) + (local $var$15 i32) + (local $var$16 i64) + (local $var$17 i64) + (local $var$18 i64) + (local $var$19 i64) + (local $var$20 i64) + (local $var$21 i64) + (local $var$22 i64) + (local $var$23 i32) + (local $n i32) + (local $y f64) + (local $t f32) + local.get $x i32.reinterpret_f32 - local.set $1 - local.get $1 + local.set $ux + local.get $ux i32.const 31 i32.shr_u - local.set $2 - local.get $1 + local.set $sign + local.get $ux i32.const 2147483647 i32.and - local.set $1 - local.get $1 + local.set $ux + local.get $ux i32.const 1061752794 i32.le_u if - local.get $1 + local.get $ux i32.const 964689920 i32.lt_u if f32.const 1 return end - local.get $0 + local.get $x f64.promote_f32 - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 f64.mul - local.set $4 - local.get $4 - local.get $4 + local.set $var$4 + local.get $var$4 + local.get $var$4 f64.mul - local.set $5 + local.set $var$5 f64.const -0.001388676377460993 - local.get $4 + local.get $var$4 f64.const 2.439044879627741e-05 f64.mul f64.add - local.set $6 + local.set $var$6 f32.const 1 f64.promote_f32 - local.get $4 + local.get $var$4 f64.const -0.499999997251031 f64.mul f64.add - local.get $5 + local.get $var$5 f64.const 0.04166662332373906 f64.mul f64.add - local.get $5 - local.get $4 + local.get $var$5 + local.get $var$4 f64.mul - local.get $6 + local.get $var$6 f64.mul f64.add f32.demote_f64 @@ -5232,139 +5232,139 @@ i32.const 1 i32.lt_s drop - local.get $1 + local.get $ux i32.const 1081824209 i32.le_u if - local.get $1 + local.get $ux i32.const 1075235811 i32.gt_u if - local.get $2 + local.get $sign if (result f64) - local.get $0 + local.get $x f64.promote_f32 f64.const 3.141592653589793 f64.add else - local.get $0 + local.get $x f64.promote_f32 f64.const 3.141592653589793 f64.sub end - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 f64.mul - local.set $6 - local.get $6 - local.get $6 + local.set $var$6 + local.get $var$6 + local.get $var$6 f64.mul - local.set $5 + local.set $var$5 f64.const -0.001388676377460993 - local.get $6 + local.get $var$6 f64.const 2.439044879627741e-05 f64.mul f64.add - local.set $4 + local.set $var$4 f32.const 1 f64.promote_f32 - local.get $6 + local.get $var$6 f64.const -0.499999997251031 f64.mul f64.add - local.get $5 + local.get $var$5 f64.const 0.04166662332373906 f64.mul f64.add - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 f64.mul - local.get $4 + local.get $var$4 f64.mul f64.add f32.demote_f64 f32.neg return else - local.get $2 + local.get $sign if (result f32) - local.get $0 + local.get $x f64.promote_f32 f64.const 1.5707963267948966 f64.add - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 f64.mul - local.set $4 - local.get $4 - local.get $4 + local.set $var$4 + local.get $var$4 + local.get $var$4 f64.mul - local.set $5 + local.set $var$5 f64.const -1.9839334836096632e-04 - local.get $4 + local.get $var$4 f64.const 2.718311493989822e-06 f64.mul f64.add - local.set $6 - local.get $4 - local.get $3 + local.set $var$6 + local.get $var$4 + local.get $var$3 f64.mul - local.set $7 - local.get $3 - local.get $7 + local.set $var$7 + local.get $var$3 + local.get $var$7 f64.const -0.16666666641626524 - local.get $4 + local.get $var$4 f64.const 0.008333329385889463 f64.mul f64.add f64.mul f64.add - local.get $7 - local.get $5 + local.get $var$7 + local.get $var$5 f64.mul - local.get $6 + local.get $var$6 f64.mul f64.add f32.demote_f64 else f64.const 1.5707963267948966 - local.get $0 + local.get $x f64.promote_f32 f64.sub - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 f64.mul - local.set $7 - local.get $7 - local.get $7 + local.set $var$7 + local.get $var$7 + local.get $var$7 f64.mul - local.set $6 + local.set $var$6 f64.const -1.9839334836096632e-04 - local.get $7 + local.get $var$7 f64.const 2.718311493989822e-06 f64.mul f64.add - local.set $5 - local.get $7 - local.get $3 + local.set $var$5 + local.get $var$7 + local.get $var$3 f64.mul - local.set $4 - local.get $3 - local.get $4 + local.set $var$4 + local.get $var$3 + local.get $var$4 f64.const -0.16666666641626524 - local.get $7 + local.get $var$7 f64.const 0.008333329385889463 f64.mul f64.add f64.mul f64.add - local.get $4 - local.get $6 + local.get $var$4 + local.get $var$6 f64.mul - local.get $5 + local.get $var$5 f64.mul f64.add f32.demote_f64 @@ -5373,139 +5373,139 @@ end unreachable end - local.get $1 + local.get $ux i32.const 1088565717 i32.le_u if - local.get $1 + local.get $ux i32.const 1085271519 i32.gt_u if - local.get $2 + local.get $sign if (result f64) - local.get $0 + local.get $x f64.promote_f32 f64.const 6.283185307179586 f64.add else - local.get $0 + local.get $x f64.promote_f32 f64.const 6.283185307179586 f64.sub end - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 f64.mul - local.set $4 - local.get $4 - local.get $4 + local.set $var$4 + local.get $var$4 + local.get $var$4 f64.mul - local.set $5 + local.set $var$5 f64.const -0.001388676377460993 - local.get $4 + local.get $var$4 f64.const 2.439044879627741e-05 f64.mul f64.add - local.set $6 + local.set $var$6 f32.const 1 f64.promote_f32 - local.get $4 + local.get $var$4 f64.const -0.499999997251031 f64.mul f64.add - local.get $5 + local.get $var$5 f64.const 0.04166662332373906 f64.mul f64.add - local.get $5 - local.get $4 + local.get $var$5 + local.get $var$4 f64.mul - local.get $6 + local.get $var$6 f64.mul f64.add f32.demote_f64 return else - local.get $2 + local.get $sign if (result f32) - local.get $0 + local.get $x f32.neg f64.promote_f32 f64.const 4.71238898038469 f64.sub - local.set $7 - local.get $7 - local.get $7 + local.set $var$7 + local.get $var$7 + local.get $var$7 f64.mul - local.set $6 - local.get $6 - local.get $6 + local.set $var$6 + local.get $var$6 + local.get $var$6 f64.mul - local.set $5 + local.set $var$5 f64.const -1.9839334836096632e-04 - local.get $6 + local.get $var$6 f64.const 2.718311493989822e-06 f64.mul f64.add - local.set $4 - local.get $6 - local.get $7 + local.set $var$4 + local.get $var$6 + local.get $var$7 f64.mul - local.set $3 - local.get $7 - local.get $3 + local.set $var$3 + local.get $var$7 + local.get $var$3 f64.const -0.16666666641626524 - local.get $6 + local.get $var$6 f64.const 0.008333329385889463 f64.mul f64.add f64.mul f64.add - local.get $3 - local.get $5 + local.get $var$3 + local.get $var$5 f64.mul - local.get $4 + local.get $var$4 f64.mul f64.add f32.demote_f64 else - local.get $0 + local.get $x f64.promote_f32 f64.const 4.71238898038469 f64.sub - local.set $7 - local.get $7 - local.get $7 + local.set $var$7 + local.get $var$7 + local.get $var$7 f64.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 f64.mul - local.set $4 + local.set $var$4 f64.const -1.9839334836096632e-04 - local.get $3 + local.get $var$3 f64.const 2.718311493989822e-06 f64.mul f64.add - local.set $5 - local.get $3 - local.get $7 + local.set $var$5 + local.get $var$3 + local.get $var$7 f64.mul - local.set $6 - local.get $7 - local.get $6 + local.set $var$6 + local.get $var$7 + local.get $var$6 f64.const -0.16666666641626524 - local.get $3 + local.get $var$3 f64.const 0.008333329385889463 f64.mul f64.add f64.mul f64.add - local.get $6 - local.get $4 + local.get $var$6 + local.get $var$4 f64.mul - local.get $5 + local.get $var$5 f64.mul f64.add f32.demote_f64 @@ -5514,402 +5514,402 @@ end unreachable end - local.get $1 + local.get $ux i32.const 2139095040 i32.ge_u if - local.get $0 - local.get $0 + local.get $x + local.get $x f32.sub return end block $~lib/math/rempio2f|inlined.0 (result i32) - local.get $0 - local.set $10 - local.get $1 - local.set $9 - local.get $2 - local.set $8 - local.get $9 + local.get $x + local.set $var$10 + local.get $ux + local.set $var$9 + local.get $sign + local.set $var$8 + local.get $var$9 i32.const 1305022427 i32.lt_u if - local.get $10 + local.get $var$10 f64.promote_f32 f64.const 0.6366197723675814 f64.mul f64.nearest - local.set $6 - local.get $10 + local.set $var$6 + local.get $var$10 f64.promote_f32 - local.get $6 + local.get $var$6 f64.const 1.5707963109016418 f64.mul f64.sub - local.get $6 + local.get $var$6 f64.const 1.5893254773528196e-08 f64.mul f64.sub global.set $~lib/math/rempio2f_y - local.get $6 + local.get $var$6 i32.trunc_sat_f64_s br $~lib/math/rempio2f|inlined.0 end - local.get $10 - local.set $12 - local.get $9 - local.set $11 - local.get $11 + local.get $var$10 + local.set $var$12 + local.get $var$9 + local.set $var$11 + local.get $var$11 i32.const 23 i32.shr_s i32.const 152 i32.sub - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 i32.const 63 i32.and i64.extend_i32_s - local.set $14 + local.set $var$14 i32.const 4608 - local.get $13 + local.get $var$13 i32.const 6 i32.shr_s i32.const 3 i32.shl i32.add - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 i64.load - local.set $16 - local.get $15 + local.set $var$16 + local.get $var$15 i64.load offset=8 - local.set $17 - local.get $14 + local.set $var$17 + local.get $var$14 i64.const 32 i64.gt_u if - local.get $15 + local.get $var$15 i64.load offset=16 - local.set $19 - local.get $19 + local.set $var$19 + local.get $var$19 i64.const 96 - local.get $14 + local.get $var$14 i64.sub i64.shr_u - local.set $18 - local.get $18 - local.get $17 - local.get $14 + local.set $var$18 + local.get $var$18 + local.get $var$17 + local.get $var$14 i64.const 32 i64.sub i64.shl i64.or - local.set $18 + local.set $var$18 else - local.get $17 + local.get $var$17 i64.const 32 - local.get $14 + local.get $var$14 i64.sub i64.shr_u - local.set $18 + local.set $var$18 end - local.get $17 + local.get $var$17 i64.const 64 - local.get $14 + local.get $var$14 i64.sub i64.shr_u - local.get $16 - local.get $14 + local.get $var$16 + local.get $var$14 i64.shl i64.or - local.set $19 - local.get $11 + local.set $var$19 + local.get $var$11 i32.const 8388607 i32.and i32.const 8388608 i32.or i64.extend_i32_s - local.set $20 - local.get $20 - local.get $19 + local.set $var$20 + local.get $var$20 + local.get $var$19 i64.mul - local.get $20 - local.get $18 + local.get $var$20 + local.get $var$18 i64.mul i64.const 32 i64.shr_u i64.add - local.set $21 - local.get $21 + local.set $var$21 + local.get $var$21 i64.const 2 i64.shl - local.set $22 - local.get $21 + local.set $var$22 + local.get $var$21 i64.const 62 i64.shr_u - local.get $22 + local.get $var$22 i64.const 63 i64.shr_u i64.add i32.wrap_i64 - local.set $23 + local.set $var$23 f64.const 8.515303950216386e-20 - local.get $12 + local.get $var$12 f64.promote_f32 f64.copysign - local.get $22 + local.get $var$22 f64.convert_i64_s f64.mul global.set $~lib/math/rempio2f_y - local.get $23 - local.set $23 + local.get $var$23 + local.set $var$23 i32.const 0 - local.get $23 + local.get $var$23 i32.sub - local.get $23 - local.get $8 + local.get $var$23 + local.get $var$8 select end - local.set $24 + local.set $n global.get $~lib/math/rempio2f_y - local.set $25 - local.get $24 + local.set $y + local.get $n i32.const 1 i32.and if (result f32) - local.get $25 - local.set $7 - local.get $7 - local.get $7 + local.get $y + local.set $var$7 + local.get $var$7 + local.get $var$7 f64.mul - local.set $6 - local.get $6 - local.get $6 + local.set $var$6 + local.get $var$6 + local.get $var$6 f64.mul - local.set $5 + local.set $var$5 f64.const -1.9839334836096632e-04 - local.get $6 + local.get $var$6 f64.const 2.718311493989822e-06 f64.mul f64.add - local.set $4 - local.get $6 - local.get $7 + local.set $var$4 + local.get $var$6 + local.get $var$7 f64.mul - local.set $3 - local.get $7 - local.get $3 + local.set $var$3 + local.get $var$7 + local.get $var$3 f64.const -0.16666666641626524 - local.get $6 + local.get $var$6 f64.const 0.008333329385889463 f64.mul f64.add f64.mul f64.add - local.get $3 - local.get $5 + local.get $var$3 + local.get $var$5 f64.mul - local.get $4 + local.get $var$4 f64.mul f64.add f32.demote_f64 else - local.get $25 - local.set $7 - local.get $7 - local.get $7 + local.get $y + local.set $var$7 + local.get $var$7 + local.get $var$7 f64.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 f64.mul - local.set $4 + local.set $var$4 f64.const -0.001388676377460993 - local.get $3 + local.get $var$3 f64.const 2.439044879627741e-05 f64.mul f64.add - local.set $5 + local.set $var$5 f32.const 1 f64.promote_f32 - local.get $3 + local.get $var$3 f64.const -0.499999997251031 f64.mul f64.add - local.get $4 + local.get $var$4 f64.const 0.04166662332373906 f64.mul f64.add - local.get $4 - local.get $3 + local.get $var$4 + local.get $var$3 f64.mul - local.get $5 + local.get $var$5 f64.mul f64.add f32.demote_f64 end - local.set $26 - local.get $24 + local.set $t + local.get $n i32.const 1 i32.add i32.const 2 i32.and if (result f32) - local.get $26 + local.get $t f32.neg else - local.get $26 + local.get $t end ) - (func $std/math/test_cosf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_cosf (param $value f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMathf.cos - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $~lib/math/NativeMath.expm1 (param $0 f64) (result f64) - (local $1 i64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 f64) - (local $13 f64) - (local $14 f64) - (local $15 f64) - local.get $0 + (func $~lib/math/NativeMath.expm1 (param $x f64) (result f64) + (local $u i64) + (local $hx i32) + (local $sign i32) + (local $k i32) + (local $c f64) + (local $t f64) + (local $var$7 f64) + (local $var$8 f64) + (local $hfx f64) + (local $hxs f64) + (local $hxq f64) + (local $r1 f64) + (local $e f64) + (local $twopk f64) + (local $y f64) + local.get $x i64.reinterpret_f64 - local.set $1 - local.get $1 + local.set $u + local.get $u i64.const 32 i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and - local.set $2 - local.get $1 + local.set $hx + local.get $u i64.const 63 i64.shr_u i32.wrap_i64 - local.set $3 + local.set $sign i32.const 0 - local.set $4 - local.get $2 + local.set $k + local.get $hx i32.const 1078159482 i32.ge_u if - local.get $0 - local.get $0 + local.get $x + local.get $x f64.ne if - local.get $0 + local.get $x return end - local.get $3 + local.get $sign if f64.const -1 return end - local.get $0 + local.get $x f64.const 709.782712893384 f64.gt if - local.get $0 + local.get $x f64.const 8988465674311579538646525e283 f64.mul return end end f64.const 0 - local.set $5 - local.get $2 + local.set $c + local.get $hx i32.const 1071001154 i32.gt_u if i32.const 1 - local.get $3 + local.get $sign i32.const 1 i32.shl i32.sub f64.const 1.4426950408889634 - local.get $0 + local.get $x f64.mul f64.const 0.5 - local.get $0 + local.get $x f64.copysign f64.add i32.trunc_sat_f64_s - local.get $2 + local.get $hx i32.const 1072734898 i32.lt_u select - local.set $4 - local.get $4 + local.set $k + local.get $k f64.convert_i32_s - local.set $6 - local.get $0 - local.get $6 + local.set $t + local.get $x + local.get $t f64.const 0.6931471803691238 f64.mul f64.sub - local.set $7 - local.get $6 + local.set $var$7 + local.get $t f64.const 1.9082149292705877e-10 f64.mul - local.set $8 - local.get $7 - local.get $8 + local.set $var$8 + local.get $var$7 + local.get $var$8 f64.sub - local.set $0 - local.get $7 - local.get $0 + local.set $x + local.get $var$7 + local.get $x f64.sub - local.get $8 + local.get $var$8 f64.sub - local.set $5 + local.set $c else - local.get $2 + local.get $hx i32.const 1016070144 i32.lt_u if - local.get $0 + local.get $x return end end f64.const 0.5 - local.get $0 + local.get $x f64.mul - local.set $9 - local.get $0 - local.get $9 + local.set $hfx + local.get $x + local.get $hfx f64.mul - local.set $10 - local.get $10 - local.get $10 + local.set $hxs + local.get $hxs + local.get $hxs f64.mul - local.set $11 + local.set $hxq f64.const 1 - local.get $10 + local.get $hxs f64.const -0.03333333333333313 f64.mul f64.add - local.get $11 + local.get $hxq f64.const 1.5873015872548146e-03 - local.get $10 + local.get $hxs f64.const -7.93650757867488e-05 f64.mul f64.add - local.get $11 + local.get $hxq f64.const 4.008217827329362e-06 - local.get $10 + local.get $hxs f64.const -2.0109921818362437e-07 f64.mul f64.add @@ -5917,74 +5917,74 @@ f64.add f64.mul f64.add - local.set $12 + local.set $r1 f64.const 3 - local.get $12 - local.get $9 + local.get $r1 + local.get $hfx f64.mul f64.sub - local.set $6 - local.get $10 - local.get $12 - local.get $6 + local.set $t + local.get $hxs + local.get $r1 + local.get $t f64.sub f64.const 6 - local.get $0 - local.get $6 + local.get $x + local.get $t f64.mul f64.sub f64.div f64.mul - local.set $13 - local.get $4 + local.set $e + local.get $k i32.const 0 i32.eq if - local.get $0 - local.get $0 - local.get $13 + local.get $x + local.get $x + local.get $e f64.mul - local.get $10 + local.get $hxs f64.sub f64.sub return end - local.get $0 - local.get $13 - local.get $5 + local.get $x + local.get $e + local.get $c f64.sub f64.mul - local.get $5 + local.get $c f64.sub - local.set $13 - local.get $13 - local.get $10 + local.set $e + local.get $e + local.get $hxs f64.sub - local.set $13 - local.get $4 + local.set $e + local.get $k i32.const -1 i32.eq if f64.const 0.5 - local.get $0 - local.get $13 + local.get $x + local.get $e f64.sub f64.mul f64.const 0.5 f64.sub return end - local.get $4 + local.get $k i32.const 1 i32.eq if - local.get $0 + local.get $x f64.const -0.25 f64.lt if f64.const -2 - local.get $13 - local.get $0 + local.get $e + local.get $x f64.const 0.5 f64.add f64.sub @@ -5993,141 +5993,141 @@ end f64.const 1 f64.const 2 - local.get $0 - local.get $13 + local.get $x + local.get $e f64.sub f64.mul f64.add return end i64.const 1023 - local.get $4 + local.get $k i64.extend_i32_s i64.add i64.const 52 i64.shl - local.set $1 - local.get $1 + local.set $u + local.get $u f64.reinterpret_i64 - local.set $14 - local.get $4 + local.set $twopk + local.get $k i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $4 + local.get $k i32.const 56 i32.gt_s end if - local.get $0 - local.get $13 + local.get $x + local.get $e f64.sub f64.const 1 f64.add - local.set $15 - local.get $4 + local.set $y + local.get $k i32.const 1024 i32.eq if - local.get $15 + local.get $y f64.const 2 f64.mul f64.const 8988465674311579538646525e283 f64.mul - local.set $15 + local.set $y else - local.get $15 - local.get $14 + local.get $y + local.get $twopk f64.mul - local.set $15 + local.set $y end - local.get $15 + local.get $y f64.const 1 f64.sub return end i64.const 1023 - local.get $4 + local.get $k i64.extend_i32_s i64.sub i64.const 52 i64.shl - local.set $1 - local.get $1 + local.set $u + local.get $u f64.reinterpret_i64 - local.set $15 - local.get $4 + local.set $y + local.get $k i32.const 20 i32.lt_s if f64.const 1 - local.get $15 + local.get $y f64.sub - local.get $13 + local.get $e f64.sub - local.set $15 + local.set $y else f64.const 1 - local.get $13 - local.get $15 + local.get $e + local.get $y f64.add f64.sub - local.set $15 + local.set $y end - local.get $0 - local.get $15 + local.get $x + local.get $y f64.add - local.get $14 + local.get $twopk f64.mul ) - (func $~lib/math/NativeMath.exp (param $0 f64) (result f64) - (local $1 f64) - (local $2 i64) - (local $3 i32) - (local $4 f64) - (local $5 f64) - (local $6 i64) - (local $7 f64) - (local $8 i32) - (local $9 i64) - (local $10 f64) - (local $11 i64) - (local $12 f64) - (local $13 f64) - (local $14 i64) - (local $15 i64) - (local $16 f64) - (local $17 f64) - (local $18 f64) - (local $19 f64) - (local $20 f64) - (local $21 f64) + (func $~lib/math/NativeMath.exp (param $x f64) (result f64) + (local $var$1 f64) + (local $var$2 i64) + (local $var$3 i32) + (local $var$4 f64) + (local $var$5 f64) + (local $var$6 i64) + (local $var$7 f64) + (local $var$8 i32) + (local $var$9 i64) + (local $var$10 f64) + (local $var$11 i64) + (local $var$12 f64) + (local $var$13 f64) + (local $var$14 i64) + (local $var$15 i64) + (local $var$16 f64) + (local $var$17 f64) + (local $var$18 f64) + (local $var$19 f64) + (local $var$20 f64) + (local $var$21 f64) i32.const 0 i32.const 1 i32.lt_s drop block $~lib/util/math/exp_lut|inlined.0 (result f64) - local.get $0 - local.set $1 - local.get $1 + local.get $x + local.set $var$1 + local.get $var$1 i64.reinterpret_f64 - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i64.const 52 i64.shr_u i32.wrap_i64 i32.const 2047 i32.and - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const 969 i32.sub i32.const 63 i32.ge_u if - local.get $3 + local.get $var$3 i32.const 969 i32.sub i32.const -2147483648 @@ -6136,29 +6136,29 @@ f64.const 1 br $~lib/util/math/exp_lut|inlined.0 end - local.get $3 + local.get $var$3 i32.const 1033 i32.ge_u if - local.get $2 + local.get $var$2 i64.const -4503599627370496 i64.eq if f64.const 0 br $~lib/util/math/exp_lut|inlined.0 end - local.get $3 + local.get $var$3 i32.const 2047 i32.ge_u if f64.const 1 - local.get $1 + local.get $var$1 f64.add br $~lib/util/math/exp_lut|inlined.0 else f64.const 0 f64.const inf - local.get $2 + local.get $var$2 i64.const 0 i64.lt_s select @@ -6167,232 +6167,232 @@ unreachable end i32.const 0 - local.set $3 + local.set $var$3 end f64.const 184.6649652337873 - local.get $1 + local.get $var$1 f64.mul - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 f64.const 6755399441055744 f64.add - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i64.reinterpret_f64 - local.set $6 - local.get $5 + local.set $var$6 + local.get $var$5 f64.const 6755399441055744 f64.sub - local.set $5 - local.get $1 - local.get $5 + local.set $var$5 + local.get $var$1 + local.get $var$5 f64.const -0.005415212348111709 f64.mul f64.add - local.get $5 + local.get $var$5 f64.const -1.2864023111638346e-14 f64.mul f64.add - local.set $7 - local.get $6 + local.set $var$7 + local.get $var$6 i32.const 127 i64.extend_i32_s i64.and i64.const 1 i64.shl i32.wrap_i64 - local.set $8 - local.get $6 + local.set $var$8 + local.get $var$6 i64.const 52 i32.const 7 i64.extend_i32_s i64.sub i64.shl - local.set $9 + local.set $var$9 i32.const 4640 - local.get $8 + local.get $var$8 i32.const 3 i32.shl i32.add i64.load f64.reinterpret_i64 - local.set $10 + local.set $var$10 i32.const 4640 - local.get $8 + local.get $var$8 i32.const 3 i32.shl i32.add i64.load offset=8 - local.get $9 + local.get $var$9 i64.add - local.set $11 - local.get $7 - local.get $7 + local.set $var$11 + local.get $var$7 + local.get $var$7 f64.mul - local.set $12 - local.get $10 - local.get $7 + local.set $var$12 + local.get $var$10 + local.get $var$7 f64.add - local.get $12 + local.get $var$12 f64.const 0.49999999999996786 - local.get $7 + local.get $var$7 f64.const 0.16666666666665886 f64.mul f64.add f64.mul f64.add - local.get $12 - local.get $12 + local.get $var$12 + local.get $var$12 f64.mul f64.const 0.0416666808410674 - local.get $7 + local.get $var$7 f64.const 0.008333335853059549 f64.mul f64.add f64.mul f64.add - local.set $13 - local.get $3 + local.set $var$13 + local.get $var$3 i32.const 0 i32.eq if block $~lib/util/math/specialcase|inlined.0 (result f64) - local.get $13 - local.set $16 - local.get $11 - local.set $15 - local.get $6 - local.set $14 - local.get $14 + local.get $var$13 + local.set $var$16 + local.get $var$11 + local.set $var$15 + local.get $var$6 + local.set $var$14 + local.get $var$14 i64.const 2147483648 i64.and i64.const 0 i64.ne i32.eqz if - local.get $15 + local.get $var$15 i64.const 1009 i64.const 52 i64.shl i64.sub - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 f64.reinterpret_i64 - local.set $17 + local.set $var$17 f64.const 5486124068793688683255936e279 - local.get $17 - local.get $17 - local.get $16 + local.get $var$17 + local.get $var$17 + local.get $var$16 f64.mul f64.add f64.mul br $~lib/util/math/specialcase|inlined.0 end - local.get $15 + local.get $var$15 i64.const 1022 i64.const 52 i64.shl i64.add - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 f64.reinterpret_i64 - local.set $17 - local.get $17 - local.get $17 - local.get $16 + local.set $var$17 + local.get $var$17 + local.get $var$17 + local.get $var$16 f64.mul f64.add - local.set $18 - local.get $18 + local.set $var$18 + local.get $var$18 f64.abs f64.const 1 f64.lt if f64.const 1 - local.get $18 + local.get $var$18 f64.copysign - local.set $19 - local.get $17 - local.get $18 + local.set $var$19 + local.get $var$17 + local.get $var$18 f64.sub - local.get $17 - local.get $16 + local.get $var$17 + local.get $var$16 f64.mul f64.add - local.set $20 - local.get $19 - local.get $18 + local.set $var$20 + local.get $var$19 + local.get $var$18 f64.add - local.set $21 - local.get $19 - local.get $21 + local.set $var$21 + local.get $var$19 + local.get $var$21 f64.sub - local.get $18 + local.get $var$18 f64.add - local.get $20 + local.get $var$20 f64.add - local.set $20 - local.get $21 - local.get $20 + local.set $var$20 + local.get $var$21 + local.get $var$20 f64.add - local.get $19 + local.get $var$19 f64.sub - local.set $18 - local.get $18 + local.set $var$18 + local.get $var$18 f64.const 0 f64.eq if - local.get $15 + local.get $var$15 i64.const -9223372036854775808 i64.and f64.reinterpret_i64 - local.set $18 + local.set $var$18 end end - local.get $18 + local.get $var$18 f64.const 2.2250738585072014e-308 f64.mul end br $~lib/util/math/exp_lut|inlined.0 end - local.get $11 + local.get $var$11 f64.reinterpret_i64 - local.set $18 - local.get $18 - local.get $18 - local.get $13 + local.set $var$18 + local.get $var$18 + local.get $var$18 + local.get $var$13 f64.mul f64.add end return ) - (func $~lib/math/NativeMath.cosh (param $0 f64) (result f64) - (local $1 i64) - (local $2 i32) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - local.get $0 + (func $~lib/math/NativeMath.cosh (param $x f64) (result f64) + (local $u i64) + (local $w i32) + (local $t f64) + (local $var$4 f64) + (local $var$5 f64) + (local $var$6 f64) + local.get $x i64.reinterpret_f64 - local.set $1 - local.get $1 + local.set $u + local.get $u i64.const 9223372036854775807 i64.and - local.set $1 - local.get $1 + local.set $u + local.get $u f64.reinterpret_i64 - local.set $0 - local.get $1 + local.set $x + local.get $u i64.const 32 i64.shr_u i32.wrap_i64 - local.set $2 - local.get $2 + local.set $w + local.get $w i32.const 1072049730 i32.lt_u if - local.get $2 + local.get $w i32.const 1072693248 i32.const 26 i32.const 20 @@ -6403,42 +6403,42 @@ f64.const 1 return end - local.get $0 + local.get $x call $~lib/math/NativeMath.expm1 - local.set $3 + local.set $t f64.const 1 - local.get $3 - local.get $3 + local.get $t + local.get $t f64.mul f64.const 2 f64.const 2 - local.get $3 + local.get $t f64.mul f64.add f64.div f64.add return end - local.get $2 + local.get $w i32.const 1082535490 i32.lt_u if - local.get $0 + local.get $x call $~lib/math/NativeMath.exp - local.set $3 + local.set $t f64.const 0.5 - local.get $3 + local.get $t f64.const 1 - local.get $3 + local.get $t f64.div f64.add f64.mul return end - local.get $0 - local.set $5 + local.get $x + local.set $var$5 f64.const 1 - local.set $4 + local.set $var$4 i32.const 1023 i32.const 2043 i32.const 2 @@ -6450,236 +6450,236 @@ i64.const 32 i64.shl f64.reinterpret_i64 - local.set $6 - local.get $5 + local.set $var$6 + local.get $var$5 f64.const 1416.0996898839683 f64.sub call $~lib/math/NativeMath.exp - local.get $4 - local.get $6 + local.get $var$4 + local.get $var$6 f64.mul f64.mul - local.get $6 + local.get $var$6 f64.mul - local.set $3 - local.get $3 + local.set $t + local.get $t ) - (func $std/math/test_cosh (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_cosh (param $value f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMath.cosh - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check if (result i32) - local.get $0 + local.get $value call $~lib/bindings/dom/Math.cosh - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check else i32.const 0 end ) - (func $~lib/math/NativeMathf.expm1 (param $0 f32) (result f32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 f32) - (local $5 f32) - (local $6 i32) - (local $7 f32) - (local $8 f32) - (local $9 f32) - (local $10 f32) - (local $11 f32) - (local $12 f32) - (local $13 f32) - (local $14 f32) - local.get $0 + (func $~lib/math/NativeMathf.expm1 (param $x f32) (result f32) + (local $u i32) + (local $hx i32) + (local $sign i32) + (local $c f32) + (local $t f32) + (local $k i32) + (local $var$7 f32) + (local $var$8 f32) + (local $hfx f32) + (local $hxs f32) + (local $r1 f32) + (local $e f32) + (local $twopk f32) + (local $y f32) + local.get $x i32.reinterpret_f32 - local.set $1 - local.get $1 + local.set $u + local.get $u i32.const 2147483647 i32.and - local.set $2 - local.get $1 + local.set $hx + local.get $u i32.const 31 i32.shr_u - local.set $3 - local.get $2 + local.set $sign + local.get $hx i32.const 1100331076 i32.ge_u if - local.get $2 + local.get $hx i32.const 2139095040 i32.gt_u if - local.get $0 + local.get $x return end - local.get $3 + local.get $sign if f32.const -1 return end - local.get $2 + local.get $hx i32.const 1118925335 i32.gt_u if - local.get $0 + local.get $x f32.const 1701411834604692317316873e14 f32.mul - local.set $0 - local.get $0 + local.set $x + local.get $x return end end f32.const 0 - local.set $4 - local.get $2 + local.set $c + local.get $hx i32.const 1051816472 i32.gt_u if i32.const 1 - local.get $3 + local.get $sign i32.const 1 i32.shl i32.sub f32.const 1.4426950216293335 - local.get $0 + local.get $x f32.mul f32.const 0.5 - local.get $0 + local.get $x f32.copysign f32.add i32.trunc_sat_f32_s - local.get $2 + local.get $hx i32.const 1065686418 i32.lt_u select - local.set $6 - local.get $6 + local.set $k + local.get $k f32.convert_i32_s - local.set $5 - local.get $0 - local.get $5 + local.set $t + local.get $x + local.get $t f32.const 0.6931381225585938 f32.mul f32.sub - local.set $7 - local.get $5 + local.set $var$7 + local.get $t f32.const 9.05800061445916e-06 f32.mul - local.set $8 - local.get $7 - local.get $8 + local.set $var$8 + local.get $var$7 + local.get $var$8 f32.sub - local.set $0 - local.get $7 - local.get $0 + local.set $x + local.get $var$7 + local.get $x f32.sub - local.get $8 + local.get $var$8 f32.sub - local.set $4 + local.set $c else - local.get $2 + local.get $hx i32.const 855638016 i32.lt_u if - local.get $0 + local.get $x return else i32.const 0 - local.set $6 + local.set $k end end f32.const 0.5 - local.get $0 + local.get $x f32.mul - local.set $9 - local.get $0 - local.get $9 + local.set $hfx + local.get $x + local.get $hfx f32.mul - local.set $10 + local.set $hxs f32.const 1 - local.get $10 + local.get $hxs f32.const -0.03333321213722229 - local.get $10 + local.get $hxs f32.const 1.5807170420885086e-03 f32.mul f32.add f32.mul f32.add - local.set $11 + local.set $r1 f32.const 3 - local.get $11 - local.get $9 + local.get $r1 + local.get $hfx f32.mul f32.sub - local.set $5 - local.get $10 - local.get $11 - local.get $5 + local.set $t + local.get $hxs + local.get $r1 + local.get $t f32.sub f32.const 6 - local.get $0 - local.get $5 + local.get $x + local.get $t f32.mul f32.sub f32.div f32.mul - local.set $12 - local.get $6 + local.set $e + local.get $k i32.const 0 i32.eq if - local.get $0 - local.get $0 - local.get $12 + local.get $x + local.get $x + local.get $e f32.mul - local.get $10 + local.get $hxs f32.sub f32.sub return end - local.get $0 - local.get $12 - local.get $4 + local.get $x + local.get $e + local.get $c f32.sub f32.mul - local.get $4 + local.get $c f32.sub - local.set $12 - local.get $12 - local.get $10 + local.set $e + local.get $e + local.get $hxs f32.sub - local.set $12 - local.get $6 + local.set $e + local.get $k i32.const -1 i32.eq if f32.const 0.5 - local.get $0 - local.get $12 + local.get $x + local.get $e f32.sub f32.mul f32.const 0.5 f32.sub return end - local.get $6 + local.get $k i32.const 1 i32.eq if - local.get $0 + local.get $x f32.const -0.25 f32.lt if f32.const -2 - local.get $12 - local.get $0 + local.get $e + local.get $x f32.const 0.5 f32.add f32.sub @@ -6688,155 +6688,155 @@ end f32.const 1 f32.const 2 - local.get $0 - local.get $12 + local.get $x + local.get $e f32.sub f32.mul f32.add return end i32.const 127 - local.get $6 + local.get $k i32.add i32.const 23 i32.shl - local.set $1 - local.get $1 + local.set $u + local.get $u f32.reinterpret_i32 - local.set $13 - local.get $6 + local.set $twopk + local.get $k i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 + local.get $k i32.const 56 i32.gt_s end if - local.get $0 - local.get $12 + local.get $x + local.get $e f32.sub f32.const 1 f32.add - local.set $14 - local.get $6 + local.set $y + local.get $k i32.const 128 i32.eq if - local.get $14 + local.get $y f32.const 2 f32.mul f32.const 1701411834604692317316873e14 f32.mul - local.set $14 + local.set $y else - local.get $14 - local.get $13 + local.get $y + local.get $twopk f32.mul - local.set $14 + local.set $y end - local.get $14 + local.get $y f32.const 1 f32.sub return end i32.const 127 - local.get $6 + local.get $k i32.sub i32.const 23 i32.shl - local.set $1 - local.get $1 + local.set $u + local.get $u f32.reinterpret_i32 - local.set $14 - local.get $6 + local.set $y + local.get $k i32.const 20 i32.lt_s if f32.const 1 - local.get $14 + local.get $y f32.sub - local.get $12 + local.get $e f32.sub - local.set $14 + local.set $y else f32.const 1 - local.get $12 - local.get $14 + local.get $e + local.get $y f32.add f32.sub - local.set $14 + local.set $y end - local.get $0 - local.get $14 + local.get $x + local.get $y f32.add - local.get $13 + local.get $twopk f32.mul ) - (func $~lib/math/NativeMathf.exp (param $0 f32) (result f32) - (local $1 f32) - (local $2 f64) - (local $3 i32) - (local $4 i32) - (local $5 f64) - (local $6 f64) - (local $7 i64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 i64) + (func $~lib/math/NativeMathf.exp (param $x f32) (result f32) + (local $var$1 f32) + (local $var$2 f64) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 f64) + (local $var$6 f64) + (local $var$7 i64) + (local $var$8 f64) + (local $var$9 f64) + (local $var$10 f64) + (local $var$11 i64) i32.const 0 i32.const 1 i32.lt_s drop block $~lib/util/math/expf_lut|inlined.0 (result f32) - local.get $0 - local.set $1 - local.get $1 + local.get $x + local.set $var$1 + local.get $var$1 f64.promote_f32 - local.set $2 - local.get $1 + local.set $var$2 + local.get $var$1 i32.reinterpret_f32 - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const 20 i32.shr_u i32.const 2047 i32.and - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 i32.const 1067 i32.ge_u if - local.get $3 + local.get $var$3 i32.const -8388608 i32.eq if f32.const 0 br $~lib/util/math/expf_lut|inlined.0 end - local.get $4 + local.get $var$4 i32.const 2040 i32.ge_u if - local.get $1 - local.get $1 + local.get $var$1 + local.get $var$1 f32.add br $~lib/util/math/expf_lut|inlined.0 end - local.get $1 + local.get $var$1 i32.const 1118925335 f32.reinterpret_i32 f32.gt if - local.get $1 + local.get $var$1 f32.const 1701411834604692317316873e14 f32.mul br $~lib/util/math/expf_lut|inlined.0 end - local.get $1 + local.get $var$1 i32.const -1026559564 f32.reinterpret_i32 f32.lt @@ -6846,24 +6846,24 @@ end end f64.const 46.16624130844683 - local.get $2 + local.get $var$2 f64.mul - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 f64.const 6755399441055744 f64.add - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 i64.reinterpret_f64 - local.set $7 - local.get $5 - local.get $6 + local.set $var$7 + local.get $var$5 + local.get $var$6 f64.const 6755399441055744 f64.sub f64.sub - local.set $8 + local.set $var$8 i32.const 6688 - local.get $7 + local.get $var$7 i32.wrap_i64 i32.const 31 i32.and @@ -6871,68 +6871,68 @@ i32.shl i32.add i64.load - local.set $11 - local.get $11 - local.get $7 + local.set $var$11 + local.get $var$11 + local.get $var$7 i64.const 52 i32.const 5 i64.extend_i32_s i64.sub i64.shl i64.add - local.set $11 - local.get $11 + local.set $var$11 + local.get $var$11 f64.reinterpret_i64 - local.set $9 + local.set $var$9 f64.const 1.6938359250920212e-06 - local.get $8 + local.get $var$8 f64.mul f64.const 2.3459809789509004e-04 f64.add - local.set $5 + local.set $var$5 f64.const 0.021660849396613134 - local.get $8 + local.get $var$8 f64.mul f64.const 1 f64.add - local.set $10 - local.get $10 - local.get $5 - local.get $8 - local.get $8 + local.set $var$10 + local.get $var$10 + local.get $var$5 + local.get $var$8 + local.get $var$8 f64.mul f64.mul f64.add - local.set $10 - local.get $10 - local.get $9 + local.set $var$10 + local.get $var$10 + local.get $var$9 f64.mul - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 f32.demote_f64 end return ) - (func $~lib/math/NativeMathf.cosh (param $0 f32) (result f32) - (local $1 i32) - (local $2 f32) - (local $3 f32) - (local $4 f32) - local.get $0 + (func $~lib/math/NativeMathf.cosh (param $x f32) (result f32) + (local $u i32) + (local $var$2 f32) + (local $var$3 f32) + (local $var$4 f32) + local.get $x i32.reinterpret_f32 - local.set $1 - local.get $1 + local.set $u + local.get $u i32.const 2147483647 i32.and - local.set $1 - local.get $1 + local.set $u + local.get $u f32.reinterpret_i32 - local.set $0 - local.get $1 + local.set $x + local.get $u i32.const 1060205079 i32.lt_u if - local.get $1 + local.get $u i32.const 1065353216 i32.const 12 i32.const 23 @@ -6943,42 +6943,42 @@ f32.const 1 return end - local.get $0 + local.get $x call $~lib/math/NativeMathf.expm1 - local.set $2 + local.set $var$2 f32.const 1 - local.get $2 - local.get $2 + local.get $var$2 + local.get $var$2 f32.mul f32.const 2 f32.const 2 - local.get $2 + local.get $var$2 f32.mul f32.add f32.div f32.add return end - local.get $1 + local.get $u i32.const 1118925335 i32.lt_u if - local.get $0 + local.get $x call $~lib/math/NativeMathf.exp - local.set $2 + local.set $var$2 f32.const 0.5 - local.get $2 + local.get $var$2 f32.mul f32.const 0.5 - local.get $2 + local.get $var$2 f32.div f32.add return end - local.get $0 - local.set $3 + local.get $x + local.set $var$3 f32.const 1 - local.set $2 + local.set $var$2 i32.const 127 i32.const 235 i32.const 1 @@ -6987,118 +6987,118 @@ i32.const 23 i32.shl f32.reinterpret_i32 - local.set $4 - local.get $3 + local.set $var$4 + local.get $var$3 f32.const 162.88958740234375 f32.sub call $~lib/math/NativeMathf.exp - local.get $2 - local.get $4 + local.get $var$2 + local.get $var$4 f32.mul f32.mul - local.get $4 + local.get $var$4 f32.mul ) - (func $std/math/test_coshf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_coshf (param $value f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMathf.cosh - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $std/math/test_exp (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_exp (param $value f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMath.exp - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check if (result i32) - local.get $0 + local.get $value call $~lib/bindings/dom/Math.exp - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check else i32.const 0 end ) - (func $std/math/test_expf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_expf (param $value f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMathf.exp - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $std/math/test_expm1 (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_expm1 (param $value f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMath.expm1 - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check if (result i32) - local.get $0 + local.get $value call $~lib/bindings/dom/Math.expm1 - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check else i32.const 0 end ) - (func $std/math/test_expm1f (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_expm1f (param $value f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMathf.expm1 - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $~lib/math/NativeMath.exp2 (param $0 f64) (result f64) - (local $1 f64) - (local $2 i64) - (local $3 i32) - (local $4 f64) - (local $5 i64) - (local $6 f64) - (local $7 i32) - (local $8 i64) - (local $9 f64) - (local $10 i64) - (local $11 f64) - (local $12 f64) - (local $13 i64) - (local $14 i64) - (local $15 f64) - (local $16 f64) - (local $17 f64) - (local $18 f64) - (local $19 f64) + (func $~lib/math/NativeMath.exp2 (param $x f64) (result f64) + (local $var$1 f64) + (local $var$2 i64) + (local $var$3 i32) + (local $var$4 f64) + (local $var$5 i64) + (local $var$6 f64) + (local $var$7 i32) + (local $var$8 i64) + (local $var$9 f64) + (local $var$10 i64) + (local $var$11 f64) + (local $var$12 f64) + (local $var$13 i64) + (local $var$14 i64) + (local $var$15 f64) + (local $var$16 f64) + (local $var$17 f64) + (local $var$18 f64) + (local $var$19 f64) block $~lib/util/math/exp2_lut|inlined.0 (result f64) - local.get $0 - local.set $1 - local.get $1 + local.get $x + local.set $var$1 + local.get $var$1 i64.reinterpret_f64 - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i64.const 52 i64.shr_u i32.wrap_i64 i32.const 2047 i32.and - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const 969 i32.sub i32.const 63 i32.ge_u if - local.get $3 + local.get $var$3 i32.const 969 i32.sub i32.const -2147483648 @@ -7107,34 +7107,34 @@ f64.const 1 br $~lib/util/math/exp2_lut|inlined.0 end - local.get $3 + local.get $var$3 i32.const 1033 i32.ge_u if - local.get $2 + local.get $var$2 i64.const -4503599627370496 i64.eq if f64.const 0 br $~lib/util/math/exp2_lut|inlined.0 end - local.get $3 + local.get $var$3 i32.const 2047 i32.ge_u if f64.const 1 - local.get $1 + local.get $var$1 f64.add br $~lib/util/math/exp2_lut|inlined.0 end - local.get $2 + local.get $var$2 i64.const 0 i64.ge_s if f64.const inf br $~lib/util/math/exp2_lut|inlined.0 else - local.get $2 + local.get $var$2 i64.const -4570929321408987136 i64.ge_u if @@ -7143,263 +7143,263 @@ end end end - local.get $2 + local.get $var$2 i64.const 1 i64.shl i64.const -9143996093422370816 i64.gt_u if i32.const 0 - local.set $3 + local.set $var$3 end end - local.get $1 + local.get $var$1 f64.const 52776558133248 f64.add - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 i64.reinterpret_f64 - local.set $5 - local.get $4 + local.set $var$5 + local.get $var$4 f64.const 52776558133248 f64.sub - local.set $4 - local.get $1 - local.get $4 + local.set $var$4 + local.get $var$1 + local.get $var$4 f64.sub - local.set $6 - local.get $5 + local.set $var$6 + local.get $var$5 i32.const 127 i64.extend_i32_s i64.and i64.const 1 i64.shl i32.wrap_i64 - local.set $7 - local.get $5 + local.set $var$7 + local.get $var$5 i64.const 52 i32.const 7 i64.extend_i32_s i64.sub i64.shl - local.set $8 + local.set $var$8 i32.const 4640 - local.get $7 + local.get $var$7 i32.const 3 i32.shl i32.add i64.load f64.reinterpret_i64 - local.set $9 + local.set $var$9 i32.const 4640 - local.get $7 + local.get $var$7 i32.const 3 i32.shl i32.add i64.load offset=8 - local.get $8 + local.get $var$8 i64.add - local.set $10 - local.get $6 - local.get $6 + local.set $var$10 + local.get $var$6 + local.get $var$6 f64.mul - local.set $11 - local.get $9 - local.get $6 + local.set $var$11 + local.get $var$9 + local.get $var$6 f64.const 0.6931471805599453 f64.mul f64.add - local.get $11 + local.get $var$11 f64.const 0.24022650695909065 - local.get $6 + local.get $var$6 f64.const 0.0555041086686087 f64.mul f64.add f64.mul f64.add - local.get $11 - local.get $11 + local.get $var$11 + local.get $var$11 f64.mul f64.const 0.009618131975721055 - local.get $6 + local.get $var$6 f64.const 1.3332074570119598e-03 f64.mul f64.add f64.mul f64.add - local.set $12 - local.get $3 + local.set $var$12 + local.get $var$3 i32.const 0 i32.eq if block $~lib/util/math/specialcase2|inlined.0 (result f64) - local.get $12 - local.set $15 - local.get $10 - local.set $14 - local.get $5 - local.set $13 - local.get $13 + local.get $var$12 + local.set $var$15 + local.get $var$10 + local.set $var$14 + local.get $var$5 + local.set $var$13 + local.get $var$13 i64.const 2147483648 i64.and i64.const 0 i64.eq if - local.get $14 + local.get $var$14 i64.const 1 i64.const 52 i64.shl i64.sub - local.set $14 - local.get $14 + local.set $var$14 + local.get $var$14 f64.reinterpret_i64 - local.set $16 + local.set $var$16 f64.const 2 - local.get $16 - local.get $15 + local.get $var$16 + local.get $var$15 f64.mul - local.get $16 + local.get $var$16 f64.add f64.mul br $~lib/util/math/specialcase2|inlined.0 end - local.get $14 + local.get $var$14 i64.const 1022 i64.const 52 i64.shl i64.add - local.set $14 - local.get $14 + local.set $var$14 + local.get $var$14 f64.reinterpret_i64 - local.set $16 - local.get $16 - local.get $15 + local.set $var$16 + local.get $var$16 + local.get $var$15 f64.mul - local.get $16 + local.get $var$16 f64.add - local.set $17 - local.get $17 + local.set $var$17 + local.get $var$17 f64.const 1 f64.lt if - local.get $16 - local.get $17 + local.get $var$16 + local.get $var$17 f64.sub - local.get $16 - local.get $15 + local.get $var$16 + local.get $var$15 f64.mul f64.add - local.set $19 + local.set $var$19 f64.const 1 - local.get $17 + local.get $var$17 f64.add - local.set $18 + local.set $var$18 f64.const 1 - local.get $18 + local.get $var$18 f64.sub - local.get $17 + local.get $var$17 f64.add - local.get $19 + local.get $var$19 f64.add - local.set $19 - local.get $18 - local.get $19 + local.set $var$19 + local.get $var$18 + local.get $var$19 f64.add f64.const 1 f64.sub - local.set $17 + local.set $var$17 end - local.get $17 + local.get $var$17 f64.const 2.2250738585072014e-308 f64.mul end br $~lib/util/math/exp2_lut|inlined.0 end - local.get $10 + local.get $var$10 f64.reinterpret_i64 - local.set $17 - local.get $17 - local.get $12 + local.set $var$17 + local.get $var$17 + local.get $var$12 f64.mul - local.get $17 + local.get $var$17 f64.add end ) - (func $std/math/test_exp2 (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_exp2 (param $value f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMath.exp2 - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check if (result i32) f64.const 2 - local.get $0 + local.get $value call $~lib/bindings/dom/Math.pow - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check else i32.const 0 end ) - (func $~lib/math/NativeMathf.exp2 (param $0 f32) (result f32) - (local $1 f32) - (local $2 f64) - (local $3 i32) - (local $4 i32) - (local $5 f64) - (local $6 i64) - (local $7 f64) - (local $8 i64) - (local $9 f64) - (local $10 f64) + (func $~lib/math/NativeMathf.exp2 (param $x f32) (result f32) + (local $var$1 f32) + (local $var$2 f64) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 f64) + (local $var$6 i64) + (local $var$7 f64) + (local $var$8 i64) + (local $var$9 f64) + (local $var$10 f64) block $~lib/util/math/exp2f_lut|inlined.0 (result f32) - local.get $0 - local.set $1 - local.get $1 + local.get $x + local.set $var$1 + local.get $var$1 f64.promote_f32 - local.set $2 - local.get $1 + local.set $var$2 + local.get $var$1 i32.reinterpret_f32 - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const 20 i32.shr_u i32.const 2047 i32.and - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 i32.const 1072 i32.ge_u if - local.get $3 + local.get $var$3 i32.const -8388608 i32.eq if f32.const 0 br $~lib/util/math/exp2f_lut|inlined.0 end - local.get $4 + local.get $var$4 i32.const 2040 i32.ge_u if - local.get $1 - local.get $1 + local.get $var$1 + local.get $var$1 f32.add br $~lib/util/math/exp2f_lut|inlined.0 end - local.get $1 + local.get $var$1 f32.const 0 f32.gt if - local.get $1 + local.get $var$1 f32.const 1701411834604692317316873e14 f32.mul br $~lib/util/math/exp2f_lut|inlined.0 end - local.get $1 + local.get $var$1 f32.const -150 f32.le if @@ -7407,21 +7407,21 @@ br $~lib/util/math/exp2f_lut|inlined.0 end end - local.get $2 + local.get $var$2 f64.const 211106232532992 f64.add - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i64.reinterpret_f64 - local.set $6 - local.get $2 - local.get $5 + local.set $var$6 + local.get $var$2 + local.get $var$5 f64.const 211106232532992 f64.sub f64.sub - local.set $7 + local.set $var$7 i32.const 6688 - local.get $6 + local.get $var$6 i32.wrap_i64 i32.const 31 i32.and @@ -7429,339 +7429,339 @@ i32.shl i32.add i64.load - local.set $8 - local.get $8 - local.get $6 + local.set $var$8 + local.get $var$8 + local.get $var$6 i64.const 52 i32.const 5 i64.extend_i32_s i64.sub i64.shl i64.add - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 f64.reinterpret_i64 - local.set $10 + local.set $var$10 f64.const 0.6931471806916203 - local.get $7 + local.get $var$7 f64.mul f64.const 1 f64.add - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 f64.const 0.05550361559341535 - local.get $7 + local.get $var$7 f64.mul f64.const 0.2402284522445722 f64.add - local.get $7 - local.get $7 + local.get $var$7 + local.get $var$7 f64.mul f64.mul f64.add - local.set $9 - local.get $9 - local.get $10 + local.set $var$9 + local.get $var$9 + local.get $var$10 f64.mul - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 f32.demote_f64 end ) - (func $std/math/test_exp2f (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_exp2f (param $value f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMathf.exp2 - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $std/math/test_floor (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 f64) - local.get $0 - local.set $4 - local.get $4 + (func $std/math/test_floor (param $value f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + (local $var$4 f64) + local.get $value + local.set $var$4 + local.get $var$4 f64.floor - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check if (result i32) - local.get $0 + local.get $value call $~lib/bindings/dom/Math.floor - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check else i32.const 0 end ) - (func $std/math/test_floorf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - (local $4 f32) - local.get $0 - local.set $4 - local.get $4 + (func $std/math/test_floorf (param $value f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + (local $var$4 f32) + local.get $value + local.set $var$4 + local.get $var$4 f32.floor - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $~lib/math/NativeMath.hypot (param $0 f64) (param $1 f64) (result f64) - (local $2 i64) - (local $3 i64) - (local $4 i64) - (local $5 i32) - (local $6 i32) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 f64) - (local $13 f64) - (local $14 f64) - local.get $0 + (func $~lib/math/NativeMath.hypot (param $x f64) (param $y f64) (result f64) + (local $ux i64) + (local $uy i64) + (local $var$4 i64) + (local $ex i32) + (local $ey i32) + (local $z f64) + (local $c f64) + (local $h f64) + (local $l f64) + (local $hx f64) + (local $lx f64) + (local $hy f64) + (local $ly f64) + local.get $x i64.reinterpret_f64 - local.set $2 - local.get $1 + local.set $ux + local.get $y i64.reinterpret_f64 - local.set $3 - local.get $2 + local.set $uy + local.get $ux i64.const 9223372036854775807 i64.and - local.set $2 - local.get $3 + local.set $ux + local.get $uy i64.const 9223372036854775807 i64.and - local.set $3 - local.get $2 - local.get $3 + local.set $uy + local.get $ux + local.get $uy i64.lt_u if - local.get $2 - local.set $4 - local.get $3 - local.set $2 - local.get $4 - local.set $3 + local.get $ux + local.set $var$4 + local.get $uy + local.set $ux + local.get $var$4 + local.set $uy end - local.get $2 + local.get $ux i64.const 52 i64.shr_u i32.wrap_i64 - local.set $5 - local.get $3 + local.set $ex + local.get $uy i64.const 52 i64.shr_u i32.wrap_i64 - local.set $6 - local.get $3 + local.set $ey + local.get $uy f64.reinterpret_i64 - local.set $1 - local.get $6 + local.set $y + local.get $ey i32.const 2047 i32.eq if - local.get $1 + local.get $y return end - local.get $2 + local.get $ux f64.reinterpret_i64 - local.set $0 - local.get $5 + local.set $x + local.get $ex i32.const 2047 i32.eq if (result i32) i32.const 1 else - local.get $3 + local.get $uy i64.const 0 i64.eq end if - local.get $0 + local.get $x return end - local.get $5 - local.get $6 + local.get $ex + local.get $ey i32.sub i32.const 64 i32.gt_s if - local.get $0 - local.get $1 + local.get $x + local.get $y f64.add return end f64.const 1 - local.set $7 - local.get $5 + local.set $z + local.get $ex i32.const 1023 i32.const 510 i32.add i32.gt_s if f64.const 5260135901548373507240989e186 - local.set $7 - local.get $0 + local.set $z + local.get $x f64.const 1.90109156629516e-211 f64.mul - local.set $0 - local.get $1 + local.set $x + local.get $y f64.const 1.90109156629516e-211 f64.mul - local.set $1 + local.set $y else - local.get $6 + local.get $ey i32.const 1023 i32.const 450 i32.sub i32.lt_s if f64.const 1.90109156629516e-211 - local.set $7 - local.get $0 + local.set $z + local.get $x f64.const 5260135901548373507240989e186 f64.mul - local.set $0 - local.get $1 + local.set $x + local.get $y f64.const 5260135901548373507240989e186 f64.mul - local.set $1 + local.set $y end end - local.get $0 + local.get $x f64.const 134217729 f64.mul - local.set $8 - local.get $0 - local.get $8 + local.set $c + local.get $x + local.get $c f64.sub - local.get $8 + local.get $c f64.add - local.set $9 - local.get $0 - local.get $9 + local.set $h + local.get $x + local.get $h f64.sub - local.set $10 - local.get $0 - local.get $0 + local.set $l + local.get $x + local.get $x f64.mul - local.set $11 - local.get $9 - local.get $9 + local.set $hx + local.get $h + local.get $h f64.mul - local.get $11 + local.get $hx f64.sub f64.const 2 - local.get $9 + local.get $h f64.mul - local.get $10 + local.get $l f64.add - local.get $10 + local.get $l f64.mul f64.add - local.set $12 - local.get $1 + local.set $lx + local.get $y f64.const 134217729 f64.mul - local.set $8 - local.get $1 - local.get $8 + local.set $c + local.get $y + local.get $c f64.sub - local.get $8 + local.get $c f64.add - local.set $9 - local.get $1 - local.get $9 + local.set $h + local.get $y + local.get $h f64.sub - local.set $10 - local.get $1 - local.get $1 + local.set $l + local.get $y + local.get $y f64.mul - local.set $13 - local.get $9 - local.get $9 + local.set $hy + local.get $h + local.get $h f64.mul - local.get $13 + local.get $hy f64.sub f64.const 2 - local.get $9 + local.get $h f64.mul - local.get $10 + local.get $l f64.add - local.get $10 + local.get $l f64.mul f64.add - local.set $14 - local.get $7 - local.get $14 - local.get $12 + local.set $ly + local.get $z + local.get $ly + local.get $lx f64.add - local.get $13 + local.get $hy f64.add - local.get $11 + local.get $hx f64.add f64.sqrt f64.mul ) - (func $std/math/test_hypot (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) - local.get $0 - local.get $1 + (func $std/math/test_hypot (param $value1 f64) (param $value2 f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + local.get $value1 + local.get $value2 call $~lib/math/NativeMath.hypot - local.get $2 - local.get $3 - local.get $4 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $~lib/math/NativeMathf.hypot (param $0 f32) (param $1 f32) (result f32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f32) - local.get $0 + (func $~lib/math/NativeMathf.hypot (param $x f32) (param $y f32) (result f32) + (local $ux i32) + (local $uy i32) + (local $var$4 i32) + (local $z f32) + local.get $x i32.reinterpret_f32 - local.set $2 - local.get $1 + local.set $ux + local.get $y i32.reinterpret_f32 - local.set $3 - local.get $2 + local.set $uy + local.get $ux i32.const 2147483647 i32.and - local.set $2 - local.get $3 + local.set $ux + local.get $uy i32.const 2147483647 i32.and - local.set $3 - local.get $2 - local.get $3 + local.set $uy + local.get $ux + local.get $uy i32.lt_u if - local.get $2 - local.set $4 - local.get $3 - local.set $2 - local.get $4 - local.set $3 + local.get $ux + local.set $var$4 + local.get $uy + local.set $ux + local.get $var$4 + local.set $uy end - local.get $2 + local.get $ux f32.reinterpret_i32 - local.set $0 - local.get $3 + local.set $x + local.get $uy f32.reinterpret_i32 - local.set $1 - local.get $3 + local.set $y + local.get $uy i32.const 255 i32.const 23 i32.shl i32.eq if - local.get $1 + local.get $y return end - local.get $2 + local.get $ux i32.const 255 i32.const 23 i32.shl @@ -7769,15 +7769,15 @@ if (result i32) i32.const 1 else - local.get $3 + local.get $uy i32.const 0 i32.eq end if (result i32) i32.const 1 else - local.get $2 - local.get $3 + local.get $ux + local.get $uy i32.sub i32.const 25 i32.const 23 @@ -7785,14 +7785,14 @@ i32.ge_u end if - local.get $0 - local.get $1 + local.get $x + local.get $y f32.add return end f32.const 1 - local.set $5 - local.get $2 + local.set $z + local.get $ux i32.const 127 i32.const 60 i32.add @@ -7801,17 +7801,17 @@ i32.ge_u if f32.const 1237940039285380274899124e3 - local.set $5 - local.get $0 + local.set $z + local.get $x f32.const 8.077935669463161e-28 f32.mul - local.set $0 - local.get $1 + local.set $x + local.get $y f32.const 8.077935669463161e-28 f32.mul - local.set $1 + local.set $y else - local.get $3 + local.get $uy i32.const 127 i32.const 60 i32.sub @@ -7820,26 +7820,26 @@ i32.lt_u if f32.const 8.077935669463161e-28 - local.set $5 - local.get $0 + local.set $z + local.get $x f32.const 1237940039285380274899124e3 f32.mul - local.set $0 - local.get $1 + local.set $x + local.get $y f32.const 1237940039285380274899124e3 f32.mul - local.set $1 + local.set $y end end - local.get $5 - local.get $0 + local.get $z + local.get $x f64.promote_f32 - local.get $0 + local.get $x f64.promote_f32 f64.mul - local.get $1 + local.get $y f64.promote_f32 - local.get $1 + local.get $y f64.promote_f32 f64.mul f64.add @@ -7847,134 +7847,134 @@ f32.sqrt f32.mul ) - (func $std/math/test_hypotf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) - local.get $0 - local.get $1 + (func $std/math/test_hypotf (param $value1 f32) (param $value2 f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + local.get $value1 + local.get $value2 call $~lib/math/NativeMathf.hypot - local.get $2 - local.get $3 - local.get $4 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $std/math/test_log (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_log (param $value f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMath.log - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check if (result i32) - local.get $0 + local.get $value call $~lib/bindings/dom/Math.log - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check else i32.const 0 end ) - (func $std/math/test_logf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_logf (param $value f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMathf.log - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $~lib/math/NativeMath.log10 (param $0 f64) (result f64) - (local $1 i64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 f64) - (local $13 f64) - (local $14 f64) - (local $15 f64) - (local $16 f64) - (local $17 f64) - (local $18 f64) - local.get $0 + (func $~lib/math/NativeMath.log10 (param $x f64) (result f64) + (local $u i64) + (local $hx i32) + (local $k i32) + (local $sign i32) + (local $f f64) + (local $hfsq f64) + (local $s f64) + (local $z f64) + (local $w f64) + (local $t1 f64) + (local $t2 f64) + (local $r f64) + (local $hi f64) + (local $lo f64) + (local $val_hi f64) + (local $dk f64) + (local $y f64) + (local $val_lo f64) + local.get $x i64.reinterpret_f64 - local.set $1 - local.get $1 + local.set $u + local.get $u i64.const 32 i64.shr_u i32.wrap_i64 - local.set $2 + local.set $hx i32.const 0 - local.set $3 - local.get $2 + local.set $k + local.get $hx i32.const 31 i32.shr_u - local.set $4 - local.get $4 + local.set $sign + local.get $sign if (result i32) i32.const 1 else - local.get $2 + local.get $hx i32.const 1048576 i32.lt_u end if - local.get $1 + local.get $u i64.const 1 i64.shl i64.const 0 i64.eq if f64.const -1 - local.get $0 - local.get $0 + local.get $x + local.get $x f64.mul f64.div return end - local.get $4 + local.get $sign if - local.get $0 - local.get $0 + local.get $x + local.get $x f64.sub f64.const 0 f64.div return end - local.get $3 + local.get $k i32.const 54 i32.sub - local.set $3 - local.get $0 + local.set $k + local.get $x f64.const 18014398509481984 f64.mul - local.set $0 - local.get $0 + local.set $x + local.get $x i64.reinterpret_f64 - local.set $1 - local.get $1 + local.set $u + local.get $u i64.const 32 i64.shr_u i32.wrap_i64 - local.set $2 + local.set $hx else - local.get $2 + local.get $hx i32.const 2146435072 i32.ge_u if - local.get $0 + local.get $x return else - local.get $2 + local.get $hx i32.const 1072693248 i32.eq if (result i32) - local.get $1 + local.get $u i64.const 32 i64.shl i64.const 0 @@ -7988,81 +7988,81 @@ end end end - local.get $2 + local.get $hx i32.const 1072693248 i32.const 1072079006 i32.sub i32.add - local.set $2 - local.get $3 - local.get $2 + local.set $hx + local.get $k + local.get $hx i32.const 20 i32.shr_u i32.const 1023 i32.sub i32.add - local.set $3 - local.get $2 + local.set $k + local.get $hx i32.const 1048575 i32.and i32.const 1072079006 i32.add - local.set $2 - local.get $2 + local.set $hx + local.get $hx i64.extend_i32_u i64.const 32 i64.shl - local.get $1 + local.get $u i64.const 4294967295 i64.and i64.or - local.set $1 - local.get $1 + local.set $u + local.get $u f64.reinterpret_i64 - local.set $0 - local.get $0 + local.set $x + local.get $x f64.const 1 f64.sub - local.set $5 + local.set $f f64.const 0.5 - local.get $5 + local.get $f f64.mul - local.get $5 + local.get $f f64.mul - local.set $6 - local.get $5 + local.set $hfsq + local.get $f f64.const 2 - local.get $5 + local.get $f f64.add f64.div - local.set $7 - local.get $7 - local.get $7 + local.set $s + local.get $s + local.get $s f64.mul - local.set $8 - local.get $8 - local.get $8 + local.set $z + local.get $z + local.get $z f64.mul - local.set $9 - local.get $9 + local.set $w + local.get $w f64.const 0.3999999999940942 - local.get $9 + local.get $w f64.const 0.22222198432149784 - local.get $9 + local.get $w f64.const 0.15313837699209373 f64.mul f64.add f64.mul f64.add f64.mul - local.set $10 - local.get $8 + local.set $t1 + local.get $z f64.const 0.6666666666666735 - local.get $9 + local.get $w f64.const 0.2857142874366239 - local.get $9 + local.get $w f64.const 0.1818357216161805 - local.get $9 + local.get $w f64.const 0.14798198605116586 f64.mul f64.add @@ -8071,171 +8071,171 @@ f64.mul f64.add f64.mul - local.set $11 - local.get $11 - local.get $10 + local.set $t2 + local.get $t2 + local.get $t1 f64.add - local.set $12 - local.get $5 - local.get $6 + local.set $r + local.get $f + local.get $hfsq f64.sub - local.set $13 - local.get $13 + local.set $hi + local.get $hi i64.reinterpret_f64 - local.set $1 - local.get $1 + local.set $u + local.get $u i64.const -4294967296 i64.and - local.set $1 - local.get $1 + local.set $u + local.get $u f64.reinterpret_i64 - local.set $13 - local.get $5 - local.get $13 + local.set $hi + local.get $f + local.get $hi f64.sub - local.get $6 + local.get $hfsq f64.sub - local.get $7 - local.get $6 - local.get $12 + local.get $s + local.get $hfsq + local.get $r f64.add f64.mul f64.add - local.set $14 - local.get $13 + local.set $lo + local.get $hi f64.const 0.4342944818781689 f64.mul - local.set $15 - local.get $3 + local.set $val_hi + local.get $k f64.convert_i32_s - local.set $16 - local.get $16 + local.set $dk + local.get $dk f64.const 0.30102999566361177 f64.mul - local.set $17 - local.get $16 + local.set $y + local.get $dk f64.const 3.694239077158931e-13 f64.mul - local.get $14 - local.get $13 + local.get $lo + local.get $hi f64.add f64.const 2.5082946711645275e-11 f64.mul f64.add - local.get $14 + local.get $lo f64.const 0.4342944818781689 f64.mul f64.add - local.set $18 - local.get $17 - local.get $15 + local.set $val_lo + local.get $y + local.get $val_hi f64.add - local.set $9 - local.get $18 - local.get $17 - local.get $9 + local.set $w + local.get $val_lo + local.get $y + local.get $w f64.sub - local.get $15 + local.get $val_hi f64.add f64.add - local.set $18 - local.get $18 - local.get $9 + local.set $val_lo + local.get $val_lo + local.get $w f64.add ) - (func $std/math/test_log10 (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_log10 (param $value f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMath.log10 - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check if (result i32) - local.get $0 + local.get $value call $~lib/bindings/dom/Math.log10 - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check else i32.const 0 end ) - (func $~lib/math/NativeMathf.log10 (param $0 f32) (result f32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 f32) - (local $5 f32) - (local $6 f32) - (local $7 f32) - (local $8 f32) - (local $9 f32) - (local $10 f32) - (local $11 f32) - (local $12 f32) - (local $13 f32) - (local $14 f32) - local.get $0 + (func $~lib/math/NativeMathf.log10 (param $x f32) (result f32) + (local $ux i32) + (local $k i32) + (local $sign i32) + (local $f f32) + (local $s f32) + (local $z f32) + (local $w f32) + (local $t1 f32) + (local $t2 f32) + (local $r f32) + (local $hfsq f32) + (local $hi f32) + (local $lo f32) + (local $dk f32) + local.get $x i32.reinterpret_f32 - local.set $1 + local.set $ux i32.const 0 - local.set $2 - local.get $1 + local.set $k + local.get $ux i32.const 31 i32.shr_u - local.set $3 - local.get $3 + local.set $sign + local.get $sign if (result i32) i32.const 1 else - local.get $1 + local.get $ux i32.const 8388608 i32.lt_u end if - local.get $1 + local.get $ux i32.const 1 i32.shl i32.const 0 i32.eq if f32.const -1 - local.get $0 - local.get $0 + local.get $x + local.get $x f32.mul f32.div return end - local.get $3 + local.get $sign if - local.get $0 - local.get $0 + local.get $x + local.get $x f32.sub f32.const 0 f32.div return end - local.get $2 + local.get $k i32.const 25 i32.sub - local.set $2 - local.get $0 + local.set $k + local.get $x f32.const 33554432 f32.mul - local.set $0 - local.get $0 + local.set $x + local.get $x i32.reinterpret_f32 - local.set $1 + local.set $ux else - local.get $1 + local.get $ux i32.const 2139095040 i32.ge_u if - local.get $0 + local.get $x return else - local.get $1 + local.get $ux i32.const 1065353216 i32.eq if @@ -8244,193 +8244,193 @@ end end end - local.get $1 + local.get $ux i32.const 1065353216 i32.const 1060439283 i32.sub i32.add - local.set $1 - local.get $2 - local.get $1 + local.set $ux + local.get $k + local.get $ux i32.const 23 i32.shr_u i32.const 127 i32.sub i32.add - local.set $2 - local.get $1 + local.set $k + local.get $ux i32.const 8388607 i32.and i32.const 1060439283 i32.add - local.set $1 - local.get $1 + local.set $ux + local.get $ux f32.reinterpret_i32 - local.set $0 - local.get $0 + local.set $x + local.get $x f32.const 1 f32.sub - local.set $4 - local.get $4 + local.set $f + local.get $f f32.const 2 - local.get $4 + local.get $f f32.add f32.div - local.set $5 - local.get $5 - local.get $5 + local.set $s + local.get $s + local.get $s f32.mul - local.set $6 - local.get $6 - local.get $6 + local.set $z + local.get $z + local.get $z f32.mul - local.set $7 - local.get $7 + local.set $w + local.get $w f32.const 0.40000972151756287 - local.get $7 + local.get $w f32.const 0.24279078841209412 f32.mul f32.add f32.mul - local.set $8 - local.get $6 + local.set $t1 + local.get $z f32.const 0.6666666269302368 - local.get $7 + local.get $w f32.const 0.2849878668785095 f32.mul f32.add f32.mul - local.set $9 - local.get $9 - local.get $8 + local.set $t2 + local.get $t2 + local.get $t1 f32.add - local.set $10 + local.set $r f32.const 0.5 - local.get $4 + local.get $f f32.mul - local.get $4 + local.get $f f32.mul - local.set $11 - local.get $4 - local.get $11 + local.set $hfsq + local.get $f + local.get $hfsq f32.sub - local.set $12 - local.get $12 + local.set $hi + local.get $hi i32.reinterpret_f32 - local.set $1 - local.get $1 + local.set $ux + local.get $ux i32.const -4096 i32.and - local.set $1 - local.get $1 + local.set $ux + local.get $ux f32.reinterpret_i32 - local.set $12 - local.get $4 - local.get $12 + local.set $hi + local.get $f + local.get $hi f32.sub - local.get $11 + local.get $hfsq f32.sub - local.get $5 - local.get $11 - local.get $10 + local.get $s + local.get $hfsq + local.get $r f32.add f32.mul f32.add - local.set $13 - local.get $2 + local.set $lo + local.get $k f32.convert_i32_s - local.set $14 - local.get $14 + local.set $dk + local.get $dk f32.const 7.903415166765626e-07 f32.mul - local.get $13 - local.get $12 + local.get $lo + local.get $hi f32.add f32.const -3.168997136526741e-05 f32.mul f32.add - local.get $13 + local.get $lo f32.const 0.434326171875 f32.mul f32.add - local.get $12 + local.get $hi f32.const 0.434326171875 f32.mul f32.add - local.get $14 + local.get $dk f32.const 0.3010292053222656 f32.mul f32.add ) - (func $std/math/test_log10f (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_log10f (param $value f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMathf.log10 - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $std/math/test_log1p (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_log1p (param $value f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMath.log1p - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check if (result i32) - local.get $0 + local.get $value call $~lib/bindings/dom/Math.log1p - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check else i32.const 0 end ) - (func $std/math/test_log1pf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_log1pf (param $value f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMathf.log1p - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $~lib/math/NativeMath.log2 (param $0 f64) (result f64) - (local $1 f64) - (local $2 i64) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 i32) - (local $13 i64) - (local $14 i32) - (local $15 i64) - (local $16 i64) - (local $17 f64) - (local $18 f64) - (local $19 f64) - (local $20 f64) - (local $21 f64) - (local $22 f64) - (local $23 f64) + (func $~lib/math/NativeMath.log2 (param $x f64) (result f64) + (local $var$1 f64) + (local $var$2 i64) + (local $var$3 f64) + (local $var$4 f64) + (local $var$5 f64) + (local $var$6 f64) + (local $var$7 f64) + (local $var$8 f64) + (local $var$9 f64) + (local $var$10 f64) + (local $var$11 f64) + (local $var$12 i32) + (local $var$13 i64) + (local $var$14 i32) + (local $var$15 i64) + (local $var$16 i64) + (local $var$17 f64) + (local $var$18 f64) + (local $var$19 f64) + (local $var$20 f64) + (local $var$21 f64) + (local $var$22 f64) + (local $var$23 f64) i32.const 0 i32.const 1 i32.lt_s drop block $~lib/util/math/log2_lut|inlined.0 (result f64) - local.get $0 - local.set $1 - local.get $1 + local.get $x + local.set $var$1 + local.get $var$1 i64.reinterpret_f64 - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i64.const 4606800540372828160 i64.sub i64.const 4607381812656734208 @@ -8438,84 +8438,84 @@ i64.sub i64.lt_u if - local.get $1 + local.get $var$1 f64.const 1 f64.sub - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $4 - local.get $3 - local.get $4 + local.set $var$4 + local.get $var$3 + local.get $var$4 f64.sub - local.set $5 - local.get $4 + local.set $var$5 + local.get $var$4 f64.const 1.4426950407214463 f64.mul - local.set $6 - local.get $5 + local.set $var$6 + local.get $var$5 f64.const 1.4426950407214463 f64.mul - local.get $3 + local.get $var$3 f64.const 1.6751713164886512e-10 f64.mul f64.add - local.set $7 - local.get $3 - local.get $3 + local.set $var$7 + local.get $var$3 + local.get $var$3 f64.mul - local.set $8 - local.get $8 - local.get $8 + local.set $var$8 + local.get $var$8 + local.get $var$8 f64.mul - local.set $9 - local.get $8 + local.set $var$9 + local.get $var$8 f64.const -0.7213475204444817 - local.get $3 + local.get $var$3 f64.const 0.48089834696298744 f64.mul f64.add f64.mul - local.set $10 - local.get $6 - local.get $10 + local.set $var$10 + local.get $var$6 + local.get $var$10 f64.add - local.set $11 - local.get $7 - local.get $6 - local.get $11 + local.set $var$11 + local.get $var$7 + local.get $var$6 + local.get $var$11 f64.sub - local.get $10 + local.get $var$10 f64.add f64.add - local.set $7 - local.get $7 - local.get $9 + local.set $var$7 + local.get $var$7 + local.get $var$9 f64.const -0.360673760222145 - local.get $3 + local.get $var$3 f64.const 0.2885390081805197 f64.mul f64.add - local.get $8 + local.get $var$8 f64.const -0.24044917405728863 - local.get $3 + local.get $var$3 f64.const 0.2060992861022954 f64.mul f64.add f64.mul f64.add - local.get $9 + local.get $var$9 f64.const -0.18033596705327856 - local.get $3 + local.get $var$3 f64.const 0.1603032746063156 f64.mul f64.add - local.get $8 + local.get $var$8 f64.const -0.14483316576701266 - local.get $3 + local.get $var$3 f64.const 0.13046826811283835 f64.mul f64.add @@ -8525,18 +8525,18 @@ f64.add f64.mul f64.add - local.set $7 - local.get $11 - local.get $7 + local.set $var$7 + local.get $var$11 + local.get $var$7 f64.add br $~lib/util/math/log2_lut|inlined.0 end - local.get $2 + local.get $var$2 i64.const 48 i64.shr_u i32.wrap_i64 - local.set $12 - local.get $12 + local.set $var$12 + local.get $var$12 i32.const 16 i32.sub i32.const 32752 @@ -8544,65 +8544,65 @@ i32.sub i32.ge_u if - local.get $2 + local.get $var$2 i64.const 1 i64.shl i64.const 0 i64.eq if f64.const -1 - local.get $1 - local.get $1 + local.get $var$1 + local.get $var$1 f64.mul f64.div br $~lib/util/math/log2_lut|inlined.0 end - local.get $2 + local.get $var$2 i64.const 9218868437227405312 i64.eq if - local.get $1 + local.get $var$1 br $~lib/util/math/log2_lut|inlined.0 end - local.get $12 + local.get $var$12 i32.const 32768 i32.and if (result i32) i32.const 1 else - local.get $12 + local.get $var$12 i32.const 32752 i32.and i32.const 32752 i32.eq end if - local.get $1 - local.get $1 + local.get $var$1 + local.get $var$1 f64.sub - local.get $1 - local.get $1 + local.get $var$1 + local.get $var$1 f64.sub f64.div br $~lib/util/math/log2_lut|inlined.0 end - local.get $1 + local.get $var$1 f64.const 4503599627370496 f64.mul i64.reinterpret_f64 - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i64.const 52 i64.const 52 i64.shl i64.sub - local.set $2 + local.set $var$2 end - local.get $2 + local.get $var$2 i64.const 4604367669032910848 i64.sub - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 i64.const 52 i32.const 6 i64.extend_i32_s @@ -8612,188 +8612,188 @@ i64.extend_i32_s i64.and i32.wrap_i64 - local.set $14 - local.get $13 + local.set $var$14 + local.get $var$13 i64.const 52 i64.shr_s - local.set $15 - local.get $2 - local.get $13 + local.set $var$15 + local.get $var$2 + local.get $var$13 i64.const -4503599627370496 i64.and i64.sub - local.set $16 + local.set $var$16 i32.const 6944 - local.get $14 + local.get $var$14 i32.const 1 i32.const 3 i32.add i32.shl i32.add f64.load - local.set $11 + local.set $var$11 i32.const 6944 - local.get $14 + local.get $var$14 i32.const 1 i32.const 3 i32.add i32.shl i32.add f64.load offset=8 - local.set $10 - local.get $16 + local.set $var$10 + local.get $var$16 f64.reinterpret_i64 - local.set $9 - local.get $15 + local.set $var$9 + local.get $var$15 f64.convert_i64_s - local.set $8 + local.set $var$8 i32.const 7968 - local.get $14 + local.get $var$14 i32.const 1 i32.const 3 i32.add i32.shl i32.add f64.load - local.set $7 + local.set $var$7 i32.const 7968 - local.get $14 + local.get $var$14 i32.const 1 i32.const 3 i32.add i32.shl i32.add f64.load offset=8 - local.set $6 - local.get $9 - local.get $7 + local.set $var$6 + local.get $var$9 + local.get $var$7 f64.sub - local.get $6 + local.get $var$6 f64.sub - local.get $11 + local.get $var$11 f64.mul - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 f64.sub - local.set $3 - local.get $4 + local.set $var$3 + local.get $var$4 f64.const 1.4426950407214463 f64.mul - local.set $17 - local.get $3 + local.set $var$17 + local.get $var$3 f64.const 1.4426950407214463 f64.mul - local.get $5 + local.get $var$5 f64.const 1.6751713164886512e-10 f64.mul f64.add - local.set $18 - local.get $8 - local.get $10 + local.set $var$18 + local.get $var$8 + local.get $var$10 f64.add - local.set $19 - local.get $19 - local.get $17 + local.set $var$19 + local.get $var$19 + local.get $var$17 f64.add - local.set $20 - local.get $19 - local.get $20 + local.set $var$20 + local.get $var$19 + local.get $var$20 f64.sub - local.get $17 + local.get $var$17 f64.add - local.get $18 + local.get $var$18 f64.add - local.set $21 - local.get $5 - local.get $5 + local.set $var$21 + local.get $var$5 + local.get $var$5 f64.mul - local.set $22 + local.set $var$22 f64.const -0.7213475204444882 - local.get $5 + local.get $var$5 f64.const 0.4808983469629985 f64.mul f64.add - local.get $22 + local.get $var$22 f64.const -0.36067375954075914 - local.get $5 + local.get $var$5 f64.const 0.2885390073180969 f64.mul f64.add f64.mul f64.add - local.get $22 - local.get $22 + local.get $var$22 + local.get $var$22 f64.mul f64.const -0.2404693555628422 - local.get $5 + local.get $var$5 f64.const 0.2061202382173603 f64.mul f64.add f64.mul f64.add - local.set $23 - local.get $21 - local.get $22 - local.get $23 + local.set $var$23 + local.get $var$21 + local.get $var$22 + local.get $var$23 f64.mul f64.add - local.get $20 + local.get $var$20 f64.add end return ) - (func $std/math/test_log2 (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_log2 (param $value f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMath.log2 - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check if (result i32) - local.get $0 + local.get $value call $~lib/bindings/dom/Math.log2 - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check else i32.const 0 end ) - (func $~lib/math/NativeMathf.log2 (param $0 f32) (result f32) - (local $1 f32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 f64) - (local $13 f64) - (local $14 f64) - (local $15 f64) + (func $~lib/math/NativeMathf.log2 (param $x f32) (result f32) + (local $var$1 f32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 f64) + (local $var$9 f64) + (local $var$10 f64) + (local $var$11 f64) + (local $var$12 f64) + (local $var$13 f64) + (local $var$14 f64) + (local $var$15 f64) i32.const 0 i32.const 1 i32.lt_s drop block $~lib/util/math/log2f_lut|inlined.0 (result f32) - local.get $0 - local.set $1 - local.get $1 + local.get $x + local.set $var$1 + local.get $var$1 i32.reinterpret_f32 - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const 8388608 i32.sub i32.const 2139095040 @@ -8801,7 +8801,7 @@ i32.sub i32.ge_u if - local.get $2 + local.get $var$2 i32.const 2 i32.mul i32.const 0 @@ -8811,854 +8811,854 @@ f32.neg br $~lib/util/math/log2f_lut|inlined.0 end - local.get $2 + local.get $var$2 i32.const 2139095040 i32.eq if - local.get $1 + local.get $var$1 br $~lib/util/math/log2f_lut|inlined.0 end - local.get $2 + local.get $var$2 i32.const 31 i32.shr_u if (result i32) i32.const 1 else - local.get $2 + local.get $var$2 i32.const 2 i32.mul i32.const -16777216 i32.ge_u end if - local.get $1 - local.get $1 + local.get $var$1 + local.get $var$1 f32.sub - local.get $1 - local.get $1 + local.get $var$1 + local.get $var$1 f32.sub f32.div br $~lib/util/math/log2f_lut|inlined.0 end - local.get $1 + local.get $var$1 f32.const 8388608 f32.mul i32.reinterpret_f32 - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const 23 i32.const 23 i32.shl i32.sub - local.set $2 + local.set $var$2 end - local.get $2 + local.get $var$2 i32.const 1060306944 i32.sub - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const 23 i32.const 4 i32.sub i32.shr_u i32.const 15 i32.and - local.set $4 - local.get $3 + local.set $var$4 + local.get $var$3 i32.const -8388608 i32.and - local.set $5 - local.get $2 - local.get $5 + local.set $var$5 + local.get $var$2 + local.get $var$5 i32.sub - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 23 i32.shr_s - local.set $7 + local.set $var$7 i32.const 8992 - local.get $4 + local.get $var$4 i32.const 1 i32.const 3 i32.add i32.shl i32.add f64.load - local.set $8 + local.set $var$8 i32.const 8992 - local.get $4 + local.get $var$4 i32.const 1 i32.const 3 i32.add i32.shl i32.add f64.load offset=8 - local.set $9 - local.get $6 + local.set $var$9 + local.get $var$6 f32.reinterpret_i32 f64.promote_f32 - local.set $10 - local.get $10 - local.get $8 + local.set $var$10 + local.get $var$10 + local.get $var$8 f64.mul f64.const 1 f64.sub - local.set $11 - local.get $9 - local.get $7 + local.set $var$11 + local.get $var$9 + local.get $var$7 f64.convert_i32_s f64.add - local.set $12 + local.set $var$12 f64.const 0.4811247078767291 - local.get $11 + local.get $var$11 f64.mul f64.const -0.7213476299867769 f64.add - local.set $13 + local.set $var$13 f64.const 1.4426950186867042 - local.get $11 + local.get $var$11 f64.mul - local.get $12 + local.get $var$12 f64.add - local.set $14 - local.get $11 - local.get $11 + local.set $var$14 + local.get $var$11 + local.get $var$11 f64.mul - local.set $15 - local.get $13 + local.set $var$15 + local.get $var$13 f64.const -0.36051725506874704 - local.get $15 + local.get $var$15 f64.mul f64.add - local.set $13 - local.get $13 - local.get $15 + local.set $var$13 + local.get $var$13 + local.get $var$15 f64.mul - local.get $14 + local.get $var$14 f64.add - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 f32.demote_f64 end return ) - (func $std/math/test_log2f (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_log2f (param $value f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMathf.log2 - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $std/math/test_max (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) - (local $5 f64) - (local $6 f64) - local.get $0 - local.set $6 - local.get $1 - local.set $5 - local.get $6 - local.get $5 + (func $std/math/test_max (param $left f64) (param $right f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + (local $var$5 f64) + (local $var$6 f64) + local.get $left + local.set $var$6 + local.get $right + local.set $var$5 + local.get $var$6 + local.get $var$5 f64.max - local.get $2 - local.get $3 - local.get $4 + local.get $expected + local.get $error + local.get $flags call $std/math/check if (result i32) - local.get $0 - local.get $1 + local.get $left + local.get $right call $~lib/bindings/dom/Math.max - local.get $2 - local.get $3 - local.get $4 + local.get $expected + local.get $error + local.get $flags call $std/math/check else i32.const 0 end ) - (func $std/math/test_maxf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) - (local $5 f32) - (local $6 f32) - local.get $0 - local.set $6 - local.get $1 - local.set $5 - local.get $6 - local.get $5 + (func $std/math/test_maxf (param $left f32) (param $right f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + (local $var$5 f32) + (local $var$6 f32) + local.get $left + local.set $var$6 + local.get $right + local.set $var$5 + local.get $var$6 + local.get $var$5 f32.max - local.get $2 - local.get $3 - local.get $4 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $std/math/test_min (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) - (local $5 f64) - (local $6 f64) - local.get $0 - local.set $6 - local.get $1 - local.set $5 - local.get $6 - local.get $5 + (func $std/math/test_min (param $left f64) (param $right f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + (local $var$5 f64) + (local $var$6 f64) + local.get $left + local.set $var$6 + local.get $right + local.set $var$5 + local.get $var$6 + local.get $var$5 f64.min - local.get $2 - local.get $3 - local.get $4 + local.get $expected + local.get $error + local.get $flags call $std/math/check if (result i32) - local.get $0 - local.get $1 + local.get $left + local.get $right call $~lib/bindings/dom/Math.min - local.get $2 - local.get $3 - local.get $4 + local.get $expected + local.get $error + local.get $flags call $std/math/check else i32.const 0 end ) - (func $std/math/test_minf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) - (local $5 f32) - (local $6 f32) - local.get $0 - local.set $6 - local.get $1 - local.set $5 - local.get $6 - local.get $5 + (func $std/math/test_minf (param $left f32) (param $right f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + (local $var$5 f32) + (local $var$6 f32) + local.get $left + local.set $var$6 + local.get $right + local.set $var$5 + local.get $var$6 + local.get $var$5 f32.min - local.get $2 - local.get $3 - local.get $4 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $~lib/math/NativeMath.mod (param $0 f64) (param $1 f64) (result f64) - (local $2 i64) - (local $3 i64) - (local $4 i64) - (local $5 i64) - (local $6 i64) - (local $7 i64) - (local $8 f64) - (local $9 i64) - (local $10 i32) - (local $11 i64) - local.get $1 + (func $~lib/math/NativeMath.mod (param $x f64) (param $y f64) (result f64) + (local $ux i64) + (local $uy i64) + (local $ex i64) + (local $ey i64) + (local $sx i64) + (local $uy1 i64) + (local $var$8 f64) + (local $ux1 i64) + (local $var$10 i32) + (local $shift i64) + local.get $y f64.abs f64.const 1 f64.eq if - local.get $0 - local.get $0 + local.get $x + local.get $x f64.trunc f64.sub - local.get $0 + local.get $x f64.copysign return end - local.get $0 + local.get $x i64.reinterpret_f64 - local.set $2 - local.get $1 + local.set $ux + local.get $y i64.reinterpret_f64 - local.set $3 - local.get $2 + local.set $uy + local.get $ux i64.const 52 i64.shr_u i64.const 2047 i64.and - local.set $4 - local.get $3 + local.set $ex + local.get $uy i64.const 52 i64.shr_u i64.const 2047 i64.and - local.set $5 - local.get $2 + local.set $ey + local.get $ux i64.const 63 i64.shr_u - local.set $6 - local.get $3 + local.set $sx + local.get $uy i64.const 1 i64.shl - local.set $7 - local.get $7 + local.set $uy1 + local.get $uy1 i64.const 0 i64.eq if (result i32) i32.const 1 else - local.get $4 + local.get $ex i64.const 2047 i64.eq end if (result i32) i32.const 1 else - local.get $1 - local.get $1 + local.get $y + local.get $y f64.ne end if - local.get $0 - local.get $1 + local.get $x + local.get $y f64.mul - local.set $8 - local.get $8 - local.get $8 + local.set $var$8 + local.get $var$8 + local.get $var$8 f64.div return end - local.get $2 + local.get $ux i64.const 1 i64.shl - local.set $9 - local.get $9 - local.get $7 + local.set $ux1 + local.get $ux1 + local.get $uy1 i64.le_u if - local.get $0 - local.get $9 - local.get $7 + local.get $x + local.get $ux1 + local.get $uy1 i64.ne f64.convert_i32_u f64.mul return end - local.get $4 + local.get $ex i64.const 0 i64.ne i32.eqz if - local.get $4 - local.get $2 + local.get $ex + local.get $ux i64.const 12 i64.shl i64.clz i64.sub - local.set $4 - local.get $2 + local.set $ex + local.get $ux i64.const 1 - local.get $4 + local.get $ex i64.sub i64.shl - local.set $2 + local.set $ux else - local.get $2 + local.get $ux i64.const -1 i64.const 12 i64.shr_u i64.and - local.set $2 - local.get $2 + local.set $ux + local.get $ux i64.const 1 i64.const 52 i64.shl i64.or - local.set $2 + local.set $ux end - local.get $5 + local.get $ey i64.const 0 i64.ne i32.eqz if - local.get $5 - local.get $3 + local.get $ey + local.get $uy i64.const 12 i64.shl i64.clz i64.sub - local.set $5 - local.get $3 + local.set $ey + local.get $uy i64.const 1 - local.get $5 + local.get $ey i64.sub i64.shl - local.set $3 + local.set $uy else - local.get $3 + local.get $uy i64.const -1 i64.const 12 i64.shr_u i64.and - local.set $3 - local.get $3 + local.set $uy + local.get $uy i64.const 1 i64.const 52 i64.shl i64.or - local.set $3 + local.set $uy end loop $while-continue|0 - local.get $4 - local.get $5 + local.get $ex + local.get $ey i64.gt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $2 - local.get $3 + local.get $ux + local.get $uy i64.ge_u if - local.get $2 - local.get $3 + local.get $ux + local.get $uy i64.eq if f64.const 0 - local.get $0 + local.get $x f64.mul return end - local.get $2 - local.get $3 + local.get $ux + local.get $uy i64.sub - local.set $2 + local.set $ux end - local.get $2 + local.get $ux i64.const 1 i64.shl - local.set $2 - local.get $4 + local.set $ux + local.get $ex i64.const 1 i64.sub - local.set $4 + local.set $ex br $while-continue|0 end end - local.get $2 - local.get $3 + local.get $ux + local.get $uy i64.ge_u if - local.get $2 - local.get $3 + local.get $ux + local.get $uy i64.eq if f64.const 0 - local.get $0 + local.get $x f64.mul return end - local.get $2 - local.get $3 + local.get $ux + local.get $uy i64.sub - local.set $2 + local.set $ux end - local.get $2 + local.get $ux i64.const 11 i64.shl i64.clz - local.set $11 - local.get $4 - local.get $11 + local.set $shift + local.get $ex + local.get $shift i64.sub - local.set $4 - local.get $2 - local.get $11 + local.set $ex + local.get $ux + local.get $shift i64.shl - local.set $2 - local.get $4 + local.set $ux + local.get $ex i64.const 0 i64.gt_s if - local.get $2 + local.get $ux i64.const 1 i64.const 52 i64.shl i64.sub - local.set $2 - local.get $2 - local.get $4 + local.set $ux + local.get $ux + local.get $ex i64.const 52 i64.shl i64.or - local.set $2 + local.set $ux else - local.get $2 + local.get $ux i64.const 0 - local.get $4 + local.get $ex i64.sub i64.const 1 i64.add i64.shr_u - local.set $2 + local.set $ux end - local.get $2 - local.get $6 + local.get $ux + local.get $sx i64.const 63 i64.shl i64.or f64.reinterpret_i64 ) - (func $std/math/test_mod (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) - local.get $0 - local.get $1 + (func $std/math/test_mod (param $left f64) (param $right f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + local.get $left + local.get $right call $~lib/math/NativeMath.mod - local.get $2 - local.get $3 - local.get $4 + local.get $expected + local.get $error + local.get $flags call $std/math/check if (result i32) - local.get $0 - local.get $1 + local.get $left + local.get $right call $std/math/mod - local.get $2 - local.get $3 - local.get $4 + local.get $expected + local.get $error + local.get $flags call $std/math/check else i32.const 0 end ) - (func $~lib/math/NativeMathf.mod (param $0 f32) (param $1 f32) (result f32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 f32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/math/NativeMathf.mod (param $x f32) (param $y f32) (result f32) + (local $ux i32) + (local $uy i32) + (local $ex i32) + (local $ey i32) + (local $sm i32) + (local $uy1 i32) + (local $var$8 f32) + (local $ux1 i32) + (local $var$10 i32) + (local $shift i32) + local.get $y f32.abs f32.const 1 f32.eq if - local.get $0 - local.get $0 + local.get $x + local.get $x f32.trunc f32.sub - local.get $0 + local.get $x f32.copysign return end - local.get $0 + local.get $x i32.reinterpret_f32 - local.set $2 - local.get $1 + local.set $ux + local.get $y i32.reinterpret_f32 - local.set $3 - local.get $2 + local.set $uy + local.get $ux i32.const 23 i32.shr_u i32.const 255 i32.and - local.set $4 - local.get $3 + local.set $ex + local.get $uy i32.const 23 i32.shr_u i32.const 255 i32.and - local.set $5 - local.get $2 + local.set $ey + local.get $ux i32.const -2147483648 i32.and - local.set $6 - local.get $3 + local.set $sm + local.get $uy i32.const 1 i32.shl - local.set $7 - local.get $7 + local.set $uy1 + local.get $uy1 i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $4 + local.get $ex i32.const 255 i32.eq end if (result i32) i32.const 1 else - local.get $1 - local.get $1 + local.get $y + local.get $y f32.ne end if - local.get $0 - local.get $1 + local.get $x + local.get $y f32.mul - local.set $8 - local.get $8 - local.get $8 + local.set $var$8 + local.get $var$8 + local.get $var$8 f32.div return end - local.get $2 + local.get $ux i32.const 1 i32.shl - local.set $9 - local.get $9 - local.get $7 + local.set $ux1 + local.get $ux1 + local.get $uy1 i32.le_u if - local.get $0 - local.get $9 - local.get $7 + local.get $x + local.get $ux1 + local.get $uy1 i32.ne f32.convert_i32_u f32.mul return end - local.get $4 + local.get $ex i32.eqz if - local.get $4 - local.get $2 + local.get $ex + local.get $ux i32.const 9 i32.shl i32.clz i32.sub - local.set $4 - local.get $2 + local.set $ex + local.get $ux i32.const 1 - local.get $4 + local.get $ex i32.sub i32.shl - local.set $2 + local.set $ux else - local.get $2 + local.get $ux i32.const -1 i32.const 9 i32.shr_u i32.and - local.set $2 - local.get $2 + local.set $ux + local.get $ux i32.const 1 i32.const 23 i32.shl i32.or - local.set $2 + local.set $ux end - local.get $5 + local.get $ey i32.eqz if - local.get $5 - local.get $3 + local.get $ey + local.get $uy i32.const 9 i32.shl i32.clz i32.sub - local.set $5 - local.get $3 + local.set $ey + local.get $uy i32.const 1 - local.get $5 + local.get $ey i32.sub i32.shl - local.set $3 + local.set $uy else - local.get $3 + local.get $uy i32.const -1 i32.const 9 i32.shr_u i32.and - local.set $3 - local.get $3 + local.set $uy + local.get $uy i32.const 1 i32.const 23 i32.shl i32.or - local.set $3 + local.set $uy end loop $while-continue|0 - local.get $4 - local.get $5 + local.get $ex + local.get $ey i32.gt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $2 - local.get $3 + local.get $ux + local.get $uy i32.ge_u if - local.get $2 - local.get $3 + local.get $ux + local.get $uy i32.eq if f32.const 0 - local.get $0 + local.get $x f32.mul return end - local.get $2 - local.get $3 + local.get $ux + local.get $uy i32.sub - local.set $2 + local.set $ux end - local.get $2 + local.get $ux i32.const 1 i32.shl - local.set $2 - local.get $4 + local.set $ux + local.get $ex i32.const 1 i32.sub - local.set $4 + local.set $ex br $while-continue|0 end end - local.get $2 - local.get $3 + local.get $ux + local.get $uy i32.ge_u if - local.get $2 - local.get $3 + local.get $ux + local.get $uy i32.eq if f32.const 0 - local.get $0 + local.get $x f32.mul return end - local.get $2 - local.get $3 + local.get $ux + local.get $uy i32.sub - local.set $2 + local.set $ux end - local.get $2 + local.get $ux i32.const 8 i32.shl i32.clz - local.set $11 - local.get $4 - local.get $11 + local.set $shift + local.get $ex + local.get $shift i32.sub - local.set $4 - local.get $2 - local.get $11 + local.set $ex + local.get $ux + local.get $shift i32.shl - local.set $2 - local.get $4 + local.set $ux + local.get $ex i32.const 0 i32.gt_s if - local.get $2 + local.get $ux i32.const 1 i32.const 23 i32.shl i32.sub - local.set $2 - local.get $2 - local.get $4 + local.set $ux + local.get $ux + local.get $ex i32.const 23 i32.shl i32.or - local.set $2 + local.set $ux else - local.get $2 + local.get $ux i32.const 0 - local.get $4 + local.get $ex i32.sub i32.const 1 i32.add i32.shr_u - local.set $2 + local.set $ux end - local.get $2 - local.get $6 + local.get $ux + local.get $sm i32.or f32.reinterpret_i32 ) - (func $std/math/test_modf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) - local.get $0 - local.get $1 + (func $std/math/test_modf (param $left f32) (param $right f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + local.get $left + local.get $right call $~lib/math/NativeMathf.mod - local.get $2 - local.get $3 - local.get $4 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $~lib/math/NativeMath.pow (param $0 f64) (param $1 f64) (result f64) - (local $2 f64) - (local $3 f64) - (local $4 i32) - (local $5 i64) - (local $6 i64) - (local $7 i64) - (local $8 i64) - (local $9 i64) - (local $10 f64) - (local $11 i64) - (local $12 i32) - (local $13 i64) - (local $14 i64) - (local $15 f64) - (local $16 f64) - (local $17 f64) - (local $18 f64) - (local $19 f64) - (local $20 f64) - (local $21 f64) - (local $22 f64) - (local $23 f64) - (local $24 f64) - (local $25 f64) - (local $26 f64) - (local $27 f64) - (local $28 f64) - (local $29 f64) - (local $30 f64) - (local $31 f64) - (local $32 f64) - (local $33 f64) - (local $34 f64) - (local $35 f64) - (local $36 f64) - (local $37 f64) - (local $38 f64) - (local $39 i32) - (local $40 i32) - (local $41 i32) - (local $42 i32) - (local $43 i64) - (local $44 i64) - local.get $1 + (func $~lib/math/NativeMath.pow (param $x f64) (param $y f64) (result f64) + (local $var$2 f64) + (local $var$3 f64) + (local $var$4 i32) + (local $var$5 i64) + (local $var$6 i64) + (local $var$7 i64) + (local $var$8 i64) + (local $var$9 i64) + (local $var$10 f64) + (local $var$11 i64) + (local $var$12 i32) + (local $var$13 i64) + (local $var$14 i64) + (local $var$15 f64) + (local $var$16 f64) + (local $var$17 f64) + (local $var$18 f64) + (local $var$19 f64) + (local $var$20 f64) + (local $var$21 f64) + (local $var$22 f64) + (local $var$23 f64) + (local $var$24 f64) + (local $var$25 f64) + (local $var$26 f64) + (local $var$27 f64) + (local $var$28 f64) + (local $var$29 f64) + (local $var$30 f64) + (local $var$31 f64) + (local $var$32 f64) + (local $var$33 f64) + (local $var$34 f64) + (local $var$35 f64) + (local $var$36 f64) + (local $var$37 f64) + (local $var$38 f64) + (local $var$39 i32) + (local $var$40 i32) + (local $var$41 i32) + (local $var$42 i32) + (local $var$43 i64) + (local $var$44 i64) + local.get $y f64.abs f64.const 2 f64.le if - local.get $1 + local.get $y f64.const 2 f64.eq if - local.get $0 - local.get $0 + local.get $x + local.get $x f64.mul return end - local.get $1 + local.get $y f64.const 0.5 f64.eq if - local.get $0 + local.get $x f64.sqrt f64.abs f64.const inf - local.get $0 + local.get $x f64.const inf f64.neg f64.ne select return end - local.get $1 + local.get $y f64.const -1 f64.eq if f64.const 1 - local.get $0 + local.get $x f64.div return end - local.get $1 + local.get $y f64.const 1 f64.eq if - local.get $0 + local.get $x return end - local.get $1 + local.get $y f64.const 0 f64.eq if @@ -9671,27 +9671,27 @@ i32.lt_s drop block $~lib/util/math/pow_lut|inlined.0 (result f64) - local.get $0 - local.set $3 - local.get $1 - local.set $2 + local.get $x + local.set $var$3 + local.get $y + local.set $var$2 i32.const 0 - local.set $4 - local.get $3 + local.set $var$4 + local.get $var$3 i64.reinterpret_f64 - local.set $5 - local.get $2 + local.set $var$5 + local.get $var$2 i64.reinterpret_f64 - local.set $6 - local.get $5 + local.set $var$6 + local.get $var$5 i64.const 52 i64.shr_u - local.set $7 - local.get $6 + local.set $var$7 + local.get $var$6 i64.const 52 i64.shr_u - local.set $8 - local.get $7 + local.set $var$8 + local.get $var$7 i64.const 1 i64.sub i64.const 2047 @@ -9701,7 +9701,7 @@ if (result i32) i32.const 1 else - local.get $8 + local.get $var$8 i64.const 2047 i64.and i64.const 958 @@ -9712,9 +9712,9 @@ i64.ge_u end if - local.get $6 - local.set $9 - local.get $9 + local.get $var$6 + local.set $var$9 + local.get $var$9 i64.const 1 i64.shl i64.const 1 @@ -9724,7 +9724,7 @@ i64.sub i64.ge_u if - local.get $6 + local.get $var$6 i64.const 1 i64.shl i64.const 0 @@ -9733,14 +9733,14 @@ f64.const 1 br $~lib/util/math/pow_lut|inlined.0 end - local.get $5 + local.get $var$5 i64.const 4607182418800017408 i64.eq if f64.const nan:0x8000000000000 br $~lib/util/math/pow_lut|inlined.0 end - local.get $5 + local.get $var$5 i64.const 1 i64.shl i64.const -9007199254740992 @@ -9748,19 +9748,19 @@ if (result i32) i32.const 1 else - local.get $6 + local.get $var$6 i64.const 1 i64.shl i64.const -9007199254740992 i64.gt_u end if - local.get $3 - local.get $2 + local.get $var$3 + local.get $var$2 f64.add br $~lib/util/math/pow_lut|inlined.0 end - local.get $5 + local.get $var$5 i64.const 1 i64.shl i64.const 9214364837600034816 @@ -9769,12 +9769,12 @@ f64.const nan:0x8000000000000 br $~lib/util/math/pow_lut|inlined.0 end - local.get $5 + local.get $var$5 i64.const 1 i64.shl i64.const 9214364837600034816 i64.lt_u - local.get $6 + local.get $var$6 i64.const 63 i64.shr_u i64.const 0 @@ -9785,14 +9785,14 @@ f64.const 0 br $~lib/util/math/pow_lut|inlined.0 end - local.get $2 - local.get $2 + local.get $var$2 + local.get $var$2 f64.mul br $~lib/util/math/pow_lut|inlined.0 end - local.get $5 - local.set $9 - local.get $9 + local.get $var$5 + local.set $var$9 + local.get $var$9 i64.const 1 i64.shl i64.const 1 @@ -9802,32 +9802,32 @@ i64.sub i64.ge_u if - local.get $3 - local.get $3 + local.get $var$3 + local.get $var$3 f64.mul - local.set $10 - local.get $5 + local.set $var$10 + local.get $var$5 i64.const 63 i64.shr_u i32.wrap_i64 if (result i32) block $~lib/util/math/checkint|inlined.0 (result i32) - local.get $6 - local.set $9 - local.get $9 + local.get $var$6 + local.set $var$9 + local.get $var$9 i64.const 52 i64.shr_u i64.const 2047 i64.and - local.set $11 - local.get $11 + local.set $var$11 + local.get $var$11 i64.const 1023 i64.lt_u if i32.const 0 br $~lib/util/math/checkint|inlined.0 end - local.get $11 + local.get $var$11 i64.const 1023 i64.const 52 i64.add @@ -9840,12 +9840,12 @@ i64.const 1023 i64.const 52 i64.add - local.get $11 + local.get $var$11 i64.sub i64.shl - local.set $11 - local.get $9 - local.get $11 + local.set $var$11 + local.get $var$9 + local.get $var$11 i64.const 1 i64.sub i64.and @@ -9855,8 +9855,8 @@ i32.const 0 br $~lib/util/math/checkint|inlined.0 end - local.get $9 - local.get $11 + local.get $var$9 + local.get $var$11 i64.and i64.const 0 i64.ne @@ -9872,43 +9872,43 @@ i32.const 0 end if - local.get $10 + local.get $var$10 f64.neg - local.set $10 + local.set $var$10 end - local.get $6 + local.get $var$6 i64.const 0 i64.lt_s if (result f64) f64.const 1 - local.get $10 + local.get $var$10 f64.div else - local.get $10 + local.get $var$10 end br $~lib/util/math/pow_lut|inlined.0 end - local.get $5 + local.get $var$5 i64.const 0 i64.lt_s if block $~lib/util/math/checkint|inlined.1 (result i32) - local.get $6 - local.set $9 - local.get $9 + local.get $var$6 + local.set $var$9 + local.get $var$9 i64.const 52 i64.shr_u i64.const 2047 i64.and - local.set $11 - local.get $11 + local.set $var$11 + local.get $var$11 i64.const 1023 i64.lt_u if i32.const 0 br $~lib/util/math/checkint|inlined.1 end - local.get $11 + local.get $var$11 i64.const 1023 i64.const 52 i64.add @@ -9921,12 +9921,12 @@ i64.const 1023 i64.const 52 i64.add - local.get $11 + local.get $var$11 i64.sub i64.shl - local.set $11 - local.get $9 - local.get $11 + local.set $var$11 + local.get $var$9 + local.get $var$11 i64.const 1 i64.sub i64.and @@ -9936,8 +9936,8 @@ i32.const 0 br $~lib/util/math/checkint|inlined.1 end - local.get $9 - local.get $11 + local.get $var$9 + local.get $var$11 i64.and i64.const 0 i64.ne @@ -9947,37 +9947,37 @@ end i32.const 2 end - local.set $12 - local.get $12 + local.set $var$12 + local.get $var$12 i32.const 0 i32.eq if - local.get $3 - local.get $3 + local.get $var$3 + local.get $var$3 f64.sub - local.get $3 - local.get $3 + local.get $var$3 + local.get $var$3 f64.sub f64.div br $~lib/util/math/pow_lut|inlined.0 end - local.get $12 + local.get $var$12 i32.const 1 i32.eq if i32.const 262144 - local.set $4 + local.set $var$4 end - local.get $5 + local.get $var$5 i64.const 9223372036854775807 i64.and - local.set $5 - local.get $7 + local.set $var$5 + local.get $var$7 i64.const 2047 i64.and - local.set $7 + local.set $var$7 end - local.get $8 + local.get $var$8 i64.const 2047 i64.and i64.const 958 @@ -9987,14 +9987,14 @@ i64.sub i64.ge_u if - local.get $5 + local.get $var$5 i64.const 4607182418800017408 i64.eq if f64.const 1 br $~lib/util/math/pow_lut|inlined.0 end - local.get $8 + local.get $var$8 i64.const 2047 i64.and i64.const 958 @@ -10003,10 +10003,10 @@ f64.const 1 br $~lib/util/math/pow_lut|inlined.0 end - local.get $5 + local.get $var$5 i64.const 4607182418800017408 i64.gt_u - local.get $8 + local.get $var$8 i64.const 2048 i64.lt_u i32.eq @@ -10017,34 +10017,34 @@ end br $~lib/util/math/pow_lut|inlined.0 end - local.get $7 + local.get $var$7 i64.const 0 i64.eq if - local.get $3 + local.get $var$3 f64.const 4503599627370496 f64.mul i64.reinterpret_f64 - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i64.const 9223372036854775807 i64.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i64.const 52 i64.const 52 i64.shl i64.sub - local.set $5 + local.set $var$5 end end - local.get $5 - local.set $9 - local.get $9 + local.get $var$5 + local.set $var$9 + local.get $var$9 i64.const 4604531861337669632 i64.sub - local.set $11 - local.get $11 + local.set $var$11 + local.get $var$11 i64.const 52 i32.const 7 i64.extend_i32_s @@ -10054,150 +10054,150 @@ i64.extend_i32_s i64.and i32.wrap_i64 - local.set $12 - local.get $11 + local.set $var$12 + local.get $var$11 i64.const 52 i64.shr_s - local.set $13 - local.get $9 - local.get $11 + local.set $var$13 + local.get $var$9 + local.get $var$11 i64.const 4095 i64.const 52 i64.shl i64.and i64.sub - local.set $14 - local.get $14 + local.set $var$14 + local.get $var$14 f64.reinterpret_i64 - local.set $10 - local.get $13 + local.set $var$10 + local.get $var$13 f64.convert_i64_s - local.set $15 + local.set $var$15 i32.const 9248 - local.get $12 + local.get $var$12 i32.const 2 i32.const 3 i32.add i32.shl i32.add f64.load - local.set $16 + local.set $var$16 i32.const 9248 - local.get $12 + local.get $var$12 i32.const 2 i32.const 3 i32.add i32.shl i32.add f64.load offset=16 - local.set $17 + local.set $var$17 i32.const 9248 - local.get $12 + local.get $var$12 i32.const 2 i32.const 3 i32.add i32.shl i32.add f64.load offset=24 - local.set $18 - local.get $14 + local.set $var$18 + local.get $var$14 i64.const 2147483648 i64.add i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $19 - local.get $10 - local.get $19 + local.set $var$19 + local.get $var$10 + local.get $var$19 f64.sub - local.set $20 - local.get $19 - local.get $16 + local.set $var$20 + local.get $var$19 + local.get $var$16 f64.mul f64.const 1 f64.sub - local.set $21 - local.get $20 - local.get $16 + local.set $var$21 + local.get $var$20 + local.get $var$16 f64.mul - local.set $22 - local.get $21 - local.get $22 + local.set $var$22 + local.get $var$21 + local.get $var$22 f64.add - local.set $23 - local.get $15 + local.set $var$23 + local.get $var$15 f64.const 0.6931471805598903 f64.mul - local.get $17 + local.get $var$17 f64.add - local.set $24 - local.get $24 - local.get $23 + local.set $var$24 + local.get $var$24 + local.get $var$23 f64.add - local.set $25 - local.get $15 + local.set $var$25 + local.get $var$15 f64.const 5.497923018708371e-14 f64.mul - local.get $18 + local.get $var$18 f64.add - local.set $26 - local.get $24 - local.get $25 + local.set $var$26 + local.get $var$24 + local.get $var$25 f64.sub - local.get $23 + local.get $var$23 f64.add - local.set $27 + local.set $var$27 f64.const -0.5 - local.get $23 + local.get $var$23 f64.mul - local.set $28 - local.get $23 - local.get $28 + local.set $var$28 + local.get $var$23 + local.get $var$28 f64.mul - local.set $29 - local.get $23 - local.get $29 + local.set $var$29 + local.get $var$23 + local.get $var$29 f64.mul - local.set $30 + local.set $var$30 f64.const -0.5 - local.get $21 + local.get $var$21 f64.mul - local.set $31 - local.get $21 - local.get $31 + local.set $var$31 + local.get $var$21 + local.get $var$31 f64.mul - local.set $32 - local.get $25 - local.get $32 + local.set $var$32 + local.get $var$25 + local.get $var$32 f64.add - local.set $33 - local.get $22 - local.get $28 - local.get $31 + local.set $var$33 + local.get $var$22 + local.get $var$28 + local.get $var$31 f64.add f64.mul - local.set $34 - local.get $25 - local.get $33 + local.set $var$34 + local.get $var$25 + local.get $var$33 f64.sub - local.get $32 + local.get $var$32 f64.add - local.set $35 - local.get $30 + local.set $var$35 + local.get $var$30 f64.const -0.6666666666666679 - local.get $23 + local.get $var$23 f64.const 0.5000000000000007 f64.mul f64.add - local.get $29 + local.get $var$29 f64.const 0.7999999995323976 - local.get $23 + local.get $var$23 f64.const -0.6666666663487739 f64.mul f64.add - local.get $29 + local.get $var$29 f64.const -1.142909628459501 - local.get $23 + local.get $var$23 f64.const 1.0000415263675542 f64.mul f64.add @@ -10206,88 +10206,88 @@ f64.mul f64.add f64.mul - local.set $36 - local.get $26 - local.get $27 + local.set $var$36 + local.get $var$26 + local.get $var$27 f64.add - local.get $34 + local.get $var$34 f64.add - local.get $35 + local.get $var$35 f64.add - local.get $36 + local.get $var$36 f64.add - local.set $37 - local.get $33 - local.get $37 + local.set $var$37 + local.get $var$33 + local.get $var$37 f64.add - local.set $38 - local.get $33 - local.get $38 + local.set $var$38 + local.get $var$33 + local.get $var$38 f64.sub - local.get $37 + local.get $var$37 f64.add global.set $~lib/util/math/log_tail - local.get $38 - local.set $38 + local.get $var$38 + local.set $var$38 global.get $~lib/util/math/log_tail - local.set $37 - local.get $6 + local.set $var$37 + local.get $var$6 i64.const -134217728 i64.and f64.reinterpret_i64 - local.set $34 - local.get $2 - local.get $34 + local.set $var$34 + local.get $var$2 + local.get $var$34 f64.sub - local.set $33 - local.get $38 + local.set $var$33 + local.get $var$38 i64.reinterpret_f64 i64.const -134217728 i64.and f64.reinterpret_i64 - local.set $32 - local.get $38 - local.get $32 + local.set $var$32 + local.get $var$38 + local.get $var$32 f64.sub - local.get $37 + local.get $var$37 f64.add - local.set $31 - local.get $34 - local.get $32 + local.set $var$31 + local.get $var$34 + local.get $var$32 f64.mul - local.set $36 - local.get $33 - local.get $32 + local.set $var$36 + local.get $var$33 + local.get $var$32 f64.mul - local.get $2 - local.get $31 + local.get $var$2 + local.get $var$31 f64.mul f64.add - local.set $35 + local.set $var$35 block $~lib/util/math/exp_inline|inlined.0 (result f64) - local.get $36 - local.set $15 - local.get $35 - local.set $10 - local.get $4 - local.set $12 - local.get $15 + local.get $var$36 + local.set $var$15 + local.get $var$35 + local.set $var$10 + local.get $var$4 + local.set $var$12 + local.get $var$15 i64.reinterpret_f64 - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 i64.const 52 i64.shr_u i32.wrap_i64 i32.const 2047 i32.and - local.set $39 - local.get $39 + local.set $var$39 + local.get $var$39 i32.const 969 i32.sub i32.const 63 i32.ge_u if - local.get $39 + local.get $var$39 i32.const 969 i32.sub i32.const -2147483648 @@ -10295,92 +10295,92 @@ if f64.const -1 f64.const 1 - local.get $12 + local.get $var$12 select br $~lib/util/math/exp_inline|inlined.0 end - local.get $39 + local.get $var$39 i32.const 1033 i32.ge_u if - local.get $9 + local.get $var$9 i64.const 0 i64.lt_s if (result f64) - local.get $12 - local.set $41 - local.get $41 - local.set $42 + local.get $var$12 + local.set $var$41 + local.get $var$41 + local.set $var$42 i64.const 1152921504606846976 f64.reinterpret_i64 - local.set $16 - local.get $16 + local.set $var$16 + local.get $var$16 f64.neg - local.get $16 - local.get $42 + local.get $var$16 + local.get $var$42 select - local.get $16 + local.get $var$16 f64.mul else - local.get $12 - local.set $42 - local.get $42 - local.set $41 + local.get $var$12 + local.set $var$42 + local.get $var$42 + local.set $var$41 i64.const 8070450532247928832 f64.reinterpret_i64 - local.set $17 - local.get $17 + local.set $var$17 + local.get $var$17 f64.neg - local.get $17 - local.get $41 + local.get $var$17 + local.get $var$41 select - local.get $17 + local.get $var$17 f64.mul end br $~lib/util/math/exp_inline|inlined.0 end i32.const 0 - local.set $39 + local.set $var$39 end f64.const 184.6649652337873 - local.get $15 + local.get $var$15 f64.mul - local.set $29 - local.get $29 + local.set $var$29 + local.get $var$29 f64.const 6755399441055744 f64.add - local.set $30 - local.get $30 + local.set $var$30 + local.get $var$30 i64.reinterpret_f64 - local.set $14 - local.get $30 + local.set $var$14 + local.get $var$30 f64.const 6755399441055744 f64.sub - local.set $30 - local.get $15 - local.get $30 + local.set $var$30 + local.get $var$15 + local.get $var$30 f64.const -0.005415212348111709 f64.mul f64.add - local.get $30 + local.get $var$30 f64.const -1.2864023111638346e-14 f64.mul f64.add - local.set $28 - local.get $28 - local.get $10 + local.set $var$28 + local.get $var$28 + local.get $var$10 f64.add - local.set $28 - local.get $14 + local.set $var$28 + local.get $var$14 i32.const 127 i64.extend_i32_s i64.and i64.const 1 i64.shl i32.wrap_i64 - local.set $40 - local.get $14 - local.get $12 + local.set $var$40 + local.get $var$14 + local.get $var$12 i64.extend_i32_u i64.add i64.const 52 @@ -10388,255 +10388,255 @@ i64.extend_i32_s i64.sub i64.shl - local.set $13 + local.set $var$13 i32.const 4640 - local.get $40 + local.get $var$40 i32.const 3 i32.shl i32.add i64.load f64.reinterpret_i64 - local.set $25 + local.set $var$25 i32.const 4640 - local.get $40 + local.get $var$40 i32.const 3 i32.shl i32.add i64.load offset=8 - local.get $13 + local.get $var$13 i64.add - local.set $11 - local.get $28 - local.get $28 + local.set $var$11 + local.get $var$28 + local.get $var$28 f64.mul - local.set $27 - local.get $25 - local.get $28 + local.set $var$27 + local.get $var$25 + local.get $var$28 f64.add - local.get $27 + local.get $var$27 f64.const 0.49999999999996786 - local.get $28 + local.get $var$28 f64.const 0.16666666666665886 f64.mul f64.add f64.mul f64.add - local.get $27 - local.get $27 + local.get $var$27 + local.get $var$27 f64.mul f64.const 0.0416666808410674 - local.get $28 + local.get $var$28 f64.const 0.008333335853059549 f64.mul f64.add f64.mul f64.add - local.set $24 - local.get $39 + local.set $var$24 + local.get $var$39 i32.const 0 i32.eq if block $~lib/util/math/specialcase|inlined.1 (result f64) - local.get $24 - local.set $18 - local.get $11 - local.set $44 - local.get $14 - local.set $43 - local.get $43 + local.get $var$24 + local.set $var$18 + local.get $var$11 + local.set $var$44 + local.get $var$14 + local.set $var$43 + local.get $var$43 i64.const 2147483648 i64.and i64.const 0 i64.ne i32.eqz if - local.get $44 + local.get $var$44 i64.const 1009 i64.const 52 i64.shl i64.sub - local.set $44 - local.get $44 + local.set $var$44 + local.get $var$44 f64.reinterpret_i64 - local.set $17 + local.set $var$17 f64.const 5486124068793688683255936e279 - local.get $17 - local.get $17 - local.get $18 + local.get $var$17 + local.get $var$17 + local.get $var$18 f64.mul f64.add f64.mul br $~lib/util/math/specialcase|inlined.1 end - local.get $44 + local.get $var$44 i64.const 1022 i64.const 52 i64.shl i64.add - local.set $44 - local.get $44 + local.set $var$44 + local.get $var$44 f64.reinterpret_i64 - local.set $17 - local.get $17 - local.get $17 - local.get $18 + local.set $var$17 + local.get $var$17 + local.get $var$17 + local.get $var$18 f64.mul f64.add - local.set $16 - local.get $16 + local.set $var$16 + local.get $var$16 f64.abs f64.const 1 f64.lt if f64.const 1 - local.get $16 + local.get $var$16 f64.copysign - local.set $23 - local.get $17 - local.get $16 + local.set $var$23 + local.get $var$17 + local.get $var$16 f64.sub - local.get $17 - local.get $18 + local.get $var$17 + local.get $var$18 f64.mul f64.add - local.set $22 - local.get $23 - local.get $16 + local.set $var$22 + local.get $var$23 + local.get $var$16 f64.add - local.set $21 - local.get $23 - local.get $21 + local.set $var$21 + local.get $var$23 + local.get $var$21 f64.sub - local.get $16 + local.get $var$16 f64.add - local.get $22 + local.get $var$22 f64.add - local.set $22 - local.get $21 - local.get $22 + local.set $var$22 + local.get $var$21 + local.get $var$22 f64.add - local.get $23 + local.get $var$23 f64.sub - local.set $16 - local.get $16 + local.set $var$16 + local.get $var$16 f64.const 0 f64.eq if - local.get $44 + local.get $var$44 i64.const -9223372036854775808 i64.and f64.reinterpret_i64 - local.set $16 + local.set $var$16 end end - local.get $16 + local.get $var$16 f64.const 2.2250738585072014e-308 f64.mul end br $~lib/util/math/exp_inline|inlined.0 end - local.get $11 + local.get $var$11 f64.reinterpret_i64 - local.set $26 - local.get $26 - local.get $26 - local.get $24 + local.set $var$26 + local.get $var$26 + local.get $var$26 + local.get $var$24 f64.mul f64.add end end return ) - (func $std/math/test_pow (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) - local.get $0 - local.get $1 + (func $std/math/test_pow (param $left f64) (param $right f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + local.get $left + local.get $right call $~lib/math/NativeMath.pow - local.get $2 - local.get $3 - local.get $4 + local.get $expected + local.get $error + local.get $flags call $std/math/check if (result i32) - local.get $0 - local.get $1 + local.get $left + local.get $right call $~lib/bindings/dom/Math.pow - local.get $2 - local.get $3 - local.get $4 + local.get $expected + local.get $error + local.get $flags call $std/math/check else i32.const 0 end ) - (func $~lib/math/NativeMathf.pow (param $0 f32) (param $1 f32) (result f32) - (local $2 f32) - (local $3 f32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 f32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 f64) - (local $16 f64) - (local $17 f64) - (local $18 f64) - (local $19 f64) - (local $20 f64) - (local $21 f64) - (local $22 f64) - (local $23 i64) - (local $24 i64) - local.get $1 + (func $~lib/math/NativeMathf.pow (param $x f32) (param $y f32) (result f32) + (local $var$2 f32) + (local $var$3 f32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 f32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) + (local $var$14 i32) + (local $var$15 f64) + (local $var$16 f64) + (local $var$17 f64) + (local $var$18 f64) + (local $var$19 f64) + (local $var$20 f64) + (local $var$21 f64) + (local $var$22 f64) + (local $var$23 i64) + (local $var$24 i64) + local.get $y f32.abs f32.const 2 f32.le if - local.get $1 + local.get $y f32.const 2 f32.eq if - local.get $0 - local.get $0 + local.get $x + local.get $x f32.mul return end - local.get $1 + local.get $y f32.const 0.5 f32.eq if - local.get $0 + local.get $x f32.sqrt f32.abs f32.const inf - local.get $0 + local.get $x f32.const inf f32.neg f32.ne select return end - local.get $1 + local.get $y f32.const -1 f32.eq if f32.const 1 - local.get $0 + local.get $x f32.div return end - local.get $1 + local.get $y f32.const 1 f32.eq if - local.get $0 + local.get $x return end - local.get $1 + local.get $y f32.const 0 f32.eq if @@ -10649,30 +10649,30 @@ i32.lt_s drop block $~lib/util/math/powf_lut|inlined.0 (result f32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 + local.get $x + local.set $var$3 + local.get $y + local.set $var$2 i32.const 0 - local.set $4 - local.get $3 + local.set $var$4 + local.get $var$3 i32.reinterpret_f32 - local.set $5 - local.get $2 + local.set $var$5 + local.get $var$2 i32.reinterpret_f32 - local.set $6 + local.set $var$6 i32.const 0 - local.set $7 - local.get $5 + local.set $var$7 + local.get $var$5 i32.const 8388608 i32.sub i32.const 2139095040 i32.const 8388608 i32.sub i32.ge_u - local.get $6 - local.set $8 - local.get $8 + local.get $var$6 + local.set $var$8 + local.get $var$8 i32.const 1 i32.shl i32.const 1 @@ -10685,12 +10685,12 @@ i32.ge_u i32.const 0 i32.ne - local.tee $7 + local.tee $var$7 i32.or if - local.get $7 + local.get $var$7 if - local.get $6 + local.get $var$6 i32.const 1 i32.shl i32.const 0 @@ -10699,14 +10699,14 @@ f32.const 1 br $~lib/util/math/powf_lut|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1065353216 i32.eq if f32.const nan:0x400000 br $~lib/util/math/powf_lut|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.shl i32.const 2139095040 @@ -10716,7 +10716,7 @@ if (result i32) i32.const 1 else - local.get $6 + local.get $var$6 i32.const 1 i32.shl i32.const 2139095040 @@ -10725,12 +10725,12 @@ i32.gt_u end if - local.get $3 - local.get $2 + local.get $var$3 + local.get $var$2 f32.add br $~lib/util/math/powf_lut|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.shl i32.const 1065353216 @@ -10741,14 +10741,14 @@ f32.const nan:0x400000 br $~lib/util/math/powf_lut|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.shl i32.const 1065353216 i32.const 1 i32.shl i32.lt_u - local.get $6 + local.get $var$6 i32.const 31 i32.shr_u i32.eqz @@ -10757,14 +10757,14 @@ f32.const 0 br $~lib/util/math/powf_lut|inlined.0 end - local.get $2 - local.get $2 + local.get $var$2 + local.get $var$2 f32.mul br $~lib/util/math/powf_lut|inlined.0 end - local.get $5 - local.set $8 - local.get $8 + local.get $var$5 + local.set $var$8 + local.get $var$8 i32.const 1 i32.shl i32.const 1 @@ -10776,31 +10776,31 @@ i32.sub i32.ge_u if - local.get $3 - local.get $3 + local.get $var$3 + local.get $var$3 f32.mul - local.set $9 - local.get $5 + local.set $var$9 + local.get $var$5 i32.const 31 i32.shr_u if (result i32) block $~lib/util/math/checkintf|inlined.0 (result i32) - local.get $6 - local.set $8 - local.get $8 + local.get $var$6 + local.set $var$8 + local.get $var$8 i32.const 23 i32.shr_u i32.const 255 i32.and - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 i32.const 127 i32.lt_u if i32.const 0 br $~lib/util/math/checkintf|inlined.0 end - local.get $10 + local.get $var$10 i32.const 127 i32.const 23 i32.add @@ -10813,12 +10813,12 @@ i32.const 127 i32.const 23 i32.add - local.get $10 + local.get $var$10 i32.sub i32.shl - local.set $10 - local.get $8 - local.get $10 + local.set $var$10 + local.get $var$8 + local.get $var$10 i32.const 1 i32.sub i32.and @@ -10826,8 +10826,8 @@ i32.const 0 br $~lib/util/math/checkintf|inlined.0 end - local.get $8 - local.get $10 + local.get $var$8 + local.get $var$10 i32.and if i32.const 1 @@ -10841,43 +10841,43 @@ i32.const 0 end if - local.get $9 + local.get $var$9 f32.neg - local.set $9 + local.set $var$9 end - local.get $6 + local.get $var$6 i32.const 0 i32.lt_s if (result f32) f32.const 1 - local.get $9 + local.get $var$9 f32.div else - local.get $9 + local.get $var$9 end br $~lib/util/math/powf_lut|inlined.0 end - local.get $5 + local.get $var$5 i32.const 0 i32.lt_s if block $~lib/util/math/checkintf|inlined.1 (result i32) - local.get $6 - local.set $8 - local.get $8 + local.get $var$6 + local.set $var$8 + local.get $var$8 i32.const 23 i32.shr_u i32.const 255 i32.and - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 i32.const 127 i32.lt_u if i32.const 0 br $~lib/util/math/checkintf|inlined.1 end - local.get $10 + local.get $var$10 i32.const 127 i32.const 23 i32.add @@ -10890,12 +10890,12 @@ i32.const 127 i32.const 23 i32.add - local.get $10 + local.get $var$10 i32.sub i32.shl - local.set $10 - local.get $8 - local.get $10 + local.set $var$10 + local.get $var$8 + local.get $var$10 i32.const 1 i32.sub i32.and @@ -10903,8 +10903,8 @@ i32.const 0 br $~lib/util/math/checkintf|inlined.1 end - local.get $8 - local.get $10 + local.get $var$8 + local.get $var$10 i32.and if i32.const 1 @@ -10912,156 +10912,156 @@ end i32.const 2 end - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 i32.const 0 i32.eq if - local.get $3 - local.get $3 + local.get $var$3 + local.get $var$3 f32.sub - local.get $3 - local.get $3 + local.get $var$3 + local.get $var$3 f32.sub f32.div br $~lib/util/math/powf_lut|inlined.0 end - local.get $10 + local.get $var$10 i32.const 1 i32.eq if i32.const 65536 - local.set $4 + local.set $var$4 end - local.get $5 + local.get $var$5 i32.const 2147483647 i32.and - local.set $5 + local.set $var$5 end - local.get $5 + local.get $var$5 i32.const 8388608 i32.lt_u if - local.get $3 + local.get $var$3 f32.const 8388608 f32.mul i32.reinterpret_f32 - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.const 2147483647 i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.const 23 i32.const 23 i32.shl i32.sub - local.set $5 + local.set $var$5 end end - local.get $5 - local.set $8 - local.get $8 + local.get $var$5 + local.set $var$8 + local.get $var$8 i32.const 1060306944 i32.sub - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 i32.const 23 i32.const 4 i32.sub i32.shr_u i32.const 15 i32.and - local.set $11 - local.get $10 + local.set $var$11 + local.get $var$10 i32.const -8388608 i32.and - local.set $12 - local.get $8 - local.get $12 + local.set $var$12 + local.get $var$8 + local.get $var$12 i32.sub - local.set $13 - local.get $12 + local.set $var$13 + local.get $var$12 i32.const 23 i32.shr_s - local.set $14 + local.set $var$14 i32.const 8992 - local.get $11 + local.get $var$11 i32.const 1 i32.const 3 i32.add i32.shl i32.add f64.load - local.set $15 + local.set $var$15 i32.const 8992 - local.get $11 + local.get $var$11 i32.const 1 i32.const 3 i32.add i32.shl i32.add f64.load offset=8 - local.set $16 - local.get $13 + local.set $var$16 + local.get $var$13 f32.reinterpret_i32 f64.promote_f32 - local.set $17 - local.get $17 - local.get $15 + local.set $var$17 + local.get $var$17 + local.get $var$15 f64.mul f64.const 1 f64.sub - local.set $18 - local.get $16 - local.get $14 + local.set $var$18 + local.get $var$16 + local.get $var$14 f64.convert_i32_s f64.add - local.set $19 + local.set $var$19 f64.const 0.288457581109214 - local.get $18 + local.get $var$18 f64.mul f64.const -0.36092606229713164 f64.add - local.set $20 + local.set $var$20 f64.const 0.480898481472577 - local.get $18 + local.get $var$18 f64.mul f64.const -0.7213474675006291 f64.add - local.set $21 + local.set $var$21 f64.const 1.4426950408774342 - local.get $18 + local.get $var$18 f64.mul - local.get $19 + local.get $var$19 f64.add - local.set $22 - local.get $18 - local.get $18 + local.set $var$22 + local.get $var$18 + local.get $var$18 f64.mul - local.set $18 - local.get $22 - local.get $21 - local.get $18 + local.set $var$18 + local.get $var$22 + local.get $var$21 + local.get $var$18 f64.mul f64.add - local.set $22 - local.get $20 - local.get $18 - local.get $18 + local.set $var$22 + local.get $var$20 + local.get $var$18 + local.get $var$18 f64.mul f64.mul - local.get $22 + local.get $var$22 f64.add - local.set $20 - local.get $20 - local.set $22 - local.get $2 + local.set $var$20 + local.get $var$20 + local.set $var$22 + local.get $var$2 f64.promote_f32 - local.get $22 + local.get $var$22 f64.mul - local.set $21 - local.get $21 + local.set $var$21 + local.get $var$21 i64.reinterpret_f64 i64.const 47 i64.shr_u @@ -11070,66 +11070,66 @@ i64.const 32959 i64.ge_u if - local.get $21 + local.get $var$21 f64.const 127.99999995700433 f64.gt if - local.get $4 - local.set $8 - local.get $8 - local.set $10 + local.get $var$4 + local.set $var$8 + local.get $var$8 + local.set $var$10 i32.const 1879048192 f32.reinterpret_i32 - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 f32.neg - local.get $9 - local.get $10 + local.get $var$9 + local.get $var$10 select - local.get $9 + local.get $var$9 f32.mul br $~lib/util/math/powf_lut|inlined.0 end - local.get $21 + local.get $var$21 f64.const -150 f64.le if - local.get $4 - local.set $11 - local.get $11 - local.set $12 + local.get $var$4 + local.set $var$11 + local.get $var$11 + local.set $var$12 i32.const 268435456 f32.reinterpret_i32 - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 f32.neg - local.get $9 - local.get $12 + local.get $var$9 + local.get $var$12 select - local.get $9 + local.get $var$9 f32.mul br $~lib/util/math/powf_lut|inlined.0 end end - local.get $21 - local.set $15 - local.get $4 - local.set $13 - local.get $15 + local.get $var$21 + local.set $var$15 + local.get $var$4 + local.set $var$13 + local.get $var$15 f64.const 211106232532992 f64.add - local.set $20 - local.get $20 + local.set $var$20 + local.get $var$20 i64.reinterpret_f64 - local.set $23 - local.get $15 - local.get $20 + local.set $var$23 + local.get $var$15 + local.get $var$20 f64.const 211106232532992 f64.sub f64.sub - local.set $19 + local.set $var$19 i32.const 6688 - local.get $23 + local.get $var$23 i32.wrap_i64 i32.const 31 i32.and @@ -11137,10 +11137,10 @@ i32.shl i32.add i64.load - local.set $24 - local.get $24 - local.get $23 - local.get $13 + local.set $var$24 + local.get $var$24 + local.get $var$23 + local.get $var$13 i64.extend_i32_u i64.add i64.const 52 @@ -11149,121 +11149,121 @@ i64.sub i64.shl i64.add - local.set $24 - local.get $24 + local.set $var$24 + local.get $var$24 f64.reinterpret_i64 - local.set $16 + local.set $var$16 f64.const 0.05550361559341535 - local.get $19 + local.get $var$19 f64.mul f64.const 0.2402284522445722 f64.add - local.set $18 + local.set $var$18 f64.const 0.6931471806916203 - local.get $19 + local.get $var$19 f64.mul f64.const 1 f64.add - local.set $17 - local.get $17 - local.get $18 - local.get $19 - local.get $19 + local.set $var$17 + local.get $var$17 + local.get $var$18 + local.get $var$19 + local.get $var$19 f64.mul f64.mul f64.add - local.set $17 - local.get $17 - local.get $16 + local.set $var$17 + local.get $var$17 + local.get $var$16 f64.mul - local.set $17 - local.get $17 + local.set $var$17 + local.get $var$17 f32.demote_f64 end return ) - (func $std/math/test_powf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) - local.get $0 - local.get $1 + (func $std/math/test_powf (param $left f32) (param $right f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + local.get $left + local.get $right call $~lib/math/NativeMathf.pow - local.get $2 - local.get $3 - local.get $4 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $~lib/math/murmurHash3 (param $0 i64) (result i64) - local.get $0 - local.get $0 + (func $~lib/math/murmurHash3 (param $h i64) (result i64) + local.get $h + local.get $h i64.const 33 i64.shr_u i64.xor - local.set $0 - local.get $0 + local.set $h + local.get $h i64.const -49064778989728563 i64.mul - local.set $0 - local.get $0 - local.get $0 + local.set $h + local.get $h + local.get $h i64.const 33 i64.shr_u i64.xor - local.set $0 - local.get $0 + local.set $h + local.get $h i64.const -4265267296055464877 i64.mul - local.set $0 - local.get $0 - local.get $0 + local.set $h + local.get $h + local.get $h i64.const 33 i64.shr_u i64.xor - local.set $0 - local.get $0 + local.set $h + local.get $h ) - (func $~lib/math/splitMix32 (param $0 i32) (result i32) - local.get $0 + (func $~lib/math/splitMix32 (param $h i32) (result i32) + local.get $h i32.const 1831565813 i32.add - local.set $0 - local.get $0 - local.get $0 + local.set $h + local.get $h + local.get $h i32.const 15 i32.shr_u i32.xor - local.get $0 + local.get $h i32.const 1 i32.or i32.mul - local.set $0 - local.get $0 - local.get $0 - local.get $0 - local.get $0 + local.set $h + local.get $h + local.get $h + local.get $h + local.get $h i32.const 7 i32.shr_u i32.xor - local.get $0 + local.get $h i32.const 61 i32.or i32.mul i32.add i32.xor - local.set $0 - local.get $0 - local.get $0 + local.set $h + local.get $h + local.get $h i32.const 14 i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (param $0 i64) - local.get $0 + (func $~lib/math/NativeMath.seedRandom (param $value i64) + local.get $value i64.const 0 i64.eq if i64.const -7046029254386353131 - local.set $0 + local.set $value end - local.get $0 + local.get $value call $~lib/math/murmurHash3 global.set $~lib/math/random_state0_64 global.get $~lib/math/random_state0_64 @@ -11271,7 +11271,7 @@ i64.xor call $~lib/math/murmurHash3 global.set $~lib/math/random_state1_64 - local.get $0 + local.get $value i32.wrap_i64 call $~lib/math/splitMix32 global.set $~lib/math/random_state0_32 @@ -11282,9 +11282,9 @@ global.set $~lib/math/random_seeded ) (func $~lib/math/NativeMath.random (result f64) - (local $0 i64) - (local $1 i64) - (local $2 i64) + (local $s1 i64) + (local $s0 i64) + (local $r i64) global.get $~lib/math/random_seeded i32.eqz if @@ -11293,91 +11293,91 @@ call $~lib/math/NativeMath.seedRandom end global.get $~lib/math/random_state0_64 - local.set $0 + local.set $s1 global.get $~lib/math/random_state1_64 - local.set $1 - local.get $1 + local.set $s0 + local.get $s0 global.set $~lib/math/random_state0_64 - local.get $0 - local.get $0 + local.get $s1 + local.get $s1 i64.const 23 i64.shl i64.xor - local.set $0 - local.get $0 - local.get $0 + local.set $s1 + local.get $s1 + local.get $s1 i64.const 17 i64.shr_u i64.xor - local.set $0 - local.get $0 - local.get $1 + local.set $s1 + local.get $s1 + local.get $s0 i64.xor - local.set $0 - local.get $0 - local.get $1 + local.set $s1 + local.get $s1 + local.get $s0 i64.const 26 i64.shr_u i64.xor - local.set $0 - local.get $0 + local.set $s1 + local.get $s1 global.set $~lib/math/random_state1_64 - local.get $1 + local.get $s0 i64.const 12 i64.shr_u i64.const 4607182418800017408 i64.or - local.set $2 - local.get $2 + local.set $r + local.get $r f64.reinterpret_i64 f64.const 1 f64.sub ) (func $~lib/math/NativeMathf.random (result f32) - (local $0 i64) - (local $1 i32) - (local $2 i32) - (local $3 i32) + (local $var$0 i64) + (local $s0 i32) + (local $s1 i32) + (local $r i32) global.get $~lib/math/random_seeded i32.eqz if call $~lib/builtins/seed i64.reinterpret_f64 - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 call $~lib/math/NativeMath.seedRandom end global.get $~lib/math/random_state0_32 - local.set $1 + local.set $s0 global.get $~lib/math/random_state1_32 - local.set $2 - local.get $1 + local.set $s1 + local.get $s0 i32.const -1640531525 i32.mul i32.const 5 i32.rotl i32.const 5 i32.mul - local.set $3 - local.get $2 - local.get $1 + local.set $r + local.get $s1 + local.get $s0 i32.xor - local.set $2 - local.get $1 + local.set $s1 + local.get $s0 i32.const 26 i32.rotl - local.get $2 + local.get $s1 i32.xor - local.get $2 + local.get $s1 i32.const 9 i32.shl i32.xor global.set $~lib/math/random_state0_32 - local.get $2 + local.get $s1 i32.const 13 i32.rotl global.set $~lib/math/random_state1_32 - local.get $3 + local.get $r i32.const 9 i32.shr_u i32.const 127 @@ -11388,154 +11388,154 @@ f32.const 1 f32.sub ) - (func $std/math/test_round (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 f64) - (local $5 f64) - local.get $0 - local.set $4 - local.get $4 + (func $std/math/test_round (param $value f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + (local $var$4 f64) + (local $var$5 f64) + local.get $value + local.set $var$4 + local.get $var$4 f64.ceil - local.set $5 - local.get $5 - local.get $5 + local.set $var$5 + local.get $var$5 + local.get $var$5 f64.const 1 f64.sub - local.get $5 + local.get $var$5 f64.const 0.5 f64.sub - local.get $4 + local.get $var$4 f64.le select - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $std/math/test_roundf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - (local $4 f32) - (local $5 f32) - local.get $0 - local.set $4 - local.get $4 + (func $std/math/test_roundf (param $value f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + (local $var$4 f32) + (local $var$5 f32) + local.get $value + local.set $var$4 + local.get $var$4 f32.ceil - local.set $5 - local.get $5 - local.get $5 + local.set $var$5 + local.get $var$5 + local.get $var$5 f32.const 1 f32.sub - local.get $5 + local.get $var$5 f32.const 0.5 f32.sub - local.get $4 + local.get $var$4 f32.le select - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $std/math/test_sign (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 f64) + (func $std/math/test_sign (param $value f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + (local $var$4 f64) block $~lib/math/NativeMath.sign|inlined.0 (result f64) - local.get $0 - local.set $4 + local.get $value + local.set $var$4 i32.const 0 i32.const 0 i32.gt_s drop - local.get $4 + local.get $var$4 f64.const 0 f64.gt if (result f64) f64.const 1 else - local.get $4 + local.get $var$4 f64.const 0 f64.lt if (result f64) f64.const -1 else - local.get $4 + local.get $var$4 end end br $~lib/math/NativeMath.sign|inlined.0 end - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check if (result i32) - local.get $0 + local.get $value call $~lib/bindings/dom/Math.sign - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check else i32.const 0 end ) - (func $std/math/test_signf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - (local $4 f32) + (func $std/math/test_signf (param $value f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + (local $var$4 f32) block $~lib/math/NativeMathf.sign|inlined.0 (result f32) - local.get $0 - local.set $4 + local.get $value + local.set $var$4 i32.const 0 i32.const 0 i32.gt_s drop - local.get $4 + local.get $var$4 f32.const 0 f32.gt if (result f32) f32.const 1 else - local.get $4 + local.get $var$4 f32.const 0 f32.lt if (result f32) f32.const -1 else - local.get $4 + local.get $var$4 end end br $~lib/math/NativeMathf.sign|inlined.0 end - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $~lib/math/NativeMath.rem (param $0 f64) (param $1 f64) (result f64) - (local $2 i64) - (local $3 i64) - (local $4 i64) - (local $5 i64) - (local $6 f64) - (local $7 i64) - (local $8 i32) - (local $9 i32) - (local $10 i64) - (local $11 f64) - local.get $0 + (func $~lib/math/NativeMath.rem (param $x f64) (param $y f64) (result f64) + (local $ux i64) + (local $uy i64) + (local $ex i64) + (local $ey i64) + (local $var$6 f64) + (local $uxi i64) + (local $q i32) + (local $var$9 i32) + (local $var$10 i64) + (local $x2 f64) + local.get $x i64.reinterpret_f64 - local.set $2 - local.get $1 + local.set $ux + local.get $y i64.reinterpret_f64 - local.set $3 - local.get $2 + local.set $uy + local.get $ux i64.const 52 i64.shr_u i64.const 2047 i64.and - local.set $4 - local.get $3 + local.set $ex + local.get $uy i64.const 52 i64.shr_u i64.const 2047 i64.and - local.set $5 - local.get $3 + local.set $ey + local.get $uy i64.const 1 i64.shl i64.const 0 @@ -11543,253 +11543,253 @@ if (result i32) i32.const 1 else - local.get $4 + local.get $ex i64.const 2047 i64.eq end if (result i32) i32.const 1 else - local.get $1 - local.get $1 + local.get $y + local.get $y f64.ne end if - local.get $0 - local.get $1 + local.get $x + local.get $y f64.mul - local.set $6 - local.get $6 - local.get $6 + local.set $var$6 + local.get $var$6 + local.get $var$6 f64.div return end - local.get $2 + local.get $ux i64.const 1 i64.shl i64.const 0 i64.eq if - local.get $0 + local.get $x return end - local.get $2 - local.set $7 - local.get $4 + local.get $ux + local.set $uxi + local.get $ex i64.const 0 i64.ne i32.eqz if - local.get $4 - local.get $7 + local.get $ex + local.get $uxi i64.const 12 i64.shl i64.clz i64.sub - local.set $4 - local.get $7 + local.set $ex + local.get $uxi i64.const 1 - local.get $4 + local.get $ex i64.sub i64.shl - local.set $7 + local.set $uxi else - local.get $7 + local.get $uxi i64.const -1 i64.const 12 i64.shr_u i64.and - local.set $7 - local.get $7 + local.set $uxi + local.get $uxi i64.const 1 i64.const 52 i64.shl i64.or - local.set $7 + local.set $uxi end - local.get $5 + local.get $ey i64.const 0 i64.ne i32.eqz if - local.get $5 - local.get $3 + local.get $ey + local.get $uy i64.const 12 i64.shl i64.clz i64.sub - local.set $5 - local.get $3 + local.set $ey + local.get $uy i64.const 1 - local.get $5 + local.get $ey i64.sub i64.shl - local.set $3 + local.set $uy else - local.get $3 + local.get $uy i64.const -1 i64.const 12 i64.shr_u i64.and - local.set $3 - local.get $3 + local.set $uy + local.get $uy i64.const 1 i64.const 52 i64.shl i64.or - local.set $3 + local.set $uy end i32.const 0 - local.set $8 + local.set $q block $do-break|0 loop $do-loop|0 - local.get $4 - local.get $5 + local.get $ex + local.get $ey i64.lt_s if - local.get $4 + local.get $ex i64.const 1 i64.add - local.get $5 + local.get $ey i64.eq if br $do-break|0 end - local.get $0 + local.get $x return end loop $while-continue|1 - local.get $4 - local.get $5 + local.get $ex + local.get $ey i64.gt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $7 - local.get $3 + local.get $uxi + local.get $uy i64.ge_u if - local.get $7 - local.get $3 + local.get $uxi + local.get $uy i64.sub - local.set $7 - local.get $8 + local.set $uxi + local.get $q i32.const 1 i32.add - local.set $8 + local.set $q end - local.get $7 + local.get $uxi i64.const 1 i64.shl - local.set $7 - local.get $8 + local.set $uxi + local.get $q i32.const 1 i32.shl - local.set $8 - local.get $4 + local.set $q + local.get $ex i64.const 1 i64.sub - local.set $4 + local.set $ex br $while-continue|1 end end - local.get $7 - local.get $3 + local.get $uxi + local.get $uy i64.ge_u if - local.get $7 - local.get $3 + local.get $uxi + local.get $uy i64.sub - local.set $7 - local.get $8 + local.set $uxi + local.get $q i32.const 1 i32.add - local.set $8 + local.set $q end - local.get $7 + local.get $uxi i64.const 0 i64.eq if i64.const -60 - local.set $4 + local.set $ex else - local.get $7 + local.get $uxi i64.const 11 i64.shl i64.clz - local.set $10 - local.get $4 - local.get $10 + local.set $var$10 + local.get $ex + local.get $var$10 i64.sub - local.set $4 - local.get $7 - local.get $10 + local.set $ex + local.get $uxi + local.get $var$10 i64.shl - local.set $7 + local.set $uxi end br $do-break|0 end unreachable end - local.get $4 + local.get $ex i64.const 0 i64.gt_s if - local.get $7 + local.get $uxi i64.const 1 i64.const 52 i64.shl i64.sub - local.set $7 - local.get $7 - local.get $4 + local.set $uxi + local.get $uxi + local.get $ex i64.const 52 i64.shl i64.or - local.set $7 + local.set $uxi else - local.get $7 + local.get $uxi i64.const 0 - local.get $4 + local.get $ex i64.sub i64.const 1 i64.add i64.shr_u - local.set $7 + local.set $uxi end - local.get $7 + local.get $uxi f64.reinterpret_i64 - local.set $0 - local.get $1 + local.set $x + local.get $y f64.abs - local.set $1 - local.get $0 - local.get $0 + local.set $y + local.get $x + local.get $x f64.add - local.set $11 - local.get $4 - local.get $5 + local.set $x2 + local.get $ex + local.get $ey i64.eq if (result i32) i32.const 1 else - local.get $4 + local.get $ex i64.const 1 i64.add - local.get $5 + local.get $ey i64.eq if (result i32) - local.get $11 - local.get $1 + local.get $x2 + local.get $y f64.gt if (result i32) i32.const 1 else - local.get $11 - local.get $1 + local.get $x2 + local.get $y f64.eq if (result i32) - local.get $8 + local.get $q i32.const 1 i32.and else @@ -11801,60 +11801,60 @@ end end if - local.get $0 - local.get $1 + local.get $x + local.get $y f64.sub - local.set $0 + local.set $x end - local.get $2 + local.get $ux i64.const 0 i64.lt_s if (result f64) - local.get $0 + local.get $x f64.neg else - local.get $0 + local.get $x end ) - (func $std/math/test_rem (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) - local.get $0 - local.get $1 + (func $std/math/test_rem (param $left f64) (param $right f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + local.get $left + local.get $right call $~lib/math/NativeMath.rem - local.get $2 - local.get $3 - local.get $4 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $~lib/math/NativeMathf.rem (param $0 f32) (param $1 f32) (result f32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 f32) - local.get $0 + (func $~lib/math/NativeMathf.rem (param $x f32) (param $y f32) (result f32) + (local $ux i32) + (local $uy i32) + (local $ex i32) + (local $ey i32) + (local $uxi i32) + (local $q i32) + (local $var$8 i32) + (local $x2 f32) + local.get $x i32.reinterpret_f32 - local.set $2 - local.get $1 + local.set $ux + local.get $y i32.reinterpret_f32 - local.set $3 - local.get $2 + local.set $uy + local.get $ux i32.const 23 i32.shr_u i32.const 255 i32.and - local.set $4 - local.get $3 + local.set $ex + local.get $uy i32.const 23 i32.shr_u i32.const 255 i32.and - local.set $5 - local.get $2 - local.set $6 - local.get $3 + local.set $ey + local.get $ux + local.set $uxi + local.get $uy i32.const 1 i32.shl i32.const 0 @@ -11862,247 +11862,247 @@ if (result i32) i32.const 1 else - local.get $4 + local.get $ex i32.const 255 i32.eq end if (result i32) i32.const 1 else - local.get $1 - local.get $1 + local.get $y + local.get $y f32.ne end if - local.get $0 - local.get $1 + local.get $x + local.get $y f32.mul - local.get $0 - local.get $1 + local.get $x + local.get $y f32.mul f32.div return end - local.get $2 + local.get $ux i32.const 1 i32.shl i32.const 0 i32.eq if - local.get $0 + local.get $x return end - local.get $4 + local.get $ex i32.eqz if - local.get $4 - local.get $6 + local.get $ex + local.get $uxi i32.const 9 i32.shl i32.clz i32.sub - local.set $4 - local.get $6 + local.set $ex + local.get $uxi i32.const 1 - local.get $4 + local.get $ex i32.sub i32.shl - local.set $6 + local.set $uxi else - local.get $6 + local.get $uxi i32.const -1 i32.const 9 i32.shr_u i32.and - local.set $6 - local.get $6 + local.set $uxi + local.get $uxi i32.const 1 i32.const 23 i32.shl i32.or - local.set $6 + local.set $uxi end - local.get $5 + local.get $ey i32.eqz if - local.get $5 - local.get $3 + local.get $ey + local.get $uy i32.const 9 i32.shl i32.clz i32.sub - local.set $5 - local.get $3 + local.set $ey + local.get $uy i32.const 1 - local.get $5 + local.get $ey i32.sub i32.shl - local.set $3 + local.set $uy else - local.get $3 + local.get $uy i32.const -1 i32.const 9 i32.shr_u i32.and - local.set $3 - local.get $3 + local.set $uy + local.get $uy i32.const 1 i32.const 23 i32.shl i32.or - local.set $3 + local.set $uy end i32.const 0 - local.set $7 + local.set $q block $do-break|0 loop $do-loop|0 - local.get $4 - local.get $5 + local.get $ex + local.get $ey i32.lt_s if - local.get $4 + local.get $ex i32.const 1 i32.add - local.get $5 + local.get $ey i32.eq if br $do-break|0 end - local.get $0 + local.get $x return end loop $while-continue|1 - local.get $4 - local.get $5 + local.get $ex + local.get $ey i32.gt_s - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 if - local.get $6 - local.get $3 + local.get $uxi + local.get $uy i32.ge_u if - local.get $6 - local.get $3 + local.get $uxi + local.get $uy i32.sub - local.set $6 - local.get $7 + local.set $uxi + local.get $q i32.const 1 i32.add - local.set $7 + local.set $q end - local.get $6 + local.get $uxi i32.const 1 i32.shl - local.set $6 - local.get $7 + local.set $uxi + local.get $q i32.const 1 i32.shl - local.set $7 - local.get $4 + local.set $q + local.get $ex i32.const 1 i32.sub - local.set $4 + local.set $ex br $while-continue|1 end end - local.get $6 - local.get $3 + local.get $uxi + local.get $uy i32.ge_u if - local.get $6 - local.get $3 + local.get $uxi + local.get $uy i32.sub - local.set $6 - local.get $7 + local.set $uxi + local.get $q i32.const 1 i32.add - local.set $7 + local.set $q end - local.get $6 + local.get $uxi i32.const 0 i32.eq if i32.const -30 - local.set $4 + local.set $ex else - local.get $6 + local.get $uxi i32.const 8 i32.shl i32.clz - local.set $8 - local.get $4 - local.get $8 + local.set $var$8 + local.get $ex + local.get $var$8 i32.sub - local.set $4 - local.get $6 - local.get $8 + local.set $ex + local.get $uxi + local.get $var$8 i32.shl - local.set $6 + local.set $uxi end br $do-break|0 end unreachable end - local.get $4 + local.get $ex i32.const 0 i32.gt_s if - local.get $6 + local.get $uxi i32.const 1 i32.const 23 i32.shl i32.sub - local.set $6 - local.get $6 - local.get $4 + local.set $uxi + local.get $uxi + local.get $ex i32.const 23 i32.shl i32.or - local.set $6 + local.set $uxi else - local.get $6 + local.get $uxi i32.const 0 - local.get $4 + local.get $ex i32.sub i32.const 1 i32.add i32.shr_u - local.set $6 + local.set $uxi end - local.get $6 + local.get $uxi f32.reinterpret_i32 - local.set $0 - local.get $1 + local.set $x + local.get $y f32.abs - local.set $1 - local.get $0 - local.get $0 + local.set $y + local.get $x + local.get $x f32.add - local.set $9 - local.get $4 - local.get $5 + local.set $x2 + local.get $ex + local.get $ey i32.eq if (result i32) i32.const 1 else - local.get $4 + local.get $ex i32.const 1 i32.add - local.get $5 + local.get $ey i32.eq if (result i32) - local.get $9 - local.get $1 + local.get $x2 + local.get $y f32.gt if (result i32) i32.const 1 else - local.get $9 - local.get $1 + local.get $x2 + local.get $y f32.eq if (result i32) - local.get $7 + local.get $q i32.const 1 i32.and else @@ -12114,143 +12114,143 @@ end end if - local.get $0 - local.get $1 + local.get $x + local.get $y f32.sub - local.set $0 + local.set $x end - local.get $2 + local.get $ux i32.const 0 i32.lt_s if (result f32) - local.get $0 + local.get $x f32.neg else - local.get $0 + local.get $x end ) - (func $std/math/test_remf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) - local.get $0 - local.get $1 + (func $std/math/test_remf (param $left f32) (param $right f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + local.get $left + local.get $right call $~lib/math/NativeMathf.rem - local.get $2 - local.get $3 - local.get $4 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $~lib/math/NativeMath.sin (param $0 f64) (result f64) - (local $1 i64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 i64) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 f64) - (local $17 i32) - (local $18 f64) - (local $19 f64) - local.get $0 + (func $~lib/math/NativeMath.sin (param $x f64) (result f64) + (local $u i64) + (local $ux i32) + (local $sign i32) + (local $var$4 i32) + (local $var$5 f64) + (local $var$6 f64) + (local $var$7 f64) + (local $var$8 f64) + (local $var$9 f64) + (local $var$10 f64) + (local $var$11 i64) + (local $var$12 i32) + (local $var$13 i32) + (local $var$14 i32) + (local $var$15 i32) + (local $var$16 f64) + (local $n i32) + (local $y0 f64) + (local $y1 f64) + local.get $x i64.reinterpret_f64 - local.set $1 - local.get $1 + local.set $u + local.get $u i64.const 32 i64.shr_u i32.wrap_i64 - local.set $2 - local.get $2 + local.set $ux + local.get $ux i32.const 31 i32.shr_u - local.set $3 - local.get $2 + local.set $sign + local.get $ux i32.const 2147483647 i32.and - local.set $2 - local.get $2 + local.set $ux + local.get $ux i32.const 1072243195 i32.le_u if - local.get $2 + local.get $ux i32.const 1045430272 i32.lt_u if - local.get $0 + local.get $x return end block $~lib/math/sin_kern|inlined.1 (result f64) - local.get $0 - local.set $6 + local.get $x + local.set $var$6 f64.const 0 - local.set $5 + local.set $var$5 i32.const 0 - local.set $4 - local.get $6 - local.get $6 + local.set $var$4 + local.get $var$6 + local.get $var$6 f64.mul - local.set $7 - local.get $7 - local.get $7 + local.set $var$7 + local.get $var$7 + local.get $var$7 f64.mul - local.set $8 + local.set $var$8 f64.const 0.00833333333332249 - local.get $7 + local.get $var$7 f64.const -1.984126982985795e-04 - local.get $7 + local.get $var$7 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $7 - local.get $8 + local.get $var$7 + local.get $var$8 f64.mul f64.const -2.5050760253406863e-08 - local.get $7 + local.get $var$7 f64.const 1.58969099521155e-10 f64.mul f64.add f64.mul f64.add - local.set $9 - local.get $7 - local.get $6 + local.set $var$9 + local.get $var$7 + local.get $var$6 f64.mul - local.set $10 - local.get $4 + local.set $var$10 + local.get $var$4 i32.eqz if - local.get $6 - local.get $10 + local.get $var$6 + local.get $var$10 f64.const -0.16666666666666632 - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 f64.mul f64.add f64.mul f64.add br $~lib/math/sin_kern|inlined.1 else - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 f64.const 0.5 - local.get $5 + local.get $var$5 f64.mul - local.get $10 - local.get $9 + local.get $var$10 + local.get $var$9 f64.mul f64.sub f64.mul - local.get $5 + local.get $var$5 f64.sub - local.get $10 + local.get $var$10 f64.const -0.16666666666666632 f64.mul f64.sub @@ -12261,298 +12261,298 @@ end return end - local.get $2 + local.get $ux i32.const 2146435072 i32.ge_u if - local.get $0 - local.get $0 + local.get $x + local.get $x f64.sub return end block $~lib/math/rempio2|inlined.1 (result i32) - local.get $0 - local.set $5 - local.get $1 - local.set $11 - local.get $3 - local.set $4 - local.get $11 + local.get $x + local.set $var$5 + local.get $u + local.set $var$11 + local.get $sign + local.set $var$4 + local.get $var$11 i64.const 32 i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and - local.set $12 + local.set $var$12 i32.const 0 i32.const 1 i32.lt_s drop - local.get $12 + local.get $var$12 i32.const 1073928572 i32.lt_u if i32.const 1 - local.set $13 - local.get $4 + local.set $var$13 + local.get $var$4 i32.eqz if - local.get $5 + local.get $var$5 f64.const 1.5707963267341256 f64.sub - local.set $10 - local.get $12 + local.set $var$10 + local.get $var$12 i32.const 1073291771 i32.ne if - local.get $10 + local.get $var$10 f64.const 6.077100506506192e-11 f64.sub - local.set $9 - local.get $10 - local.get $9 + local.set $var$9 + local.get $var$10 + local.get $var$9 f64.sub f64.const 6.077100506506192e-11 f64.sub - local.set $8 + local.set $var$8 else - local.get $10 + local.get $var$10 f64.const 6.077100506303966e-11 f64.sub - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 f64.const 2.0222662487959506e-21 f64.sub - local.set $9 - local.get $10 - local.get $9 + local.set $var$9 + local.get $var$10 + local.get $var$9 f64.sub f64.const 2.0222662487959506e-21 f64.sub - local.set $8 + local.set $var$8 end else - local.get $5 + local.get $var$5 f64.const 1.5707963267341256 f64.add - local.set $10 - local.get $12 + local.set $var$10 + local.get $var$12 i32.const 1073291771 i32.ne if - local.get $10 + local.get $var$10 f64.const 6.077100506506192e-11 f64.add - local.set $9 - local.get $10 - local.get $9 + local.set $var$9 + local.get $var$10 + local.get $var$9 f64.sub f64.const 6.077100506506192e-11 f64.add - local.set $8 + local.set $var$8 else - local.get $10 + local.get $var$10 f64.const 6.077100506303966e-11 f64.add - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 f64.const 2.0222662487959506e-21 f64.add - local.set $9 - local.get $10 - local.get $9 + local.set $var$9 + local.get $var$10 + local.get $var$9 f64.sub f64.const 2.0222662487959506e-21 f64.add - local.set $8 + local.set $var$8 end i32.const -1 - local.set $13 + local.set $var$13 end - local.get $9 + local.get $var$9 global.set $~lib/math/rempio2_y0 - local.get $8 + local.get $var$8 global.set $~lib/math/rempio2_y1 - local.get $13 + local.get $var$13 br $~lib/math/rempio2|inlined.1 end - local.get $12 + local.get $var$12 i32.const 1094263291 i32.lt_u if - local.get $5 + local.get $var$5 f64.const 0.6366197723675814 f64.mul f64.nearest - local.set $8 - local.get $5 - local.get $8 + local.set $var$8 + local.get $var$5 + local.get $var$8 f64.const 1.5707963267341256 f64.mul f64.sub - local.set $9 - local.get $8 + local.set $var$9 + local.get $var$8 f64.const 6.077100506506192e-11 f64.mul - local.set $10 - local.get $12 + local.set $var$10 + local.get $var$12 i32.const 20 i32.shr_u - local.set $13 - local.get $9 - local.get $10 + local.set $var$13 + local.get $var$9 + local.get $var$10 f64.sub - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $14 - local.get $13 - local.get $14 + local.set $var$14 + local.get $var$13 + local.get $var$14 i32.const 20 i32.shr_u i32.const 2047 i32.and i32.sub - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 i32.const 16 i32.gt_u if - local.get $9 - local.set $6 - local.get $8 + local.get $var$9 + local.set $var$6 + local.get $var$8 f64.const 6.077100506303966e-11 f64.mul - local.set $10 - local.get $6 - local.get $10 + local.set $var$10 + local.get $var$6 + local.get $var$10 f64.sub - local.set $9 - local.get $8 + local.set $var$9 + local.get $var$8 f64.const 2.0222662487959506e-21 f64.mul - local.get $6 - local.get $9 + local.get $var$6 + local.get $var$9 f64.sub - local.get $10 + local.get $var$10 f64.sub f64.sub - local.set $10 - local.get $9 - local.get $10 + local.set $var$10 + local.get $var$9 + local.get $var$10 f64.sub - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $14 - local.get $13 - local.get $14 + local.set $var$14 + local.get $var$13 + local.get $var$14 i32.const 20 i32.shr_u i32.const 2047 i32.and i32.sub - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 i32.const 49 i32.gt_u if - local.get $9 - local.set $16 - local.get $8 + local.get $var$9 + local.set $var$16 + local.get $var$8 f64.const 2.0222662487111665e-21 f64.mul - local.set $10 - local.get $16 - local.get $10 + local.set $var$10 + local.get $var$16 + local.get $var$10 f64.sub - local.set $9 - local.get $8 + local.set $var$9 + local.get $var$8 f64.const 8.4784276603689e-32 f64.mul - local.get $16 - local.get $9 + local.get $var$16 + local.get $var$9 f64.sub - local.get $10 + local.get $var$10 f64.sub f64.sub - local.set $10 - local.get $9 - local.get $10 + local.set $var$10 + local.get $var$9 + local.get $var$10 f64.sub - local.set $7 + local.set $var$7 end end - local.get $9 - local.get $7 + local.get $var$9 + local.get $var$7 f64.sub - local.get $10 + local.get $var$10 f64.sub - local.set $6 - local.get $7 + local.set $var$6 + local.get $var$7 global.set $~lib/math/rempio2_y0 - local.get $6 + local.get $var$6 global.set $~lib/math/rempio2_y1 - local.get $8 + local.get $var$8 i32.trunc_sat_f64_s br $~lib/math/rempio2|inlined.1 end - local.get $5 - local.get $11 + local.get $var$5 + local.get $var$11 call $~lib/math/pio2_large_quot - local.set $15 + local.set $var$15 i32.const 0 - local.get $15 + local.get $var$15 i32.sub - local.get $15 - local.get $4 + local.get $var$15 + local.get $var$4 select end - local.set $17 + local.set $n global.get $~lib/math/rempio2_y0 - local.set $18 + local.set $y0 global.get $~lib/math/rempio2_y1 - local.set $19 - local.get $17 + local.set $y1 + local.get $n i32.const 1 i32.and if (result f64) - local.get $18 - local.set $8 - local.get $19 - local.set $16 - local.get $8 - local.get $8 - f64.mul - local.set $5 - local.get $5 - local.get $5 - f64.mul - local.set $6 - local.get $5 + local.get $y0 + local.set $var$8 + local.get $y1 + local.set $var$16 + local.get $var$8 + local.get $var$8 + f64.mul + local.set $var$5 + local.get $var$5 + local.get $var$5 + f64.mul + local.set $var$6 + local.get $var$5 f64.const 0.0416666666666666 - local.get $5 + local.get $var$5 f64.const -0.001388888888887411 - local.get $5 + local.get $var$5 f64.const 2.480158728947673e-05 f64.mul f64.add f64.mul f64.add f64.mul - local.get $6 - local.get $6 + local.get $var$6 + local.get $var$6 f64.mul f64.const -2.7557314351390663e-07 - local.get $5 + local.get $var$5 f64.const 2.087572321298175e-09 - local.get $5 + local.get $var$5 f64.const -1.1359647557788195e-11 f64.mul f64.add @@ -12560,97 +12560,97 @@ f64.add f64.mul f64.add - local.set $7 + local.set $var$7 f64.const 0.5 - local.get $5 + local.get $var$5 f64.mul - local.set $10 + local.set $var$10 f64.const 1 - local.get $10 + local.get $var$10 f64.sub - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 f64.const 1 - local.get $6 + local.get $var$6 f64.sub - local.get $10 + local.get $var$10 f64.sub - local.get $5 - local.get $7 + local.get $var$5 + local.get $var$7 f64.mul - local.get $8 - local.get $16 + local.get $var$8 + local.get $var$16 f64.mul f64.sub f64.add f64.add else block $~lib/math/sin_kern|inlined.2 (result f64) - local.get $18 - local.set $16 - local.get $19 - local.set $9 + local.get $y0 + local.set $var$16 + local.get $y1 + local.set $var$9 i32.const 1 - local.set $13 - local.get $16 - local.get $16 + local.set $var$13 + local.get $var$16 + local.get $var$16 f64.mul - local.set $10 - local.get $10 - local.get $10 + local.set $var$10 + local.get $var$10 + local.get $var$10 f64.mul - local.set $7 + local.set $var$7 f64.const 0.00833333333332249 - local.get $10 + local.get $var$10 f64.const -1.984126982985795e-04 - local.get $10 + local.get $var$10 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $10 - local.get $7 + local.get $var$10 + local.get $var$7 f64.mul f64.const -2.5050760253406863e-08 - local.get $10 + local.get $var$10 f64.const 1.58969099521155e-10 f64.mul f64.add f64.mul f64.add - local.set $6 - local.get $10 - local.get $16 + local.set $var$6 + local.get $var$10 + local.get $var$16 f64.mul - local.set $5 - local.get $13 + local.set $var$5 + local.get $var$13 i32.eqz if - local.get $16 - local.get $5 + local.get $var$16 + local.get $var$5 f64.const -0.16666666666666632 - local.get $10 - local.get $6 + local.get $var$10 + local.get $var$6 f64.mul f64.add f64.mul f64.add br $~lib/math/sin_kern|inlined.2 else - local.get $16 - local.get $10 + local.get $var$16 + local.get $var$10 f64.const 0.5 - local.get $9 + local.get $var$9 f64.mul - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 f64.mul f64.sub f64.mul - local.get $9 + local.get $var$9 f64.sub - local.get $5 + local.get $var$5 f64.const -0.16666666666666632 f64.mul f64.sub @@ -12660,118 +12660,118 @@ unreachable end end - local.set $0 - local.get $17 + local.set $x + local.get $n i32.const 2 i32.and if (result f64) - local.get $0 + local.get $x f64.neg else - local.get $0 + local.get $x end ) - (func $std/math/test_sin (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_sin (param $value f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMath.sin - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check if (result i32) - local.get $0 + local.get $value call $~lib/bindings/dom/Math.sin - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check else i32.const 0 end ) - (func $~lib/math/NativeMathf.sin (param $0 f32) (result f32) - (local $1 i32) - (local $2 i32) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 i32) - (local $9 i32) - (local $10 f32) - (local $11 i32) - (local $12 f32) - (local $13 i32) - (local $14 i64) - (local $15 i32) - (local $16 i64) - (local $17 i64) - (local $18 i64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i32) - (local $24 i32) - (local $25 f64) - (local $26 f32) - local.get $0 + (func $~lib/math/NativeMathf.sin (param $x f32) (result f32) + (local $ux i32) + (local $sign i32) + (local $var$3 f64) + (local $var$4 f64) + (local $var$5 f64) + (local $var$6 f64) + (local $var$7 f64) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 f32) + (local $var$11 i32) + (local $var$12 f32) + (local $var$13 i32) + (local $var$14 i64) + (local $var$15 i32) + (local $var$16 i64) + (local $var$17 i64) + (local $var$18 i64) + (local $var$19 i64) + (local $var$20 i64) + (local $var$21 i64) + (local $var$22 i64) + (local $var$23 i32) + (local $n i32) + (local $y f64) + (local $t f32) + local.get $x i32.reinterpret_f32 - local.set $1 - local.get $1 + local.set $ux + local.get $ux i32.const 31 i32.shr_u - local.set $2 - local.get $1 + local.set $sign + local.get $ux i32.const 2147483647 i32.and - local.set $1 - local.get $1 + local.set $ux + local.get $ux i32.const 1061752794 i32.le_u if - local.get $1 + local.get $ux i32.const 964689920 i32.lt_u if - local.get $0 + local.get $x return end - local.get $0 + local.get $x f64.promote_f32 - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 f64.mul - local.set $4 - local.get $4 - local.get $4 + local.set $var$4 + local.get $var$4 + local.get $var$4 f64.mul - local.set $5 + local.set $var$5 f64.const -1.9839334836096632e-04 - local.get $4 + local.get $var$4 f64.const 2.718311493989822e-06 f64.mul f64.add - local.set $6 - local.get $4 - local.get $3 + local.set $var$6 + local.get $var$4 + local.get $var$3 f64.mul - local.set $7 - local.get $3 - local.get $7 + local.set $var$7 + local.get $var$3 + local.get $var$7 f64.const -0.16666666641626524 - local.get $4 + local.get $var$4 f64.const 0.008333329385889463 f64.mul f64.add f64.mul f64.add - local.get $7 - local.get $5 + local.get $var$7 + local.get $var$5 f64.mul - local.get $6 + local.get $var$6 f64.mul f64.add f32.demote_f64 @@ -12781,223 +12781,223 @@ i32.const 1 i32.lt_s drop - local.get $1 + local.get $ux i32.const 1081824209 i32.le_u if - local.get $1 + local.get $ux i32.const 1075235811 i32.le_u if - local.get $2 + local.get $sign if (result f32) - local.get $0 + local.get $x f64.promote_f32 f64.const 1.5707963267948966 f64.add - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 f64.mul - local.set $7 - local.get $7 - local.get $7 + local.set $var$7 + local.get $var$7 + local.get $var$7 f64.mul - local.set $6 + local.set $var$6 f64.const -0.001388676377460993 - local.get $7 + local.get $var$7 f64.const 2.439044879627741e-05 f64.mul f64.add - local.set $5 + local.set $var$5 f32.const 1 f64.promote_f32 - local.get $7 + local.get $var$7 f64.const -0.499999997251031 f64.mul f64.add - local.get $6 + local.get $var$6 f64.const 0.04166662332373906 f64.mul f64.add - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 f64.mul - local.get $5 + local.get $var$5 f64.mul f64.add f32.demote_f64 f32.neg else - local.get $0 + local.get $x f64.promote_f32 f64.const 1.5707963267948966 f64.sub - local.set $4 - local.get $4 - local.get $4 + local.set $var$4 + local.get $var$4 + local.get $var$4 f64.mul - local.set $5 - local.get $5 - local.get $5 + local.set $var$5 + local.get $var$5 + local.get $var$5 f64.mul - local.set $6 + local.set $var$6 f64.const -0.001388676377460993 - local.get $5 + local.get $var$5 f64.const 2.439044879627741e-05 f64.mul f64.add - local.set $7 + local.set $var$7 f32.const 1 f64.promote_f32 - local.get $5 + local.get $var$5 f64.const -0.499999997251031 f64.mul f64.add - local.get $6 + local.get $var$6 f64.const 0.04166662332373906 f64.mul f64.add - local.get $6 - local.get $5 + local.get $var$6 + local.get $var$5 f64.mul - local.get $7 + local.get $var$7 f64.mul f64.add f32.demote_f64 end return end - local.get $2 + local.get $sign if (result f64) - local.get $0 + local.get $x f64.promote_f32 f64.const 3.141592653589793 f64.add else - local.get $0 + local.get $x f64.promote_f32 f64.const 3.141592653589793 f64.sub end f64.neg - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 f64.mul - local.set $7 - local.get $7 - local.get $7 + local.set $var$7 + local.get $var$7 + local.get $var$7 f64.mul - local.set $6 + local.set $var$6 f64.const -1.9839334836096632e-04 - local.get $7 + local.get $var$7 f64.const 2.718311493989822e-06 f64.mul f64.add - local.set $5 - local.get $7 - local.get $3 + local.set $var$5 + local.get $var$7 + local.get $var$3 f64.mul - local.set $4 - local.get $3 - local.get $4 + local.set $var$4 + local.get $var$3 + local.get $var$4 f64.const -0.16666666641626524 - local.get $7 + local.get $var$7 f64.const 0.008333329385889463 f64.mul f64.add f64.mul f64.add - local.get $4 - local.get $6 + local.get $var$4 + local.get $var$6 f64.mul - local.get $5 + local.get $var$5 f64.mul f64.add f32.demote_f64 return end - local.get $1 + local.get $ux i32.const 1088565717 i32.le_u if - local.get $1 + local.get $ux i32.const 1085271519 i32.le_u if - local.get $2 + local.get $sign if (result f32) - local.get $0 + local.get $x f64.promote_f32 f64.const 4.71238898038469 f64.add - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 f64.mul - local.set $4 - local.get $4 - local.get $4 + local.set $var$4 + local.get $var$4 + local.get $var$4 f64.mul - local.set $5 + local.set $var$5 f64.const -0.001388676377460993 - local.get $4 + local.get $var$4 f64.const 2.439044879627741e-05 f64.mul f64.add - local.set $6 + local.set $var$6 f32.const 1 f64.promote_f32 - local.get $4 + local.get $var$4 f64.const -0.499999997251031 f64.mul f64.add - local.get $5 + local.get $var$5 f64.const 0.04166662332373906 f64.mul f64.add - local.get $5 - local.get $4 + local.get $var$5 + local.get $var$4 f64.mul - local.get $6 + local.get $var$6 f64.mul f64.add f32.demote_f64 else - local.get $0 + local.get $x f64.promote_f32 f64.const 4.71238898038469 f64.sub - local.set $7 - local.get $7 - local.get $7 + local.set $var$7 + local.get $var$7 + local.get $var$7 f64.mul - local.set $6 - local.get $6 - local.get $6 + local.set $var$6 + local.get $var$6 + local.get $var$6 f64.mul - local.set $5 + local.set $var$5 f64.const -0.001388676377460993 - local.get $6 + local.get $var$6 f64.const 2.439044879627741e-05 f64.mul f64.add - local.set $4 + local.set $var$4 f32.const 1 f64.promote_f32 - local.get $6 + local.get $var$6 f64.const -0.499999997251031 f64.mul f64.add - local.get $5 + local.get $var$5 f64.const 0.04166662332373906 f64.mul f64.add - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 f64.mul - local.get $4 + local.get $var$4 f64.mul f64.add f32.demote_f64 @@ -13005,345 +13005,345 @@ end return end - local.get $2 + local.get $sign if (result f64) - local.get $0 + local.get $x f64.promote_f32 f64.const 6.283185307179586 f64.add else - local.get $0 + local.get $x f64.promote_f32 f64.const 6.283185307179586 f64.sub end - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 f64.mul - local.set $4 - local.get $4 - local.get $4 + local.set $var$4 + local.get $var$4 + local.get $var$4 f64.mul - local.set $5 + local.set $var$5 f64.const -1.9839334836096632e-04 - local.get $4 + local.get $var$4 f64.const 2.718311493989822e-06 f64.mul f64.add - local.set $6 - local.get $4 - local.get $3 + local.set $var$6 + local.get $var$4 + local.get $var$3 f64.mul - local.set $7 - local.get $3 - local.get $7 + local.set $var$7 + local.get $var$3 + local.get $var$7 f64.const -0.16666666641626524 - local.get $4 + local.get $var$4 f64.const 0.008333329385889463 f64.mul f64.add f64.mul f64.add - local.get $7 - local.get $5 + local.get $var$7 + local.get $var$5 f64.mul - local.get $6 + local.get $var$6 f64.mul f64.add f32.demote_f64 return end - local.get $1 + local.get $ux i32.const 2139095040 i32.ge_u if - local.get $0 - local.get $0 + local.get $x + local.get $x f32.sub return end block $~lib/math/rempio2f|inlined.1 (result i32) - local.get $0 - local.set $10 - local.get $1 - local.set $9 - local.get $2 - local.set $8 - local.get $9 + local.get $x + local.set $var$10 + local.get $ux + local.set $var$9 + local.get $sign + local.set $var$8 + local.get $var$9 i32.const 1305022427 i32.lt_u if - local.get $10 + local.get $var$10 f64.promote_f32 f64.const 0.6366197723675814 f64.mul f64.nearest - local.set $7 - local.get $10 + local.set $var$7 + local.get $var$10 f64.promote_f32 - local.get $7 + local.get $var$7 f64.const 1.5707963109016418 f64.mul f64.sub - local.get $7 + local.get $var$7 f64.const 1.5893254773528196e-08 f64.mul f64.sub global.set $~lib/math/rempio2f_y - local.get $7 + local.get $var$7 i32.trunc_sat_f64_s br $~lib/math/rempio2f|inlined.1 end - local.get $10 - local.set $12 - local.get $9 - local.set $11 - local.get $11 + local.get $var$10 + local.set $var$12 + local.get $var$9 + local.set $var$11 + local.get $var$11 i32.const 23 i32.shr_s i32.const 152 i32.sub - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 i32.const 63 i32.and i64.extend_i32_s - local.set $14 + local.set $var$14 i32.const 4608 - local.get $13 + local.get $var$13 i32.const 6 i32.shr_s i32.const 3 i32.shl i32.add - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 i64.load - local.set $16 - local.get $15 + local.set $var$16 + local.get $var$15 i64.load offset=8 - local.set $17 - local.get $14 + local.set $var$17 + local.get $var$14 i64.const 32 i64.gt_u if - local.get $15 + local.get $var$15 i64.load offset=16 - local.set $19 - local.get $19 + local.set $var$19 + local.get $var$19 i64.const 96 - local.get $14 + local.get $var$14 i64.sub i64.shr_u - local.set $18 - local.get $18 - local.get $17 - local.get $14 + local.set $var$18 + local.get $var$18 + local.get $var$17 + local.get $var$14 i64.const 32 i64.sub i64.shl i64.or - local.set $18 + local.set $var$18 else - local.get $17 + local.get $var$17 i64.const 32 - local.get $14 + local.get $var$14 i64.sub i64.shr_u - local.set $18 + local.set $var$18 end - local.get $17 + local.get $var$17 i64.const 64 - local.get $14 + local.get $var$14 i64.sub i64.shr_u - local.get $16 - local.get $14 + local.get $var$16 + local.get $var$14 i64.shl i64.or - local.set $19 - local.get $11 + local.set $var$19 + local.get $var$11 i32.const 8388607 i32.and i32.const 8388608 i32.or i64.extend_i32_s - local.set $20 - local.get $20 - local.get $19 + local.set $var$20 + local.get $var$20 + local.get $var$19 i64.mul - local.get $20 - local.get $18 + local.get $var$20 + local.get $var$18 i64.mul i64.const 32 i64.shr_u i64.add - local.set $21 - local.get $21 + local.set $var$21 + local.get $var$21 i64.const 2 i64.shl - local.set $22 - local.get $21 + local.set $var$22 + local.get $var$21 i64.const 62 i64.shr_u - local.get $22 + local.get $var$22 i64.const 63 i64.shr_u i64.add i32.wrap_i64 - local.set $23 + local.set $var$23 f64.const 8.515303950216386e-20 - local.get $12 + local.get $var$12 f64.promote_f32 f64.copysign - local.get $22 + local.get $var$22 f64.convert_i64_s f64.mul global.set $~lib/math/rempio2f_y - local.get $23 - local.set $23 + local.get $var$23 + local.set $var$23 i32.const 0 - local.get $23 + local.get $var$23 i32.sub - local.get $23 - local.get $8 + local.get $var$23 + local.get $var$8 select end - local.set $24 + local.set $n global.get $~lib/math/rempio2f_y - local.set $25 - local.get $24 + local.set $y + local.get $n i32.const 1 i32.and if (result f32) - local.get $25 - local.set $3 - local.get $3 - local.get $3 + local.get $y + local.set $var$3 + local.get $var$3 + local.get $var$3 f64.mul - local.set $7 - local.get $7 - local.get $7 + local.set $var$7 + local.get $var$7 + local.get $var$7 f64.mul - local.set $6 + local.set $var$6 f64.const -0.001388676377460993 - local.get $7 + local.get $var$7 f64.const 2.439044879627741e-05 f64.mul f64.add - local.set $5 + local.set $var$5 f32.const 1 f64.promote_f32 - local.get $7 + local.get $var$7 f64.const -0.499999997251031 f64.mul f64.add - local.get $6 + local.get $var$6 f64.const 0.04166662332373906 f64.mul f64.add - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 f64.mul - local.get $5 + local.get $var$5 f64.mul f64.add f32.demote_f64 else - local.get $25 - local.set $4 - local.get $4 - local.get $4 + local.get $y + local.set $var$4 + local.get $var$4 + local.get $var$4 f64.mul - local.set $5 - local.get $5 - local.get $5 + local.set $var$5 + local.get $var$5 + local.get $var$5 f64.mul - local.set $6 + local.set $var$6 f64.const -1.9839334836096632e-04 - local.get $5 + local.get $var$5 f64.const 2.718311493989822e-06 f64.mul f64.add - local.set $7 - local.get $5 - local.get $4 + local.set $var$7 + local.get $var$5 + local.get $var$4 f64.mul - local.set $3 - local.get $4 - local.get $3 + local.set $var$3 + local.get $var$4 + local.get $var$3 f64.const -0.16666666641626524 - local.get $5 + local.get $var$5 f64.const 0.008333329385889463 f64.mul f64.add f64.mul f64.add - local.get $3 - local.get $6 + local.get $var$3 + local.get $var$6 f64.mul - local.get $7 + local.get $var$7 f64.mul f64.add f32.demote_f64 end - local.set $26 - local.get $24 + local.set $t + local.get $n i32.const 2 i32.and if (result f32) - local.get $26 + local.get $t f32.neg else - local.get $26 + local.get $t end ) - (func $std/math/test_sinf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_sinf (param $value f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMathf.sin - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $~lib/math/NativeMath.sinh (param $0 f64) (result f64) - (local $1 i64) - (local $2 f64) - (local $3 i32) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - local.get $0 + (func $~lib/math/NativeMath.sinh (param $x f64) (result f64) + (local $u i64) + (local $a f64) + (local $w i32) + (local $h f64) + (local $var$5 f64) + (local $var$6 f64) + (local $var$7 f64) + local.get $x i64.reinterpret_f64 i64.const 9223372036854775807 i64.and - local.set $1 - local.get $1 + local.set $u + local.get $u f64.reinterpret_i64 - local.set $2 - local.get $1 + local.set $a + local.get $u i64.const 32 i64.shr_u i32.wrap_i64 - local.set $3 + local.set $w f64.const 0.5 - local.get $0 + local.get $x f64.copysign - local.set $4 - local.get $3 + local.set $h + local.get $w i32.const 1082535490 i32.lt_u if - local.get $2 + local.get $a call $~lib/math/NativeMath.expm1 - local.set $5 - local.get $3 + local.set $var$5 + local.get $w i32.const 1072693248 i32.lt_u if - local.get $3 + local.get $w i32.const 1072693248 i32.const 26 i32.const 20 @@ -13351,17 +13351,17 @@ i32.sub i32.lt_u if - local.get $0 + local.get $x return end - local.get $4 + local.get $h f64.const 2 - local.get $5 + local.get $var$5 f64.mul - local.get $5 - local.get $5 + local.get $var$5 + local.get $var$5 f64.mul - local.get $5 + local.get $var$5 f64.const 1 f64.add f64.div @@ -13369,10 +13369,10 @@ f64.mul return end - local.get $4 - local.get $5 - local.get $5 - local.get $5 + local.get $h + local.get $var$5 + local.get $var$5 + local.get $var$5 f64.const 1 f64.add f64.div @@ -13380,12 +13380,12 @@ f64.mul return end - local.get $2 - local.set $6 + local.get $a + local.set $var$6 f64.const 2 - local.get $4 + local.get $h f64.mul - local.set $5 + local.set $var$5 i32.const 1023 i32.const 2043 i32.const 2 @@ -13397,67 +13397,67 @@ i64.const 32 i64.shl f64.reinterpret_i64 - local.set $7 - local.get $6 + local.set $var$7 + local.get $var$6 f64.const 1416.0996898839683 f64.sub call $~lib/math/NativeMath.exp - local.get $5 - local.get $7 + local.get $var$5 + local.get $var$7 f64.mul f64.mul - local.get $7 + local.get $var$7 f64.mul ) - (func $std/math/test_sinh (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_sinh (param $value f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMath.sinh - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check if (result i32) - local.get $0 + local.get $value call $~lib/bindings/dom/Math.sinh - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check else i32.const 0 end ) - (func $~lib/math/NativeMathf.sinh (param $0 f32) (result f32) - (local $1 i32) - (local $2 f32) - (local $3 f32) - (local $4 f32) - (local $5 f32) - (local $6 f32) - local.get $0 + (func $~lib/math/NativeMathf.sinh (param $x f32) (result f32) + (local $u i32) + (local $a f32) + (local $h f32) + (local $var$4 f32) + (local $var$5 f32) + (local $var$6 f32) + local.get $x i32.reinterpret_f32 i32.const 2147483647 i32.and - local.set $1 - local.get $1 + local.set $u + local.get $u f32.reinterpret_i32 - local.set $2 + local.set $a f32.const 0.5 - local.get $0 + local.get $x f32.copysign - local.set $3 - local.get $1 + local.set $h + local.get $u i32.const 1118925335 i32.lt_u if - local.get $2 + local.get $a call $~lib/math/NativeMathf.expm1 - local.set $4 - local.get $1 + local.set $var$4 + local.get $u i32.const 1065353216 i32.lt_u if - local.get $1 + local.get $u i32.const 1065353216 i32.const 12 i32.const 23 @@ -13465,17 +13465,17 @@ i32.sub i32.lt_u if - local.get $0 + local.get $x return end - local.get $3 + local.get $h f32.const 2 - local.get $4 + local.get $var$4 f32.mul - local.get $4 - local.get $4 + local.get $var$4 + local.get $var$4 f32.mul - local.get $4 + local.get $var$4 f32.const 1 f32.add f32.div @@ -13483,10 +13483,10 @@ f32.mul return end - local.get $3 - local.get $4 - local.get $4 - local.get $4 + local.get $h + local.get $var$4 + local.get $var$4 + local.get $var$4 f32.const 1 f32.add f32.div @@ -13494,12 +13494,12 @@ f32.mul return end - local.get $2 - local.set $5 + local.get $a + local.set $var$5 f32.const 2 - local.get $3 + local.get $h f32.mul - local.set $4 + local.set $var$4 i32.const 127 i32.const 235 i32.const 1 @@ -13508,129 +13508,129 @@ i32.const 23 i32.shl f32.reinterpret_i32 - local.set $6 - local.get $5 + local.set $var$6 + local.get $var$5 f32.const 162.88958740234375 f32.sub call $~lib/math/NativeMathf.exp - local.get $4 - local.get $6 + local.get $var$4 + local.get $var$6 f32.mul f32.mul - local.get $6 + local.get $var$6 f32.mul ) - (func $std/math/test_sinhf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_sinhf (param $value f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMathf.sinh - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $std/math/test_sqrt (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 f64) - local.get $0 - local.set $4 - local.get $4 + (func $std/math/test_sqrt (param $value f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + (local $var$4 f64) + local.get $value + local.set $var$4 + local.get $var$4 f64.sqrt - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check if (result i32) - local.get $0 + local.get $value call $~lib/bindings/dom/Math.sqrt - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check else i32.const 0 end ) - (func $std/math/test_sqrtf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - (local $4 f32) - local.get $0 - local.set $4 - local.get $4 + (func $std/math/test_sqrtf (param $value f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + (local $var$4 f32) + local.get $value + local.set $var$4 + local.get $var$4 f32.sqrt - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $~lib/math/tan_kern (param $0 f64) (param $1 f64) (param $2 i32) (result f64) - (local $3 f64) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 f64) - (local $12 f64) - local.get $0 + (func $~lib/math/tan_kern (param $x f64) (param $y f64) (param $iy i32) (result f64) + (local $z f64) + (local $r f64) + (local $v f64) + (local $w f64) + (local $s f64) + (local $hx i32) + (local $ix i32) + (local $big i32) + (local $a f64) + (local $t f64) + local.get $x i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $8 - local.get $8 + local.set $hx + local.get $hx i32.const 2147483647 i32.and - local.set $9 - local.get $9 + local.set $ix + local.get $ix i32.const 1072010280 i32.ge_s - local.set $10 - local.get $10 + local.set $big + local.get $big if - local.get $8 + local.get $hx i32.const 0 i32.lt_s if - local.get $0 + local.get $x f64.neg - local.set $0 - local.get $1 + local.set $x + local.get $y f64.neg - local.set $1 + local.set $y end f64.const 0.7853981633974483 - local.get $0 + local.get $x f64.sub - local.set $3 + local.set $z f64.const 3.061616997868383e-17 - local.get $1 + local.get $y f64.sub - local.set $6 - local.get $3 - local.get $6 + local.set $w + local.get $z + local.get $w f64.add - local.set $0 + local.set $x f64.const 0 - local.set $1 + local.set $y end - local.get $0 - local.get $0 + local.get $x + local.get $x f64.mul - local.set $3 - local.get $3 - local.get $3 + local.set $z + local.get $z + local.get $z f64.mul - local.set $6 + local.set $w f64.const 0.13333333333320124 - local.get $6 + local.get $w f64.const 0.021869488294859542 - local.get $6 + local.get $w f64.const 3.5920791075913124e-03 - local.get $6 + local.get $w f64.const 5.880412408202641e-04 - local.get $6 + local.get $w f64.const 7.817944429395571e-05 - local.get $6 + local.get $w f64.const -1.8558637485527546e-05 f64.mul f64.add @@ -13642,18 +13642,18 @@ f64.add f64.mul f64.add - local.set $4 - local.get $3 + local.set $r + local.get $z f64.const 0.05396825397622605 - local.get $6 + local.get $w f64.const 0.0088632398235993 - local.get $6 + local.get $w f64.const 1.4562094543252903e-03 - local.get $6 + local.get $w f64.const 2.464631348184699e-04 - local.get $6 + local.get $w f64.const 7.140724913826082e-05 - local.get $6 + local.get $w f64.const 2.590730518636337e-05 f64.mul f64.add @@ -13666,57 +13666,57 @@ f64.mul f64.add f64.mul - local.set $5 - local.get $3 - local.get $0 + local.set $v + local.get $z + local.get $x f64.mul - local.set $7 - local.get $1 - local.get $3 - local.get $7 - local.get $4 - local.get $5 + local.set $s + local.get $y + local.get $z + local.get $s + local.get $r + local.get $v f64.add f64.mul - local.get $1 + local.get $y f64.add f64.mul f64.add - local.set $4 - local.get $4 + local.set $r + local.get $r f64.const 0.3333333333333341 - local.get $7 + local.get $s f64.mul f64.add - local.set $4 - local.get $0 - local.get $4 + local.set $r + local.get $x + local.get $r f64.add - local.set $6 - local.get $10 + local.set $w + local.get $big if - local.get $2 + local.get $iy f64.convert_i32_s - local.set $5 + local.set $v f64.const 1 - local.get $8 + local.get $hx i32.const 30 i32.shr_s i32.const 2 i32.and f64.convert_i32_s f64.sub - local.get $5 + local.get $v f64.const 2 - local.get $0 - local.get $6 - local.get $6 + local.get $x + local.get $w + local.get $w f64.mul - local.get $6 - local.get $5 + local.get $w + local.get $v f64.add f64.div - local.get $4 + local.get $r f64.sub f64.sub f64.mul @@ -13724,364 +13724,364 @@ f64.mul return end - local.get $2 + local.get $iy i32.const 1 i32.eq if - local.get $6 + local.get $w return end - local.get $6 - local.set $3 - local.get $3 + local.get $w + local.set $z + local.get $z i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $3 - local.get $4 - local.get $3 - local.get $0 + local.set $z + local.get $r + local.get $z + local.get $x f64.sub f64.sub - local.set $5 + local.set $v f64.const 1 f64.neg - local.get $6 + local.get $w f64.div - local.tee $11 - local.set $12 - local.get $12 + local.tee $a + local.set $t + local.get $t i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $12 + local.set $t f64.const 1 - local.get $12 - local.get $3 + local.get $t + local.get $z f64.mul f64.add - local.set $7 - local.get $12 - local.get $11 - local.get $7 - local.get $12 - local.get $5 + local.set $s + local.get $t + local.get $a + local.get $s + local.get $t + local.get $v f64.mul f64.add f64.mul f64.add ) - (func $~lib/math/NativeMath.tan (param $0 f64) (result f64) - (local $1 i64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i64) - (local $6 f64) - (local $7 i32) - (local $8 i32) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 f64) - (local $13 i32) - (local $14 i32) - (local $15 f64) - (local $16 f64) - (local $17 i32) - local.get $0 + (func $~lib/math/NativeMath.tan (param $x f64) (result f64) + (local $u i64) + (local $ux i32) + (local $sign i32) + (local $var$4 i32) + (local $var$5 i64) + (local $var$6 f64) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 f64) + (local $var$10 f64) + (local $var$11 f64) + (local $var$12 f64) + (local $var$13 i32) + (local $var$14 i32) + (local $var$15 f64) + (local $var$16 f64) + (local $n i32) + local.get $x i64.reinterpret_f64 - local.set $1 - local.get $1 + local.set $u + local.get $u i64.const 32 i64.shr_u i32.wrap_i64 - local.set $2 - local.get $2 + local.set $ux + local.get $ux i32.const 31 i32.shr_u - local.set $3 - local.get $2 + local.set $sign + local.get $ux i32.const 2147483647 i32.and - local.set $2 - local.get $2 + local.set $ux + local.get $ux i32.const 1072243195 i32.le_u if - local.get $2 + local.get $ux i32.const 1044381696 i32.lt_u if - local.get $0 + local.get $x return end - local.get $0 + local.get $x f64.const 0 i32.const 1 call $~lib/math/tan_kern return end - local.get $2 + local.get $ux i32.const 2146435072 i32.ge_u if - local.get $0 - local.get $0 + local.get $x + local.get $x f64.sub return end block $~lib/math/rempio2|inlined.2 (result i32) - local.get $0 - local.set $6 - local.get $1 - local.set $5 - local.get $3 - local.set $4 - local.get $5 + local.get $x + local.set $var$6 + local.get $u + local.set $var$5 + local.get $sign + local.set $var$4 + local.get $var$5 i64.const 32 i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and - local.set $7 + local.set $var$7 i32.const 0 i32.const 1 i32.lt_s drop - local.get $7 + local.get $var$7 i32.const 1073928572 i32.lt_u if i32.const 1 - local.set $8 - local.get $4 + local.set $var$8 + local.get $var$4 i32.eqz if - local.get $6 + local.get $var$6 f64.const 1.5707963267341256 f64.sub - local.set $9 - local.get $7 + local.set $var$9 + local.get $var$7 i32.const 1073291771 i32.ne if - local.get $9 + local.get $var$9 f64.const 6.077100506506192e-11 f64.sub - local.set $10 - local.get $9 - local.get $10 + local.set $var$10 + local.get $var$9 + local.get $var$10 f64.sub f64.const 6.077100506506192e-11 f64.sub - local.set $11 + local.set $var$11 else - local.get $9 + local.get $var$9 f64.const 6.077100506303966e-11 f64.sub - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 f64.const 2.0222662487959506e-21 f64.sub - local.set $10 - local.get $9 - local.get $10 + local.set $var$10 + local.get $var$9 + local.get $var$10 f64.sub f64.const 2.0222662487959506e-21 f64.sub - local.set $11 + local.set $var$11 end else - local.get $6 + local.get $var$6 f64.const 1.5707963267341256 f64.add - local.set $9 - local.get $7 + local.set $var$9 + local.get $var$7 i32.const 1073291771 i32.ne if - local.get $9 + local.get $var$9 f64.const 6.077100506506192e-11 f64.add - local.set $10 - local.get $9 - local.get $10 + local.set $var$10 + local.get $var$9 + local.get $var$10 f64.sub f64.const 6.077100506506192e-11 f64.add - local.set $11 + local.set $var$11 else - local.get $9 + local.get $var$9 f64.const 6.077100506303966e-11 f64.add - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 f64.const 2.0222662487959506e-21 f64.add - local.set $10 - local.get $9 - local.get $10 + local.set $var$10 + local.get $var$9 + local.get $var$10 f64.sub f64.const 2.0222662487959506e-21 f64.add - local.set $11 + local.set $var$11 end i32.const -1 - local.set $8 + local.set $var$8 end - local.get $10 + local.get $var$10 global.set $~lib/math/rempio2_y0 - local.get $11 + local.get $var$11 global.set $~lib/math/rempio2_y1 - local.get $8 + local.get $var$8 br $~lib/math/rempio2|inlined.2 end - local.get $7 + local.get $var$7 i32.const 1094263291 i32.lt_u if - local.get $6 + local.get $var$6 f64.const 0.6366197723675814 f64.mul f64.nearest - local.set $11 - local.get $6 - local.get $11 + local.set $var$11 + local.get $var$6 + local.get $var$11 f64.const 1.5707963267341256 f64.mul f64.sub - local.set $10 - local.get $11 + local.set $var$10 + local.get $var$11 f64.const 6.077100506506192e-11 f64.mul - local.set $9 - local.get $7 + local.set $var$9 + local.get $var$7 i32.const 20 i32.shr_u - local.set $8 - local.get $10 - local.get $9 + local.set $var$8 + local.get $var$10 + local.get $var$9 f64.sub - local.set $12 - local.get $12 + local.set $var$12 + local.get $var$12 i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $13 - local.get $8 - local.get $13 + local.set $var$13 + local.get $var$8 + local.get $var$13 i32.const 20 i32.shr_u i32.const 2047 i32.and i32.sub - local.set $14 - local.get $14 + local.set $var$14 + local.get $var$14 i32.const 16 i32.gt_u if - local.get $10 - local.set $15 - local.get $11 + local.get $var$10 + local.set $var$15 + local.get $var$11 f64.const 6.077100506303966e-11 f64.mul - local.set $9 - local.get $15 - local.get $9 + local.set $var$9 + local.get $var$15 + local.get $var$9 f64.sub - local.set $10 - local.get $11 + local.set $var$10 + local.get $var$11 f64.const 2.0222662487959506e-21 f64.mul - local.get $15 - local.get $10 + local.get $var$15 + local.get $var$10 f64.sub - local.get $9 + local.get $var$9 f64.sub f64.sub - local.set $9 - local.get $10 - local.get $9 + local.set $var$9 + local.get $var$10 + local.get $var$9 f64.sub - local.set $12 - local.get $12 + local.set $var$12 + local.get $var$12 i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $13 - local.get $8 - local.get $13 + local.set $var$13 + local.get $var$8 + local.get $var$13 i32.const 20 i32.shr_u i32.const 2047 i32.and i32.sub - local.set $14 - local.get $14 + local.set $var$14 + local.get $var$14 i32.const 49 i32.gt_u if - local.get $10 - local.set $16 - local.get $11 + local.get $var$10 + local.set $var$16 + local.get $var$11 f64.const 2.0222662487111665e-21 f64.mul - local.set $9 - local.get $16 - local.get $9 + local.set $var$9 + local.get $var$16 + local.get $var$9 f64.sub - local.set $10 - local.get $11 + local.set $var$10 + local.get $var$11 f64.const 8.4784276603689e-32 f64.mul - local.get $16 - local.get $10 + local.get $var$16 + local.get $var$10 f64.sub - local.get $9 + local.get $var$9 f64.sub f64.sub - local.set $9 - local.get $10 - local.get $9 + local.set $var$9 + local.get $var$10 + local.get $var$9 f64.sub - local.set $12 + local.set $var$12 end end - local.get $10 - local.get $12 + local.get $var$10 + local.get $var$12 f64.sub - local.get $9 + local.get $var$9 f64.sub - local.set $15 - local.get $12 + local.set $var$15 + local.get $var$12 global.set $~lib/math/rempio2_y0 - local.get $15 + local.get $var$15 global.set $~lib/math/rempio2_y1 - local.get $11 + local.get $var$11 i32.trunc_sat_f64_s br $~lib/math/rempio2|inlined.2 end - local.get $6 - local.get $5 + local.get $var$6 + local.get $var$5 call $~lib/math/pio2_large_quot - local.set $14 + local.set $var$14 i32.const 0 - local.get $14 + local.get $var$14 i32.sub - local.get $14 - local.get $4 + local.get $var$14 + local.get $var$4 select end - local.set $17 + local.set $n global.get $~lib/math/rempio2_y0 global.get $~lib/math/rempio2_y1 i32.const 1 - local.get $17 + local.get $n i32.const 1 i32.and i32.const 1 @@ -14089,133 +14089,133 @@ i32.sub call $~lib/math/tan_kern ) - (func $std/math/test_tan (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_tan (param $value f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMath.tan - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check if (result i32) - local.get $0 + local.get $value call $~lib/bindings/dom/Math.tan - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check else i32.const 0 end ) - (func $~lib/math/NativeMathf.tan (param $0 f32) (result f32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 f64) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 i32) - (local $12 f32) - (local $13 i32) - (local $14 f32) - (local $15 i32) - (local $16 i64) - (local $17 i32) - (local $18 i64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i64) - (local $24 i64) - (local $25 i32) - (local $26 i32) - (local $27 f64) - local.get $0 + (func $~lib/math/NativeMathf.tan (param $x f32) (result f32) + (local $ux i32) + (local $sign i32) + (local $var$3 i32) + (local $var$4 f64) + (local $var$5 f64) + (local $var$6 f64) + (local $var$7 f64) + (local $var$8 f64) + (local $var$9 f64) + (local $var$10 f64) + (local $var$11 i32) + (local $var$12 f32) + (local $var$13 i32) + (local $var$14 f32) + (local $var$15 i32) + (local $var$16 i64) + (local $var$17 i32) + (local $var$18 i64) + (local $var$19 i64) + (local $var$20 i64) + (local $var$21 i64) + (local $var$22 i64) + (local $var$23 i64) + (local $var$24 i64) + (local $var$25 i32) + (local $n i32) + (local $y f64) + local.get $x i32.reinterpret_f32 - local.set $1 - local.get $1 + local.set $ux + local.get $ux i32.const 31 i32.shr_u - local.set $2 - local.get $1 + local.set $sign + local.get $ux i32.const 2147483647 i32.and - local.set $1 - local.get $1 + local.set $ux + local.get $ux i32.const 1061752794 i32.le_u if - local.get $1 + local.get $ux i32.const 964689920 i32.lt_u if - local.get $0 + local.get $x return end - local.get $0 + local.get $x f64.promote_f32 - local.set $4 + local.set $var$4 i32.const 0 - local.set $3 - local.get $4 - local.get $4 + local.set $var$3 + local.get $var$4 + local.get $var$4 f64.mul - local.set $5 + local.set $var$5 f64.const 0.002974357433599673 - local.get $5 + local.get $var$5 f64.const 0.009465647849436732 f64.mul f64.add - local.set $6 + local.set $var$6 f64.const 0.05338123784456704 - local.get $5 + local.get $var$5 f64.const 0.024528318116654728 f64.mul f64.add - local.set $7 - local.get $5 - local.get $5 + local.set $var$7 + local.get $var$5 + local.get $var$5 f64.mul - local.set $8 - local.get $5 - local.get $4 + local.set $var$8 + local.get $var$5 + local.get $var$4 f64.mul - local.set $9 + local.set $var$9 f64.const 0.3333313950307914 - local.get $5 + local.get $var$5 f64.const 0.13339200271297674 f64.mul f64.add - local.set $10 - local.get $4 - local.get $9 - local.get $10 + local.set $var$10 + local.get $var$4 + local.get $var$9 + local.get $var$10 f64.mul f64.add - local.get $9 - local.get $8 + local.get $var$9 + local.get $var$8 f64.mul - local.get $7 - local.get $8 - local.get $6 + local.get $var$7 + local.get $var$8 + local.get $var$6 f64.mul f64.add f64.mul f64.add - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 if (result f64) f32.const -1 f64.promote_f32 - local.get $6 + local.get $var$6 f64.div else - local.get $6 + local.get $var$6 end f32.demote_f64 return @@ -14224,904 +14224,904 @@ i32.const 1 i32.lt_s drop - local.get $1 + local.get $ux i32.const 1081824209 i32.le_u if - local.get $1 + local.get $ux i32.const 1075235811 i32.le_u if - local.get $2 + local.get $sign if (result f64) - local.get $0 + local.get $x f64.promote_f32 f64.const 1.5707963267948966 f64.add else - local.get $0 + local.get $x f64.promote_f32 f64.const 1.5707963267948966 f64.sub end - local.set $4 + local.set $var$4 i32.const 1 - local.set $3 - local.get $4 - local.get $4 + local.set $var$3 + local.get $var$4 + local.get $var$4 f64.mul - local.set $10 + local.set $var$10 f64.const 0.002974357433599673 - local.get $10 + local.get $var$10 f64.const 0.009465647849436732 f64.mul f64.add - local.set $9 + local.set $var$9 f64.const 0.05338123784456704 - local.get $10 + local.get $var$10 f64.const 0.024528318116654728 f64.mul f64.add - local.set $8 - local.get $10 - local.get $10 + local.set $var$8 + local.get $var$10 + local.get $var$10 f64.mul - local.set $7 - local.get $10 - local.get $4 + local.set $var$7 + local.get $var$10 + local.get $var$4 f64.mul - local.set $6 + local.set $var$6 f64.const 0.3333313950307914 - local.get $10 + local.get $var$10 f64.const 0.13339200271297674 f64.mul f64.add - local.set $5 - local.get $4 - local.get $6 - local.get $5 + local.set $var$5 + local.get $var$4 + local.get $var$6 + local.get $var$5 f64.mul f64.add - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 f64.mul - local.get $8 - local.get $7 - local.get $9 + local.get $var$8 + local.get $var$7 + local.get $var$9 f64.mul f64.add f64.mul f64.add - local.set $9 - local.get $3 + local.set $var$9 + local.get $var$3 if (result f64) f32.const -1 f64.promote_f32 - local.get $9 + local.get $var$9 f64.div else - local.get $9 + local.get $var$9 end f32.demote_f64 return else - local.get $2 + local.get $sign if (result f64) - local.get $0 + local.get $x f64.promote_f32 f64.const 3.141592653589793 f64.add else - local.get $0 + local.get $x f64.promote_f32 f64.const 3.141592653589793 f64.sub end - local.set $4 + local.set $var$4 i32.const 0 - local.set $3 - local.get $4 - local.get $4 + local.set $var$3 + local.get $var$4 + local.get $var$4 f64.mul - local.set $5 + local.set $var$5 f64.const 0.002974357433599673 - local.get $5 + local.get $var$5 f64.const 0.009465647849436732 f64.mul f64.add - local.set $6 + local.set $var$6 f64.const 0.05338123784456704 - local.get $5 + local.get $var$5 f64.const 0.024528318116654728 f64.mul f64.add - local.set $7 - local.get $5 - local.get $5 + local.set $var$7 + local.get $var$5 + local.get $var$5 f64.mul - local.set $8 - local.get $5 - local.get $4 + local.set $var$8 + local.get $var$5 + local.get $var$4 f64.mul - local.set $9 + local.set $var$9 f64.const 0.3333313950307914 - local.get $5 + local.get $var$5 f64.const 0.13339200271297674 f64.mul f64.add - local.set $10 - local.get $4 - local.get $9 - local.get $10 + local.set $var$10 + local.get $var$4 + local.get $var$9 + local.get $var$10 f64.mul f64.add - local.get $9 - local.get $8 + local.get $var$9 + local.get $var$8 f64.mul - local.get $7 - local.get $8 - local.get $6 + local.get $var$7 + local.get $var$8 + local.get $var$6 f64.mul f64.add f64.mul f64.add - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 if (result f64) f32.const -1 f64.promote_f32 - local.get $6 + local.get $var$6 f64.div else - local.get $6 + local.get $var$6 end f32.demote_f64 return end unreachable end - local.get $1 + local.get $ux i32.const 1088565717 i32.le_u if - local.get $1 + local.get $ux i32.const 1085271519 i32.le_u if - local.get $2 + local.get $sign if (result f64) - local.get $0 + local.get $x f64.promote_f32 f64.const 4.71238898038469 f64.add else - local.get $0 + local.get $x f64.promote_f32 f64.const 4.71238898038469 f64.sub end - local.set $4 + local.set $var$4 i32.const 1 - local.set $3 - local.get $4 - local.get $4 + local.set $var$3 + local.get $var$4 + local.get $var$4 f64.mul - local.set $10 + local.set $var$10 f64.const 0.002974357433599673 - local.get $10 + local.get $var$10 f64.const 0.009465647849436732 f64.mul f64.add - local.set $9 + local.set $var$9 f64.const 0.05338123784456704 - local.get $10 + local.get $var$10 f64.const 0.024528318116654728 f64.mul f64.add - local.set $8 - local.get $10 - local.get $10 + local.set $var$8 + local.get $var$10 + local.get $var$10 f64.mul - local.set $7 - local.get $10 - local.get $4 + local.set $var$7 + local.get $var$10 + local.get $var$4 f64.mul - local.set $6 + local.set $var$6 f64.const 0.3333313950307914 - local.get $10 + local.get $var$10 f64.const 0.13339200271297674 f64.mul f64.add - local.set $5 - local.get $4 - local.get $6 - local.get $5 + local.set $var$5 + local.get $var$4 + local.get $var$6 + local.get $var$5 f64.mul f64.add - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 f64.mul - local.get $8 - local.get $7 - local.get $9 + local.get $var$8 + local.get $var$7 + local.get $var$9 f64.mul f64.add f64.mul f64.add - local.set $9 - local.get $3 + local.set $var$9 + local.get $var$3 if (result f64) f32.const -1 f64.promote_f32 - local.get $9 + local.get $var$9 f64.div else - local.get $9 + local.get $var$9 end f32.demote_f64 return else - local.get $2 + local.get $sign if (result f64) - local.get $0 + local.get $x f64.promote_f32 f64.const 6.283185307179586 f64.add else - local.get $0 + local.get $x f64.promote_f32 f64.const 6.283185307179586 f64.sub end - local.set $4 + local.set $var$4 i32.const 0 - local.set $3 - local.get $4 - local.get $4 + local.set $var$3 + local.get $var$4 + local.get $var$4 f64.mul - local.set $5 + local.set $var$5 f64.const 0.002974357433599673 - local.get $5 + local.get $var$5 f64.const 0.009465647849436732 f64.mul f64.add - local.set $6 + local.set $var$6 f64.const 0.05338123784456704 - local.get $5 + local.get $var$5 f64.const 0.024528318116654728 f64.mul f64.add - local.set $7 - local.get $5 - local.get $5 + local.set $var$7 + local.get $var$5 + local.get $var$5 f64.mul - local.set $8 - local.get $5 - local.get $4 + local.set $var$8 + local.get $var$5 + local.get $var$4 f64.mul - local.set $9 + local.set $var$9 f64.const 0.3333313950307914 - local.get $5 + local.get $var$5 f64.const 0.13339200271297674 f64.mul f64.add - local.set $10 - local.get $4 - local.get $9 - local.get $10 + local.set $var$10 + local.get $var$4 + local.get $var$9 + local.get $var$10 f64.mul f64.add - local.get $9 - local.get $8 + local.get $var$9 + local.get $var$8 f64.mul - local.get $7 - local.get $8 - local.get $6 + local.get $var$7 + local.get $var$8 + local.get $var$6 f64.mul f64.add f64.mul f64.add - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 if (result f64) f32.const -1 f64.promote_f32 - local.get $6 + local.get $var$6 f64.div else - local.get $6 + local.get $var$6 end f32.demote_f64 return end unreachable end - local.get $1 + local.get $ux i32.const 2139095040 i32.ge_u if - local.get $0 - local.get $0 + local.get $x + local.get $x f32.sub return end block $~lib/math/rempio2f|inlined.2 (result i32) - local.get $0 - local.set $12 - local.get $1 - local.set $11 - local.get $2 - local.set $3 - local.get $11 + local.get $x + local.set $var$12 + local.get $ux + local.set $var$11 + local.get $sign + local.set $var$3 + local.get $var$11 i32.const 1305022427 i32.lt_u if - local.get $12 + local.get $var$12 f64.promote_f32 f64.const 0.6366197723675814 f64.mul f64.nearest - local.set $10 - local.get $12 + local.set $var$10 + local.get $var$12 f64.promote_f32 - local.get $10 + local.get $var$10 f64.const 1.5707963109016418 f64.mul f64.sub - local.get $10 + local.get $var$10 f64.const 1.5893254773528196e-08 f64.mul f64.sub global.set $~lib/math/rempio2f_y - local.get $10 + local.get $var$10 i32.trunc_sat_f64_s br $~lib/math/rempio2f|inlined.2 end - local.get $12 - local.set $14 - local.get $11 - local.set $13 - local.get $13 + local.get $var$12 + local.set $var$14 + local.get $var$11 + local.set $var$13 + local.get $var$13 i32.const 23 i32.shr_s i32.const 152 i32.sub - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 i32.const 63 i32.and i64.extend_i32_s - local.set $16 + local.set $var$16 i32.const 4608 - local.get $15 + local.get $var$15 i32.const 6 i32.shr_s i32.const 3 i32.shl i32.add - local.set $17 - local.get $17 + local.set $var$17 + local.get $var$17 i64.load - local.set $18 - local.get $17 + local.set $var$18 + local.get $var$17 i64.load offset=8 - local.set $19 - local.get $16 + local.set $var$19 + local.get $var$16 i64.const 32 i64.gt_u if - local.get $17 + local.get $var$17 i64.load offset=16 - local.set $21 - local.get $21 + local.set $var$21 + local.get $var$21 i64.const 96 - local.get $16 + local.get $var$16 i64.sub i64.shr_u - local.set $20 - local.get $20 - local.get $19 - local.get $16 + local.set $var$20 + local.get $var$20 + local.get $var$19 + local.get $var$16 i64.const 32 i64.sub i64.shl i64.or - local.set $20 + local.set $var$20 else - local.get $19 + local.get $var$19 i64.const 32 - local.get $16 + local.get $var$16 i64.sub i64.shr_u - local.set $20 + local.set $var$20 end - local.get $19 + local.get $var$19 i64.const 64 - local.get $16 + local.get $var$16 i64.sub i64.shr_u - local.get $18 - local.get $16 + local.get $var$18 + local.get $var$16 i64.shl i64.or - local.set $21 - local.get $13 + local.set $var$21 + local.get $var$13 i32.const 8388607 i32.and i32.const 8388608 i32.or i64.extend_i32_s - local.set $22 - local.get $22 - local.get $21 + local.set $var$22 + local.get $var$22 + local.get $var$21 i64.mul - local.get $22 - local.get $20 + local.get $var$22 + local.get $var$20 i64.mul i64.const 32 i64.shr_u i64.add - local.set $23 - local.get $23 + local.set $var$23 + local.get $var$23 i64.const 2 i64.shl - local.set $24 - local.get $23 + local.set $var$24 + local.get $var$23 i64.const 62 i64.shr_u - local.get $24 + local.get $var$24 i64.const 63 i64.shr_u i64.add i32.wrap_i64 - local.set $25 + local.set $var$25 f64.const 8.515303950216386e-20 - local.get $14 + local.get $var$14 f64.promote_f32 f64.copysign - local.get $24 + local.get $var$24 f64.convert_i64_s f64.mul global.set $~lib/math/rempio2f_y - local.get $25 - local.set $25 + local.get $var$25 + local.set $var$25 i32.const 0 - local.get $25 + local.get $var$25 i32.sub - local.get $25 - local.get $3 + local.get $var$25 + local.get $var$3 select end - local.set $26 + local.set $n global.get $~lib/math/rempio2f_y - local.set $27 - local.get $27 - local.set $4 - local.get $26 + local.set $y + local.get $y + local.set $var$4 + local.get $n i32.const 1 i32.and - local.set $13 - local.get $4 - local.get $4 + local.set $var$13 + local.get $var$4 + local.get $var$4 f64.mul - local.set $10 + local.set $var$10 f64.const 0.002974357433599673 - local.get $10 + local.get $var$10 f64.const 0.009465647849436732 f64.mul f64.add - local.set $9 + local.set $var$9 f64.const 0.05338123784456704 - local.get $10 + local.get $var$10 f64.const 0.024528318116654728 f64.mul f64.add - local.set $8 - local.get $10 - local.get $10 + local.set $var$8 + local.get $var$10 + local.get $var$10 f64.mul - local.set $7 - local.get $10 - local.get $4 + local.set $var$7 + local.get $var$10 + local.get $var$4 f64.mul - local.set $6 + local.set $var$6 f64.const 0.3333313950307914 - local.get $10 + local.get $var$10 f64.const 0.13339200271297674 f64.mul f64.add - local.set $5 - local.get $4 - local.get $6 - local.get $5 + local.set $var$5 + local.get $var$4 + local.get $var$6 + local.get $var$5 f64.mul f64.add - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 f64.mul - local.get $8 - local.get $7 - local.get $9 + local.get $var$8 + local.get $var$7 + local.get $var$9 f64.mul f64.add f64.mul f64.add - local.set $9 - local.get $13 + local.set $var$9 + local.get $var$13 if (result f64) f32.const -1 f64.promote_f32 - local.get $9 + local.get $var$9 f64.div else - local.get $9 + local.get $var$9 end f32.demote_f64 ) - (func $std/math/test_tanf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_tanf (param $value f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMathf.tan - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $~lib/math/NativeMath.tanh (param $0 f64) (result f64) - (local $1 i64) - (local $2 f64) - (local $3 i32) - (local $4 f64) - local.get $0 + (func $~lib/math/NativeMath.tanh (param $x f64) (result f64) + (local $u i64) + (local $y f64) + (local $w i32) + (local $t f64) + local.get $x i64.reinterpret_f64 - local.set $1 - local.get $1 + local.set $u + local.get $u i64.const 9223372036854775807 i64.and - local.set $1 - local.get $1 + local.set $u + local.get $u f64.reinterpret_i64 - local.set $2 - local.get $1 + local.set $y + local.get $u i64.const 32 i64.shr_u i32.wrap_i64 - local.set $3 - local.get $3 + local.set $w + local.get $w i32.const 1071748074 i32.gt_u if - local.get $3 + local.get $w i32.const 1077149696 i32.gt_u if f64.const 1 f64.const 0 - local.get $2 + local.get $y f64.div f64.sub - local.set $4 + local.set $t else f64.const 2 - local.get $2 + local.get $y f64.mul call $~lib/math/NativeMath.expm1 - local.set $4 + local.set $t f64.const 1 f64.const 2 - local.get $4 + local.get $t f64.const 2 f64.add f64.div f64.sub - local.set $4 + local.set $t end else - local.get $3 + local.get $w i32.const 1070618798 i32.gt_u if f64.const 2 - local.get $2 + local.get $y f64.mul call $~lib/math/NativeMath.expm1 - local.set $4 - local.get $4 - local.get $4 + local.set $t + local.get $t + local.get $t f64.const 2 f64.add f64.div - local.set $4 + local.set $t else - local.get $3 + local.get $w i32.const 1048576 i32.ge_u if f64.const -2 - local.get $2 + local.get $y f64.mul call $~lib/math/NativeMath.expm1 - local.set $4 - local.get $4 + local.set $t + local.get $t f64.neg - local.get $4 + local.get $t f64.const 2 f64.add f64.div - local.set $4 + local.set $t else - local.get $2 - local.set $4 + local.get $y + local.set $t end end end - local.get $4 - local.get $0 + local.get $t + local.get $x f64.copysign ) - (func $std/math/test_tanh (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_tanh (param $value f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMath.tanh - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check if (result i32) - local.get $0 + local.get $value call $~lib/bindings/dom/Math.tanh - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check else i32.const 0 end ) - (func $~lib/math/NativeMathf.tanh (param $0 f32) (result f32) - (local $1 i32) - (local $2 f32) - (local $3 f32) - local.get $0 + (func $~lib/math/NativeMathf.tanh (param $x f32) (result f32) + (local $u i32) + (local $y f32) + (local $t f32) + local.get $x i32.reinterpret_f32 - local.set $1 - local.get $1 + local.set $u + local.get $u i32.const 2147483647 i32.and - local.set $1 - local.get $1 + local.set $u + local.get $u f32.reinterpret_i32 - local.set $2 - local.get $1 + local.set $y + local.get $u i32.const 1057791828 i32.gt_u if - local.get $1 + local.get $u i32.const 1092616192 i32.gt_u if f32.const 1 f32.const 0 - local.get $2 + local.get $y f32.div f32.add - local.set $3 + local.set $t else f32.const 2 - local.get $2 + local.get $y f32.mul call $~lib/math/NativeMathf.expm1 - local.set $3 + local.set $t f32.const 1 f32.const 2 - local.get $3 + local.get $t f32.const 2 f32.add f32.div f32.sub - local.set $3 + local.set $t end else - local.get $1 + local.get $u i32.const 1048757624 i32.gt_u if f32.const 2 - local.get $2 + local.get $y f32.mul call $~lib/math/NativeMathf.expm1 - local.set $3 - local.get $3 - local.get $3 + local.set $t + local.get $t + local.get $t f32.const 2 f32.add f32.div - local.set $3 + local.set $t else - local.get $1 + local.get $u i32.const 8388608 i32.ge_u if f32.const -2 - local.get $2 + local.get $y f32.mul call $~lib/math/NativeMathf.expm1 - local.set $3 - local.get $3 + local.set $t + local.get $t f32.neg - local.get $3 + local.get $t f32.const 2 f32.add f32.div - local.set $3 + local.set $t else - local.get $2 - local.set $3 + local.get $y + local.set $t end end end - local.get $3 - local.get $0 + local.get $t + local.get $x f32.copysign ) - (func $std/math/test_tanhf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - local.get $0 + (func $std/math/test_tanhf (param $value f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + local.get $value call $~lib/math/NativeMathf.tanh - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $std/math/test_trunc (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 f64) - local.get $0 - local.set $4 - local.get $4 + (func $std/math/test_trunc (param $value f64) (param $expected f64) (param $error f64) (param $flags i32) (result i32) + (local $var$4 f64) + local.get $value + local.set $var$4 + local.get $var$4 f64.trunc - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check if (result i32) - local.get $0 + local.get $value call $~lib/bindings/dom/Math.trunc - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check else i32.const 0 end ) - (func $std/math/test_truncf (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) - (local $4 f32) - local.get $0 - local.set $4 - local.get $4 + (func $std/math/test_truncf (param $value f32) (param $expected f32) (param $error f32) (param $flags i32) (result i32) + (local $var$4 f32) + local.get $value + local.set $var$4 + local.get $var$4 f32.trunc - local.get $1 - local.get $2 - local.get $3 + local.get $expected + local.get $error + local.get $flags call $std/math/check ) - (func $~lib/math/NativeMath.sincos (param $0 f64) - (local $1 i64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f64) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 i64) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 f64) - (local $17 i32) - (local $18 f64) - (local $19 f64) - (local $20 f64) - (local $21 f64) - (local $22 f64) - (local $23 f64) - local.get $0 + (func $~lib/math/NativeMath.sincos (param $x f64) + (local $u i64) + (local $ux i32) + (local $sign i32) + (local $var$4 i32) + (local $var$5 f64) + (local $var$6 f64) + (local $var$7 f64) + (local $var$8 f64) + (local $var$9 f64) + (local $var$10 f64) + (local $var$11 i64) + (local $var$12 i32) + (local $var$13 i32) + (local $var$14 i32) + (local $var$15 i32) + (local $var$16 f64) + (local $n i32) + (local $y0 f64) + (local $y1 f64) + (local $s f64) + (local $c f64) + (local $sin f64) + (local $cos f64) + local.get $x i64.reinterpret_f64 - local.set $1 - local.get $1 + local.set $u + local.get $u i64.const 32 i64.shr_u i32.wrap_i64 - local.set $2 - local.get $2 + local.set $ux + local.get $ux i32.const 31 i32.shr_u - local.set $3 - local.get $2 + local.set $sign + local.get $ux i32.const 2147483647 i32.and - local.set $2 - local.get $2 + local.set $ux + local.get $ux i32.const 1072243195 i32.le_u if - local.get $2 + local.get $ux i32.const 1044816030 i32.lt_u if - local.get $0 + local.get $x global.set $~lib/math/NativeMath.sincos_sin f64.const 1 global.set $~lib/math/NativeMath.sincos_cos return end block $~lib/math/sin_kern|inlined.3 (result f64) - local.get $0 - local.set $6 + local.get $x + local.set $var$6 f64.const 0 - local.set $5 + local.set $var$5 i32.const 0 - local.set $4 - local.get $6 - local.get $6 + local.set $var$4 + local.get $var$6 + local.get $var$6 f64.mul - local.set $7 - local.get $7 - local.get $7 + local.set $var$7 + local.get $var$7 + local.get $var$7 f64.mul - local.set $8 + local.set $var$8 f64.const 0.00833333333332249 - local.get $7 + local.get $var$7 f64.const -1.984126982985795e-04 - local.get $7 + local.get $var$7 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $7 - local.get $8 + local.get $var$7 + local.get $var$8 f64.mul f64.const -2.5050760253406863e-08 - local.get $7 + local.get $var$7 f64.const 1.58969099521155e-10 f64.mul f64.add f64.mul f64.add - local.set $9 - local.get $7 - local.get $6 + local.set $var$9 + local.get $var$7 + local.get $var$6 f64.mul - local.set $10 - local.get $4 + local.set $var$10 + local.get $var$4 i32.eqz if - local.get $6 - local.get $10 + local.get $var$6 + local.get $var$10 f64.const -0.16666666666666632 - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 f64.mul f64.add f64.mul f64.add br $~lib/math/sin_kern|inlined.3 else - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 f64.const 0.5 - local.get $5 + local.get $var$5 f64.mul - local.get $10 - local.get $9 + local.get $var$10 + local.get $var$9 f64.mul f64.sub f64.mul - local.get $5 + local.get $var$5 f64.sub - local.get $10 + local.get $var$10 f64.const -0.16666666666666632 f64.mul f64.sub @@ -15131,36 +15131,36 @@ unreachable end global.set $~lib/math/NativeMath.sincos_sin - local.get $0 - local.set $6 + local.get $x + local.set $var$6 f64.const 0 - local.set $5 - local.get $6 - local.get $6 + local.set $var$5 + local.get $var$6 + local.get $var$6 f64.mul - local.set $10 - local.get $10 - local.get $10 + local.set $var$10 + local.get $var$10 + local.get $var$10 f64.mul - local.set $9 - local.get $10 + local.set $var$9 + local.get $var$10 f64.const 0.0416666666666666 - local.get $10 + local.get $var$10 f64.const -0.001388888888887411 - local.get $10 + local.get $var$10 f64.const 2.480158728947673e-05 f64.mul f64.add f64.mul f64.add f64.mul - local.get $9 - local.get $9 + local.get $var$9 + local.get $var$9 f64.mul f64.const -2.7557314351390663e-07 - local.get $10 + local.get $var$10 f64.const 2.087572321298175e-09 - local.get $10 + local.get $var$10 f64.const -1.1359647557788195e-11 f64.mul f64.add @@ -15168,26 +15168,26 @@ f64.add f64.mul f64.add - local.set $8 + local.set $var$8 f64.const 0.5 - local.get $10 + local.get $var$10 f64.mul - local.set $7 + local.set $var$7 f64.const 1 - local.get $7 + local.get $var$7 f64.sub - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 f64.const 1 - local.get $9 + local.get $var$9 f64.sub - local.get $7 + local.get $var$7 f64.sub - local.get $10 - local.get $8 + local.get $var$10 + local.get $var$8 f64.mul - local.get $6 - local.get $5 + local.get $var$6 + local.get $var$5 f64.mul f64.sub f64.add @@ -15195,335 +15195,335 @@ global.set $~lib/math/NativeMath.sincos_cos return end - local.get $2 + local.get $ux i32.const 2139095040 i32.ge_u if - local.get $0 - local.get $0 + local.get $x + local.get $x f64.sub - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 global.set $~lib/math/NativeMath.sincos_sin - local.get $7 + local.get $var$7 global.set $~lib/math/NativeMath.sincos_cos return end block $~lib/math/rempio2|inlined.3 (result i32) - local.get $0 - local.set $5 - local.get $1 - local.set $11 - local.get $3 - local.set $4 - local.get $11 + local.get $x + local.set $var$5 + local.get $u + local.set $var$11 + local.get $sign + local.set $var$4 + local.get $var$11 i64.const 32 i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and - local.set $12 + local.set $var$12 i32.const 0 i32.const 1 i32.lt_s drop - local.get $12 + local.get $var$12 i32.const 1073928572 i32.lt_u if i32.const 1 - local.set $13 - local.get $4 + local.set $var$13 + local.get $var$4 i32.eqz if - local.get $5 + local.get $var$5 f64.const 1.5707963267341256 f64.sub - local.set $7 - local.get $12 + local.set $var$7 + local.get $var$12 i32.const 1073291771 i32.ne if - local.get $7 + local.get $var$7 f64.const 6.077100506506192e-11 f64.sub - local.set $8 - local.get $7 - local.get $8 + local.set $var$8 + local.get $var$7 + local.get $var$8 f64.sub f64.const 6.077100506506192e-11 f64.sub - local.set $9 + local.set $var$9 else - local.get $7 + local.get $var$7 f64.const 6.077100506303966e-11 f64.sub - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 f64.const 2.0222662487959506e-21 f64.sub - local.set $8 - local.get $7 - local.get $8 + local.set $var$8 + local.get $var$7 + local.get $var$8 f64.sub f64.const 2.0222662487959506e-21 f64.sub - local.set $9 + local.set $var$9 end else - local.get $5 + local.get $var$5 f64.const 1.5707963267341256 f64.add - local.set $7 - local.get $12 + local.set $var$7 + local.get $var$12 i32.const 1073291771 i32.ne if - local.get $7 + local.get $var$7 f64.const 6.077100506506192e-11 f64.add - local.set $8 - local.get $7 - local.get $8 + local.set $var$8 + local.get $var$7 + local.get $var$8 f64.sub f64.const 6.077100506506192e-11 f64.add - local.set $9 + local.set $var$9 else - local.get $7 + local.get $var$7 f64.const 6.077100506303966e-11 f64.add - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 f64.const 2.0222662487959506e-21 f64.add - local.set $8 - local.get $7 - local.get $8 + local.set $var$8 + local.get $var$7 + local.get $var$8 f64.sub f64.const 2.0222662487959506e-21 f64.add - local.set $9 + local.set $var$9 end i32.const -1 - local.set $13 + local.set $var$13 end - local.get $8 + local.get $var$8 global.set $~lib/math/rempio2_y0 - local.get $9 + local.get $var$9 global.set $~lib/math/rempio2_y1 - local.get $13 + local.get $var$13 br $~lib/math/rempio2|inlined.3 end - local.get $12 + local.get $var$12 i32.const 1094263291 i32.lt_u if - local.get $5 + local.get $var$5 f64.const 0.6366197723675814 f64.mul f64.nearest - local.set $9 - local.get $5 - local.get $9 + local.set $var$9 + local.get $var$5 + local.get $var$9 f64.const 1.5707963267341256 f64.mul f64.sub - local.set $8 - local.get $9 + local.set $var$8 + local.get $var$9 f64.const 6.077100506506192e-11 f64.mul - local.set $7 - local.get $12 + local.set $var$7 + local.get $var$12 i32.const 20 i32.shr_u - local.set $13 - local.get $8 - local.get $7 + local.set $var$13 + local.get $var$8 + local.get $var$7 f64.sub - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $14 - local.get $13 - local.get $14 + local.set $var$14 + local.get $var$13 + local.get $var$14 i32.const 20 i32.shr_u i32.const 2047 i32.and i32.sub - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 i32.const 16 i32.gt_u if - local.get $8 - local.set $6 - local.get $9 + local.get $var$8 + local.set $var$6 + local.get $var$9 f64.const 6.077100506303966e-11 f64.mul - local.set $7 - local.get $6 - local.get $7 + local.set $var$7 + local.get $var$6 + local.get $var$7 f64.sub - local.set $8 - local.get $9 + local.set $var$8 + local.get $var$9 f64.const 2.0222662487959506e-21 f64.mul - local.get $6 - local.get $8 + local.get $var$6 + local.get $var$8 f64.sub - local.get $7 + local.get $var$7 f64.sub f64.sub - local.set $7 - local.get $8 - local.get $7 + local.set $var$7 + local.get $var$8 + local.get $var$7 f64.sub - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $14 - local.get $13 - local.get $14 + local.set $var$14 + local.get $var$13 + local.get $var$14 i32.const 20 i32.shr_u i32.const 2047 i32.and i32.sub - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 i32.const 49 i32.gt_u if - local.get $8 - local.set $16 - local.get $9 + local.get $var$8 + local.set $var$16 + local.get $var$9 f64.const 2.0222662487111665e-21 f64.mul - local.set $7 - local.get $16 - local.get $7 + local.set $var$7 + local.get $var$16 + local.get $var$7 f64.sub - local.set $8 - local.get $9 + local.set $var$8 + local.get $var$9 f64.const 8.4784276603689e-32 f64.mul - local.get $16 - local.get $8 + local.get $var$16 + local.get $var$8 f64.sub - local.get $7 + local.get $var$7 f64.sub f64.sub - local.set $7 - local.get $8 - local.get $7 + local.set $var$7 + local.get $var$8 + local.get $var$7 f64.sub - local.set $10 + local.set $var$10 end end - local.get $8 - local.get $10 + local.get $var$8 + local.get $var$10 f64.sub - local.get $7 + local.get $var$7 f64.sub - local.set $6 - local.get $10 + local.set $var$6 + local.get $var$10 global.set $~lib/math/rempio2_y0 - local.get $6 + local.get $var$6 global.set $~lib/math/rempio2_y1 - local.get $9 + local.get $var$9 i32.trunc_sat_f64_s br $~lib/math/rempio2|inlined.3 end - local.get $5 - local.get $11 + local.get $var$5 + local.get $var$11 call $~lib/math/pio2_large_quot - local.set $15 + local.set $var$15 i32.const 0 - local.get $15 + local.get $var$15 i32.sub - local.get $15 - local.get $4 + local.get $var$15 + local.get $var$4 select end - local.set $17 + local.set $n global.get $~lib/math/rempio2_y0 - local.set $18 + local.set $y0 global.get $~lib/math/rempio2_y1 - local.set $19 + local.set $y1 block $~lib/math/sin_kern|inlined.4 (result f64) - local.get $18 - local.set $9 - local.get $19 - local.set $16 + local.get $y0 + local.set $var$9 + local.get $y1 + local.set $var$16 i32.const 1 - local.set $13 - local.get $9 - local.get $9 + local.set $var$13 + local.get $var$9 + local.get $var$9 f64.mul - local.set $5 - local.get $5 - local.get $5 + local.set $var$5 + local.get $var$5 + local.get $var$5 f64.mul - local.set $6 + local.set $var$6 f64.const 0.00833333333332249 - local.get $5 + local.get $var$5 f64.const -1.984126982985795e-04 - local.get $5 + local.get $var$5 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 f64.mul f64.const -2.5050760253406863e-08 - local.get $5 + local.get $var$5 f64.const 1.58969099521155e-10 f64.mul f64.add f64.mul f64.add - local.set $10 - local.get $5 - local.get $9 + local.set $var$10 + local.get $var$5 + local.get $var$9 f64.mul - local.set $7 - local.get $13 + local.set $var$7 + local.get $var$13 i32.eqz if - local.get $9 - local.get $7 + local.get $var$9 + local.get $var$7 f64.const -0.16666666666666632 - local.get $5 - local.get $10 + local.get $var$5 + local.get $var$10 f64.mul f64.add f64.mul f64.add br $~lib/math/sin_kern|inlined.4 else - local.get $9 - local.get $5 + local.get $var$9 + local.get $var$5 f64.const 0.5 - local.get $16 + local.get $var$16 f64.mul - local.get $7 - local.get $10 + local.get $var$7 + local.get $var$10 f64.mul f64.sub f64.mul - local.get $16 + local.get $var$16 f64.sub - local.get $7 + local.get $var$7 f64.const -0.16666666666666632 f64.mul f64.sub @@ -15532,37 +15532,37 @@ end unreachable end - local.set $20 - local.get $18 - local.set $16 - local.get $19 - local.set $8 - local.get $16 - local.get $16 + local.set $s + local.get $y0 + local.set $var$16 + local.get $y1 + local.set $var$8 + local.get $var$16 + local.get $var$16 f64.mul - local.set $7 - local.get $7 - local.get $7 + local.set $var$7 + local.get $var$7 + local.get $var$7 f64.mul - local.set $10 - local.get $7 + local.set $var$10 + local.get $var$7 f64.const 0.0416666666666666 - local.get $7 + local.get $var$7 f64.const -0.001388888888887411 - local.get $7 + local.get $var$7 f64.const 2.480158728947673e-05 f64.mul f64.add f64.mul f64.add f64.mul - local.get $10 - local.get $10 + local.get $var$10 + local.get $var$10 f64.mul f64.const -2.7557314351390663e-07 - local.get $7 + local.get $var$7 f64.const 2.087572321298175e-09 - local.get $7 + local.get $var$7 f64.const -1.1359647557788195e-11 f64.mul f64.add @@ -15570,130 +15570,130 @@ f64.add f64.mul f64.add - local.set $6 + local.set $var$6 f64.const 0.5 - local.get $7 + local.get $var$7 f64.mul - local.set $5 + local.set $var$5 f64.const 1 - local.get $5 + local.get $var$5 f64.sub - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 f64.const 1 - local.get $10 + local.get $var$10 f64.sub - local.get $5 + local.get $var$5 f64.sub - local.get $7 - local.get $6 + local.get $var$7 + local.get $var$6 f64.mul - local.get $16 - local.get $8 + local.get $var$16 + local.get $var$8 f64.mul f64.sub f64.add f64.add - local.set $21 - local.get $20 - local.set $22 - local.get $21 - local.set $23 - local.get $17 + local.set $c + local.get $s + local.set $sin + local.get $c + local.set $cos + local.get $n i32.const 1 i32.and if - local.get $21 - local.set $22 - local.get $20 + local.get $c + local.set $sin + local.get $s f64.neg - local.set $23 + local.set $cos end - local.get $17 + local.get $n i32.const 2 i32.and if - local.get $22 + local.get $sin f64.neg - local.set $22 - local.get $23 + local.set $sin + local.get $cos f64.neg - local.set $23 + local.set $cos end - local.get $22 + local.get $sin global.set $~lib/math/NativeMath.sincos_sin - local.get $23 + local.get $cos global.set $~lib/math/NativeMath.sincos_cos ) - (func $std/math/test_sincos (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (param $5 i32) (result i32) - (local $6 f64) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 f64) - local.get $0 + (func $std/math/test_sincos (param $value i64) (param $expected_sin i64) (param $error_sin i64) (param $expected_cos i64) (param $error_cos i64) (param $flags i32) (result i32) + (local $arg f64) + (local $expsin f64) + (local $expcos f64) + (local $errsin f64) + (local $errcos f64) + local.get $value f64.reinterpret_i64 - local.set $6 - local.get $1 + local.set $arg + local.get $expected_sin f64.reinterpret_i64 - local.set $7 - local.get $3 + local.set $expsin + local.get $expected_cos f64.reinterpret_i64 - local.set $8 - local.get $2 + local.set $expcos + local.get $error_sin f64.reinterpret_i64 - local.set $9 - local.get $4 + local.set $errsin + local.get $error_cos f64.reinterpret_i64 - local.set $10 - local.get $6 + local.set $errcos + local.get $arg call $~lib/math/NativeMath.sincos global.get $~lib/math/NativeMath.sincos_sin - local.get $7 - local.get $9 - local.get $5 + local.get $expsin + local.get $errsin + local.get $flags call $std/math/check if (result i32) global.get $~lib/math/NativeMath.sincos_cos - local.get $8 - local.get $10 - local.get $5 + local.get $expcos + local.get $errcos + local.get $flags call $std/math/check else i32.const 0 end ) - (func $~lib/math/dtoi32 (param $0 f64) (result i32) - (local $1 i32) - (local $2 i64) - (local $3 i64) - (local $4 i64) + (func $~lib/math/dtoi32 (param $x f64) (result i32) + (local $var$1 i32) + (local $var$2 i64) + (local $var$3 i64) + (local $var$4 i64) i32.const 0 i32.const 0 i32.gt_s drop i32.const 0 - local.set $1 - local.get $0 + local.set $var$1 + local.get $x i64.reinterpret_f64 - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i64.const 52 i64.shr_u i64.const 2047 i64.and - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i64.const 1023 i64.const 30 i64.add i64.le_u if - local.get $0 + local.get $x i32.trunc_sat_f64_s - local.set $1 + local.set $var$1 else - local.get $3 + local.get $var$3 i64.const 1023 i64.const 30 i64.add @@ -15701,7 +15701,7 @@ i64.add i64.le_u if - local.get $2 + local.get $var$2 i64.const 1 i64.const 52 i64.shl @@ -15712,9 +15712,9 @@ i64.const 52 i64.shl i64.or - local.set $4 - local.get $4 - local.get $3 + local.set $var$4 + local.get $var$4 + local.get $var$3 i64.const 1023 i64.sub i64.const 52 @@ -15722,33 +15722,33 @@ i64.const 32 i64.add i64.shl - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $1 + local.set $var$1 i32.const 0 - local.get $1 + local.get $var$1 i32.sub - local.get $1 - local.get $2 + local.get $var$1 + local.get $var$2 i64.const 0 i64.lt_s select - local.set $1 + local.set $var$1 end end - local.get $1 + local.get $var$1 return ) - (func $~lib/math/NativeMath.imul (param $0 f64) (param $1 f64) (result f64) - (local $2 f64) - local.get $0 - local.get $1 + (func $~lib/math/NativeMath.imul (param $x f64) (param $y f64) (result f64) + (local $var$2 f64) + local.get $x + local.get $y f64.add - local.tee $2 - local.get $2 + local.tee $var$2 + local.get $var$2 f64.sub f64.const 0 f64.eq @@ -15757,16 +15757,16 @@ f64.const 0 return end - local.get $0 + local.get $x call $~lib/math/dtoi32 - local.get $1 + local.get $y call $~lib/math/dtoi32 i32.mul f64.convert_i32_s ) - (func $~lib/math/NativeMath.clz32 (param $0 f64) (result f64) - local.get $0 - local.get $0 + (func $~lib/math/NativeMath.clz32 (param $x f64) (result f64) + local.get $x + local.get $x f64.sub f64.const 0 f64.eq @@ -15775,46 +15775,46 @@ f64.const 32 return end - local.get $0 + local.get $x call $~lib/math/dtoi32 i32.clz f64.convert_i32_s ) - (func $~lib/math/ipow64 (param $0 i64) (param $1 i64) (result i64) - (local $2 i64) - (local $3 i32) - (local $4 i32) + (func $~lib/math/ipow64 (param $x i64) (param $e i64) (result i64) + (local $out i64) + (local $var$3 i32) + (local $var$4 i32) i64.const 1 - local.set $2 + local.set $out i32.const 0 i32.const 1 i32.lt_s drop - local.get $0 + local.get $x i64.const 2 i64.eq if i64.const 1 - local.get $1 + local.get $e i64.shl i64.const 0 - local.get $1 + local.get $e i64.const 64 i64.lt_u select return end - local.get $1 + local.get $e i64.const 0 i64.le_s if - local.get $0 + local.get $x i64.const -1 i64.eq if i64.const -1 i64.const 1 - local.get $1 + local.get $e i64.const 1 i64.and i64.const 0 @@ -15822,43 +15822,43 @@ select return end - local.get $1 + local.get $e i64.const 0 i64.eq i64.extend_i32_u - local.get $0 + local.get $x i64.const 1 i64.eq i64.extend_i32_u i64.or return else - local.get $1 + local.get $e i64.const 1 i64.eq if - local.get $0 + local.get $x return else - local.get $1 + local.get $e i64.const 2 i64.eq if - local.get $0 - local.get $0 + local.get $x + local.get $x i64.mul return else - local.get $1 + local.get $e i64.const 64 i64.lt_s if i32.const 64 - local.get $1 + local.get $e i64.clz i32.wrap_i64 i32.sub - local.set $3 + local.set $var$3 block $break|0 block $case5|0 block $case4|0 @@ -15866,409 +15866,409 @@ block $case2|0 block $case1|0 block $case0|0 - local.get $3 - local.set $4 - local.get $4 + local.get $var$3 + local.set $var$4 + local.get $var$4 i32.const 6 i32.eq br_if $case0|0 - local.get $4 + local.get $var$4 i32.const 5 i32.eq br_if $case1|0 - local.get $4 + local.get $var$4 i32.const 4 i32.eq br_if $case2|0 - local.get $4 + local.get $var$4 i32.const 3 i32.eq br_if $case3|0 - local.get $4 + local.get $var$4 i32.const 2 i32.eq br_if $case4|0 - local.get $4 + local.get $var$4 i32.const 1 i32.eq br_if $case5|0 br $break|0 end - local.get $1 + local.get $e i64.const 1 i64.and i64.const 0 i64.ne if - local.get $2 - local.get $0 + local.get $out + local.get $x i64.mul - local.set $2 + local.set $out end - local.get $1 + local.get $e i64.const 1 i64.shr_u - local.set $1 - local.get $0 - local.get $0 + local.set $e + local.get $x + local.get $x i64.mul - local.set $0 + local.set $x end - local.get $1 + local.get $e i64.const 1 i64.and i64.const 0 i64.ne if - local.get $2 - local.get $0 + local.get $out + local.get $x i64.mul - local.set $2 + local.set $out end - local.get $1 + local.get $e i64.const 1 i64.shr_u - local.set $1 - local.get $0 - local.get $0 + local.set $e + local.get $x + local.get $x i64.mul - local.set $0 + local.set $x end - local.get $1 + local.get $e i64.const 1 i64.and i64.const 0 i64.ne if - local.get $2 - local.get $0 + local.get $out + local.get $x i64.mul - local.set $2 + local.set $out end - local.get $1 + local.get $e i64.const 1 i64.shr_u - local.set $1 - local.get $0 - local.get $0 + local.set $e + local.get $x + local.get $x i64.mul - local.set $0 + local.set $x end - local.get $1 + local.get $e i64.const 1 i64.and i64.const 0 i64.ne if - local.get $2 - local.get $0 + local.get $out + local.get $x i64.mul - local.set $2 + local.set $out end - local.get $1 + local.get $e i64.const 1 i64.shr_u - local.set $1 - local.get $0 - local.get $0 + local.set $e + local.get $x + local.get $x i64.mul - local.set $0 + local.set $x end - local.get $1 + local.get $e i64.const 1 i64.and i64.const 0 i64.ne if - local.get $2 - local.get $0 + local.get $out + local.get $x i64.mul - local.set $2 + local.set $out end - local.get $1 + local.get $e i64.const 1 i64.shr_u - local.set $1 - local.get $0 - local.get $0 + local.set $e + local.get $x + local.get $x i64.mul - local.set $0 + local.set $x end - local.get $1 + local.get $e i64.const 1 i64.and i64.const 0 i64.ne if - local.get $2 - local.get $0 + local.get $out + local.get $x i64.mul - local.set $2 + local.set $out end end - local.get $2 + local.get $out return end end end end loop $while-continue|1 - local.get $1 + local.get $e i64.const 0 i64.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $1 + local.get $e i64.const 1 i64.and i64.const 0 i64.ne if - local.get $2 - local.get $0 + local.get $out + local.get $x i64.mul - local.set $2 + local.set $out end - local.get $1 + local.get $e i64.const 1 i64.shr_u - local.set $1 - local.get $0 - local.get $0 + local.set $e + local.get $x + local.get $x i64.mul - local.set $0 + local.set $x br $while-continue|1 end end - local.get $2 + local.get $out ) - (func $~lib/math/ipow32 (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (func $~lib/math/ipow32 (param $x i32) (param $e i32) (result i32) + (local $out i32) + (local $var$3 i32) + (local $var$4 i32) i32.const 1 - local.set $2 + local.set $out i32.const 0 i32.const 1 i32.lt_s drop - local.get $0 + local.get $x i32.const 2 i32.eq if i32.const 1 - local.get $1 + local.get $e i32.shl i32.const 0 - local.get $1 + local.get $e i32.const 32 i32.lt_u select return end - local.get $1 + local.get $e i32.const 0 i32.le_s if - local.get $0 + local.get $x i32.const -1 i32.eq if i32.const -1 i32.const 1 - local.get $1 + local.get $e i32.const 1 i32.and select return end - local.get $1 + local.get $e i32.const 0 i32.eq - local.get $0 + local.get $x i32.const 1 i32.eq i32.or return else - local.get $1 + local.get $e i32.const 1 i32.eq if - local.get $0 + local.get $x return else - local.get $1 + local.get $e i32.const 2 i32.eq if - local.get $0 - local.get $0 + local.get $x + local.get $x i32.mul return else - local.get $1 + local.get $e i32.const 32 i32.lt_s if i32.const 32 - local.get $1 + local.get $e i32.clz i32.sub - local.set $3 + local.set $var$3 block $break|0 block $case4|0 block $case3|0 block $case2|0 block $case1|0 block $case0|0 - local.get $3 - local.set $4 - local.get $4 + local.get $var$3 + local.set $var$4 + local.get $var$4 i32.const 5 i32.eq br_if $case0|0 - local.get $4 + local.get $var$4 i32.const 4 i32.eq br_if $case1|0 - local.get $4 + local.get $var$4 i32.const 3 i32.eq br_if $case2|0 - local.get $4 + local.get $var$4 i32.const 2 i32.eq br_if $case3|0 - local.get $4 + local.get $var$4 i32.const 1 i32.eq br_if $case4|0 br $break|0 end - local.get $1 + local.get $e i32.const 1 i32.and if - local.get $2 - local.get $0 + local.get $out + local.get $x i32.mul - local.set $2 + local.set $out end - local.get $1 + local.get $e i32.const 1 i32.shr_u - local.set $1 - local.get $0 - local.get $0 + local.set $e + local.get $x + local.get $x i32.mul - local.set $0 + local.set $x end - local.get $1 + local.get $e i32.const 1 i32.and if - local.get $2 - local.get $0 + local.get $out + local.get $x i32.mul - local.set $2 + local.set $out end - local.get $1 + local.get $e i32.const 1 i32.shr_u - local.set $1 - local.get $0 - local.get $0 + local.set $e + local.get $x + local.get $x i32.mul - local.set $0 + local.set $x end - local.get $1 + local.get $e i32.const 1 i32.and if - local.get $2 - local.get $0 + local.get $out + local.get $x i32.mul - local.set $2 + local.set $out end - local.get $1 + local.get $e i32.const 1 i32.shr_u - local.set $1 - local.get $0 - local.get $0 + local.set $e + local.get $x + local.get $x i32.mul - local.set $0 + local.set $x end - local.get $1 + local.get $e i32.const 1 i32.and if - local.get $2 - local.get $0 + local.get $out + local.get $x i32.mul - local.set $2 + local.set $out end - local.get $1 + local.get $e i32.const 1 i32.shr_u - local.set $1 - local.get $0 - local.get $0 + local.set $e + local.get $x + local.get $x i32.mul - local.set $0 + local.set $x end - local.get $1 + local.get $e i32.const 1 i32.and if - local.get $2 - local.get $0 + local.get $out + local.get $x i32.mul - local.set $2 + local.set $out end end - local.get $2 + local.get $out return end end end end loop $while-continue|1 - local.get $1 - local.set $3 - local.get $3 + local.get $e + local.set $var$3 + local.get $var$3 if - local.get $1 + local.get $e i32.const 1 i32.and if - local.get $2 - local.get $0 + local.get $out + local.get $x i32.mul - local.set $2 + local.set $out end - local.get $1 + local.get $e i32.const 1 i32.shr_u - local.set $1 - local.get $0 - local.get $0 + local.set $e + local.get $x + local.get $x i32.mul - local.set $0 + local.set $x br $while-continue|1 end end - local.get $2 + local.get $out ) (func $start:std/math - (local $0 f64) - (local $1 i32) - (local $2 i32) - (local $3 i64) - (local $4 f32) - (local $5 f64) + (local $var$0 f64) + (local $var$1 i32) + (local $var$2 i32) + (local $var$3 i64) + (local $var$4 f32) + (local $var$5 f64) global.get $~lib/math/NativeMath.E global.get $~lib/math/NativeMath.E f64.eq @@ -43140,8 +43140,8 @@ f64.const nan:0x8000000000000 f64.const 1 call $~lib/math/NativeMath.pow - local.tee $0 - local.get $0 + local.tee $var$0 + local.get $var$0 f64.ne i32.eqz if @@ -43255,8 +43255,8 @@ f64.const nan:0x8000000000000 f64.const -1 call $~lib/math/NativeMath.pow - local.tee $0 - local.get $0 + local.tee $var$0 + local.get $var$0 f64.ne i32.eqz if @@ -43369,8 +43369,8 @@ f64.const nan:0x8000000000000 f64.const 2 call $~lib/math/NativeMath.pow - local.tee $0 - local.get $0 + local.tee $var$0 + local.get $var$0 f64.ne i32.eqz if @@ -43412,8 +43412,8 @@ f64.const -1 f64.const 0.5 call $~lib/math/NativeMath.pow - local.tee $0 - local.get $0 + local.tee $var$0 + local.get $var$0 f64.ne i32.eqz if @@ -43484,8 +43484,8 @@ f64.const nan:0x8000000000000 f64.const 0.5 call $~lib/math/NativeMath.pow - local.tee $0 - local.get $0 + local.tee $var$0 + local.get $var$0 f64.ne i32.eqz if @@ -47184,22 +47184,22 @@ i64.reinterpret_f64 call $~lib/math/NativeMath.seedRandom i32.const 0 - local.set $1 + local.set $var$1 loop $for-loop|0 - local.get $1 + local.get $var$1 f64.convert_i32_s f64.const 1e6 f64.lt - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if call $~lib/math/NativeMath.random - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 f64.const 0 f64.ge if (result i32) - local.get $0 + local.get $var$0 f64.const 1 f64.lt else @@ -47214,35 +47214,35 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i32.const 1 i32.add - local.set $1 + local.set $var$1 br $for-loop|0 end end call $~lib/bindings/dom/Math.random i64.reinterpret_f64 - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 call $~lib/math/NativeMath.seedRandom i32.const 0 - local.set $1 + local.set $var$1 loop $for-loop|1 - local.get $1 + local.get $var$1 f64.convert_i32_s f64.const 1e6 f64.lt - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if call $~lib/math/NativeMathf.random - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 f32.const 0 f32.ge if (result i32) - local.get $4 + local.get $var$4 f32.const 1 f32.lt else @@ -47257,10 +47257,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i32.const 1 i32.add - local.set $1 + local.set $var$1 br $for-loop|1 end end @@ -47645,90 +47645,90 @@ unreachable end f64.const 9007199254740990 - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 f64.ceil - local.set $5 - local.get $5 - local.get $5 + local.set $var$5 + local.get $var$5 + local.get $var$5 f64.const 1 f64.sub - local.get $5 + local.get $var$5 f64.const 0.5 f64.sub - local.get $0 + local.get $var$0 f64.le select f64.const 9007199254740990 f64.eq drop f64.const -9007199254740990 - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 f64.ceil - local.set $5 - local.get $5 - local.get $5 + local.set $var$5 + local.get $var$5 + local.get $var$5 f64.const 1 f64.sub - local.get $5 + local.get $var$5 f64.const 0.5 f64.sub - local.get $0 + local.get $var$0 f64.le select f64.const -9007199254740990 f64.eq drop f64.const 9007199254740991 - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 f64.ceil - local.set $5 - local.get $5 - local.get $5 + local.set $var$5 + local.get $var$5 + local.get $var$5 f64.const 1 f64.sub - local.get $5 + local.get $var$5 f64.const 0.5 f64.sub - local.get $0 + local.get $var$0 f64.le select f64.const 9007199254740991 f64.eq drop f64.const -9007199254740991 - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 f64.ceil - local.set $5 - local.get $5 - local.get $5 + local.set $var$5 + local.get $var$5 + local.get $var$5 f64.const 1 f64.sub - local.get $5 + local.get $var$5 f64.const 0.5 f64.sub - local.get $0 + local.get $var$0 f64.le select f64.const -9007199254740991 f64.eq drop f64.const -1797693134862315708145274e284 - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 f64.ceil - local.set $5 - local.get $5 - local.get $5 + local.set $var$5 + local.get $var$5 + local.get $var$5 f64.const 1 f64.sub - local.get $5 + local.get $var$5 f64.const 0.5 f64.sub - local.get $0 + local.get $var$0 f64.le select f64.const -1797693134862315708145274e284 @@ -48369,8 +48369,8 @@ unreachable end f64.const 0 - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 i64.reinterpret_f64 i64.const 63 i64.shr_u @@ -48382,8 +48382,8 @@ i32.eq drop f64.const -0 - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i64.reinterpret_f64 i64.const 63 i64.shr_u @@ -48395,8 +48395,8 @@ i32.eq drop f64.const 1 - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 i64.reinterpret_f64 i64.const 63 i64.shr_u @@ -48408,8 +48408,8 @@ i32.eq drop f64.const -1 - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i64.reinterpret_f64 i64.const 63 i64.shr_u @@ -48421,8 +48421,8 @@ i32.eq drop f64.const nan:0x8000000000000 - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 i64.reinterpret_f64 i64.const 63 i64.shr_u @@ -48435,8 +48435,8 @@ drop f64.const nan:0x8000000000000 f64.neg - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i64.reinterpret_f64 i64.const 63 i64.shr_u @@ -48448,8 +48448,8 @@ i32.eq drop f64.const inf - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 i64.reinterpret_f64 i64.const 63 i64.shr_u @@ -48462,8 +48462,8 @@ drop f64.const inf f64.neg - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i64.reinterpret_f64 i64.const 63 i64.shr_u @@ -48475,8 +48475,8 @@ i32.eq drop f32.const 0 - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 i32.reinterpret_f32 i32.const 31 i32.shr_u @@ -48486,8 +48486,8 @@ i32.eq drop f32.const -0 - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 i32.reinterpret_f32 i32.const 31 i32.shr_u @@ -48497,8 +48497,8 @@ i32.eq drop f32.const 1 - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 i32.reinterpret_f32 i32.const 31 i32.shr_u @@ -48508,8 +48508,8 @@ i32.eq drop f32.const -1 - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 i32.reinterpret_f32 i32.const 31 i32.shr_u @@ -48519,8 +48519,8 @@ i32.eq drop f32.const nan:0x400000 - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 i32.reinterpret_f32 i32.const 31 i32.shr_u @@ -48531,8 +48531,8 @@ drop f32.const nan:0x400000 f32.neg - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 i32.reinterpret_f32 i32.const 31 i32.shr_u @@ -48542,8 +48542,8 @@ i32.eq drop f32.const inf - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 i32.reinterpret_f32 i32.const 31 i32.shr_u @@ -48554,8 +48554,8 @@ drop f32.const inf f32.neg - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 i32.reinterpret_f32 i32.const 31 i32.shr_u diff --git a/tests/compiler/std/mod.debug.wat b/tests/compiler/std/mod.debug.wat index 4c91d5b5b2..87fb908a2b 100644 --- a/tests/compiler/std/mod.debug.wat +++ b/tests/compiler/std/mod.debug.wat @@ -20,591 +20,591 @@ (export "mod" (func $std/mod/mod)) (export "memory" (memory $0)) (start $~start) - (func $~lib/math/NativeMath.mod (param $0 f64) (param $1 f64) (result f64) - (local $2 i64) - (local $3 i64) - (local $4 i64) - (local $5 i64) - (local $6 i64) - (local $7 i64) - (local $8 f64) - (local $9 i64) - (local $10 i32) - (local $11 i64) - local.get $1 + (func $~lib/math/NativeMath.mod (param $x f64) (param $y f64) (result f64) + (local $ux i64) + (local $uy i64) + (local $ex i64) + (local $ey i64) + (local $sx i64) + (local $uy1 i64) + (local $var$8 f64) + (local $ux1 i64) + (local $var$10 i32) + (local $shift i64) + local.get $y f64.abs f64.const 1 f64.eq if - local.get $0 - local.get $0 + local.get $x + local.get $x f64.trunc f64.sub - local.get $0 + local.get $x f64.copysign return end - local.get $0 + local.get $x i64.reinterpret_f64 - local.set $2 - local.get $1 + local.set $ux + local.get $y i64.reinterpret_f64 - local.set $3 - local.get $2 + local.set $uy + local.get $ux i64.const 52 i64.shr_u i64.const 2047 i64.and - local.set $4 - local.get $3 + local.set $ex + local.get $uy i64.const 52 i64.shr_u i64.const 2047 i64.and - local.set $5 - local.get $2 + local.set $ey + local.get $ux i64.const 63 i64.shr_u - local.set $6 - local.get $3 + local.set $sx + local.get $uy i64.const 1 i64.shl - local.set $7 - local.get $7 + local.set $uy1 + local.get $uy1 i64.const 0 i64.eq if (result i32) i32.const 1 else - local.get $4 + local.get $ex i64.const 2047 i64.eq end if (result i32) i32.const 1 else - local.get $1 - local.get $1 + local.get $y + local.get $y f64.ne end if - local.get $0 - local.get $1 + local.get $x + local.get $y f64.mul - local.set $8 - local.get $8 - local.get $8 + local.set $var$8 + local.get $var$8 + local.get $var$8 f64.div return end - local.get $2 + local.get $ux i64.const 1 i64.shl - local.set $9 - local.get $9 - local.get $7 + local.set $ux1 + local.get $ux1 + local.get $uy1 i64.le_u if - local.get $0 - local.get $9 - local.get $7 + local.get $x + local.get $ux1 + local.get $uy1 i64.ne f64.convert_i32_u f64.mul return end - local.get $4 + local.get $ex i64.const 0 i64.ne i32.eqz if - local.get $4 - local.get $2 + local.get $ex + local.get $ux i64.const 12 i64.shl i64.clz i64.sub - local.set $4 - local.get $2 + local.set $ex + local.get $ux i64.const 1 - local.get $4 + local.get $ex i64.sub i64.shl - local.set $2 + local.set $ux else - local.get $2 + local.get $ux i64.const -1 i64.const 12 i64.shr_u i64.and - local.set $2 - local.get $2 + local.set $ux + local.get $ux i64.const 1 i64.const 52 i64.shl i64.or - local.set $2 + local.set $ux end - local.get $5 + local.get $ey i64.const 0 i64.ne i32.eqz if - local.get $5 - local.get $3 + local.get $ey + local.get $uy i64.const 12 i64.shl i64.clz i64.sub - local.set $5 - local.get $3 + local.set $ey + local.get $uy i64.const 1 - local.get $5 + local.get $ey i64.sub i64.shl - local.set $3 + local.set $uy else - local.get $3 + local.get $uy i64.const -1 i64.const 12 i64.shr_u i64.and - local.set $3 - local.get $3 + local.set $uy + local.get $uy i64.const 1 i64.const 52 i64.shl i64.or - local.set $3 + local.set $uy end loop $while-continue|0 - local.get $4 - local.get $5 + local.get $ex + local.get $ey i64.gt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $2 - local.get $3 + local.get $ux + local.get $uy i64.ge_u if - local.get $2 - local.get $3 + local.get $ux + local.get $uy i64.eq if f64.const 0 - local.get $0 + local.get $x f64.mul return end - local.get $2 - local.get $3 + local.get $ux + local.get $uy i64.sub - local.set $2 + local.set $ux end - local.get $2 + local.get $ux i64.const 1 i64.shl - local.set $2 - local.get $4 + local.set $ux + local.get $ex i64.const 1 i64.sub - local.set $4 + local.set $ex br $while-continue|0 end end - local.get $2 - local.get $3 + local.get $ux + local.get $uy i64.ge_u if - local.get $2 - local.get $3 + local.get $ux + local.get $uy i64.eq if f64.const 0 - local.get $0 + local.get $x f64.mul return end - local.get $2 - local.get $3 + local.get $ux + local.get $uy i64.sub - local.set $2 + local.set $ux end - local.get $2 + local.get $ux i64.const 11 i64.shl i64.clz - local.set $11 - local.get $4 - local.get $11 + local.set $shift + local.get $ex + local.get $shift i64.sub - local.set $4 - local.get $2 - local.get $11 + local.set $ex + local.get $ux + local.get $shift i64.shl - local.set $2 - local.get $4 + local.set $ux + local.get $ex i64.const 0 i64.gt_s if - local.get $2 + local.get $ux i64.const 1 i64.const 52 i64.shl i64.sub - local.set $2 - local.get $2 - local.get $4 + local.set $ux + local.get $ux + local.get $ex i64.const 52 i64.shl i64.or - local.set $2 + local.set $ux else - local.get $2 + local.get $ux i64.const 0 - local.get $4 + local.get $ex i64.sub i64.const 1 i64.add i64.shr_u - local.set $2 + local.set $ux end - local.get $2 - local.get $6 + local.get $ux + local.get $sx i64.const 63 i64.shl i64.or f64.reinterpret_i64 ) - (func $std/mod/check (param $0 f64) (param $1 f64) (result i32) - local.get $1 - local.get $1 + (func $std/mod/check (param $actual f64) (param $expected f64) (result i32) + local.get $expected + local.get $expected f64.ne if - local.get $0 - local.get $0 + local.get $actual + local.get $actual f64.ne return end - local.get $1 + local.get $expected f64.const 0 f64.eq if i32.const 1 f64.convert_i32_u - local.get $1 + local.get $expected f64.div f64.const 1 - local.get $0 + local.get $actual f64.div f64.eq return end - local.get $0 - local.get $1 + local.get $actual + local.get $expected f64.eq ) - (func $std/mod/test_fmod (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - local.get $0 - local.get $1 + (func $std/mod/test_fmod (param $left f64) (param $right f64) (param $expected f64) (result i32) + local.get $left + local.get $right call $~lib/math/NativeMath.mod - local.get $2 + local.get $expected call $std/mod/check if (result i32) - local.get $0 - local.get $1 + local.get $left + local.get $right call $std/mod/mod - local.get $2 + local.get $expected call $std/mod/check else i32.const 0 end ) - (func $~lib/math/NativeMathf.mod (param $0 f32) (param $1 f32) (result f32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 f32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/math/NativeMathf.mod (param $x f32) (param $y f32) (result f32) + (local $ux i32) + (local $uy i32) + (local $ex i32) + (local $ey i32) + (local $sm i32) + (local $uy1 i32) + (local $var$8 f32) + (local $ux1 i32) + (local $var$10 i32) + (local $shift i32) + local.get $y f32.abs f32.const 1 f32.eq if - local.get $0 - local.get $0 + local.get $x + local.get $x f32.trunc f32.sub - local.get $0 + local.get $x f32.copysign return end - local.get $0 + local.get $x i32.reinterpret_f32 - local.set $2 - local.get $1 + local.set $ux + local.get $y i32.reinterpret_f32 - local.set $3 - local.get $2 + local.set $uy + local.get $ux i32.const 23 i32.shr_u i32.const 255 i32.and - local.set $4 - local.get $3 + local.set $ex + local.get $uy i32.const 23 i32.shr_u i32.const 255 i32.and - local.set $5 - local.get $2 + local.set $ey + local.get $ux i32.const -2147483648 i32.and - local.set $6 - local.get $3 + local.set $sm + local.get $uy i32.const 1 i32.shl - local.set $7 - local.get $7 + local.set $uy1 + local.get $uy1 i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $4 + local.get $ex i32.const 255 i32.eq end if (result i32) i32.const 1 else - local.get $1 - local.get $1 + local.get $y + local.get $y f32.ne end if - local.get $0 - local.get $1 + local.get $x + local.get $y f32.mul - local.set $8 - local.get $8 - local.get $8 + local.set $var$8 + local.get $var$8 + local.get $var$8 f32.div return end - local.get $2 + local.get $ux i32.const 1 i32.shl - local.set $9 - local.get $9 - local.get $7 + local.set $ux1 + local.get $ux1 + local.get $uy1 i32.le_u if - local.get $0 - local.get $9 - local.get $7 + local.get $x + local.get $ux1 + local.get $uy1 i32.ne f32.convert_i32_u f32.mul return end - local.get $4 + local.get $ex i32.eqz if - local.get $4 - local.get $2 + local.get $ex + local.get $ux i32.const 9 i32.shl i32.clz i32.sub - local.set $4 - local.get $2 + local.set $ex + local.get $ux i32.const 1 - local.get $4 + local.get $ex i32.sub i32.shl - local.set $2 + local.set $ux else - local.get $2 + local.get $ux i32.const -1 i32.const 9 i32.shr_u i32.and - local.set $2 - local.get $2 + local.set $ux + local.get $ux i32.const 1 i32.const 23 i32.shl i32.or - local.set $2 + local.set $ux end - local.get $5 + local.get $ey i32.eqz if - local.get $5 - local.get $3 + local.get $ey + local.get $uy i32.const 9 i32.shl i32.clz i32.sub - local.set $5 - local.get $3 + local.set $ey + local.get $uy i32.const 1 - local.get $5 + local.get $ey i32.sub i32.shl - local.set $3 + local.set $uy else - local.get $3 + local.get $uy i32.const -1 i32.const 9 i32.shr_u i32.and - local.set $3 - local.get $3 + local.set $uy + local.get $uy i32.const 1 i32.const 23 i32.shl i32.or - local.set $3 + local.set $uy end loop $while-continue|0 - local.get $4 - local.get $5 + local.get $ex + local.get $ey i32.gt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $2 - local.get $3 + local.get $ux + local.get $uy i32.ge_u if - local.get $2 - local.get $3 + local.get $ux + local.get $uy i32.eq if f32.const 0 - local.get $0 + local.get $x f32.mul return end - local.get $2 - local.get $3 + local.get $ux + local.get $uy i32.sub - local.set $2 + local.set $ux end - local.get $2 + local.get $ux i32.const 1 i32.shl - local.set $2 - local.get $4 + local.set $ux + local.get $ex i32.const 1 i32.sub - local.set $4 + local.set $ex br $while-continue|0 end end - local.get $2 - local.get $3 + local.get $ux + local.get $uy i32.ge_u if - local.get $2 - local.get $3 + local.get $ux + local.get $uy i32.eq if f32.const 0 - local.get $0 + local.get $x f32.mul return end - local.get $2 - local.get $3 + local.get $ux + local.get $uy i32.sub - local.set $2 + local.set $ux end - local.get $2 + local.get $ux i32.const 8 i32.shl i32.clz - local.set $11 - local.get $4 - local.get $11 + local.set $shift + local.get $ex + local.get $shift i32.sub - local.set $4 - local.get $2 - local.get $11 + local.set $ex + local.get $ux + local.get $shift i32.shl - local.set $2 - local.get $4 + local.set $ux + local.get $ex i32.const 0 i32.gt_s if - local.get $2 + local.get $ux i32.const 1 i32.const 23 i32.shl i32.sub - local.set $2 - local.get $2 - local.get $4 + local.set $ux + local.get $ux + local.get $ex i32.const 23 i32.shl i32.or - local.set $2 + local.set $ux else - local.get $2 + local.get $ux i32.const 0 - local.get $4 + local.get $ex i32.sub i32.const 1 i32.add i32.shr_u - local.set $2 + local.set $ux end - local.get $2 - local.get $6 + local.get $ux + local.get $sm i32.or f32.reinterpret_i32 ) - (func $std/mod/check (param $0 f32) (param $1 f32) (result i32) - local.get $1 - local.get $1 + (func $std/mod/check (param $actual f32) (param $expected f32) (result i32) + local.get $expected + local.get $expected f32.ne if - local.get $0 - local.get $0 + local.get $actual + local.get $actual f32.ne return end - local.get $1 + local.get $expected f32.const 0 f32.eq if i32.const 1 f32.convert_i32_u - local.get $1 + local.get $expected f32.div f32.const 1 - local.get $0 + local.get $actual f32.div f32.eq return end - local.get $0 - local.get $1 + local.get $actual + local.get $expected f32.eq ) - (func $std/mod/test_fmodf (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - local.get $1 + (func $std/mod/test_fmodf (param $left f32) (param $right f32) (param $expected f32) (result i32) + local.get $left + local.get $right call $~lib/math/NativeMathf.mod - local.get $2 + local.get $expected call $std/mod/check ) (func $start:std/mod diff --git a/tests/compiler/std/new.debug.wat b/tests/compiler/std/new.debug.wat index dfd94a3f80..8fb8195346 100644 --- a/tests/compiler/std/new.debug.wat +++ b/tests/compiler/std/new.debug.wat @@ -65,50 +65,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -121,58 +121,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -189,12 +189,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -204,19 +204,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -227,27 +227,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -255,35 +255,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -293,15 +293,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -311,25 +311,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -337,33 +337,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -391,23 +391,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -419,15 +419,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -439,33 +439,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -473,21 +473,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -502,36 +502,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -539,67 +539,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -609,22 +609,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -634,12 +634,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -651,75 +651,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -731,38 +731,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -776,12 +776,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -792,38 +792,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -831,21 +831,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -860,101 +860,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -965,7 +965,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -976,26 +976,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1008,27 +1008,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1042,11 +1042,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1057,66 +1057,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1126,10 +1126,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1140,13 +1140,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1157,109 +1157,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1267,7 +1267,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1284,23 +1284,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1312,54 +1312,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1380,30 +1380,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1413,9 +1413,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1425,8 +1425,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1434,43 +1434,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1482,17 +1482,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1506,7 +1506,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1524,7 +1524,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1534,12 +1534,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1561,7 +1561,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1581,14 +1581,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1601,8 +1601,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1613,37 +1613,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1651,16 +1651,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1668,21 +1668,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1697,12 +1697,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1710,49 +1710,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1762,90 +1762,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1854,22 +1854,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1878,27 +1878,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1913,69 +1913,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1990,29 +1990,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2025,13 +2025,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2042,25 +2042,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2075,10 +2075,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2096,36 +2096,36 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) (func $start:std/new memory.size diff --git a/tests/compiler/std/object.debug.wat b/tests/compiler/std/object.debug.wat index 602bc9694b..67f381ca94 100644 --- a/tests/compiler/std/object.debug.wat +++ b/tests/compiler/std/object.debug.wat @@ -24,116 +24,116 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (start $~start) - (func $~lib/object/Object.is (param $0 f64) (param $1 f64) (result i32) + (func $~lib/object/Object.is (param $value1 f64) (param $value2 f64) (result i32) i32.const 1 drop - local.get $0 - local.get $1 + local.get $value1 + local.get $value2 f64.eq if i32.const 8 i32.const 8 i32.eq drop - local.get $0 + local.get $value1 i64.reinterpret_f64 - local.get $1 + local.get $value2 i64.reinterpret_f64 i64.eq return end - local.get $0 - local.get $0 + local.get $value1 + local.get $value1 f64.ne - local.get $1 - local.get $1 + local.get $value2 + local.get $value2 f64.ne i32.and return ) - (func $~lib/object/Object.is (param $0 f32) (param $1 f32) (result i32) + (func $~lib/object/Object.is (param $value1 f32) (param $value2 f32) (result i32) i32.const 1 drop - local.get $0 - local.get $1 + local.get $value1 + local.get $value2 f32.eq if i32.const 4 i32.const 8 i32.eq drop - local.get $0 + local.get $value1 i32.reinterpret_f32 - local.get $1 + local.get $value2 i32.reinterpret_f32 i32.eq return end - local.get $0 - local.get $0 + local.get $value1 + local.get $value1 f32.ne - local.get $1 - local.get $1 + local.get $value2 + local.get $value2 f32.ne i32.and return ) - (func $~lib/object/Object.is (param $0 i32) (param $1 i32) (result i32) + (func $~lib/object/Object.is (param $value1 i32) (param $value2 i32) (result i32) i32.const 0 drop - local.get $0 - local.get $1 + local.get $value1 + local.get $value2 i32.eq ) - (func $~lib/object/Object.is (param $0 i32) (param $1 i32) (result i32) + (func $~lib/object/Object.is (param $value1 i32) (param $value2 i32) (result i32) i32.const 0 drop - local.get $0 + local.get $value1 i32.const 0 i32.ne - local.get $1 + local.get $value2 i32.const 0 i32.ne i32.eq ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.get $1 + (func $~lib/util/string/compareImpl (param $str1 i32) (param $index1 i32) (param $str2 i32) (param $index2 i32) (param $len i32) (result i32) + (local $ptr1 i32) + (local $ptr2 i32) + (local $var$7 i32) + (local $a i32) + (local $b i32) + local.get $str1 + local.get $index1 i32.const 1 i32.shl i32.add - local.set $5 - local.get $2 - local.get $3 + local.set $ptr1 + local.get $str2 + local.get $index2 i32.const 1 i32.shl i32.add - local.set $6 + local.set $ptr2 i32.const 0 i32.const 2 i32.lt_s drop - local.get $4 + local.get $len i32.const 4 i32.ge_u if (result i32) - local.get $5 + local.get $ptr1 i32.const 7 i32.and - local.get $6 + local.get $ptr2 i32.const 7 i32.and i32.or @@ -144,27 +144,27 @@ if block $do-break|0 loop $do-loop|0 - local.get $5 + local.get $ptr1 i64.load - local.get $6 + local.get $ptr2 i64.load i64.ne if br $do-break|0 end - local.get $5 + local.get $ptr1 i32.const 8 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 8 i32.add - local.set $6 - local.get $4 + local.set $ptr2 + local.get $len i32.const 4 i32.sub - local.set $4 - local.get $4 + local.set $len + local.get $len i32.const 4 i32.ge_u br_if $do-loop|0 @@ -172,59 +172,59 @@ end end loop $while-continue|1 - local.get $4 - local.tee $7 + local.get $len + local.tee $var$7 i32.const 1 i32.sub - local.set $4 - local.get $7 - local.set $7 - local.get $7 + local.set $len + local.get $var$7 + local.set $var$7 + local.get $var$7 if - local.get $5 + local.get $ptr1 i32.load16_u - local.set $8 - local.get $6 + local.set $a + local.get $ptr2 i32.load16_u - local.set $9 - local.get $8 - local.get $9 + local.set $b + local.get $a + local.get $b i32.ne if - local.get $8 - local.get $9 + local.get $a + local.get $b i32.sub return end - local.get $5 + local.get $ptr1 i32.const 2 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 2 i32.add - local.set $6 + local.set $ptr2 br $while-continue|1 end end i32.const 0 ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__eq (param $left i32) (param $right i32) (result i32) + (local $leftLength i32) + local.get $left + local.get $right i32.eq if i32.const 1 return end - local.get $0 + local.get $left i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $1 + local.get $right i32.const 0 i32.eq end @@ -232,37 +232,37 @@ i32.const 0 return end - local.get $0 + local.get $left call $~lib/string/String#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $leftLength + local.get $leftLength + local.get $right call $~lib/string/String#get:length i32.ne if i32.const 0 return end - local.get $0 + local.get $left i32.const 0 - local.get $1 + local.get $right i32.const 0 - local.get $2 + local.get $leftLength call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/object/Object.is<~lib/string/String> (param $0 i32) (param $1 i32) (result i32) + (func $~lib/object/Object.is<~lib/string/String> (param $value1 i32) (param $value2 i32) (result i32) i32.const 0 drop - local.get $0 - local.get $1 + local.get $value1 + local.get $value2 call $~lib/string/String.__eq ) - (func $~lib/object/Object.is<~lib/string/String|null> (param $0 i32) (param $1 i32) (result i32) + (func $~lib/object/Object.is<~lib/string/String|null> (param $value1 i32) (param $value2 i32) (result i32) i32.const 0 drop - local.get $0 - local.get $1 + local.get $value1 + local.get $value2 call $~lib/string/String.__eq ) (func $~start diff --git a/tests/compiler/std/operator-overloading.debug.wat b/tests/compiler/std/operator-overloading.debug.wat index 501886b768..d61fc6632c 100644 --- a/tests/compiler/std/operator-overloading.debug.wat +++ b/tests/compiler/std/operator-overloading.debug.wat @@ -120,50 +120,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -176,58 +176,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -244,12 +244,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -259,19 +259,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -282,27 +282,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -310,35 +310,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -348,15 +348,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -366,25 +366,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -392,33 +392,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -446,23 +446,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -474,15 +474,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -494,33 +494,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -528,21 +528,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -557,36 +557,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -594,67 +594,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -664,22 +664,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -689,12 +689,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -706,75 +706,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -786,38 +786,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -831,12 +831,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -847,38 +847,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -886,21 +886,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -915,101 +915,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -1020,7 +1020,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1031,26 +1031,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1063,27 +1063,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1097,11 +1097,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1112,66 +1112,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1181,10 +1181,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1195,13 +1195,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1212,109 +1212,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1322,7 +1322,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1339,23 +1339,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1367,54 +1367,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1435,30 +1435,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1468,9 +1468,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1480,8 +1480,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1489,43 +1489,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1537,17 +1537,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1561,7 +1561,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1579,7 +1579,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1589,12 +1589,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1616,7 +1616,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1636,14 +1636,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1656,8 +1656,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1668,37 +1668,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1706,16 +1706,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1723,21 +1723,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1752,12 +1752,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1765,49 +1765,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1817,90 +1817,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1909,22 +1909,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1933,27 +1933,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1968,69 +1968,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2045,29 +2045,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2080,13 +2080,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2097,25 +2097,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2130,10 +2130,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2151,36 +2151,36 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) (func $std/operator-overloading/Tester#set:x (param $0 i32) (param $1 i32) local.get $0 @@ -2192,576 +2192,576 @@ local.get $1 i32.store offset=4 ) - (func $std/operator-overloading/Tester.add (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.add (param $a i32) (param $b i32) (result i32) i32.const 0 - local.get $0 + local.get $a i32.load - local.get $1 + local.get $b i32.load i32.add - local.get $0 + local.get $a i32.load offset=4 - local.get $1 + local.get $b i32.load offset=4 i32.add call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.sub (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.sub (param $a i32) (param $b i32) (result i32) i32.const 0 - local.get $0 + local.get $a i32.load - local.get $1 + local.get $b i32.load i32.sub - local.get $0 + local.get $a i32.load offset=4 - local.get $1 + local.get $b i32.load offset=4 i32.sub call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.mul (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.mul (param $a i32) (param $b i32) (result i32) i32.const 0 - local.get $0 + local.get $a i32.load - local.get $1 + local.get $b i32.load i32.mul - local.get $0 + local.get $a i32.load offset=4 - local.get $1 + local.get $b i32.load offset=4 i32.mul call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.div (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.div (param $a i32) (param $b i32) (result i32) i32.const 0 - local.get $0 + local.get $a i32.load - local.get $1 + local.get $b i32.load i32.div_s - local.get $0 + local.get $a i32.load offset=4 - local.get $1 + local.get $b i32.load offset=4 i32.div_s call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.mod (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.mod (param $a i32) (param $b i32) (result i32) i32.const 0 - local.get $0 + local.get $a i32.load - local.get $1 + local.get $b i32.load i32.rem_s - local.get $0 + local.get $a i32.load offset=4 - local.get $1 + local.get $b i32.load offset=4 i32.rem_s call $std/operator-overloading/Tester#constructor ) - (func $~lib/math/ipow32 (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (func $~lib/math/ipow32 (param $x i32) (param $e i32) (result i32) + (local $out i32) + (local $var$3 i32) + (local $var$4 i32) i32.const 1 - local.set $2 + local.set $out i32.const 0 i32.const 1 i32.lt_s drop - local.get $0 + local.get $x i32.const 2 i32.eq if i32.const 1 - local.get $1 + local.get $e i32.shl i32.const 0 - local.get $1 + local.get $e i32.const 32 i32.lt_u select return end - local.get $1 + local.get $e i32.const 0 i32.le_s if - local.get $0 + local.get $x i32.const -1 i32.eq if i32.const -1 i32.const 1 - local.get $1 + local.get $e i32.const 1 i32.and select return end - local.get $1 + local.get $e i32.const 0 i32.eq - local.get $0 + local.get $x i32.const 1 i32.eq i32.or return else - local.get $1 + local.get $e i32.const 1 i32.eq if - local.get $0 + local.get $x return else - local.get $1 + local.get $e i32.const 2 i32.eq if - local.get $0 - local.get $0 + local.get $x + local.get $x i32.mul return else - local.get $1 + local.get $e i32.const 32 i32.lt_s if i32.const 32 - local.get $1 + local.get $e i32.clz i32.sub - local.set $3 + local.set $var$3 block $break|0 block $case4|0 block $case3|0 block $case2|0 block $case1|0 block $case0|0 - local.get $3 - local.set $4 - local.get $4 + local.get $var$3 + local.set $var$4 + local.get $var$4 i32.const 5 i32.eq br_if $case0|0 - local.get $4 + local.get $var$4 i32.const 4 i32.eq br_if $case1|0 - local.get $4 + local.get $var$4 i32.const 3 i32.eq br_if $case2|0 - local.get $4 + local.get $var$4 i32.const 2 i32.eq br_if $case3|0 - local.get $4 + local.get $var$4 i32.const 1 i32.eq br_if $case4|0 br $break|0 end - local.get $1 + local.get $e i32.const 1 i32.and if - local.get $2 - local.get $0 + local.get $out + local.get $x i32.mul - local.set $2 + local.set $out end - local.get $1 + local.get $e i32.const 1 i32.shr_u - local.set $1 - local.get $0 - local.get $0 + local.set $e + local.get $x + local.get $x i32.mul - local.set $0 + local.set $x end - local.get $1 + local.get $e i32.const 1 i32.and if - local.get $2 - local.get $0 + local.get $out + local.get $x i32.mul - local.set $2 + local.set $out end - local.get $1 + local.get $e i32.const 1 i32.shr_u - local.set $1 - local.get $0 - local.get $0 + local.set $e + local.get $x + local.get $x i32.mul - local.set $0 + local.set $x end - local.get $1 + local.get $e i32.const 1 i32.and if - local.get $2 - local.get $0 + local.get $out + local.get $x i32.mul - local.set $2 + local.set $out end - local.get $1 + local.get $e i32.const 1 i32.shr_u - local.set $1 - local.get $0 - local.get $0 + local.set $e + local.get $x + local.get $x i32.mul - local.set $0 + local.set $x end - local.get $1 + local.get $e i32.const 1 i32.and if - local.get $2 - local.get $0 + local.get $out + local.get $x i32.mul - local.set $2 + local.set $out end - local.get $1 + local.get $e i32.const 1 i32.shr_u - local.set $1 - local.get $0 - local.get $0 + local.set $e + local.get $x + local.get $x i32.mul - local.set $0 + local.set $x end - local.get $1 + local.get $e i32.const 1 i32.and if - local.get $2 - local.get $0 + local.get $out + local.get $x i32.mul - local.set $2 + local.set $out end end - local.get $2 + local.get $out return end end end end loop $while-continue|1 - local.get $1 - local.set $3 - local.get $3 + local.get $e + local.set $var$3 + local.get $var$3 if - local.get $1 + local.get $e i32.const 1 i32.and if - local.get $2 - local.get $0 + local.get $out + local.get $x i32.mul - local.set $2 + local.set $out end - local.get $1 + local.get $e i32.const 1 i32.shr_u - local.set $1 - local.get $0 - local.get $0 + local.set $e + local.get $x + local.get $x i32.mul - local.set $0 + local.set $x br $while-continue|1 end end - local.get $2 + local.get $out ) - (func $std/operator-overloading/Tester.pow (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.pow (param $a i32) (param $b i32) (result i32) i32.const 0 - local.get $0 + local.get $a i32.load - local.get $1 + local.get $b i32.load call $~lib/math/ipow32 - local.get $0 + local.get $a i32.load offset=4 - local.get $1 + local.get $b i32.load offset=4 call $~lib/math/ipow32 call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.and (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.and (param $a i32) (param $b i32) (result i32) i32.const 0 - local.get $0 + local.get $a i32.load - local.get $1 + local.get $b i32.load i32.and - local.get $0 + local.get $a i32.load offset=4 - local.get $1 + local.get $b i32.load offset=4 i32.and call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.or (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.or (param $a i32) (param $b i32) (result i32) i32.const 0 - local.get $0 + local.get $a i32.load - local.get $1 + local.get $b i32.load i32.or - local.get $0 + local.get $a i32.load offset=4 - local.get $1 + local.get $b i32.load offset=4 i32.or call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.xor (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.xor (param $a i32) (param $b i32) (result i32) i32.const 0 - local.get $0 + local.get $a i32.load - local.get $1 + local.get $b i32.load i32.xor - local.get $0 + local.get $a i32.load offset=4 - local.get $1 + local.get $b i32.load offset=4 i32.xor call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.equals (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $std/operator-overloading/Tester.equals (param $a i32) (param $b i32) (result i32) + local.get $a i32.load - local.get $1 + local.get $b i32.load i32.eq if (result i32) - local.get $0 + local.get $a i32.load offset=4 - local.get $1 + local.get $b i32.load offset=4 i32.eq else i32.const 0 end ) - (func $std/operator-overloading/Tester.notEquals (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $std/operator-overloading/Tester.notEquals (param $a i32) (param $b i32) (result i32) + local.get $a i32.load - local.get $1 + local.get $b i32.load i32.ne if (result i32) - local.get $0 + local.get $a i32.load offset=4 - local.get $1 + local.get $b i32.load offset=4 i32.ne else i32.const 0 end ) - (func $std/operator-overloading/Tester.greater (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $std/operator-overloading/Tester.greater (param $a i32) (param $b i32) (result i32) + local.get $a i32.load - local.get $1 + local.get $b i32.load i32.gt_s if (result i32) - local.get $0 + local.get $a i32.load offset=4 - local.get $1 + local.get $b i32.load offset=4 i32.gt_s else i32.const 0 end ) - (func $std/operator-overloading/Tester.greaterEquals (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $std/operator-overloading/Tester.greaterEquals (param $a i32) (param $b i32) (result i32) + local.get $a i32.load - local.get $1 + local.get $b i32.load i32.ge_s if (result i32) - local.get $0 + local.get $a i32.load offset=4 - local.get $1 + local.get $b i32.load offset=4 i32.ge_s else i32.const 0 end ) - (func $std/operator-overloading/Tester.less (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $std/operator-overloading/Tester.less (param $a i32) (param $b i32) (result i32) + local.get $a i32.load - local.get $1 + local.get $b i32.load i32.lt_s if (result i32) - local.get $0 + local.get $a i32.load offset=4 - local.get $1 + local.get $b i32.load offset=4 i32.lt_s else i32.const 0 end ) - (func $std/operator-overloading/Tester.lessEquals (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $std/operator-overloading/Tester.lessEquals (param $a i32) (param $b i32) (result i32) + local.get $a i32.load - local.get $1 + local.get $b i32.load i32.le_s if (result i32) - local.get $0 + local.get $a i32.load offset=4 - local.get $1 + local.get $b i32.load offset=4 i32.le_s else i32.const 0 end ) - (func $std/operator-overloading/Tester.shr (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.shr (param $value i32) (param $shift i32) (result i32) i32.const 0 - local.get $0 + local.get $value i32.load - local.get $1 + local.get $shift i32.shr_s - local.get $0 + local.get $value i32.load offset=4 - local.get $1 + local.get $shift i32.shr_s call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.shu (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.shu (param $value i32) (param $shift i32) (result i32) i32.const 0 - local.get $0 + local.get $value i32.load - local.get $1 + local.get $shift i32.shr_u - local.get $0 + local.get $value i32.load offset=4 - local.get $1 + local.get $shift i32.shr_u call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.shl (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.shl (param $value i32) (param $shift i32) (result i32) i32.const 0 - local.get $0 + local.get $value i32.load - local.get $1 + local.get $shift i32.shl - local.get $0 + local.get $value i32.load offset=4 - local.get $1 + local.get $shift i32.shl call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.pos (param $0 i32) (result i32) + (func $std/operator-overloading/Tester.pos (param $value i32) (result i32) i32.const 0 - local.get $0 + local.get $value i32.load - local.get $0 + local.get $value i32.load offset=4 call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.neg (param $0 i32) (result i32) + (func $std/operator-overloading/Tester.neg (param $value i32) (result i32) i32.const 0 i32.const 0 - local.get $0 + local.get $value i32.load i32.sub i32.const 0 - local.get $0 + local.get $value i32.load offset=4 i32.sub call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.not (param $0 i32) (result i32) + (func $std/operator-overloading/Tester.not (param $value i32) (result i32) i32.const 0 - local.get $0 + local.get $value i32.load i32.const -1 i32.xor - local.get $0 + local.get $value i32.load offset=4 i32.const -1 i32.xor call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.excl (param $0 i32) (result i32) - local.get $0 + (func $std/operator-overloading/Tester.excl (param $value i32) (result i32) + local.get $value i32.load i32.eqz if (result i32) - local.get $0 + local.get $value i32.load offset=4 i32.eqz else i32.const 0 end ) - (func $std/operator-overloading/Tester#inc (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $std/operator-overloading/Tester#inc (param $this i32) (result i32) + local.get $this + local.get $this i32.load i32.const 1 i32.add call $std/operator-overloading/Tester#set:x - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=4 i32.const 1 i32.add call $std/operator-overloading/Tester#set:y - local.get $0 + local.get $this ) - (func $std/operator-overloading/Tester#dec (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $std/operator-overloading/Tester#dec (param $this i32) (result i32) + local.get $this + local.get $this i32.load i32.const 1 i32.sub call $std/operator-overloading/Tester#set:x - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=4 i32.const 1 i32.sub call $std/operator-overloading/Tester#set:y - local.get $0 + local.get $this ) - (func $std/operator-overloading/Tester#postInc (param $0 i32) (result i32) + (func $std/operator-overloading/Tester#postInc (param $this i32) (result i32) i32.const 0 - local.get $0 + local.get $this i32.load i32.const 1 i32.add - local.get $0 + local.get $this i32.load offset=4 i32.const 1 i32.add call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester#postDec (param $0 i32) (result i32) + (func $std/operator-overloading/Tester#postDec (param $this i32) (result i32) i32.const 0 - local.get $0 + local.get $this i32.load i32.const 1 i32.sub - local.get $0 + local.get $this i32.load offset=4 i32.const 1 i32.sub diff --git a/tests/compiler/std/pointer.debug.wat b/tests/compiler/std/pointer.debug.wat index cccc7cc2b2..b973a6443b 100644 --- a/tests/compiler/std/pointer.debug.wat +++ b/tests/compiler/std/pointer.debug.wat @@ -29,25 +29,25 @@ i32.store offset=4 ) (func $start:std/pointer - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 f32) + (local $var$0 i32) + (local $var$1 i32) + (local $var$2 i32) + (local $var$3 f32) i32.const 0 - local.set $1 + local.set $var$1 i32.const 8 - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 global.set $std/pointer/one i32.const 0 - local.set $1 + local.set $var$1 i32.const 24 - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 global.set $std/pointer/two global.get $std/pointer/one - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 i32.const 8 i32.eq i32.eqz @@ -60,8 +60,8 @@ unreachable end global.get $std/pointer/two - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 24 i32.eq i32.eqz @@ -75,30 +75,30 @@ end block $std/pointer/Pointer#get:value|inlined.0 (result i32) global.get $std/pointer/one - local.set $0 + local.set $var$0 i32.const 1 drop - local.get $0 + local.get $var$0 br $std/pointer/Pointer#get:value|inlined.0 end i32.const 1 call $std/pointer/Entry#set:key block $std/pointer/Pointer#get:value|inlined.1 (result i32) global.get $std/pointer/one - local.set $1 + local.set $var$1 i32.const 1 drop - local.get $1 + local.get $var$1 br $std/pointer/Pointer#get:value|inlined.1 end i32.const 2 call $std/pointer/Entry#set:val block $std/pointer/Pointer#get:value|inlined.2 (result i32) global.get $std/pointer/one - local.set $0 + local.set $var$0 i32.const 1 drop - local.get $0 + local.get $var$0 br $std/pointer/Pointer#get:value|inlined.2 end i32.load @@ -115,10 +115,10 @@ end block $std/pointer/Pointer#get:value|inlined.3 (result i32) global.get $std/pointer/one - local.set $1 + local.set $var$1 i32.const 1 drop - local.get $1 + local.get $var$1 br $std/pointer/Pointer#get:value|inlined.3 end i32.load offset=4 @@ -134,16 +134,16 @@ unreachable end global.get $std/pointer/one - local.set $1 + local.set $var$1 global.get $std/pointer/two - local.set $0 - local.get $1 - local.get $0 + local.set $var$0 + local.get $var$1 + local.get $var$0 i32.add global.set $std/pointer/add global.get $std/pointer/add - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 i32.const 32 i32.eq i32.eqz @@ -156,16 +156,16 @@ unreachable end global.get $std/pointer/two - local.set $0 + local.set $var$0 global.get $std/pointer/one - local.set $1 - local.get $0 - local.get $1 + local.set $var$1 + local.get $var$0 + local.get $var$1 i32.sub global.set $std/pointer/sub global.get $std/pointer/sub - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 16 i32.eq i32.eqz @@ -178,8 +178,8 @@ unreachable end global.get $std/pointer/one - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 i32.const 8 i32.eq i32.eqz @@ -192,8 +192,8 @@ unreachable end global.get $std/pointer/one - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 8 i32.add global.set $std/pointer/one @@ -212,8 +212,8 @@ unreachable end global.get $std/pointer/one - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 i32.const 16 i32.eq i32.eqz @@ -226,8 +226,8 @@ unreachable end global.get $std/pointer/two - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 24 i32.eq i32.eqz @@ -240,20 +240,20 @@ unreachable end global.get $std/pointer/two - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 i32.const 8 i32.sub global.set $std/pointer/two global.get $std/pointer/two - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 8 i32.sub global.set $std/pointer/two global.get $std/pointer/two - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 i32.const 8 i32.eq i32.eqz @@ -267,10 +267,10 @@ end block $std/pointer/Pointer#get:value|inlined.4 (result i32) global.get $std/pointer/two - local.set $1 + local.set $var$1 i32.const 1 drop - local.get $1 + local.get $var$1 br $std/pointer/Pointer#get:value|inlined.4 end i32.load @@ -287,10 +287,10 @@ end block $std/pointer/Pointer#get:value|inlined.5 (result i32) global.get $std/pointer/two - local.set $0 + local.set $var$0 i32.const 1 drop - local.get $0 + local.get $var$0 br $std/pointer/Pointer#get:value|inlined.5 end i32.load offset=4 @@ -306,40 +306,40 @@ unreachable end global.get $std/pointer/one - local.set $2 + local.set $var$2 block $std/pointer/Pointer#get:value|inlined.6 (result i32) global.get $std/pointer/two - local.set $1 + local.set $var$1 i32.const 1 drop - local.get $1 + local.get $var$1 br $std/pointer/Pointer#get:value|inlined.6 end - local.set $0 + local.set $var$0 i32.const 1 drop i32.const 0 drop - local.get $0 + local.get $var$0 i32.const 0 i32.eq if - local.get $2 + local.get $var$2 i32.const 0 i32.const 8 memory.fill else - local.get $2 - local.get $0 + local.get $var$2 + local.get $var$0 i32.const 8 memory.copy end global.get $std/pointer/one - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 global.get $std/pointer/two - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 i32.ne i32.eqz if @@ -352,10 +352,10 @@ end block $std/pointer/Pointer#get:value|inlined.7 (result i32) global.get $std/pointer/one - local.set $2 + local.set $var$2 i32.const 1 drop - local.get $2 + local.get $var$2 br $std/pointer/Pointer#get:value|inlined.7 end i32.load @@ -372,10 +372,10 @@ end block $std/pointer/Pointer#get:value|inlined.8 (result i32) global.get $std/pointer/one - local.set $1 + local.set $var$1 i32.const 1 drop - local.get $1 + local.get $var$1 br $std/pointer/Pointer#get:value|inlined.8 end i32.load offset=4 @@ -391,43 +391,43 @@ unreachable end i32.const 0 - local.set $2 + local.set $var$2 i32.const 0 - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 global.set $std/pointer/buf global.get $std/pointer/buf - local.set $0 + local.set $var$0 i32.const 0 - local.set $1 + local.set $var$1 f32.const 1.100000023841858 - local.set $3 - local.get $0 - local.get $1 + local.set $var$3 + local.get $var$0 + local.get $var$1 i32.const 4 i32.mul i32.add - local.get $3 + local.get $var$3 f32.store global.get $std/pointer/buf - local.set $1 + local.set $var$1 i32.const 1 - local.set $2 + local.set $var$2 f32.const 1.2000000476837158 - local.set $3 - local.get $1 - local.get $2 + local.set $var$3 + local.get $var$1 + local.get $var$2 i32.const 4 i32.mul i32.add - local.get $3 + local.get $var$3 f32.store global.get $std/pointer/buf - local.set $2 + local.set $var$2 i32.const 0 - local.set $0 - local.get $2 - local.get $0 + local.set $var$0 + local.get $var$2 + local.get $var$0 i32.const 4 i32.mul i32.add @@ -444,11 +444,11 @@ unreachable end global.get $std/pointer/buf - local.set $0 + local.set $var$0 i32.const 1 - local.set $1 - local.get $0 - local.get $1 + local.set $var$1 + local.get $var$0 + local.get $var$1 i32.const 4 i32.mul i32.add @@ -465,11 +465,11 @@ unreachable end global.get $std/pointer/buf - local.set $1 + local.set $var$1 i32.const 0 - local.set $2 - local.get $1 - local.get $2 + local.set $var$2 + local.get $var$1 + local.get $var$2 i32.const 4 i32.mul i32.add @@ -486,11 +486,11 @@ unreachable end global.get $std/pointer/buf - local.set $2 + local.set $var$2 i32.const 1 - local.set $0 - local.get $2 - local.get $0 + local.set $var$0 + local.get $var$2 + local.get $var$0 i32.const 4 i32.mul i32.add @@ -533,24 +533,24 @@ unreachable end global.get $std/pointer/buf - local.set $0 + local.set $var$0 i32.const 2 - local.set $1 + local.set $var$1 f32.const 1.2999999523162842 - local.set $3 - local.get $0 - local.get $1 + local.set $var$3 + local.get $var$0 + local.get $var$1 i32.const 4 i32.mul i32.add - local.get $3 + local.get $var$3 f32.store global.get $std/pointer/buf - local.set $1 + local.set $var$1 i32.const 2 - local.set $2 - local.get $1 - local.get $2 + local.set $var$2 + local.get $var$1 + local.get $var$2 i32.const 4 i32.mul i32.add @@ -567,11 +567,11 @@ unreachable end global.get $std/pointer/buf - local.set $2 + local.set $var$2 i32.const 2 - local.set $0 - local.get $2 - local.get $0 + local.set $var$0 + local.get $var$2 + local.get $var$0 i32.const 4 i32.mul i32.add @@ -601,20 +601,20 @@ unreachable end global.get $std/pointer/buf - local.set $1 + local.set $var$1 f32.const 1.399999976158142 - local.set $3 + local.set $var$3 i32.const 0 drop - local.get $1 - local.get $3 + local.get $var$1 + local.get $var$3 f32.store block $std/pointer/Pointer#get:value|inlined.0 (result f32) global.get $std/pointer/buf - local.set $0 + local.set $var$0 i32.const 0 drop - local.get $0 + local.get $var$0 f32.load br $std/pointer/Pointer#get:value|inlined.0 end diff --git a/tests/compiler/std/set.debug.wat b/tests/compiler/std/set.debug.wat index df83df63c5..0156f923a5 100644 --- a/tests/compiler/std/set.debug.wat +++ b/tests/compiler/std/set.debug.wat @@ -74,50 +74,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -130,58 +130,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -198,12 +198,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -213,19 +213,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -236,27 +236,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -264,35 +264,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -302,15 +302,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -320,25 +320,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -346,33 +346,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -400,23 +400,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -428,15 +428,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -448,33 +448,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -482,21 +482,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -511,36 +511,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -548,67 +548,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -618,22 +618,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -643,12 +643,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -660,75 +660,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -740,38 +740,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -785,12 +785,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -801,38 +801,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -840,21 +840,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -869,101 +869,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -974,7 +974,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -985,26 +985,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1017,27 +1017,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1051,11 +1051,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1066,66 +1066,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1135,10 +1135,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1149,13 +1149,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1166,109 +1166,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1276,7 +1276,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1293,23 +1293,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1321,54 +1321,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1389,30 +1389,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1422,9 +1422,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1434,8 +1434,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1443,43 +1443,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1491,17 +1491,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1515,7 +1515,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1533,7 +1533,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1543,12 +1543,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1570,7 +1570,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1590,14 +1590,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1610,8 +1610,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1622,37 +1622,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1660,16 +1660,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1677,21 +1677,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1706,12 +1706,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1719,49 +1719,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1771,90 +1771,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1863,22 +1863,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1887,27 +1887,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1922,69 +1922,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1999,29 +1999,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2034,13 +2034,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2051,25 +2051,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2084,10 +2084,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2105,49 +2105,49 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32) + (local $child i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $childPtr i32.eqz if return end i32.const 1 drop - local.get $0 + local.get $parentPtr i32.eqz if i32.const 0 @@ -2157,37 +2157,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $childPtr i32.const 20 i32.sub - local.set $3 - local.get $3 + local.set $child + local.get $child call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $0 + local.get $parentPtr i32.const 20 i32.sub - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 call $~lib/rt/itcms/Object#get:color - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $2 + local.get $expectMultiple if - local.get $4 + local.get $var$4 call $~lib/rt/itcms/Object#makeGray else - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end else - local.get $5 + local.get $var$5 i32.const 3 i32.eq if (result i32) @@ -2198,7 +2198,7 @@ i32.const 0 end if - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end end @@ -2242,10 +2242,10 @@ local.get $1 i32.store offset=20 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + (func $~lib/util/hash/HASH (param $key i32) (result i32) + (local $var$1 i32) + (local $var$2 i32) + (local $var$3 i32) i32.const 0 drop i32.const 0 @@ -2256,113 +2256,113 @@ i32.const 4 i32.le_u drop - local.get $0 + local.get $key i32.extend8_s - local.set $2 + local.set $var$2 i32.const 1 - local.set $1 + local.set $var$1 i32.const 0 i32.const 374761393 i32.add - local.get $1 + local.get $var$1 i32.add - local.set $3 - local.get $3 - local.get $2 + local.set $var$3 + local.get $var$3 + local.get $var$2 i32.const -1028477379 i32.mul i32.add - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 15 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const -2048144777 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 13 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const -1028477379 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 16 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 return ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/set/Set#find (param $this i32) (param $key i32) (param $hashCode i32) (result i32) + (local $entry i32) + (local $var$4 i32) + (local $taggedNext i32) + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add i32.load - local.set $3 + local.set $entry loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + local.get $entry + local.set $var$4 + local.get $var$4 if - local.get $3 + local.get $entry i32.load offset=4 - local.set $5 - local.get $5 + local.set $taggedNext + local.get $taggedNext i32.const 1 i32.and i32.eqz if (result i32) - local.get $3 + local.get $entry i32.load8_s - local.get $1 + local.get $key i32.extend8_s i32.eq else i32.const 0 end if - local.get $3 + local.get $entry return end - local.get $5 + local.get $taggedNext i32.const 1 i32.const -1 i32.xor i32.and - local.set $3 + local.set $entry br $while-continue|0 end end i32.const 0 ) - (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/set/Set#has (param $this i32) (param $key i32) (result i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 @@ -2378,20 +2378,20 @@ local.get $1 i32.store offset=4 ) - (func $~lib/set/Set#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) + (func $~lib/set/Set#rehash (param $this i32) (param $newBucketsMask i32) + (local $newBucketsCapacity i32) + (local $newBuckets i32) + (local $newEntriesCapacity i32) + (local $newEntries i32) + (local $oldPtr i32) + (local $oldEnd i32) + (local $newPtr i32) + (local $var$9 i32) + (local $oldEntry i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) + (local $var$14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -2400,111 +2400,111 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $1 + local.get $newBucketsMask i32.const 1 i32.add - local.set $2 + local.set $newBucketsCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 + local.get $newBucketsCapacity i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $newBuckets i32.store - local.get $2 + local.get $newBucketsCapacity i32.const 8 i32.mul i32.const 3 i32.div_s - local.set $4 + local.set $newEntriesCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 + local.get $newEntriesCapacity i32.const 8 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $newEntries i32.store offset=4 - local.get $0 + local.get $this i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 + local.set $oldPtr + local.get $oldPtr + local.get $this i32.load offset=16 i32.const 8 i32.mul i32.add - local.set $7 - local.get $5 - local.set $8 + local.set $oldEnd + local.get $newEntries + local.set $newPtr loop $while-continue|0 - local.get $6 - local.get $7 + local.get $oldPtr + local.get $oldEnd i32.ne - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $6 - local.set $10 - local.get $10 + local.get $oldPtr + local.set $oldEntry + local.get $oldEntry i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $8 - local.set $11 - local.get $10 + local.get $newPtr + local.set $var$11 + local.get $oldEntry i32.load8_s - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 call $~lib/set/SetEntry#set:key - local.get $12 + local.get $var$12 call $~lib/util/hash/HASH - local.get $1 + local.get $newBucketsMask i32.and - local.set $13 - local.get $3 - local.get $13 + local.set $var$13 + local.get $newBuckets + local.get $var$13 i32.const 4 i32.mul i32.add - local.set $14 - local.get $11 - local.get $14 + local.set $var$14 + local.get $var$11 + local.get $var$14 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $14 - local.get $8 + local.get $var$14 + local.get $newPtr i32.store - local.get $8 + local.get $newPtr i32.const 8 i32.add - local.set $8 + local.set $newPtr end - local.get $6 + local.get $oldPtr i32.const 8 i32.add - local.set $6 + local.set $oldPtr br $while-continue|0 end end - local.get $0 - local.get $3 + local.get $this + local.get $newBuckets call $~lib/set/Set#set:buckets - local.get $0 - local.get $1 + local.get $this + local.get $newBucketsMask call $~lib/set/Set#set:bucketsMask - local.get $0 - local.get $5 + local.get $this + local.get $newEntries call $~lib/set/Set#set:entries - local.get $0 - local.get $4 + local.get $this + local.get $newEntriesCapacity call $~lib/set/Set#set:entriesCapacity - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 call $~lib/set/Set#set:entriesOffset global.get $~lib/memory/__stack_pointer @@ -2512,31 +2512,31 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 + (func $~lib/set/Set#add (param $this i32) (param $key i32) (result i32) + (local $hashCode i32) + (local $entry i32) + (local $var$4 i32) + local.get $key call $~lib/util/hash/HASH - local.set $2 - local.get $0 - local.get $1 - local.get $2 + local.set $hashCode + local.get $this + local.get $key + local.get $hashCode call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $entry + local.get $entry i32.eqz if - local.get $0 + local.get $this i32.load offset=16 - local.get $0 + local.get $this i32.load offset=12 i32.eq if - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 - local.get $0 + local.get $this i32.load offset=12 i32.const 3 i32.mul @@ -2544,10 +2544,10 @@ i32.div_s i32.lt_s if (result i32) - local.get $0 + local.get $this i32.load offset=4 else - local.get $0 + local.get $this i32.load offset=4 i32.const 1 i32.shl @@ -2556,53 +2556,53 @@ end call $~lib/set/Set#rehash end - local.get $0 + local.get $this i32.load offset=8 - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=16 - local.tee $4 + local.tee $var$4 i32.const 1 i32.add call $~lib/set/Set#set:entriesOffset - local.get $4 + local.get $var$4 i32.const 8 i32.mul i32.add - local.set $3 - local.get $3 - local.get $1 + local.set $entry + local.get $entry + local.get $key call $~lib/set/SetEntry#set:key i32.const 0 drop - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 i32.const 1 i32.add call $~lib/set/Set#set:entriesCount - local.get $0 + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $4 - local.get $3 - local.get $4 + local.set $var$4 + local.get $entry + local.get $var$4 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $4 - local.get $3 + local.get $var$4 + local.get $entry i32.store end - local.get $0 + local.get $this ) - (func $~lib/set/Set#get:size (param $0 i32) (result i32) - local.get $0 + (func $~lib/set/Set#get:size (param $this i32) (result i32) + local.get $this i32.load offset=20 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) @@ -2629,29 +2629,29 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 0 i32.shl i32.add - local.get $2 + local.get $value i32.store8 i32.const 0 drop ) - (func $~lib/rt/itcms/__renew (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/rt/itcms/__renew (param $oldPtr i32) (param $size i32) (result i32) + (local $oldObj i32) + (local $newPtr i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $oldPtr i32.const 20 i32.sub - local.set $2 - local.get $1 - local.get $2 + local.set $oldObj + local.get $size + local.get $oldObj i32.load i32.const 3 i32.const -1 @@ -2661,49 +2661,49 @@ i32.sub i32.le_u if - local.get $2 - local.get $1 + local.get $oldObj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $0 + local.get $oldPtr return end - local.get $1 - local.get $2 + local.get $size + local.get $oldObj i32.load offset=12 call $~lib/rt/itcms/__new - local.set $3 - local.get $3 - local.get $0 - local.get $1 - local.tee $4 - local.get $2 + local.set $newPtr + local.get $newPtr + local.get $oldPtr + local.get $size + local.tee $var$4 + local.get $oldObj i32.load offset=16 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.lt_u select memory.copy - local.get $3 - ) - (func $~lib/array/ensureCapacity (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $0 + local.get $newPtr + ) + (func $~lib/array/ensureCapacity (param $array i32) (param $newSize i32) (param $alignLog2 i32) (param $canGrow i32) + (local $oldCapacity i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $array i32.load offset=8 - local.set $4 - local.get $1 - local.get $4 - local.get $2 + local.set $oldCapacity + local.get $newSize + local.get $oldCapacity + local.get $alignLog2 i32.shr_u i32.gt_u if - local.get $1 + local.get $newSize i32.const 1073741820 - local.get $2 + local.get $alignLog2 i32.shr_u i32.gt_u if @@ -2714,87 +2714,87 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.load - local.set $5 - local.get $1 - local.tee $6 + local.set $var$5 + local.get $newSize + local.tee $var$6 i32.const 8 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.gt_u select - local.get $2 + local.get $alignLog2 i32.shl - local.set $6 - local.get $3 + local.set $var$6 + local.get $canGrow if - local.get $4 + local.get $oldCapacity i32.const 1 i32.shl - local.tee $7 + local.tee $var$7 i32.const 1073741820 - local.tee $8 - local.get $7 - local.get $8 + local.tee $var$8 + local.get $var$7 + local.get $var$8 i32.lt_u select - local.tee $8 - local.get $6 - local.tee $7 - local.get $8 - local.get $7 + local.tee $var$8 + local.get $var$6 + local.tee $var$7 + local.get $var$8 + local.get $var$7 i32.gt_u select - local.set $6 + local.set $var$6 end - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 call $~lib/rt/itcms/__renew - local.set $8 + local.set $var$8 i32.const 2 global.get $~lib/shared/runtime/Runtime.Incremental i32.ne drop - local.get $8 - local.get $5 + local.get $var$8 + local.get $var$5 i32.ne if - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.store - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.store offset=4 - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.const 0 call $~lib/rt/itcms/__link end - local.get $0 - local.get $6 + local.get $array + local.get $var$6 i32.store offset=8 end ) - (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 + (func $~lib/array/Array#set:length (param $this i32) (param $newLength i32) + local.get $this + local.get $newLength i32.const 0 i32.const 0 call $~lib/array/ensureCapacity - local.get $0 - local.get $1 + local.get $this + local.get $newLength call $~lib/array/Array#set:length_ ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i32) + (local $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -2805,69 +2805,69 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 0 i32.shl i32.add i32.load8_s - local.set $2 + local.set $value i32.const 0 drop - local.get $2 - ) - (func $~lib/set/Set#delete (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - local.get $1 - local.get $1 + local.get $value + ) + (func $~lib/set/Set#delete (param $this i32) (param $key i32) (result i32) + (local $entry i32) + (local $halfBucketsMask i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $2 - local.get $2 + local.set $entry + local.get $entry i32.eqz if i32.const 0 return end - local.get $2 - local.get $2 + local.get $entry + local.get $entry i32.load offset=4 i32.const 1 i32.or call $~lib/set/SetEntry#set:taggedNext - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 i32.const 1 i32.sub call $~lib/set/Set#set:entriesCount - local.get $0 + local.get $this i32.load offset=4 i32.const 1 i32.shr_u - local.set $3 - local.get $3 + local.set $halfBucketsMask + local.get $halfBucketsMask i32.const 1 i32.add i32.const 4 - local.tee $4 - local.get $0 + local.tee $var$4 + local.get $this i32.load offset=20 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.gt_u select i32.ge_u if (result i32) - local.get $0 + local.get $this i32.load offset=20 - local.get $0 + local.get $this i32.load offset=12 i32.const 3 i32.mul @@ -2878,52 +2878,52 @@ i32.const 0 end if - local.get $0 - local.get $3 + local.get $this + local.get $halfBucketsMask call $~lib/set/Set#rehash end i32.const 1 ) - (func $~lib/set/Set#clear (param $0 i32) - local.get $0 + (func $~lib/set/Set#clear (param $this i32) + local.get $this i32.const 0 i32.const 4 i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets - local.get $0 + local.get $this i32.const 4 i32.const 1 i32.sub call $~lib/set/Set#set:bucketsMask - local.get $0 + local.get $this i32.const 0 i32.const 4 i32.const 8 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:entries - local.get $0 + local.get $this i32.const 4 call $~lib/set/Set#set:entriesCapacity - local.get $0 + local.get $this i32.const 0 call $~lib/set/Set#set:entriesOffset - local.get $0 + local.get $this i32.const 0 call $~lib/set/Set#set:entriesCount ) (func $std/set/testNumeric - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) + (local $set i32) + (local $vals i32) + (local $var$2 i32) + (local $var$3 i32) + (local $valSet i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -2938,20 +2938,20 @@ global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/set/Set#constructor - local.tee $0 + local.tee $set i32.store i32.const 0 - local.set $1 + local.set $vals loop $for-loop|1 - local.get $1 + local.get $vals i32.extend8_s i32.const 100 i32.lt_s - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#has i32.eqz i32.eqz @@ -2963,12 +2963,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#add drop - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#has i32.eqz if @@ -2979,14 +2979,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $vals i32.const 1 i32.add - local.set $1 + local.set $vals br $for-loop|1 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 100 i32.eq @@ -3000,17 +3000,17 @@ unreachable end i32.const 50 - local.set $1 + local.set $vals loop $for-loop|3 - local.get $1 + local.get $vals i32.extend8_s i32.const 100 i32.lt_s - local.set $4 - local.get $4 + local.set $valSet + local.get $valSet if - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#has i32.eqz if @@ -3021,12 +3021,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#add drop - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#has i32.eqz if @@ -3037,14 +3037,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $vals i32.const 1 i32.add - local.set $1 + local.set $vals br $for-loop|3 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 100 i32.eq @@ -3058,28 +3058,28 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $set call $~lib/set/Set#values - local.tee $1 + local.tee $vals i32.store offset=4 global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/set/Set#constructor - local.tee $4 + local.tee $valSet i32.store offset=8 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|4 - local.get $5 - local.get $1 + local.get $var$5 + local.get $vals call $~lib/array/Array#get:length i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $1 - local.get $5 + local.get $set + local.get $vals + local.get $var$5 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -3091,22 +3091,22 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $1 - local.get $5 + local.get $valSet + local.get $vals + local.get $var$5 call $~lib/array/Array#__get call $~lib/set/Set#add drop - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|4 end end - local.get $4 + local.get $valSet call $~lib/set/Set#get:size - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.eq i32.eqz @@ -3119,17 +3119,17 @@ unreachable end i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|6 - local.get $5 + local.get $var$5 i32.extend8_s i32.const 50 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $0 - local.get $5 + local.get $set + local.get $var$5 call $~lib/set/Set#has i32.eqz if @@ -3140,12 +3140,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $5 + local.get $set + local.get $var$5 call $~lib/set/Set#delete drop - local.get $0 - local.get $5 + local.get $set + local.get $var$5 call $~lib/set/Set#has i32.eqz i32.eqz @@ -3157,14 +3157,14 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|6 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 50 i32.eq @@ -3178,17 +3178,17 @@ unreachable end i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|8 - local.get $5 + local.get $var$5 i32.extend8_s i32.const 50 i32.lt_s - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 if - local.get $0 - local.get $5 + local.get $set + local.get $var$5 call $~lib/set/Set#has i32.eqz i32.eqz @@ -3200,12 +3200,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $5 + local.get $set + local.get $var$5 call $~lib/set/Set#add drop - local.get $0 - local.get $5 + local.get $set + local.get $var$5 call $~lib/set/Set#has i32.eqz if @@ -3216,12 +3216,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $5 + local.get $set + local.get $var$5 call $~lib/set/Set#delete drop - local.get $0 - local.get $5 + local.get $set + local.get $var$5 call $~lib/set/Set#has i32.eqz i32.eqz @@ -3233,14 +3233,14 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|8 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 50 i32.eq @@ -3253,9 +3253,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $set call $~lib/set/Set#clear - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 0 i32.eq @@ -3311,10 +3311,10 @@ local.get $1 i32.store offset=20 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + (func $~lib/util/hash/HASH (param $key i32) (result i32) + (local $var$1 i32) + (local $var$2 i32) + (local $var$3 i32) i32.const 0 drop i32.const 0 @@ -3325,90 +3325,90 @@ i32.const 4 i32.le_u drop - local.get $0 + local.get $key i32.const 255 i32.and - local.set $2 + local.set $var$2 i32.const 1 - local.set $1 + local.set $var$1 i32.const 0 i32.const 374761393 i32.add - local.get $1 + local.get $var$1 i32.add - local.set $3 - local.get $3 - local.get $2 + local.set $var$3 + local.get $var$3 + local.get $var$2 i32.const -1028477379 i32.mul i32.add - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 15 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const -2048144777 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 13 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const -1028477379 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 16 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 return ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/set/Set#find (param $this i32) (param $key i32) (param $hashCode i32) (result i32) + (local $entry i32) + (local $var$4 i32) + (local $taggedNext i32) + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add i32.load - local.set $3 + local.set $entry loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + local.get $entry + local.set $var$4 + local.get $var$4 if - local.get $3 + local.get $entry i32.load offset=4 - local.set $5 - local.get $5 + local.set $taggedNext + local.get $taggedNext i32.const 1 i32.and i32.eqz if (result i32) - local.get $3 + local.get $entry i32.load8_u - local.get $1 + local.get $key i32.const 255 i32.and i32.eq @@ -3416,24 +3416,24 @@ i32.const 0 end if - local.get $3 + local.get $entry return end - local.get $5 + local.get $taggedNext i32.const 1 i32.const -1 i32.xor i32.and - local.set $3 + local.set $entry br $while-continue|0 end end i32.const 0 ) - (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/set/Set#has (param $this i32) (param $key i32) (result i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 @@ -3449,20 +3449,20 @@ local.get $1 i32.store offset=4 ) - (func $~lib/set/Set#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) + (func $~lib/set/Set#rehash (param $this i32) (param $newBucketsMask i32) + (local $newBucketsCapacity i32) + (local $newBuckets i32) + (local $newEntriesCapacity i32) + (local $newEntries i32) + (local $oldPtr i32) + (local $oldEnd i32) + (local $newPtr i32) + (local $var$9 i32) + (local $oldEntry i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) + (local $var$14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -3471,111 +3471,111 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $1 + local.get $newBucketsMask i32.const 1 i32.add - local.set $2 + local.set $newBucketsCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 + local.get $newBucketsCapacity i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $newBuckets i32.store - local.get $2 + local.get $newBucketsCapacity i32.const 8 i32.mul i32.const 3 i32.div_s - local.set $4 + local.set $newEntriesCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 + local.get $newEntriesCapacity i32.const 8 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $newEntries i32.store offset=4 - local.get $0 + local.get $this i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 + local.set $oldPtr + local.get $oldPtr + local.get $this i32.load offset=16 i32.const 8 i32.mul i32.add - local.set $7 - local.get $5 - local.set $8 + local.set $oldEnd + local.get $newEntries + local.set $newPtr loop $while-continue|0 - local.get $6 - local.get $7 + local.get $oldPtr + local.get $oldEnd i32.ne - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $6 - local.set $10 - local.get $10 + local.get $oldPtr + local.set $oldEntry + local.get $oldEntry i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $8 - local.set $11 - local.get $10 + local.get $newPtr + local.set $var$11 + local.get $oldEntry i32.load8_u - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 call $~lib/set/SetEntry#set:key - local.get $12 + local.get $var$12 call $~lib/util/hash/HASH - local.get $1 + local.get $newBucketsMask i32.and - local.set $13 - local.get $3 - local.get $13 + local.set $var$13 + local.get $newBuckets + local.get $var$13 i32.const 4 i32.mul i32.add - local.set $14 - local.get $11 - local.get $14 + local.set $var$14 + local.get $var$11 + local.get $var$14 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $14 - local.get $8 + local.get $var$14 + local.get $newPtr i32.store - local.get $8 + local.get $newPtr i32.const 8 i32.add - local.set $8 + local.set $newPtr end - local.get $6 + local.get $oldPtr i32.const 8 i32.add - local.set $6 + local.set $oldPtr br $while-continue|0 end end - local.get $0 - local.get $3 + local.get $this + local.get $newBuckets call $~lib/set/Set#set:buckets - local.get $0 - local.get $1 + local.get $this + local.get $newBucketsMask call $~lib/set/Set#set:bucketsMask - local.get $0 - local.get $5 + local.get $this + local.get $newEntries call $~lib/set/Set#set:entries - local.get $0 - local.get $4 + local.get $this + local.get $newEntriesCapacity call $~lib/set/Set#set:entriesCapacity - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 call $~lib/set/Set#set:entriesOffset global.get $~lib/memory/__stack_pointer @@ -3583,31 +3583,31 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 + (func $~lib/set/Set#add (param $this i32) (param $key i32) (result i32) + (local $hashCode i32) + (local $entry i32) + (local $var$4 i32) + local.get $key call $~lib/util/hash/HASH - local.set $2 - local.get $0 - local.get $1 - local.get $2 + local.set $hashCode + local.get $this + local.get $key + local.get $hashCode call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $entry + local.get $entry i32.eqz if - local.get $0 + local.get $this i32.load offset=16 - local.get $0 + local.get $this i32.load offset=12 i32.eq if - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 - local.get $0 + local.get $this i32.load offset=12 i32.const 3 i32.mul @@ -3615,10 +3615,10 @@ i32.div_s i32.lt_s if (result i32) - local.get $0 + local.get $this i32.load offset=4 else - local.get $0 + local.get $this i32.load offset=4 i32.const 1 i32.shl @@ -3627,53 +3627,53 @@ end call $~lib/set/Set#rehash end - local.get $0 + local.get $this i32.load offset=8 - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=16 - local.tee $4 + local.tee $var$4 i32.const 1 i32.add call $~lib/set/Set#set:entriesOffset - local.get $4 + local.get $var$4 i32.const 8 i32.mul i32.add - local.set $3 - local.get $3 - local.get $1 + local.set $entry + local.get $entry + local.get $key call $~lib/set/SetEntry#set:key i32.const 0 drop - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 i32.const 1 i32.add call $~lib/set/Set#set:entriesCount - local.get $0 + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $4 - local.get $3 - local.get $4 + local.set $var$4 + local.get $entry + local.get $var$4 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $4 - local.get $3 + local.get $var$4 + local.get $entry i32.store end - local.get $0 + local.get $this ) - (func $~lib/set/Set#get:size (param $0 i32) (result i32) - local.get $0 + (func $~lib/set/Set#get:size (param $this i32) (result i32) + local.get $this i32.load offset=20 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) @@ -3700,36 +3700,36 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 0 i32.shl i32.add - local.get $2 + local.get $value i32.store8 i32.const 0 drop ) - (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 + (func $~lib/array/Array#set:length (param $this i32) (param $newLength i32) + local.get $this + local.get $newLength i32.const 0 i32.const 0 call $~lib/array/ensureCapacity - local.get $0 - local.get $1 + local.get $this + local.get $newLength call $~lib/array/Array#set:length_ ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i32) + (local $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -3740,69 +3740,69 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 0 i32.shl i32.add i32.load8_u - local.set $2 + local.set $value i32.const 0 drop - local.get $2 - ) - (func $~lib/set/Set#delete (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - local.get $1 - local.get $1 + local.get $value + ) + (func $~lib/set/Set#delete (param $this i32) (param $key i32) (result i32) + (local $entry i32) + (local $halfBucketsMask i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $2 - local.get $2 + local.set $entry + local.get $entry i32.eqz if i32.const 0 return end - local.get $2 - local.get $2 + local.get $entry + local.get $entry i32.load offset=4 i32.const 1 i32.or call $~lib/set/SetEntry#set:taggedNext - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 i32.const 1 i32.sub call $~lib/set/Set#set:entriesCount - local.get $0 + local.get $this i32.load offset=4 i32.const 1 i32.shr_u - local.set $3 - local.get $3 + local.set $halfBucketsMask + local.get $halfBucketsMask i32.const 1 i32.add i32.const 4 - local.tee $4 - local.get $0 + local.tee $var$4 + local.get $this i32.load offset=20 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.gt_u select i32.ge_u if (result i32) - local.get $0 + local.get $this i32.load offset=20 - local.get $0 + local.get $this i32.load offset=12 i32.const 3 i32.mul @@ -3813,52 +3813,52 @@ i32.const 0 end if - local.get $0 - local.get $3 + local.get $this + local.get $halfBucketsMask call $~lib/set/Set#rehash end i32.const 1 ) - (func $~lib/set/Set#clear (param $0 i32) - local.get $0 + (func $~lib/set/Set#clear (param $this i32) + local.get $this i32.const 0 i32.const 4 i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets - local.get $0 + local.get $this i32.const 4 i32.const 1 i32.sub call $~lib/set/Set#set:bucketsMask - local.get $0 + local.get $this i32.const 0 i32.const 4 i32.const 8 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:entries - local.get $0 + local.get $this i32.const 4 call $~lib/set/Set#set:entriesCapacity - local.get $0 + local.get $this i32.const 0 call $~lib/set/Set#set:entriesOffset - local.get $0 + local.get $this i32.const 0 call $~lib/set/Set#set:entriesCount ) (func $std/set/testNumeric - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) + (local $set i32) + (local $vals i32) + (local $var$2 i32) + (local $var$3 i32) + (local $valSet i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -3873,21 +3873,21 @@ global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/set/Set#constructor - local.tee $0 + local.tee $set i32.store i32.const 0 - local.set $1 + local.set $vals loop $for-loop|1 - local.get $1 + local.get $vals i32.const 255 i32.and i32.const 100 i32.lt_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#has i32.eqz i32.eqz @@ -3899,12 +3899,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#add drop - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#has i32.eqz if @@ -3915,14 +3915,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $vals i32.const 1 i32.add - local.set $1 + local.set $vals br $for-loop|1 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 100 i32.eq @@ -3936,18 +3936,18 @@ unreachable end i32.const 50 - local.set $1 + local.set $vals loop $for-loop|3 - local.get $1 + local.get $vals i32.const 255 i32.and i32.const 100 i32.lt_u - local.set $4 - local.get $4 + local.set $valSet + local.get $valSet if - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#has i32.eqz if @@ -3958,12 +3958,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#add drop - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#has i32.eqz if @@ -3974,14 +3974,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $vals i32.const 1 i32.add - local.set $1 + local.set $vals br $for-loop|3 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 100 i32.eq @@ -3995,28 +3995,28 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $set call $~lib/set/Set#values - local.tee $1 + local.tee $vals i32.store offset=4 global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/set/Set#constructor - local.tee $4 + local.tee $valSet i32.store offset=8 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|4 - local.get $5 - local.get $1 + local.get $var$5 + local.get $vals call $~lib/array/Array#get:length i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $1 - local.get $5 + local.get $set + local.get $vals + local.get $var$5 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -4028,22 +4028,22 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $1 - local.get $5 + local.get $valSet + local.get $vals + local.get $var$5 call $~lib/array/Array#__get call $~lib/set/Set#add drop - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|4 end end - local.get $4 + local.get $valSet call $~lib/set/Set#get:size - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.eq i32.eqz @@ -4056,18 +4056,18 @@ unreachable end i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|6 - local.get $5 + local.get $var$5 i32.const 255 i32.and i32.const 50 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $0 - local.get $5 + local.get $set + local.get $var$5 call $~lib/set/Set#has i32.eqz if @@ -4078,12 +4078,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $5 + local.get $set + local.get $var$5 call $~lib/set/Set#delete drop - local.get $0 - local.get $5 + local.get $set + local.get $var$5 call $~lib/set/Set#has i32.eqz i32.eqz @@ -4095,14 +4095,14 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|6 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 50 i32.eq @@ -4116,18 +4116,18 @@ unreachable end i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|8 - local.get $5 + local.get $var$5 i32.const 255 i32.and i32.const 50 i32.lt_u - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 if - local.get $0 - local.get $5 + local.get $set + local.get $var$5 call $~lib/set/Set#has i32.eqz i32.eqz @@ -4139,12 +4139,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $5 + local.get $set + local.get $var$5 call $~lib/set/Set#add drop - local.get $0 - local.get $5 + local.get $set + local.get $var$5 call $~lib/set/Set#has i32.eqz if @@ -4155,12 +4155,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $5 + local.get $set + local.get $var$5 call $~lib/set/Set#delete drop - local.get $0 - local.get $5 + local.get $set + local.get $var$5 call $~lib/set/Set#has i32.eqz i32.eqz @@ -4172,14 +4172,14 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|8 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 50 i32.eq @@ -4192,9 +4192,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $set call $~lib/set/Set#clear - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 0 i32.eq @@ -4250,10 +4250,10 @@ local.get $1 i32.store offset=20 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + (func $~lib/util/hash/HASH (param $key i32) (result i32) + (local $var$1 i32) + (local $var$2 i32) + (local $var$3 i32) i32.const 0 drop i32.const 0 @@ -4264,113 +4264,113 @@ i32.const 4 i32.le_u drop - local.get $0 + local.get $key i32.extend16_s - local.set $2 + local.set $var$2 i32.const 2 - local.set $1 + local.set $var$1 i32.const 0 i32.const 374761393 i32.add - local.get $1 + local.get $var$1 i32.add - local.set $3 - local.get $3 - local.get $2 + local.set $var$3 + local.get $var$3 + local.get $var$2 i32.const -1028477379 i32.mul i32.add - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 15 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const -2048144777 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 13 i32.shr_u i32.xor - local.set $3 - local.get $3 - i32.const -1028477379 - i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + i32.const -1028477379 + i32.mul + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 16 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 return ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/set/Set#find (param $this i32) (param $key i32) (param $hashCode i32) (result i32) + (local $entry i32) + (local $var$4 i32) + (local $taggedNext i32) + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add i32.load - local.set $3 + local.set $entry loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + local.get $entry + local.set $var$4 + local.get $var$4 if - local.get $3 + local.get $entry i32.load offset=4 - local.set $5 - local.get $5 + local.set $taggedNext + local.get $taggedNext i32.const 1 i32.and i32.eqz if (result i32) - local.get $3 + local.get $entry i32.load16_s - local.get $1 + local.get $key i32.extend16_s i32.eq else i32.const 0 end if - local.get $3 + local.get $entry return end - local.get $5 + local.get $taggedNext i32.const 1 i32.const -1 i32.xor i32.and - local.set $3 + local.set $entry br $while-continue|0 end end i32.const 0 ) - (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/set/Set#has (param $this i32) (param $key i32) (result i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 @@ -4386,20 +4386,20 @@ local.get $1 i32.store offset=4 ) - (func $~lib/set/Set#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) + (func $~lib/set/Set#rehash (param $this i32) (param $newBucketsMask i32) + (local $newBucketsCapacity i32) + (local $newBuckets i32) + (local $newEntriesCapacity i32) + (local $newEntries i32) + (local $oldPtr i32) + (local $oldEnd i32) + (local $newPtr i32) + (local $var$9 i32) + (local $oldEntry i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) + (local $var$14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -4408,111 +4408,111 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $1 + local.get $newBucketsMask i32.const 1 i32.add - local.set $2 + local.set $newBucketsCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 + local.get $newBucketsCapacity i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $newBuckets i32.store - local.get $2 + local.get $newBucketsCapacity i32.const 8 i32.mul i32.const 3 i32.div_s - local.set $4 + local.set $newEntriesCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 + local.get $newEntriesCapacity i32.const 8 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $newEntries i32.store offset=4 - local.get $0 + local.get $this i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 + local.set $oldPtr + local.get $oldPtr + local.get $this i32.load offset=16 i32.const 8 i32.mul i32.add - local.set $7 - local.get $5 - local.set $8 + local.set $oldEnd + local.get $newEntries + local.set $newPtr loop $while-continue|0 - local.get $6 - local.get $7 + local.get $oldPtr + local.get $oldEnd i32.ne - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $6 - local.set $10 - local.get $10 + local.get $oldPtr + local.set $oldEntry + local.get $oldEntry i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $8 - local.set $11 - local.get $10 + local.get $newPtr + local.set $var$11 + local.get $oldEntry i32.load16_s - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 call $~lib/set/SetEntry#set:key - local.get $12 + local.get $var$12 call $~lib/util/hash/HASH - local.get $1 + local.get $newBucketsMask i32.and - local.set $13 - local.get $3 - local.get $13 + local.set $var$13 + local.get $newBuckets + local.get $var$13 i32.const 4 i32.mul i32.add - local.set $14 - local.get $11 - local.get $14 + local.set $var$14 + local.get $var$11 + local.get $var$14 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $14 - local.get $8 + local.get $var$14 + local.get $newPtr i32.store - local.get $8 + local.get $newPtr i32.const 8 i32.add - local.set $8 + local.set $newPtr end - local.get $6 + local.get $oldPtr i32.const 8 i32.add - local.set $6 + local.set $oldPtr br $while-continue|0 end end - local.get $0 - local.get $3 + local.get $this + local.get $newBuckets call $~lib/set/Set#set:buckets - local.get $0 - local.get $1 + local.get $this + local.get $newBucketsMask call $~lib/set/Set#set:bucketsMask - local.get $0 - local.get $5 + local.get $this + local.get $newEntries call $~lib/set/Set#set:entries - local.get $0 - local.get $4 + local.get $this + local.get $newEntriesCapacity call $~lib/set/Set#set:entriesCapacity - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 call $~lib/set/Set#set:entriesOffset global.get $~lib/memory/__stack_pointer @@ -4520,31 +4520,31 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 + (func $~lib/set/Set#add (param $this i32) (param $key i32) (result i32) + (local $hashCode i32) + (local $entry i32) + (local $var$4 i32) + local.get $key call $~lib/util/hash/HASH - local.set $2 - local.get $0 - local.get $1 - local.get $2 + local.set $hashCode + local.get $this + local.get $key + local.get $hashCode call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $entry + local.get $entry i32.eqz if - local.get $0 + local.get $this i32.load offset=16 - local.get $0 + local.get $this i32.load offset=12 i32.eq if - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 - local.get $0 + local.get $this i32.load offset=12 i32.const 3 i32.mul @@ -4552,10 +4552,10 @@ i32.div_s i32.lt_s if (result i32) - local.get $0 + local.get $this i32.load offset=4 else - local.get $0 + local.get $this i32.load offset=4 i32.const 1 i32.shl @@ -4564,53 +4564,53 @@ end call $~lib/set/Set#rehash end - local.get $0 + local.get $this i32.load offset=8 - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=16 - local.tee $4 + local.tee $var$4 i32.const 1 i32.add call $~lib/set/Set#set:entriesOffset - local.get $4 + local.get $var$4 i32.const 8 i32.mul i32.add - local.set $3 - local.get $3 - local.get $1 + local.set $entry + local.get $entry + local.get $key call $~lib/set/SetEntry#set:key i32.const 0 drop - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 i32.const 1 i32.add call $~lib/set/Set#set:entriesCount - local.get $0 + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $4 - local.get $3 - local.get $4 + local.set $var$4 + local.get $entry + local.get $var$4 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $4 - local.get $3 + local.get $var$4 + local.get $entry i32.store end - local.get $0 + local.get $this ) - (func $~lib/set/Set#get:size (param $0 i32) (result i32) - local.get $0 + (func $~lib/set/Set#get:size (param $this i32) (result i32) + local.get $this i32.load offset=20 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) @@ -4637,36 +4637,36 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 1 i32.shl i32.add - local.get $2 + local.get $value i32.store16 i32.const 0 drop ) - (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 + (func $~lib/array/Array#set:length (param $this i32) (param $newLength i32) + local.get $this + local.get $newLength i32.const 1 i32.const 0 call $~lib/array/ensureCapacity - local.get $0 - local.get $1 + local.get $this + local.get $newLength call $~lib/array/Array#set:length_ ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i32) + (local $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -4677,69 +4677,69 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 1 i32.shl i32.add i32.load16_s - local.set $2 + local.set $value i32.const 0 drop - local.get $2 - ) - (func $~lib/set/Set#delete (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - local.get $1 - local.get $1 + local.get $value + ) + (func $~lib/set/Set#delete (param $this i32) (param $key i32) (result i32) + (local $entry i32) + (local $halfBucketsMask i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $2 - local.get $2 + local.set $entry + local.get $entry i32.eqz if i32.const 0 return end - local.get $2 - local.get $2 + local.get $entry + local.get $entry i32.load offset=4 i32.const 1 i32.or call $~lib/set/SetEntry#set:taggedNext - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 i32.const 1 i32.sub call $~lib/set/Set#set:entriesCount - local.get $0 + local.get $this i32.load offset=4 i32.const 1 i32.shr_u - local.set $3 - local.get $3 + local.set $halfBucketsMask + local.get $halfBucketsMask i32.const 1 i32.add i32.const 4 - local.tee $4 - local.get $0 + local.tee $var$4 + local.get $this i32.load offset=20 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.gt_u select i32.ge_u if (result i32) - local.get $0 + local.get $this i32.load offset=20 - local.get $0 + local.get $this i32.load offset=12 i32.const 3 i32.mul @@ -4750,52 +4750,52 @@ i32.const 0 end if - local.get $0 - local.get $3 + local.get $this + local.get $halfBucketsMask call $~lib/set/Set#rehash end i32.const 1 ) - (func $~lib/set/Set#clear (param $0 i32) - local.get $0 + (func $~lib/set/Set#clear (param $this i32) + local.get $this i32.const 0 i32.const 4 i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets - local.get $0 + local.get $this i32.const 4 i32.const 1 i32.sub call $~lib/set/Set#set:bucketsMask - local.get $0 + local.get $this i32.const 0 i32.const 4 i32.const 8 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:entries - local.get $0 + local.get $this i32.const 4 call $~lib/set/Set#set:entriesCapacity - local.get $0 + local.get $this i32.const 0 call $~lib/set/Set#set:entriesOffset - local.get $0 + local.get $this i32.const 0 call $~lib/set/Set#set:entriesCount ) (func $std/set/testNumeric - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) + (local $set i32) + (local $vals i32) + (local $var$2 i32) + (local $var$3 i32) + (local $valSet i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -4810,20 +4810,20 @@ global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/set/Set#constructor - local.tee $0 + local.tee $set i32.store i32.const 0 - local.set $1 + local.set $vals loop $for-loop|1 - local.get $1 + local.get $vals i32.extend16_s i32.const 100 i32.lt_s - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#has i32.eqz i32.eqz @@ -4835,12 +4835,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#add drop - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#has i32.eqz if @@ -4851,14 +4851,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $vals i32.const 1 i32.add - local.set $1 + local.set $vals br $for-loop|1 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 100 i32.eq @@ -4872,17 +4872,17 @@ unreachable end i32.const 50 - local.set $1 + local.set $vals loop $for-loop|3 - local.get $1 + local.get $vals i32.extend16_s i32.const 100 i32.lt_s - local.set $4 - local.get $4 + local.set $valSet + local.get $valSet if - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#has i32.eqz if @@ -4893,12 +4893,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#add drop - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#has i32.eqz if @@ -4909,14 +4909,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $vals i32.const 1 i32.add - local.set $1 + local.set $vals br $for-loop|3 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 100 i32.eq @@ -4930,28 +4930,28 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $set call $~lib/set/Set#values - local.tee $1 + local.tee $vals i32.store offset=4 global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/set/Set#constructor - local.tee $4 + local.tee $valSet i32.store offset=8 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|4 - local.get $5 - local.get $1 + local.get $var$5 + local.get $vals call $~lib/array/Array#get:length i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $1 - local.get $5 + local.get $set + local.get $vals + local.get $var$5 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -4963,22 +4963,22 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $1 - local.get $5 + local.get $valSet + local.get $vals + local.get $var$5 call $~lib/array/Array#__get call $~lib/set/Set#add drop - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|4 end end - local.get $4 + local.get $valSet call $~lib/set/Set#get:size - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.eq i32.eqz @@ -4991,17 +4991,17 @@ unreachable end i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|6 - local.get $5 + local.get $var$5 i32.extend16_s i32.const 50 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $0 - local.get $5 + local.get $set + local.get $var$5 call $~lib/set/Set#has i32.eqz if @@ -5012,12 +5012,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $5 + local.get $set + local.get $var$5 call $~lib/set/Set#delete drop - local.get $0 - local.get $5 + local.get $set + local.get $var$5 call $~lib/set/Set#has i32.eqz i32.eqz @@ -5029,14 +5029,14 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|6 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 50 i32.eq @@ -5050,17 +5050,17 @@ unreachable end i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|8 - local.get $5 + local.get $var$5 i32.extend16_s i32.const 50 i32.lt_s - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 if - local.get $0 - local.get $5 + local.get $set + local.get $var$5 call $~lib/set/Set#has i32.eqz i32.eqz @@ -5072,12 +5072,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $5 + local.get $set + local.get $var$5 call $~lib/set/Set#add drop - local.get $0 - local.get $5 + local.get $set + local.get $var$5 call $~lib/set/Set#has i32.eqz if @@ -5088,12 +5088,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $5 + local.get $set + local.get $var$5 call $~lib/set/Set#delete drop - local.get $0 - local.get $5 + local.get $set + local.get $var$5 call $~lib/set/Set#has i32.eqz i32.eqz @@ -5105,14 +5105,14 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|8 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 50 i32.eq @@ -5125,9 +5125,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $set call $~lib/set/Set#clear - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 0 i32.eq @@ -5183,10 +5183,10 @@ local.get $1 i32.store offset=20 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + (func $~lib/util/hash/HASH (param $key i32) (result i32) + (local $var$1 i32) + (local $var$2 i32) + (local $var$3 i32) i32.const 0 drop i32.const 0 @@ -5197,90 +5197,90 @@ i32.const 4 i32.le_u drop - local.get $0 + local.get $key i32.const 65535 i32.and - local.set $2 + local.set $var$2 i32.const 2 - local.set $1 + local.set $var$1 i32.const 0 i32.const 374761393 i32.add - local.get $1 + local.get $var$1 i32.add - local.set $3 - local.get $3 - local.get $2 + local.set $var$3 + local.get $var$3 + local.get $var$2 i32.const -1028477379 i32.mul i32.add - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 15 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const -2048144777 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 13 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const -1028477379 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 16 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 return ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/set/Set#find (param $this i32) (param $key i32) (param $hashCode i32) (result i32) + (local $entry i32) + (local $var$4 i32) + (local $taggedNext i32) + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add i32.load - local.set $3 + local.set $entry loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + local.get $entry + local.set $var$4 + local.get $var$4 if - local.get $3 + local.get $entry i32.load offset=4 - local.set $5 - local.get $5 + local.set $taggedNext + local.get $taggedNext i32.const 1 i32.and i32.eqz if (result i32) - local.get $3 + local.get $entry i32.load16_u - local.get $1 + local.get $key i32.const 65535 i32.and i32.eq @@ -5288,24 +5288,24 @@ i32.const 0 end if - local.get $3 + local.get $entry return end - local.get $5 + local.get $taggedNext i32.const 1 i32.const -1 i32.xor i32.and - local.set $3 + local.set $entry br $while-continue|0 end end i32.const 0 ) - (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/set/Set#has (param $this i32) (param $key i32) (result i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 @@ -5317,24 +5317,24 @@ i32.store16 ) (func $~lib/set/SetEntry#set:taggedNext (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - i32.store offset=4 - ) - (func $~lib/set/Set#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) + local.get $0 + local.get $1 + i32.store offset=4 + ) + (func $~lib/set/Set#rehash (param $this i32) (param $newBucketsMask i32) + (local $newBucketsCapacity i32) + (local $newBuckets i32) + (local $newEntriesCapacity i32) + (local $newEntries i32) + (local $oldPtr i32) + (local $oldEnd i32) + (local $newPtr i32) + (local $var$9 i32) + (local $oldEntry i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) + (local $var$14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -5343,111 +5343,111 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $1 + local.get $newBucketsMask i32.const 1 i32.add - local.set $2 + local.set $newBucketsCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 + local.get $newBucketsCapacity i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $newBuckets i32.store - local.get $2 + local.get $newBucketsCapacity i32.const 8 i32.mul i32.const 3 i32.div_s - local.set $4 + local.set $newEntriesCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 + local.get $newEntriesCapacity i32.const 8 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $newEntries i32.store offset=4 - local.get $0 + local.get $this i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 + local.set $oldPtr + local.get $oldPtr + local.get $this i32.load offset=16 i32.const 8 i32.mul i32.add - local.set $7 - local.get $5 - local.set $8 + local.set $oldEnd + local.get $newEntries + local.set $newPtr loop $while-continue|0 - local.get $6 - local.get $7 + local.get $oldPtr + local.get $oldEnd i32.ne - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $6 - local.set $10 - local.get $10 + local.get $oldPtr + local.set $oldEntry + local.get $oldEntry i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $8 - local.set $11 - local.get $10 + local.get $newPtr + local.set $var$11 + local.get $oldEntry i32.load16_u - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 call $~lib/set/SetEntry#set:key - local.get $12 + local.get $var$12 call $~lib/util/hash/HASH - local.get $1 + local.get $newBucketsMask i32.and - local.set $13 - local.get $3 - local.get $13 + local.set $var$13 + local.get $newBuckets + local.get $var$13 i32.const 4 i32.mul i32.add - local.set $14 - local.get $11 - local.get $14 + local.set $var$14 + local.get $var$11 + local.get $var$14 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $14 - local.get $8 + local.get $var$14 + local.get $newPtr i32.store - local.get $8 + local.get $newPtr i32.const 8 i32.add - local.set $8 + local.set $newPtr end - local.get $6 + local.get $oldPtr i32.const 8 i32.add - local.set $6 + local.set $oldPtr br $while-continue|0 end end - local.get $0 - local.get $3 + local.get $this + local.get $newBuckets call $~lib/set/Set#set:buckets - local.get $0 - local.get $1 + local.get $this + local.get $newBucketsMask call $~lib/set/Set#set:bucketsMask - local.get $0 - local.get $5 + local.get $this + local.get $newEntries call $~lib/set/Set#set:entries - local.get $0 - local.get $4 + local.get $this + local.get $newEntriesCapacity call $~lib/set/Set#set:entriesCapacity - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 call $~lib/set/Set#set:entriesOffset global.get $~lib/memory/__stack_pointer @@ -5455,31 +5455,31 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 + (func $~lib/set/Set#add (param $this i32) (param $key i32) (result i32) + (local $hashCode i32) + (local $entry i32) + (local $var$4 i32) + local.get $key call $~lib/util/hash/HASH - local.set $2 - local.get $0 - local.get $1 - local.get $2 + local.set $hashCode + local.get $this + local.get $key + local.get $hashCode call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $entry + local.get $entry i32.eqz if - local.get $0 + local.get $this i32.load offset=16 - local.get $0 + local.get $this i32.load offset=12 i32.eq if - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 - local.get $0 + local.get $this i32.load offset=12 i32.const 3 i32.mul @@ -5487,10 +5487,10 @@ i32.div_s i32.lt_s if (result i32) - local.get $0 + local.get $this i32.load offset=4 else - local.get $0 + local.get $this i32.load offset=4 i32.const 1 i32.shl @@ -5499,53 +5499,53 @@ end call $~lib/set/Set#rehash end - local.get $0 + local.get $this i32.load offset=8 - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=16 - local.tee $4 + local.tee $var$4 i32.const 1 i32.add call $~lib/set/Set#set:entriesOffset - local.get $4 + local.get $var$4 i32.const 8 i32.mul i32.add - local.set $3 - local.get $3 - local.get $1 + local.set $entry + local.get $entry + local.get $key call $~lib/set/SetEntry#set:key i32.const 0 drop - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 i32.const 1 i32.add call $~lib/set/Set#set:entriesCount - local.get $0 + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $4 - local.get $3 - local.get $4 + local.set $var$4 + local.get $entry + local.get $var$4 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $4 - local.get $3 + local.get $var$4 + local.get $entry i32.store end - local.get $0 + local.get $this ) - (func $~lib/set/Set#get:size (param $0 i32) (result i32) - local.get $0 + (func $~lib/set/Set#get:size (param $this i32) (result i32) + local.get $this i32.load offset=20 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) @@ -5572,36 +5572,36 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 1 i32.shl i32.add - local.get $2 + local.get $value i32.store16 i32.const 0 drop ) - (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 + (func $~lib/array/Array#set:length (param $this i32) (param $newLength i32) + local.get $this + local.get $newLength i32.const 1 i32.const 0 call $~lib/array/ensureCapacity - local.get $0 - local.get $1 + local.get $this + local.get $newLength call $~lib/array/Array#set:length_ ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i32) + (local $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -5612,69 +5612,69 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 1 i32.shl i32.add i32.load16_u - local.set $2 + local.set $value i32.const 0 drop - local.get $2 - ) - (func $~lib/set/Set#delete (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - local.get $1 - local.get $1 + local.get $value + ) + (func $~lib/set/Set#delete (param $this i32) (param $key i32) (result i32) + (local $entry i32) + (local $halfBucketsMask i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $2 - local.get $2 + local.set $entry + local.get $entry i32.eqz if i32.const 0 return end - local.get $2 - local.get $2 + local.get $entry + local.get $entry i32.load offset=4 i32.const 1 i32.or call $~lib/set/SetEntry#set:taggedNext - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 i32.const 1 i32.sub call $~lib/set/Set#set:entriesCount - local.get $0 + local.get $this i32.load offset=4 i32.const 1 i32.shr_u - local.set $3 - local.get $3 + local.set $halfBucketsMask + local.get $halfBucketsMask i32.const 1 i32.add i32.const 4 - local.tee $4 - local.get $0 + local.tee $var$4 + local.get $this i32.load offset=20 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.gt_u select i32.ge_u if (result i32) - local.get $0 + local.get $this i32.load offset=20 - local.get $0 + local.get $this i32.load offset=12 i32.const 3 i32.mul @@ -5685,52 +5685,52 @@ i32.const 0 end if - local.get $0 - local.get $3 + local.get $this + local.get $halfBucketsMask call $~lib/set/Set#rehash end i32.const 1 ) - (func $~lib/set/Set#clear (param $0 i32) - local.get $0 + (func $~lib/set/Set#clear (param $this i32) + local.get $this i32.const 0 i32.const 4 i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets - local.get $0 + local.get $this i32.const 4 i32.const 1 i32.sub call $~lib/set/Set#set:bucketsMask - local.get $0 + local.get $this i32.const 0 i32.const 4 i32.const 8 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:entries - local.get $0 + local.get $this i32.const 4 call $~lib/set/Set#set:entriesCapacity - local.get $0 + local.get $this i32.const 0 call $~lib/set/Set#set:entriesOffset - local.get $0 + local.get $this i32.const 0 call $~lib/set/Set#set:entriesCount ) (func $std/set/testNumeric - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) + (local $set i32) + (local $vals i32) + (local $var$2 i32) + (local $var$3 i32) + (local $valSet i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -5745,21 +5745,21 @@ global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/set/Set#constructor - local.tee $0 + local.tee $set i32.store i32.const 0 - local.set $1 + local.set $vals loop $for-loop|1 - local.get $1 + local.get $vals i32.const 65535 i32.and i32.const 100 i32.lt_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#has i32.eqz i32.eqz @@ -5771,12 +5771,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#add drop - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#has i32.eqz if @@ -5787,14 +5787,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $vals i32.const 1 i32.add - local.set $1 + local.set $vals br $for-loop|1 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 100 i32.eq @@ -5808,18 +5808,18 @@ unreachable end i32.const 50 - local.set $1 + local.set $vals loop $for-loop|3 - local.get $1 + local.get $vals i32.const 65535 i32.and i32.const 100 i32.lt_u - local.set $4 - local.get $4 + local.set $valSet + local.get $valSet if - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#has i32.eqz if @@ -5830,12 +5830,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#add drop - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#has i32.eqz if @@ -5846,14 +5846,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $vals i32.const 1 i32.add - local.set $1 + local.set $vals br $for-loop|3 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 100 i32.eq @@ -5867,28 +5867,28 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $set call $~lib/set/Set#values - local.tee $1 + local.tee $vals i32.store offset=4 global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/set/Set#constructor - local.tee $4 + local.tee $valSet i32.store offset=8 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|4 - local.get $5 - local.get $1 + local.get $var$5 + local.get $vals call $~lib/array/Array#get:length i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $1 - local.get $5 + local.get $set + local.get $vals + local.get $var$5 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -5900,22 +5900,22 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $1 - local.get $5 + local.get $valSet + local.get $vals + local.get $var$5 call $~lib/array/Array#__get call $~lib/set/Set#add drop - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|4 end end - local.get $4 + local.get $valSet call $~lib/set/Set#get:size - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.eq i32.eqz @@ -5928,18 +5928,18 @@ unreachable end i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|6 - local.get $5 + local.get $var$5 i32.const 65535 i32.and i32.const 50 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $0 - local.get $5 + local.get $set + local.get $var$5 call $~lib/set/Set#has i32.eqz if @@ -5950,12 +5950,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $5 + local.get $set + local.get $var$5 call $~lib/set/Set#delete drop - local.get $0 - local.get $5 + local.get $set + local.get $var$5 call $~lib/set/Set#has i32.eqz i32.eqz @@ -5967,14 +5967,14 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|6 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 50 i32.eq @@ -5988,18 +5988,18 @@ unreachable end i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|8 - local.get $5 + local.get $var$5 i32.const 65535 i32.and i32.const 50 i32.lt_u - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 if - local.get $0 - local.get $5 + local.get $set + local.get $var$5 call $~lib/set/Set#has i32.eqz i32.eqz @@ -6011,12 +6011,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $5 + local.get $set + local.get $var$5 call $~lib/set/Set#add drop - local.get $0 - local.get $5 + local.get $set + local.get $var$5 call $~lib/set/Set#has i32.eqz if @@ -6027,12 +6027,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $5 + local.get $set + local.get $var$5 call $~lib/set/Set#delete drop - local.get $0 - local.get $5 + local.get $set + local.get $var$5 call $~lib/set/Set#has i32.eqz i32.eqz @@ -6044,14 +6044,14 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|8 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 50 i32.eq @@ -6064,9 +6064,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $set call $~lib/set/Set#clear - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 0 i32.eq @@ -6122,10 +6122,10 @@ local.get $1 i32.store offset=20 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + (func $~lib/util/hash/HASH (param $key i32) (result i32) + (local $var$1 i32) + (local $var$2 i32) + (local $var$3 i32) i32.const 0 drop i32.const 0 @@ -6136,111 +6136,111 @@ i32.const 4 i32.le_u drop - local.get $0 - local.set $2 + local.get $key + local.set $var$2 i32.const 4 - local.set $1 + local.set $var$1 i32.const 0 i32.const 374761393 i32.add - local.get $1 + local.get $var$1 i32.add - local.set $3 - local.get $3 - local.get $2 + local.set $var$3 + local.get $var$3 + local.get $var$2 i32.const -1028477379 i32.mul i32.add - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 15 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const -2048144777 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 13 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const -1028477379 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 16 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 return ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/set/Set#find (param $this i32) (param $key i32) (param $hashCode i32) (result i32) + (local $entry i32) + (local $var$4 i32) + (local $taggedNext i32) + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add i32.load - local.set $3 + local.set $entry loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + local.get $entry + local.set $var$4 + local.get $var$4 if - local.get $3 + local.get $entry i32.load offset=4 - local.set $5 - local.get $5 + local.set $taggedNext + local.get $taggedNext i32.const 1 i32.and i32.eqz if (result i32) - local.get $3 + local.get $entry i32.load - local.get $1 + local.get $key i32.eq else i32.const 0 end if - local.get $3 + local.get $entry return end - local.get $5 + local.get $taggedNext i32.const 1 i32.const -1 i32.xor i32.and - local.set $3 + local.set $entry br $while-continue|0 end end i32.const 0 ) - (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/set/Set#has (param $this i32) (param $key i32) (result i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 @@ -6256,20 +6256,20 @@ local.get $1 i32.store offset=4 ) - (func $~lib/set/Set#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) + (func $~lib/set/Set#rehash (param $this i32) (param $newBucketsMask i32) + (local $newBucketsCapacity i32) + (local $newBuckets i32) + (local $newEntriesCapacity i32) + (local $newEntries i32) + (local $oldPtr i32) + (local $oldEnd i32) + (local $newPtr i32) + (local $var$9 i32) + (local $oldEntry i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) + (local $var$14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -6278,111 +6278,111 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $1 + local.get $newBucketsMask i32.const 1 i32.add - local.set $2 + local.set $newBucketsCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 + local.get $newBucketsCapacity i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $newBuckets i32.store - local.get $2 + local.get $newBucketsCapacity i32.const 8 i32.mul i32.const 3 i32.div_s - local.set $4 + local.set $newEntriesCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 + local.get $newEntriesCapacity i32.const 8 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $newEntries i32.store offset=4 - local.get $0 + local.get $this i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 + local.set $oldPtr + local.get $oldPtr + local.get $this i32.load offset=16 i32.const 8 i32.mul i32.add - local.set $7 - local.get $5 - local.set $8 + local.set $oldEnd + local.get $newEntries + local.set $newPtr loop $while-continue|0 - local.get $6 - local.get $7 + local.get $oldPtr + local.get $oldEnd i32.ne - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $6 - local.set $10 - local.get $10 + local.get $oldPtr + local.set $oldEntry + local.get $oldEntry i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $8 - local.set $11 - local.get $10 + local.get $newPtr + local.set $var$11 + local.get $oldEntry i32.load - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 call $~lib/set/SetEntry#set:key - local.get $12 + local.get $var$12 call $~lib/util/hash/HASH - local.get $1 + local.get $newBucketsMask i32.and - local.set $13 - local.get $3 - local.get $13 + local.set $var$13 + local.get $newBuckets + local.get $var$13 i32.const 4 i32.mul i32.add - local.set $14 - local.get $11 - local.get $14 + local.set $var$14 + local.get $var$11 + local.get $var$14 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $14 - local.get $8 + local.get $var$14 + local.get $newPtr i32.store - local.get $8 + local.get $newPtr i32.const 8 i32.add - local.set $8 + local.set $newPtr end - local.get $6 + local.get $oldPtr i32.const 8 i32.add - local.set $6 + local.set $oldPtr br $while-continue|0 end end - local.get $0 - local.get $3 + local.get $this + local.get $newBuckets call $~lib/set/Set#set:buckets - local.get $0 - local.get $1 + local.get $this + local.get $newBucketsMask call $~lib/set/Set#set:bucketsMask - local.get $0 - local.get $5 - call $~lib/set/Set#set:entries - local.get $0 - local.get $4 + local.get $this + local.get $newEntries + call $~lib/set/Set#set:entries + local.get $this + local.get $newEntriesCapacity call $~lib/set/Set#set:entriesCapacity - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 call $~lib/set/Set#set:entriesOffset global.get $~lib/memory/__stack_pointer @@ -6390,31 +6390,31 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 + (func $~lib/set/Set#add (param $this i32) (param $key i32) (result i32) + (local $hashCode i32) + (local $entry i32) + (local $var$4 i32) + local.get $key call $~lib/util/hash/HASH - local.set $2 - local.get $0 - local.get $1 - local.get $2 + local.set $hashCode + local.get $this + local.get $key + local.get $hashCode call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $entry + local.get $entry i32.eqz if - local.get $0 + local.get $this i32.load offset=16 - local.get $0 + local.get $this i32.load offset=12 i32.eq if - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 - local.get $0 + local.get $this i32.load offset=12 i32.const 3 i32.mul @@ -6422,10 +6422,10 @@ i32.div_s i32.lt_s if (result i32) - local.get $0 + local.get $this i32.load offset=4 else - local.get $0 + local.get $this i32.load offset=4 i32.const 1 i32.shl @@ -6434,53 +6434,53 @@ end call $~lib/set/Set#rehash end - local.get $0 + local.get $this i32.load offset=8 - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=16 - local.tee $4 + local.tee $var$4 i32.const 1 i32.add call $~lib/set/Set#set:entriesOffset - local.get $4 + local.get $var$4 i32.const 8 i32.mul i32.add - local.set $3 - local.get $3 - local.get $1 + local.set $entry + local.get $entry + local.get $key call $~lib/set/SetEntry#set:key i32.const 0 drop - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 i32.const 1 i32.add call $~lib/set/Set#set:entriesCount - local.get $0 + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $4 - local.get $3 - local.get $4 + local.set $var$4 + local.get $entry + local.get $var$4 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $4 - local.get $3 + local.get $var$4 + local.get $entry i32.store end - local.get $0 + local.get $this ) - (func $~lib/set/Set#get:size (param $0 i32) (result i32) - local.get $0 + (func $~lib/set/Set#get:size (param $this i32) (result i32) + local.get $this i32.load offset=20 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) @@ -6507,36 +6507,36 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store i32.const 0 drop ) - (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 + (func $~lib/array/Array#set:length (param $this i32) (param $newLength i32) + local.get $this + local.get $newLength i32.const 2 i32.const 0 call $~lib/array/ensureCapacity - local.get $0 - local.get $1 + local.get $this + local.get $newLength call $~lib/array/Array#set:length_ ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i32) + (local $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -6547,69 +6547,69 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add i32.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 - ) - (func $~lib/set/Set#delete (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - local.get $1 - local.get $1 + local.get $value + ) + (func $~lib/set/Set#delete (param $this i32) (param $key i32) (result i32) + (local $entry i32) + (local $halfBucketsMask i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $2 - local.get $2 + local.set $entry + local.get $entry i32.eqz if i32.const 0 return end - local.get $2 - local.get $2 + local.get $entry + local.get $entry i32.load offset=4 i32.const 1 i32.or call $~lib/set/SetEntry#set:taggedNext - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 i32.const 1 i32.sub call $~lib/set/Set#set:entriesCount - local.get $0 + local.get $this i32.load offset=4 i32.const 1 i32.shr_u - local.set $3 - local.get $3 + local.set $halfBucketsMask + local.get $halfBucketsMask i32.const 1 i32.add i32.const 4 - local.tee $4 - local.get $0 + local.tee $var$4 + local.get $this i32.load offset=20 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.gt_u select i32.ge_u if (result i32) - local.get $0 + local.get $this i32.load offset=20 - local.get $0 + local.get $this i32.load offset=12 i32.const 3 i32.mul @@ -6620,48 +6620,48 @@ i32.const 0 end if - local.get $0 - local.get $3 + local.get $this + local.get $halfBucketsMask call $~lib/set/Set#rehash end i32.const 1 ) - (func $~lib/set/Set#clear (param $0 i32) - local.get $0 + (func $~lib/set/Set#clear (param $this i32) + local.get $this i32.const 0 i32.const 4 i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets - local.get $0 + local.get $this i32.const 4 i32.const 1 i32.sub call $~lib/set/Set#set:bucketsMask - local.get $0 + local.get $this i32.const 0 i32.const 4 i32.const 8 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:entries - local.get $0 + local.get $this i32.const 4 call $~lib/set/Set#set:entriesCapacity - local.get $0 + local.get $this i32.const 0 call $~lib/set/Set#set:entriesOffset - local.get $0 + local.get $this i32.const 0 call $~lib/set/Set#set:entriesCount ) (func $std/set/testNumeric - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (local $set i32) + (local $vals i32) + (local $valSet i32) + (local $var$3 i32) + (local $var$4 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -6676,19 +6676,19 @@ global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/set/Set#constructor - local.tee $0 + local.tee $set i32.store i32.const 0 - local.set $1 + local.set $vals loop $for-loop|0 - local.get $1 + local.get $vals i32.const 100 i32.lt_s - local.set $2 - local.get $2 + local.set $valSet + local.get $valSet if - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#has i32.eqz i32.eqz @@ -6700,12 +6700,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#add drop - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#has i32.eqz if @@ -6716,14 +6716,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $vals i32.const 1 i32.add - local.set $1 + local.set $vals br $for-loop|0 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 100 i32.eq @@ -6737,16 +6737,16 @@ unreachable end i32.const 50 - local.set $1 + local.set $vals loop $for-loop|1 - local.get $1 + local.get $vals i32.const 100 i32.lt_s - local.set $2 - local.get $2 + local.set $valSet + local.get $valSet if - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#has i32.eqz if @@ -6757,12 +6757,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#add drop - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#has i32.eqz if @@ -6773,14 +6773,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $vals i32.const 1 i32.add - local.set $1 + local.set $vals br $for-loop|1 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 100 i32.eq @@ -6794,28 +6794,28 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $set call $~lib/set/Set#values - local.tee $1 + local.tee $vals i32.store offset=4 global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/set/Set#constructor - local.tee $2 + local.tee $valSet i32.store offset=8 i32.const 0 - local.set $3 + local.set $var$3 loop $for-loop|2 - local.get $3 - local.get $1 + local.get $var$3 + local.get $vals call $~lib/array/Array#get:length i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $0 - local.get $1 - local.get $3 + local.get $set + local.get $vals + local.get $var$3 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -6827,22 +6827,22 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $1 - local.get $3 + local.get $valSet + local.get $vals + local.get $var$3 call $~lib/array/Array#__get call $~lib/set/Set#add drop - local.get $3 + local.get $var$3 i32.const 1 i32.add - local.set $3 + local.set $var$3 br $for-loop|2 end end - local.get $2 + local.get $valSet call $~lib/set/Set#get:size - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.eq i32.eqz @@ -6855,16 +6855,16 @@ unreachable end i32.const 0 - local.set $3 + local.set $var$3 loop $for-loop|3 - local.get $3 + local.get $var$3 i32.const 50 i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $0 - local.get $3 + local.get $set + local.get $var$3 call $~lib/set/Set#has i32.eqz if @@ -6875,12 +6875,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $set + local.get $var$3 call $~lib/set/Set#delete drop - local.get $0 - local.get $3 + local.get $set + local.get $var$3 call $~lib/set/Set#has i32.eqz i32.eqz @@ -6892,14 +6892,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $var$3 i32.const 1 i32.add - local.set $3 + local.set $var$3 br $for-loop|3 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 50 i32.eq @@ -6913,16 +6913,16 @@ unreachable end i32.const 0 - local.set $3 + local.set $var$3 loop $for-loop|4 - local.get $3 + local.get $var$3 i32.const 50 i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $0 - local.get $3 + local.get $set + local.get $var$3 call $~lib/set/Set#has i32.eqz i32.eqz @@ -6934,12 +6934,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $set + local.get $var$3 call $~lib/set/Set#add drop - local.get $0 - local.get $3 + local.get $set + local.get $var$3 call $~lib/set/Set#has i32.eqz if @@ -6950,12 +6950,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $set + local.get $var$3 call $~lib/set/Set#delete drop - local.get $0 - local.get $3 + local.get $set + local.get $var$3 call $~lib/set/Set#has i32.eqz i32.eqz @@ -6967,14 +6967,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $var$3 i32.const 1 i32.add - local.set $3 + local.set $var$3 br $for-loop|4 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 50 i32.eq @@ -6987,9 +6987,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $set call $~lib/set/Set#clear - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 0 i32.eq @@ -7045,10 +7045,10 @@ local.get $1 i32.store offset=20 ) - (func $~lib/util/hash/HASH (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + (func $~lib/util/hash/HASH (param $key i32) (result i32) + (local $var$1 i32) + (local $var$2 i32) + (local $var$3 i32) i32.const 0 drop i32.const 0 @@ -7059,111 +7059,111 @@ i32.const 4 i32.le_u drop - local.get $0 - local.set $2 + local.get $key + local.set $var$2 i32.const 4 - local.set $1 + local.set $var$1 i32.const 0 i32.const 374761393 i32.add - local.get $1 + local.get $var$1 i32.add - local.set $3 - local.get $3 - local.get $2 + local.set $var$3 + local.get $var$3 + local.get $var$2 i32.const -1028477379 i32.mul i32.add - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 15 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const -2048144777 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 13 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const -1028477379 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 16 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 return ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/set/Set#find (param $this i32) (param $key i32) (param $hashCode i32) (result i32) + (local $entry i32) + (local $var$4 i32) + (local $taggedNext i32) + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add i32.load - local.set $3 + local.set $entry loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + local.get $entry + local.set $var$4 + local.get $var$4 if - local.get $3 + local.get $entry i32.load offset=4 - local.set $5 - local.get $5 + local.set $taggedNext + local.get $taggedNext i32.const 1 i32.and i32.eqz if (result i32) - local.get $3 + local.get $entry i32.load - local.get $1 + local.get $key i32.eq else i32.const 0 end if - local.get $3 + local.get $entry return end - local.get $5 + local.get $taggedNext i32.const 1 i32.const -1 i32.xor i32.and - local.set $3 + local.set $entry br $while-continue|0 end end i32.const 0 ) - (func $~lib/set/Set#has (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/set/Set#has (param $this i32) (param $key i32) (result i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 @@ -7179,20 +7179,20 @@ local.get $1 i32.store offset=4 ) - (func $~lib/set/Set#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) + (func $~lib/set/Set#rehash (param $this i32) (param $newBucketsMask i32) + (local $newBucketsCapacity i32) + (local $newBuckets i32) + (local $newEntriesCapacity i32) + (local $newEntries i32) + (local $oldPtr i32) + (local $oldEnd i32) + (local $newPtr i32) + (local $var$9 i32) + (local $oldEntry i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) + (local $var$14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -7201,111 +7201,111 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $1 + local.get $newBucketsMask i32.const 1 i32.add - local.set $2 + local.set $newBucketsCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 + local.get $newBucketsCapacity i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $newBuckets i32.store - local.get $2 + local.get $newBucketsCapacity i32.const 8 i32.mul i32.const 3 i32.div_s - local.set $4 + local.set $newEntriesCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 + local.get $newEntriesCapacity i32.const 8 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $newEntries i32.store offset=4 - local.get $0 + local.get $this i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 + local.set $oldPtr + local.get $oldPtr + local.get $this i32.load offset=16 i32.const 8 i32.mul i32.add - local.set $7 - local.get $5 - local.set $8 + local.set $oldEnd + local.get $newEntries + local.set $newPtr loop $while-continue|0 - local.get $6 - local.get $7 + local.get $oldPtr + local.get $oldEnd i32.ne - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $6 - local.set $10 - local.get $10 + local.get $oldPtr + local.set $oldEntry + local.get $oldEntry i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $8 - local.set $11 - local.get $10 + local.get $newPtr + local.set $var$11 + local.get $oldEntry i32.load - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 call $~lib/set/SetEntry#set:key - local.get $12 + local.get $var$12 call $~lib/util/hash/HASH - local.get $1 + local.get $newBucketsMask i32.and - local.set $13 - local.get $3 - local.get $13 + local.set $var$13 + local.get $newBuckets + local.get $var$13 i32.const 4 i32.mul i32.add - local.set $14 - local.get $11 - local.get $14 + local.set $var$14 + local.get $var$11 + local.get $var$14 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $14 - local.get $8 + local.get $var$14 + local.get $newPtr i32.store - local.get $8 + local.get $newPtr i32.const 8 i32.add - local.set $8 + local.set $newPtr end - local.get $6 + local.get $oldPtr i32.const 8 i32.add - local.set $6 + local.set $oldPtr br $while-continue|0 end end - local.get $0 - local.get $3 + local.get $this + local.get $newBuckets call $~lib/set/Set#set:buckets - local.get $0 - local.get $1 + local.get $this + local.get $newBucketsMask call $~lib/set/Set#set:bucketsMask - local.get $0 - local.get $5 + local.get $this + local.get $newEntries call $~lib/set/Set#set:entries - local.get $0 - local.get $4 + local.get $this + local.get $newEntriesCapacity call $~lib/set/Set#set:entriesCapacity - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 call $~lib/set/Set#set:entriesOffset global.get $~lib/memory/__stack_pointer @@ -7313,31 +7313,31 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/set/Set#add (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 + (func $~lib/set/Set#add (param $this i32) (param $key i32) (result i32) + (local $hashCode i32) + (local $entry i32) + (local $var$4 i32) + local.get $key call $~lib/util/hash/HASH - local.set $2 - local.get $0 - local.get $1 - local.get $2 + local.set $hashCode + local.get $this + local.get $key + local.get $hashCode call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $entry + local.get $entry i32.eqz if - local.get $0 + local.get $this i32.load offset=16 - local.get $0 + local.get $this i32.load offset=12 i32.eq if - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 - local.get $0 + local.get $this i32.load offset=12 i32.const 3 i32.mul @@ -7345,10 +7345,10 @@ i32.div_s i32.lt_s if (result i32) - local.get $0 + local.get $this i32.load offset=4 else - local.get $0 + local.get $this i32.load offset=4 i32.const 1 i32.shl @@ -7357,53 +7357,53 @@ end call $~lib/set/Set#rehash end - local.get $0 + local.get $this i32.load offset=8 - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=16 - local.tee $4 + local.tee $var$4 i32.const 1 i32.add call $~lib/set/Set#set:entriesOffset - local.get $4 + local.get $var$4 i32.const 8 i32.mul i32.add - local.set $3 - local.get $3 - local.get $1 + local.set $entry + local.get $entry + local.get $key call $~lib/set/SetEntry#set:key i32.const 0 drop - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 i32.const 1 i32.add call $~lib/set/Set#set:entriesCount - local.get $0 + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $4 - local.get $3 - local.get $4 + local.set $var$4 + local.get $entry + local.get $var$4 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $4 - local.get $3 + local.get $var$4 + local.get $entry i32.store end - local.get $0 + local.get $this ) - (func $~lib/set/Set#get:size (param $0 i32) (result i32) - local.get $0 + (func $~lib/set/Set#get:size (param $this i32) (result i32) + local.get $this i32.load offset=20 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) @@ -7430,36 +7430,36 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store i32.const 0 drop ) - (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 + (func $~lib/array/Array#set:length (param $this i32) (param $newLength i32) + local.get $this + local.get $newLength i32.const 2 i32.const 0 call $~lib/array/ensureCapacity - local.get $0 - local.get $1 + local.get $this + local.get $newLength call $~lib/array/Array#set:length_ ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i32) + (local $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -7470,69 +7470,69 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add i32.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 - ) - (func $~lib/set/Set#delete (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - local.get $1 - local.get $1 + local.get $value + ) + (func $~lib/set/Set#delete (param $this i32) (param $key i32) (result i32) + (local $entry i32) + (local $halfBucketsMask i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $2 - local.get $2 + local.set $entry + local.get $entry i32.eqz if i32.const 0 return end - local.get $2 - local.get $2 + local.get $entry + local.get $entry i32.load offset=4 i32.const 1 i32.or call $~lib/set/SetEntry#set:taggedNext - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 i32.const 1 i32.sub call $~lib/set/Set#set:entriesCount - local.get $0 + local.get $this i32.load offset=4 i32.const 1 i32.shr_u - local.set $3 - local.get $3 + local.set $halfBucketsMask + local.get $halfBucketsMask i32.const 1 i32.add i32.const 4 - local.tee $4 - local.get $0 + local.tee $var$4 + local.get $this i32.load offset=20 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.gt_u select i32.ge_u if (result i32) - local.get $0 + local.get $this i32.load offset=20 - local.get $0 + local.get $this i32.load offset=12 i32.const 3 i32.mul @@ -7543,48 +7543,48 @@ i32.const 0 end if - local.get $0 - local.get $3 + local.get $this + local.get $halfBucketsMask call $~lib/set/Set#rehash end i32.const 1 ) - (func $~lib/set/Set#clear (param $0 i32) - local.get $0 + (func $~lib/set/Set#clear (param $this i32) + local.get $this i32.const 0 i32.const 4 i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets - local.get $0 + local.get $this i32.const 4 i32.const 1 i32.sub call $~lib/set/Set#set:bucketsMask - local.get $0 + local.get $this i32.const 0 i32.const 4 i32.const 8 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:entries - local.get $0 + local.get $this i32.const 4 call $~lib/set/Set#set:entriesCapacity - local.get $0 + local.get $this i32.const 0 call $~lib/set/Set#set:entriesOffset - local.get $0 + local.get $this i32.const 0 call $~lib/set/Set#set:entriesCount ) (func $std/set/testNumeric - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (local $set i32) + (local $vals i32) + (local $valSet i32) + (local $var$3 i32) + (local $var$4 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -7599,19 +7599,19 @@ global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/set/Set#constructor - local.tee $0 + local.tee $set i32.store i32.const 0 - local.set $1 + local.set $vals loop $for-loop|0 - local.get $1 + local.get $vals i32.const 100 i32.lt_u - local.set $2 - local.get $2 + local.set $valSet + local.get $valSet if - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#has i32.eqz i32.eqz @@ -7623,12 +7623,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#add drop - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#has i32.eqz if @@ -7639,14 +7639,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $vals i32.const 1 i32.add - local.set $1 + local.set $vals br $for-loop|0 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 100 i32.eq @@ -7660,16 +7660,16 @@ unreachable end i32.const 50 - local.set $1 + local.set $vals loop $for-loop|1 - local.get $1 + local.get $vals i32.const 100 i32.lt_u - local.set $2 - local.get $2 + local.set $valSet + local.get $valSet if - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#has i32.eqz if @@ -7680,12 +7680,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#add drop - local.get $0 - local.get $1 + local.get $set + local.get $vals call $~lib/set/Set#has i32.eqz if @@ -7696,14 +7696,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $vals i32.const 1 i32.add - local.set $1 + local.set $vals br $for-loop|1 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 100 i32.eq @@ -7717,28 +7717,28 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $set call $~lib/set/Set#values - local.tee $1 + local.tee $vals i32.store offset=4 global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/set/Set#constructor - local.tee $2 + local.tee $valSet i32.store offset=8 i32.const 0 - local.set $3 + local.set $var$3 loop $for-loop|2 - local.get $3 - local.get $1 + local.get $var$3 + local.get $vals call $~lib/array/Array#get:length i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $0 - local.get $1 - local.get $3 + local.get $set + local.get $vals + local.get $var$3 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -7750,22 +7750,22 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $1 - local.get $3 + local.get $valSet + local.get $vals + local.get $var$3 call $~lib/array/Array#__get call $~lib/set/Set#add drop - local.get $3 + local.get $var$3 i32.const 1 i32.add - local.set $3 + local.set $var$3 br $for-loop|2 end end - local.get $2 + local.get $valSet call $~lib/set/Set#get:size - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.eq i32.eqz @@ -7778,16 +7778,16 @@ unreachable end i32.const 0 - local.set $3 + local.set $var$3 loop $for-loop|3 - local.get $3 + local.get $var$3 i32.const 50 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $0 - local.get $3 + local.get $set + local.get $var$3 call $~lib/set/Set#has i32.eqz if @@ -7798,12 +7798,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $set + local.get $var$3 call $~lib/set/Set#delete drop - local.get $0 - local.get $3 + local.get $set + local.get $var$3 call $~lib/set/Set#has i32.eqz i32.eqz @@ -7815,14 +7815,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $var$3 i32.const 1 i32.add - local.set $3 + local.set $var$3 br $for-loop|3 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 50 i32.eq @@ -7836,16 +7836,16 @@ unreachable end i32.const 0 - local.set $3 + local.set $var$3 loop $for-loop|4 - local.get $3 + local.get $var$3 i32.const 50 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $0 - local.get $3 + local.get $set + local.get $var$3 call $~lib/set/Set#has i32.eqz i32.eqz @@ -7857,12 +7857,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $set + local.get $var$3 call $~lib/set/Set#add drop - local.get $0 - local.get $3 + local.get $set + local.get $var$3 call $~lib/set/Set#has i32.eqz if @@ -7873,12 +7873,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $set + local.get $var$3 call $~lib/set/Set#delete drop - local.get $0 - local.get $3 + local.get $set + local.get $var$3 call $~lib/set/Set#has i32.eqz i32.eqz @@ -7890,14 +7890,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $var$3 i32.const 1 i32.add - local.set $3 + local.set $var$3 br $for-loop|4 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 50 i32.eq @@ -7910,9 +7910,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $set call $~lib/set/Set#clear - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 0 i32.eq @@ -7968,9 +7968,9 @@ local.get $1 i32.store offset=20 ) - (func $~lib/util/hash/HASH (param $0 i64) (result i32) - (local $1 i64) - (local $2 i32) + (func $~lib/util/hash/HASH (param $key i64) (result i32) + (local $var$1 i64) + (local $var$2 i32) i32.const 0 drop i32.const 0 @@ -7985,125 +7985,125 @@ i32.const 8 i32.eq drop - local.get $0 - local.set $1 + local.get $key + local.set $var$1 i32.const 0 i32.const 374761393 i32.add i32.const 8 i32.add - local.set $2 - local.get $2 - local.get $1 + local.set $var$2 + local.get $var$2 + local.get $var$1 i32.wrap_i64 i32.const -1028477379 i32.mul i32.add - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $2 - local.get $2 - local.get $1 + local.set $var$2 + local.get $var$2 + local.get $var$1 i64.const 32 i64.shr_u i32.wrap_i64 i32.const -1028477379 i32.mul i32.add - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $2 - local.get $2 - local.get $2 + local.set $var$2 + local.get $var$2 + local.get $var$2 i32.const 15 i32.shr_u i32.xor - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const -2048144777 i32.mul - local.set $2 - local.get $2 - local.get $2 + local.set $var$2 + local.get $var$2 + local.get $var$2 i32.const 13 i32.shr_u i32.xor - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const -1028477379 i32.mul - local.set $2 - local.get $2 - local.get $2 + local.set $var$2 + local.get $var$2 + local.get $var$2 i32.const 16 i32.shr_u i32.xor - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 return ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/set/Set#find (param $this i32) (param $key i64) (param $hashCode i32) (result i32) + (local $entry i32) + (local $var$4 i32) + (local $taggedNext i32) + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add i32.load - local.set $3 + local.set $entry loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + local.get $entry + local.set $var$4 + local.get $var$4 if - local.get $3 + local.get $entry i32.load offset=8 - local.set $5 - local.get $5 + local.set $taggedNext + local.get $taggedNext i32.const 1 i32.and i32.eqz if (result i32) - local.get $3 + local.get $entry i64.load - local.get $1 + local.get $key i64.eq else i32.const 0 end if - local.get $3 + local.get $entry return end - local.get $5 + local.get $taggedNext i32.const 1 i32.const -1 i32.xor i32.and - local.set $3 + local.set $entry br $while-continue|0 end end i32.const 0 ) - (func $~lib/set/Set#has (param $0 i32) (param $1 i64) (result i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/set/Set#has (param $this i32) (param $key i64) (result i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 @@ -8119,20 +8119,20 @@ local.get $1 i32.store offset=8 ) - (func $~lib/set/Set#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i64) - (local $13 i32) - (local $14 i32) + (func $~lib/set/Set#rehash (param $this i32) (param $newBucketsMask i32) + (local $newBucketsCapacity i32) + (local $newBuckets i32) + (local $newEntriesCapacity i32) + (local $newEntries i32) + (local $oldPtr i32) + (local $oldEnd i32) + (local $newPtr i32) + (local $var$9 i32) + (local $oldEntry i32) + (local $var$11 i32) + (local $var$12 i64) + (local $var$13 i32) + (local $var$14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -8141,111 +8141,111 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $1 + local.get $newBucketsMask i32.const 1 i32.add - local.set $2 + local.set $newBucketsCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 + local.get $newBucketsCapacity i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $newBuckets i32.store - local.get $2 + local.get $newBucketsCapacity i32.const 8 i32.mul i32.const 3 i32.div_s - local.set $4 + local.set $newEntriesCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 + local.get $newEntriesCapacity i32.const 16 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $newEntries i32.store offset=4 - local.get $0 + local.get $this i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 + local.set $oldPtr + local.get $oldPtr + local.get $this i32.load offset=16 i32.const 16 i32.mul i32.add - local.set $7 - local.get $5 - local.set $8 + local.set $oldEnd + local.get $newEntries + local.set $newPtr loop $while-continue|0 - local.get $6 - local.get $7 + local.get $oldPtr + local.get $oldEnd i32.ne - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $6 - local.set $10 - local.get $10 + local.get $oldPtr + local.set $oldEntry + local.get $oldEntry i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $8 - local.set $11 - local.get $10 + local.get $newPtr + local.set $var$11 + local.get $oldEntry i64.load - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 call $~lib/set/SetEntry#set:key - local.get $12 + local.get $var$12 call $~lib/util/hash/HASH - local.get $1 + local.get $newBucketsMask i32.and - local.set $13 - local.get $3 - local.get $13 + local.set $var$13 + local.get $newBuckets + local.get $var$13 i32.const 4 i32.mul i32.add - local.set $14 - local.get $11 - local.get $14 + local.set $var$14 + local.get $var$11 + local.get $var$14 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $14 - local.get $8 + local.get $var$14 + local.get $newPtr i32.store - local.get $8 + local.get $newPtr i32.const 16 i32.add - local.set $8 + local.set $newPtr end - local.get $6 + local.get $oldPtr i32.const 16 i32.add - local.set $6 + local.set $oldPtr br $while-continue|0 end end - local.get $0 - local.get $3 + local.get $this + local.get $newBuckets call $~lib/set/Set#set:buckets - local.get $0 - local.get $1 + local.get $this + local.get $newBucketsMask call $~lib/set/Set#set:bucketsMask - local.get $0 - local.get $5 + local.get $this + local.get $newEntries call $~lib/set/Set#set:entries - local.get $0 - local.get $4 + local.get $this + local.get $newEntriesCapacity call $~lib/set/Set#set:entriesCapacity - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 call $~lib/set/Set#set:entriesOffset global.get $~lib/memory/__stack_pointer @@ -8253,31 +8253,31 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/set/Set#add (param $0 i32) (param $1 i64) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 + (func $~lib/set/Set#add (param $this i32) (param $key i64) (result i32) + (local $hashCode i32) + (local $entry i32) + (local $var$4 i32) + local.get $key call $~lib/util/hash/HASH - local.set $2 - local.get $0 - local.get $1 - local.get $2 + local.set $hashCode + local.get $this + local.get $key + local.get $hashCode call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $entry + local.get $entry i32.eqz if - local.get $0 + local.get $this i32.load offset=16 - local.get $0 + local.get $this i32.load offset=12 i32.eq if - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 - local.get $0 + local.get $this i32.load offset=12 i32.const 3 i32.mul @@ -8285,10 +8285,10 @@ i32.div_s i32.lt_s if (result i32) - local.get $0 + local.get $this i32.load offset=4 else - local.get $0 + local.get $this i32.load offset=4 i32.const 1 i32.shl @@ -8297,53 +8297,53 @@ end call $~lib/set/Set#rehash end - local.get $0 + local.get $this i32.load offset=8 - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=16 - local.tee $4 + local.tee $var$4 i32.const 1 i32.add call $~lib/set/Set#set:entriesOffset - local.get $4 + local.get $var$4 i32.const 16 i32.mul i32.add - local.set $3 - local.get $3 - local.get $1 + local.set $entry + local.get $entry + local.get $key call $~lib/set/SetEntry#set:key i32.const 0 drop - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 i32.const 1 i32.add call $~lib/set/Set#set:entriesCount - local.get $0 + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $4 - local.get $3 - local.get $4 + local.set $var$4 + local.get $entry + local.get $var$4 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $4 - local.get $3 + local.get $var$4 + local.get $entry i32.store end - local.get $0 + local.get $this ) - (func $~lib/set/Set#get:size (param $0 i32) (result i32) - local.get $0 + (func $~lib/set/Set#get:size (param $this i32) (result i32) + local.get $this i32.load offset=20 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) @@ -8370,36 +8370,36 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i64) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value i64) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add - local.get $2 + local.get $value i64.store i32.const 0 drop ) - (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 + (func $~lib/array/Array#set:length (param $this i32) (param $newLength i32) + local.get $this + local.get $newLength i32.const 3 i32.const 0 call $~lib/array/ensureCapacity - local.get $0 - local.get $1 + local.get $this + local.get $newLength call $~lib/array/Array#set:length_ ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i64) - (local $2 i64) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i64) + (local $value i64) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -8410,69 +8410,69 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add i64.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 - ) - (func $~lib/set/Set#delete (param $0 i32) (param $1 i64) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - local.get $1 - local.get $1 + local.get $value + ) + (func $~lib/set/Set#delete (param $this i32) (param $key i64) (result i32) + (local $entry i32) + (local $halfBucketsMask i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $2 - local.get $2 + local.set $entry + local.get $entry i32.eqz if i32.const 0 return end - local.get $2 - local.get $2 + local.get $entry + local.get $entry i32.load offset=8 i32.const 1 i32.or call $~lib/set/SetEntry#set:taggedNext - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 i32.const 1 i32.sub call $~lib/set/Set#set:entriesCount - local.get $0 + local.get $this i32.load offset=4 i32.const 1 i32.shr_u - local.set $3 - local.get $3 + local.set $halfBucketsMask + local.get $halfBucketsMask i32.const 1 i32.add i32.const 4 - local.tee $4 - local.get $0 + local.tee $var$4 + local.get $this i32.load offset=20 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.gt_u select i32.ge_u if (result i32) - local.get $0 + local.get $this i32.load offset=20 - local.get $0 + local.get $this i32.load offset=12 i32.const 3 i32.mul @@ -8483,49 +8483,49 @@ i32.const 0 end if - local.get $0 - local.get $3 + local.get $this + local.get $halfBucketsMask call $~lib/set/Set#rehash end i32.const 1 ) - (func $~lib/set/Set#clear (param $0 i32) - local.get $0 + (func $~lib/set/Set#clear (param $this i32) + local.get $this i32.const 0 i32.const 4 i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets - local.get $0 + local.get $this i32.const 4 i32.const 1 i32.sub call $~lib/set/Set#set:bucketsMask - local.get $0 + local.get $this i32.const 0 i32.const 4 i32.const 16 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:entries - local.get $0 + local.get $this i32.const 4 call $~lib/set/Set#set:entriesCapacity - local.get $0 + local.get $this i32.const 0 call $~lib/set/Set#set:entriesOffset - local.get $0 + local.get $this i32.const 0 call $~lib/set/Set#set:entriesCount ) (func $std/set/testNumeric - (local $0 i32) - (local $1 i64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (local $set i32) + (local $var$1 i64) + (local $vals i32) + (local $valSet i32) + (local $var$4 i32) + (local $var$5 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -8540,19 +8540,19 @@ global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/set/Set#constructor - local.tee $0 + local.tee $set i32.store i64.const 0 - local.set $1 + local.set $var$1 loop $for-loop|0 - local.get $1 + local.get $var$1 i64.const 100 i64.lt_s - local.set $2 - local.get $2 + local.set $vals + local.get $vals if - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz i32.eqz @@ -8564,12 +8564,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#add drop - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz if @@ -8580,14 +8580,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i64.const 1 i64.add - local.set $1 + local.set $var$1 br $for-loop|0 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 100 i32.eq @@ -8601,16 +8601,16 @@ unreachable end i64.const 50 - local.set $1 + local.set $var$1 loop $for-loop|1 - local.get $1 + local.get $var$1 i64.const 100 i64.lt_s - local.set $2 - local.get $2 + local.set $vals + local.get $vals if - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz if @@ -8621,12 +8621,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#add drop - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz if @@ -8637,14 +8637,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i64.const 1 i64.add - local.set $1 + local.set $var$1 br $for-loop|1 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 100 i32.eq @@ -8658,28 +8658,28 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $set call $~lib/set/Set#values - local.tee $2 + local.tee $vals i32.store offset=4 global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/set/Set#constructor - local.tee $3 + local.tee $valSet i32.store offset=8 i32.const 0 - local.set $4 + local.set $var$4 loop $for-loop|2 - local.get $4 - local.get $2 + local.get $var$4 + local.get $vals call $~lib/array/Array#get:length i32.lt_s - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $0 - local.get $2 - local.get $4 + local.get $set + local.get $vals + local.get $var$4 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -8691,22 +8691,22 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $2 - local.get $4 + local.get $valSet + local.get $vals + local.get $var$4 call $~lib/array/Array#__get call $~lib/set/Set#add drop - local.get $4 + local.get $var$4 i32.const 1 i32.add - local.set $4 + local.set $var$4 br $for-loop|2 end end - local.get $3 + local.get $valSet call $~lib/set/Set#get:size - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.eq i32.eqz @@ -8719,16 +8719,16 @@ unreachable end i64.const 0 - local.set $1 + local.set $var$1 loop $for-loop|3 - local.get $1 + local.get $var$1 i64.const 50 i64.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz if @@ -8739,12 +8739,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#delete drop - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz i32.eqz @@ -8756,14 +8756,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i64.const 1 i64.add - local.set $1 + local.set $var$1 br $for-loop|3 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 50 i32.eq @@ -8777,16 +8777,16 @@ unreachable end i64.const 0 - local.set $1 + local.set $var$1 loop $for-loop|4 - local.get $1 + local.get $var$1 i64.const 50 i64.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz i32.eqz @@ -8798,12 +8798,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#add drop - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz if @@ -8814,12 +8814,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#delete drop - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz i32.eqz @@ -8831,14 +8831,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i64.const 1 i64.add - local.set $1 + local.set $var$1 br $for-loop|4 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 50 i32.eq @@ -8851,9 +8851,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $set call $~lib/set/Set#clear - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 0 i32.eq @@ -8909,9 +8909,9 @@ local.get $1 i32.store offset=20 ) - (func $~lib/util/hash/HASH (param $0 i64) (result i32) - (local $1 i64) - (local $2 i32) + (func $~lib/util/hash/HASH (param $key i64) (result i32) + (local $var$1 i64) + (local $var$2 i32) i32.const 0 drop i32.const 0 @@ -8926,125 +8926,125 @@ i32.const 8 i32.eq drop - local.get $0 - local.set $1 + local.get $key + local.set $var$1 i32.const 0 i32.const 374761393 i32.add i32.const 8 i32.add - local.set $2 - local.get $2 - local.get $1 + local.set $var$2 + local.get $var$2 + local.get $var$1 i32.wrap_i64 i32.const -1028477379 i32.mul i32.add - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $2 - local.get $2 - local.get $1 + local.set $var$2 + local.get $var$2 + local.get $var$1 i64.const 32 i64.shr_u i32.wrap_i64 i32.const -1028477379 i32.mul i32.add - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $2 - local.get $2 - local.get $2 + local.set $var$2 + local.get $var$2 + local.get $var$2 i32.const 15 i32.shr_u i32.xor - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const -2048144777 i32.mul - local.set $2 - local.get $2 - local.get $2 + local.set $var$2 + local.get $var$2 + local.get $var$2 i32.const 13 i32.shr_u i32.xor - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const -1028477379 i32.mul - local.set $2 - local.get $2 - local.get $2 + local.set $var$2 + local.get $var$2 + local.get $var$2 i32.const 16 i32.shr_u i32.xor - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 return ) - (func $~lib/set/Set#find (param $0 i32) (param $1 i64) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/set/Set#find (param $this i32) (param $key i64) (param $hashCode i32) (result i32) + (local $entry i32) + (local $var$4 i32) + (local $taggedNext i32) + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add i32.load - local.set $3 + local.set $entry loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + local.get $entry + local.set $var$4 + local.get $var$4 if - local.get $3 + local.get $entry i32.load offset=8 - local.set $5 - local.get $5 + local.set $taggedNext + local.get $taggedNext i32.const 1 i32.and i32.eqz if (result i32) - local.get $3 + local.get $entry i64.load - local.get $1 + local.get $key i64.eq else i32.const 0 end if - local.get $3 + local.get $entry return end - local.get $5 + local.get $taggedNext i32.const 1 i32.const -1 i32.xor i32.and - local.set $3 + local.set $entry br $while-continue|0 end end i32.const 0 ) - (func $~lib/set/Set#has (param $0 i32) (param $1 i64) (result i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/set/Set#has (param $this i32) (param $key i64) (result i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 @@ -9060,20 +9060,20 @@ local.get $1 i32.store offset=8 ) - (func $~lib/set/Set#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i64) - (local $13 i32) - (local $14 i32) + (func $~lib/set/Set#rehash (param $this i32) (param $newBucketsMask i32) + (local $newBucketsCapacity i32) + (local $newBuckets i32) + (local $newEntriesCapacity i32) + (local $newEntries i32) + (local $oldPtr i32) + (local $oldEnd i32) + (local $newPtr i32) + (local $var$9 i32) + (local $oldEntry i32) + (local $var$11 i32) + (local $var$12 i64) + (local $var$13 i32) + (local $var$14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -9082,111 +9082,111 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $1 + local.get $newBucketsMask i32.const 1 i32.add - local.set $2 + local.set $newBucketsCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 + local.get $newBucketsCapacity i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $newBuckets i32.store - local.get $2 + local.get $newBucketsCapacity i32.const 8 i32.mul i32.const 3 i32.div_s - local.set $4 + local.set $newEntriesCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 + local.get $newEntriesCapacity i32.const 16 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $newEntries i32.store offset=4 - local.get $0 + local.get $this i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 + local.set $oldPtr + local.get $oldPtr + local.get $this i32.load offset=16 i32.const 16 i32.mul i32.add - local.set $7 - local.get $5 - local.set $8 + local.set $oldEnd + local.get $newEntries + local.set $newPtr loop $while-continue|0 - local.get $6 - local.get $7 + local.get $oldPtr + local.get $oldEnd i32.ne - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $6 - local.set $10 - local.get $10 + local.get $oldPtr + local.set $oldEntry + local.get $oldEntry i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $8 - local.set $11 - local.get $10 + local.get $newPtr + local.set $var$11 + local.get $oldEntry i64.load - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 call $~lib/set/SetEntry#set:key - local.get $12 + local.get $var$12 call $~lib/util/hash/HASH - local.get $1 + local.get $newBucketsMask i32.and - local.set $13 - local.get $3 - local.get $13 + local.set $var$13 + local.get $newBuckets + local.get $var$13 i32.const 4 i32.mul i32.add - local.set $14 - local.get $11 - local.get $14 + local.set $var$14 + local.get $var$11 + local.get $var$14 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $14 - local.get $8 + local.get $var$14 + local.get $newPtr i32.store - local.get $8 + local.get $newPtr i32.const 16 i32.add - local.set $8 + local.set $newPtr end - local.get $6 + local.get $oldPtr i32.const 16 i32.add - local.set $6 + local.set $oldPtr br $while-continue|0 end end - local.get $0 - local.get $3 + local.get $this + local.get $newBuckets call $~lib/set/Set#set:buckets - local.get $0 - local.get $1 + local.get $this + local.get $newBucketsMask call $~lib/set/Set#set:bucketsMask - local.get $0 - local.get $5 + local.get $this + local.get $newEntries call $~lib/set/Set#set:entries - local.get $0 - local.get $4 + local.get $this + local.get $newEntriesCapacity call $~lib/set/Set#set:entriesCapacity - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 call $~lib/set/Set#set:entriesOffset global.get $~lib/memory/__stack_pointer @@ -9194,31 +9194,31 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/set/Set#add (param $0 i32) (param $1 i64) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 + (func $~lib/set/Set#add (param $this i32) (param $key i64) (result i32) + (local $hashCode i32) + (local $entry i32) + (local $var$4 i32) + local.get $key call $~lib/util/hash/HASH - local.set $2 - local.get $0 - local.get $1 - local.get $2 + local.set $hashCode + local.get $this + local.get $key + local.get $hashCode call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $entry + local.get $entry i32.eqz if - local.get $0 + local.get $this i32.load offset=16 - local.get $0 + local.get $this i32.load offset=12 i32.eq if - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 - local.get $0 + local.get $this i32.load offset=12 i32.const 3 i32.mul @@ -9226,10 +9226,10 @@ i32.div_s i32.lt_s if (result i32) - local.get $0 + local.get $this i32.load offset=4 else - local.get $0 + local.get $this i32.load offset=4 i32.const 1 i32.shl @@ -9238,53 +9238,53 @@ end call $~lib/set/Set#rehash end - local.get $0 + local.get $this i32.load offset=8 - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=16 - local.tee $4 + local.tee $var$4 i32.const 1 i32.add call $~lib/set/Set#set:entriesOffset - local.get $4 + local.get $var$4 i32.const 16 i32.mul i32.add - local.set $3 - local.get $3 - local.get $1 + local.set $entry + local.get $entry + local.get $key call $~lib/set/SetEntry#set:key i32.const 0 drop - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 i32.const 1 i32.add call $~lib/set/Set#set:entriesCount - local.get $0 + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $4 - local.get $3 - local.get $4 + local.set $var$4 + local.get $entry + local.get $var$4 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $4 - local.get $3 + local.get $var$4 + local.get $entry i32.store end - local.get $0 + local.get $this ) - (func $~lib/set/Set#get:size (param $0 i32) (result i32) - local.get $0 + (func $~lib/set/Set#get:size (param $this i32) (result i32) + local.get $this i32.load offset=20 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) @@ -9311,36 +9311,36 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i64) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value i64) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add - local.get $2 + local.get $value i64.store i32.const 0 drop ) - (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 + (func $~lib/array/Array#set:length (param $this i32) (param $newLength i32) + local.get $this + local.get $newLength i32.const 3 i32.const 0 call $~lib/array/ensureCapacity - local.get $0 - local.get $1 + local.get $this + local.get $newLength call $~lib/array/Array#set:length_ ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i64) - (local $2 i64) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i64) + (local $value i64) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -9351,69 +9351,69 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add i64.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 - ) - (func $~lib/set/Set#delete (param $0 i32) (param $1 i64) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - local.get $1 - local.get $1 + local.get $value + ) + (func $~lib/set/Set#delete (param $this i32) (param $key i64) (result i32) + (local $entry i32) + (local $halfBucketsMask i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $2 - local.get $2 + local.set $entry + local.get $entry i32.eqz if i32.const 0 return end - local.get $2 - local.get $2 + local.get $entry + local.get $entry i32.load offset=8 i32.const 1 i32.or call $~lib/set/SetEntry#set:taggedNext - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 i32.const 1 i32.sub call $~lib/set/Set#set:entriesCount - local.get $0 + local.get $this i32.load offset=4 i32.const 1 i32.shr_u - local.set $3 - local.get $3 + local.set $halfBucketsMask + local.get $halfBucketsMask i32.const 1 i32.add i32.const 4 - local.tee $4 - local.get $0 + local.tee $var$4 + local.get $this i32.load offset=20 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.gt_u select i32.ge_u if (result i32) - local.get $0 + local.get $this i32.load offset=20 - local.get $0 + local.get $this i32.load offset=12 i32.const 3 i32.mul @@ -9424,49 +9424,49 @@ i32.const 0 end if - local.get $0 - local.get $3 + local.get $this + local.get $halfBucketsMask call $~lib/set/Set#rehash end i32.const 1 ) - (func $~lib/set/Set#clear (param $0 i32) - local.get $0 + (func $~lib/set/Set#clear (param $this i32) + local.get $this i32.const 0 i32.const 4 i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets - local.get $0 + local.get $this i32.const 4 i32.const 1 i32.sub call $~lib/set/Set#set:bucketsMask - local.get $0 + local.get $this i32.const 0 i32.const 4 i32.const 16 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:entries - local.get $0 + local.get $this i32.const 4 call $~lib/set/Set#set:entriesCapacity - local.get $0 + local.get $this i32.const 0 call $~lib/set/Set#set:entriesOffset - local.get $0 + local.get $this i32.const 0 call $~lib/set/Set#set:entriesCount ) (func $std/set/testNumeric - (local $0 i32) - (local $1 i64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (local $set i32) + (local $var$1 i64) + (local $vals i32) + (local $valSet i32) + (local $var$4 i32) + (local $var$5 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -9481,19 +9481,19 @@ global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/set/Set#constructor - local.tee $0 + local.tee $set i32.store i64.const 0 - local.set $1 + local.set $var$1 loop $for-loop|0 - local.get $1 + local.get $var$1 i64.const 100 i64.lt_u - local.set $2 - local.get $2 + local.set $vals + local.get $vals if - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz i32.eqz @@ -9505,12 +9505,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#add drop - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz if @@ -9521,14 +9521,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i64.const 1 i64.add - local.set $1 + local.set $var$1 br $for-loop|0 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 100 i32.eq @@ -9542,16 +9542,16 @@ unreachable end i64.const 50 - local.set $1 + local.set $var$1 loop $for-loop|1 - local.get $1 + local.get $var$1 i64.const 100 i64.lt_u - local.set $2 - local.get $2 + local.set $vals + local.get $vals if - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz if @@ -9562,12 +9562,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#add drop - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz if @@ -9578,14 +9578,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i64.const 1 i64.add - local.set $1 + local.set $var$1 br $for-loop|1 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 100 i32.eq @@ -9599,28 +9599,28 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $set call $~lib/set/Set#values - local.tee $2 + local.tee $vals i32.store offset=4 global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/set/Set#constructor - local.tee $3 + local.tee $valSet i32.store offset=8 i32.const 0 - local.set $4 + local.set $var$4 loop $for-loop|2 - local.get $4 - local.get $2 + local.get $var$4 + local.get $vals call $~lib/array/Array#get:length i32.lt_s - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $0 - local.get $2 - local.get $4 + local.get $set + local.get $vals + local.get $var$4 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -9632,22 +9632,22 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $2 - local.get $4 + local.get $valSet + local.get $vals + local.get $var$4 call $~lib/array/Array#__get call $~lib/set/Set#add drop - local.get $4 + local.get $var$4 i32.const 1 i32.add - local.set $4 + local.set $var$4 br $for-loop|2 end end - local.get $3 + local.get $valSet call $~lib/set/Set#get:size - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.eq i32.eqz @@ -9660,16 +9660,16 @@ unreachable end i64.const 0 - local.set $1 + local.set $var$1 loop $for-loop|3 - local.get $1 + local.get $var$1 i64.const 50 i64.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz if @@ -9680,12 +9680,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#delete drop - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz i32.eqz @@ -9697,14 +9697,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i64.const 1 i64.add - local.set $1 + local.set $var$1 br $for-loop|3 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 50 i32.eq @@ -9718,16 +9718,16 @@ unreachable end i64.const 0 - local.set $1 + local.set $var$1 loop $for-loop|4 - local.get $1 + local.get $var$1 i64.const 50 i64.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz i32.eqz @@ -9739,12 +9739,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#add drop - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz if @@ -9755,12 +9755,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#delete drop - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz i32.eqz @@ -9772,14 +9772,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 i64.const 1 i64.add - local.set $1 + local.set $var$1 br $for-loop|4 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 50 i32.eq @@ -9792,9 +9792,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $set call $~lib/set/Set#clear - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 0 i32.eq @@ -9850,10 +9850,10 @@ local.get $1 i32.store offset=20 ) - (func $~lib/util/hash/HASH (param $0 f32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + (func $~lib/util/hash/HASH (param $key f32) (result i32) + (local $var$1 i32) + (local $var$2 i32) + (local $var$3 i32) i32.const 0 drop i32.const 0 @@ -9864,112 +9864,112 @@ i32.const 4 i32.eq drop - local.get $0 + local.get $key i32.reinterpret_f32 - local.set $1 + local.set $var$1 i32.const 4 - local.set $2 + local.set $var$2 i32.const 0 i32.const 374761393 i32.add - local.get $2 + local.get $var$2 i32.add - local.set $3 - local.get $3 - local.get $1 + local.set $var$3 + local.get $var$3 + local.get $var$1 i32.const -1028477379 i32.mul - i32.add - local.set $3 - local.get $3 + i32.add + local.set $var$3 + local.get $var$3 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 15 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const -2048144777 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 13 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const -1028477379 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 16 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 return ) - (func $~lib/set/Set#find (param $0 i32) (param $1 f32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/set/Set#find (param $this i32) (param $key f32) (param $hashCode i32) (result i32) + (local $entry i32) + (local $var$4 i32) + (local $taggedNext i32) + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add i32.load - local.set $3 + local.set $entry loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + local.get $entry + local.set $var$4 + local.get $var$4 if - local.get $3 + local.get $entry i32.load offset=4 - local.set $5 - local.get $5 + local.set $taggedNext + local.get $taggedNext i32.const 1 i32.and i32.eqz if (result i32) - local.get $3 + local.get $entry f32.load - local.get $1 + local.get $key f32.eq else i32.const 0 end if - local.get $3 + local.get $entry return end - local.get $5 + local.get $taggedNext i32.const 1 i32.const -1 i32.xor i32.and - local.set $3 + local.set $entry br $while-continue|0 end end i32.const 0 ) - (func $~lib/set/Set#has (param $0 i32) (param $1 f32) (result i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/set/Set#has (param $this i32) (param $key f32) (result i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 @@ -9985,20 +9985,20 @@ local.get $1 i32.store offset=4 ) - (func $~lib/set/Set#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 f32) - (local $13 i32) - (local $14 i32) + (func $~lib/set/Set#rehash (param $this i32) (param $newBucketsMask i32) + (local $newBucketsCapacity i32) + (local $newBuckets i32) + (local $newEntriesCapacity i32) + (local $newEntries i32) + (local $oldPtr i32) + (local $oldEnd i32) + (local $newPtr i32) + (local $var$9 i32) + (local $oldEntry i32) + (local $var$11 i32) + (local $var$12 f32) + (local $var$13 i32) + (local $var$14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -10007,111 +10007,111 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $1 + local.get $newBucketsMask i32.const 1 i32.add - local.set $2 + local.set $newBucketsCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 + local.get $newBucketsCapacity i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $newBuckets i32.store - local.get $2 + local.get $newBucketsCapacity i32.const 8 i32.mul i32.const 3 i32.div_s - local.set $4 + local.set $newEntriesCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 + local.get $newEntriesCapacity i32.const 8 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $newEntries i32.store offset=4 - local.get $0 + local.get $this i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 + local.set $oldPtr + local.get $oldPtr + local.get $this i32.load offset=16 i32.const 8 i32.mul i32.add - local.set $7 - local.get $5 - local.set $8 + local.set $oldEnd + local.get $newEntries + local.set $newPtr loop $while-continue|0 - local.get $6 - local.get $7 + local.get $oldPtr + local.get $oldEnd i32.ne - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $6 - local.set $10 - local.get $10 + local.get $oldPtr + local.set $oldEntry + local.get $oldEntry i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $8 - local.set $11 - local.get $10 + local.get $newPtr + local.set $var$11 + local.get $oldEntry f32.load - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 call $~lib/set/SetEntry#set:key - local.get $12 + local.get $var$12 call $~lib/util/hash/HASH - local.get $1 + local.get $newBucketsMask i32.and - local.set $13 - local.get $3 - local.get $13 + local.set $var$13 + local.get $newBuckets + local.get $var$13 i32.const 4 i32.mul i32.add - local.set $14 - local.get $11 - local.get $14 + local.set $var$14 + local.get $var$11 + local.get $var$14 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $14 - local.get $8 + local.get $var$14 + local.get $newPtr i32.store - local.get $8 + local.get $newPtr i32.const 8 i32.add - local.set $8 + local.set $newPtr end - local.get $6 + local.get $oldPtr i32.const 8 i32.add - local.set $6 + local.set $oldPtr br $while-continue|0 end end - local.get $0 - local.get $3 + local.get $this + local.get $newBuckets call $~lib/set/Set#set:buckets - local.get $0 - local.get $1 + local.get $this + local.get $newBucketsMask call $~lib/set/Set#set:bucketsMask - local.get $0 - local.get $5 + local.get $this + local.get $newEntries call $~lib/set/Set#set:entries - local.get $0 - local.get $4 + local.get $this + local.get $newEntriesCapacity call $~lib/set/Set#set:entriesCapacity - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 call $~lib/set/Set#set:entriesOffset global.get $~lib/memory/__stack_pointer @@ -10119,31 +10119,31 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/set/Set#add (param $0 i32) (param $1 f32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 + (func $~lib/set/Set#add (param $this i32) (param $key f32) (result i32) + (local $hashCode i32) + (local $entry i32) + (local $var$4 i32) + local.get $key call $~lib/util/hash/HASH - local.set $2 - local.get $0 - local.get $1 - local.get $2 + local.set $hashCode + local.get $this + local.get $key + local.get $hashCode call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $entry + local.get $entry i32.eqz if - local.get $0 + local.get $this i32.load offset=16 - local.get $0 + local.get $this i32.load offset=12 i32.eq if - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 - local.get $0 + local.get $this i32.load offset=12 i32.const 3 i32.mul @@ -10151,10 +10151,10 @@ i32.div_s i32.lt_s if (result i32) - local.get $0 + local.get $this i32.load offset=4 else - local.get $0 + local.get $this i32.load offset=4 i32.const 1 i32.shl @@ -10163,53 +10163,53 @@ end call $~lib/set/Set#rehash end - local.get $0 + local.get $this i32.load offset=8 - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=16 - local.tee $4 + local.tee $var$4 i32.const 1 i32.add call $~lib/set/Set#set:entriesOffset - local.get $4 + local.get $var$4 i32.const 8 i32.mul i32.add - local.set $3 - local.get $3 - local.get $1 + local.set $entry + local.get $entry + local.get $key call $~lib/set/SetEntry#set:key i32.const 0 drop - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 i32.const 1 i32.add call $~lib/set/Set#set:entriesCount - local.get $0 + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $4 - local.get $3 - local.get $4 + local.set $var$4 + local.get $entry + local.get $var$4 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $4 - local.get $3 + local.get $var$4 + local.get $entry i32.store end - local.get $0 + local.get $this ) - (func $~lib/set/Set#get:size (param $0 i32) (result i32) - local.get $0 + (func $~lib/set/Set#get:size (param $this i32) (result i32) + local.get $this i32.load offset=20 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) @@ -10236,36 +10236,36 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 f32) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value f32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value f32.store i32.const 0 drop ) - (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 + (func $~lib/array/Array#set:length (param $this i32) (param $newLength i32) + local.get $this + local.get $newLength i32.const 2 i32.const 0 call $~lib/array/ensureCapacity - local.get $0 - local.get $1 + local.get $this + local.get $newLength call $~lib/array/Array#set:length_ ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result f32) - (local $2 f32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result f32) + (local $value f32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -10276,69 +10276,69 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add f32.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 - ) - (func $~lib/set/Set#delete (param $0 i32) (param $1 f32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - local.get $1 - local.get $1 + local.get $value + ) + (func $~lib/set/Set#delete (param $this i32) (param $key f32) (result i32) + (local $entry i32) + (local $halfBucketsMask i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $2 - local.get $2 + local.set $entry + local.get $entry i32.eqz if i32.const 0 return end - local.get $2 - local.get $2 + local.get $entry + local.get $entry i32.load offset=4 i32.const 1 i32.or call $~lib/set/SetEntry#set:taggedNext - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 i32.const 1 i32.sub call $~lib/set/Set#set:entriesCount - local.get $0 + local.get $this i32.load offset=4 i32.const 1 i32.shr_u - local.set $3 - local.get $3 + local.set $halfBucketsMask + local.get $halfBucketsMask i32.const 1 i32.add i32.const 4 - local.tee $4 - local.get $0 + local.tee $var$4 + local.get $this i32.load offset=20 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.gt_u select i32.ge_u if (result i32) - local.get $0 + local.get $this i32.load offset=20 - local.get $0 + local.get $this i32.load offset=12 i32.const 3 i32.mul @@ -10349,49 +10349,49 @@ i32.const 0 end if - local.get $0 - local.get $3 + local.get $this + local.get $halfBucketsMask call $~lib/set/Set#rehash end i32.const 1 ) - (func $~lib/set/Set#clear (param $0 i32) - local.get $0 + (func $~lib/set/Set#clear (param $this i32) + local.get $this i32.const 0 i32.const 4 i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets - local.get $0 + local.get $this i32.const 4 i32.const 1 i32.sub call $~lib/set/Set#set:bucketsMask - local.get $0 + local.get $this i32.const 0 i32.const 4 i32.const 8 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:entries - local.get $0 + local.get $this i32.const 4 call $~lib/set/Set#set:entriesCapacity - local.get $0 + local.get $this i32.const 0 call $~lib/set/Set#set:entriesOffset - local.get $0 + local.get $this i32.const 0 call $~lib/set/Set#set:entriesCount ) (func $std/set/testNumeric - (local $0 i32) - (local $1 f32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (local $set i32) + (local $var$1 f32) + (local $vals i32) + (local $valSet i32) + (local $var$4 i32) + (local $var$5 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -10406,19 +10406,19 @@ global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/set/Set#constructor - local.tee $0 + local.tee $set i32.store f32.const 0 - local.set $1 + local.set $var$1 loop $for-loop|0 - local.get $1 + local.get $var$1 f32.const 100 f32.lt - local.set $2 - local.get $2 + local.set $vals + local.get $vals if - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz i32.eqz @@ -10430,12 +10430,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#add drop - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz if @@ -10446,14 +10446,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 f32.const 1 f32.add - local.set $1 + local.set $var$1 br $for-loop|0 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 100 i32.eq @@ -10467,16 +10467,16 @@ unreachable end f32.const 50 - local.set $1 + local.set $var$1 loop $for-loop|1 - local.get $1 + local.get $var$1 f32.const 100 f32.lt - local.set $2 - local.get $2 + local.set $vals + local.get $vals if - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz if @@ -10487,12 +10487,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#add drop - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz if @@ -10503,14 +10503,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 f32.const 1 f32.add - local.set $1 + local.set $var$1 br $for-loop|1 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 100 i32.eq @@ -10524,28 +10524,28 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $set call $~lib/set/Set#values - local.tee $2 + local.tee $vals i32.store offset=4 global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/set/Set#constructor - local.tee $3 + local.tee $valSet i32.store offset=8 i32.const 0 - local.set $4 + local.set $var$4 loop $for-loop|2 - local.get $4 - local.get $2 + local.get $var$4 + local.get $vals call $~lib/array/Array#get:length i32.lt_s - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $0 - local.get $2 - local.get $4 + local.get $set + local.get $vals + local.get $var$4 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -10557,22 +10557,22 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $2 - local.get $4 + local.get $valSet + local.get $vals + local.get $var$4 call $~lib/array/Array#__get call $~lib/set/Set#add drop - local.get $4 + local.get $var$4 i32.const 1 i32.add - local.set $4 + local.set $var$4 br $for-loop|2 end end - local.get $3 + local.get $valSet call $~lib/set/Set#get:size - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.eq i32.eqz @@ -10585,16 +10585,16 @@ unreachable end f32.const 0 - local.set $1 + local.set $var$1 loop $for-loop|3 - local.get $1 + local.get $var$1 f32.const 50 f32.lt - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz if @@ -10605,12 +10605,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#delete drop - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz i32.eqz @@ -10622,14 +10622,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 f32.const 1 f32.add - local.set $1 + local.set $var$1 br $for-loop|3 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 50 i32.eq @@ -10643,16 +10643,16 @@ unreachable end f32.const 0 - local.set $1 + local.set $var$1 loop $for-loop|4 - local.get $1 + local.get $var$1 f32.const 50 f32.lt - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz i32.eqz @@ -10664,12 +10664,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#add drop - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz if @@ -10680,12 +10680,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#delete drop - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz i32.eqz @@ -10697,14 +10697,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 f32.const 1 f32.add - local.set $1 + local.set $var$1 br $for-loop|4 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 50 i32.eq @@ -10717,9 +10717,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $set call $~lib/set/Set#clear - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 0 i32.eq @@ -10775,9 +10775,9 @@ local.get $1 i32.store offset=20 ) - (func $~lib/util/hash/HASH (param $0 f64) (result i32) - (local $1 i64) - (local $2 i32) + (func $~lib/util/hash/HASH (param $key f64) (result i32) + (local $var$1 i64) + (local $var$2 i32) i32.const 0 drop i32.const 0 @@ -10792,126 +10792,126 @@ i32.const 8 i32.eq drop - local.get $0 + local.get $key i64.reinterpret_f64 - local.set $1 + local.set $var$1 i32.const 0 i32.const 374761393 i32.add i32.const 8 i32.add - local.set $2 - local.get $2 - local.get $1 + local.set $var$2 + local.get $var$2 + local.get $var$1 i32.wrap_i64 i32.const -1028477379 i32.mul i32.add - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $2 - local.get $2 - local.get $1 + local.set $var$2 + local.get $var$2 + local.get $var$1 i64.const 32 i64.shr_u i32.wrap_i64 i32.const -1028477379 i32.mul i32.add - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $2 - local.get $2 - local.get $2 + local.set $var$2 + local.get $var$2 + local.get $var$2 i32.const 15 i32.shr_u i32.xor - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const -2048144777 i32.mul - local.set $2 - local.get $2 - local.get $2 + local.set $var$2 + local.get $var$2 + local.get $var$2 i32.const 13 i32.shr_u i32.xor - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const -1028477379 i32.mul - local.set $2 - local.get $2 - local.get $2 + local.set $var$2 + local.get $var$2 + local.get $var$2 i32.const 16 i32.shr_u i32.xor - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 return ) - (func $~lib/set/Set#find (param $0 i32) (param $1 f64) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/set/Set#find (param $this i32) (param $key f64) (param $hashCode i32) (result i32) + (local $entry i32) + (local $var$4 i32) + (local $taggedNext i32) + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add i32.load - local.set $3 + local.set $entry loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + local.get $entry + local.set $var$4 + local.get $var$4 if - local.get $3 + local.get $entry i32.load offset=8 - local.set $5 - local.get $5 + local.set $taggedNext + local.get $taggedNext i32.const 1 i32.and i32.eqz if (result i32) - local.get $3 + local.get $entry f64.load - local.get $1 + local.get $key f64.eq else i32.const 0 end if - local.get $3 + local.get $entry return end - local.get $5 + local.get $taggedNext i32.const 1 i32.const -1 i32.xor i32.and - local.set $3 + local.set $entry br $while-continue|0 end end i32.const 0 ) - (func $~lib/set/Set#has (param $0 i32) (param $1 f64) (result i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/set/Set#has (param $this i32) (param $key f64) (result i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/set/Set#find i32.const 0 @@ -10925,22 +10925,22 @@ (func $~lib/set/SetEntry#set:taggedNext (param $0 i32) (param $1 i32) local.get $0 local.get $1 - i32.store offset=8 - ) - (func $~lib/set/Set#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 f64) - (local $13 i32) - (local $14 i32) + i32.store offset=8 + ) + (func $~lib/set/Set#rehash (param $this i32) (param $newBucketsMask i32) + (local $newBucketsCapacity i32) + (local $newBuckets i32) + (local $newEntriesCapacity i32) + (local $newEntries i32) + (local $oldPtr i32) + (local $oldEnd i32) + (local $newPtr i32) + (local $var$9 i32) + (local $oldEntry i32) + (local $var$11 i32) + (local $var$12 f64) + (local $var$13 i32) + (local $var$14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -10949,111 +10949,111 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $1 + local.get $newBucketsMask i32.const 1 i32.add - local.set $2 + local.set $newBucketsCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 + local.get $newBucketsCapacity i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $newBuckets i32.store - local.get $2 + local.get $newBucketsCapacity i32.const 8 i32.mul i32.const 3 i32.div_s - local.set $4 + local.set $newEntriesCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 + local.get $newEntriesCapacity i32.const 16 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $newEntries i32.store offset=4 - local.get $0 + local.get $this i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 + local.set $oldPtr + local.get $oldPtr + local.get $this i32.load offset=16 i32.const 16 i32.mul i32.add - local.set $7 - local.get $5 - local.set $8 + local.set $oldEnd + local.get $newEntries + local.set $newPtr loop $while-continue|0 - local.get $6 - local.get $7 + local.get $oldPtr + local.get $oldEnd i32.ne - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $6 - local.set $10 - local.get $10 + local.get $oldPtr + local.set $oldEntry + local.get $oldEntry i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $8 - local.set $11 - local.get $10 + local.get $newPtr + local.set $var$11 + local.get $oldEntry f64.load - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 call $~lib/set/SetEntry#set:key - local.get $12 + local.get $var$12 call $~lib/util/hash/HASH - local.get $1 + local.get $newBucketsMask i32.and - local.set $13 - local.get $3 - local.get $13 + local.set $var$13 + local.get $newBuckets + local.get $var$13 i32.const 4 i32.mul i32.add - local.set $14 - local.get $11 - local.get $14 + local.set $var$14 + local.get $var$11 + local.get $var$14 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $14 - local.get $8 + local.get $var$14 + local.get $newPtr i32.store - local.get $8 + local.get $newPtr i32.const 16 i32.add - local.set $8 + local.set $newPtr end - local.get $6 + local.get $oldPtr i32.const 16 i32.add - local.set $6 + local.set $oldPtr br $while-continue|0 end end - local.get $0 - local.get $3 + local.get $this + local.get $newBuckets call $~lib/set/Set#set:buckets - local.get $0 - local.get $1 + local.get $this + local.get $newBucketsMask call $~lib/set/Set#set:bucketsMask - local.get $0 - local.get $5 + local.get $this + local.get $newEntries call $~lib/set/Set#set:entries - local.get $0 - local.get $4 + local.get $this + local.get $newEntriesCapacity call $~lib/set/Set#set:entriesCapacity - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 call $~lib/set/Set#set:entriesOffset global.get $~lib/memory/__stack_pointer @@ -11061,31 +11061,31 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/set/Set#add (param $0 i32) (param $1 f64) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 + (func $~lib/set/Set#add (param $this i32) (param $key f64) (result i32) + (local $hashCode i32) + (local $entry i32) + (local $var$4 i32) + local.get $key call $~lib/util/hash/HASH - local.set $2 - local.get $0 - local.get $1 - local.get $2 + local.set $hashCode + local.get $this + local.get $key + local.get $hashCode call $~lib/set/Set#find - local.set $3 - local.get $3 + local.set $entry + local.get $entry i32.eqz if - local.get $0 + local.get $this i32.load offset=16 - local.get $0 + local.get $this i32.load offset=12 i32.eq if - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 - local.get $0 + local.get $this i32.load offset=12 i32.const 3 i32.mul @@ -11093,10 +11093,10 @@ i32.div_s i32.lt_s if (result i32) - local.get $0 + local.get $this i32.load offset=4 else - local.get $0 + local.get $this i32.load offset=4 i32.const 1 i32.shl @@ -11105,53 +11105,53 @@ end call $~lib/set/Set#rehash end - local.get $0 + local.get $this i32.load offset=8 - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=16 - local.tee $4 + local.tee $var$4 i32.const 1 i32.add call $~lib/set/Set#set:entriesOffset - local.get $4 + local.get $var$4 i32.const 16 i32.mul i32.add - local.set $3 - local.get $3 - local.get $1 + local.set $entry + local.get $entry + local.get $key call $~lib/set/SetEntry#set:key i32.const 0 drop - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 i32.const 1 i32.add call $~lib/set/Set#set:entriesCount - local.get $0 + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $4 - local.get $3 - local.get $4 + local.set $var$4 + local.get $entry + local.get $var$4 i32.load call $~lib/set/SetEntry#set:taggedNext - local.get $4 - local.get $3 + local.get $var$4 + local.get $entry i32.store end - local.get $0 + local.get $this ) - (func $~lib/set/Set#get:size (param $0 i32) (result i32) - local.get $0 + (func $~lib/set/Set#get:size (param $this i32) (result i32) + local.get $this i32.load offset=20 ) (func $~lib/array/Array#set:buffer (param $0 i32) (param $1 i32) @@ -11178,36 +11178,36 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 f64) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value f64) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add - local.get $2 + local.get $value f64.store i32.const 0 drop ) - (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 + (func $~lib/array/Array#set:length (param $this i32) (param $newLength i32) + local.get $this + local.get $newLength i32.const 3 i32.const 0 call $~lib/array/ensureCapacity - local.get $0 - local.get $1 + local.get $this + local.get $newLength call $~lib/array/Array#set:length_ ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result f64) - (local $2 f64) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result f64) + (local $value f64) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -11218,69 +11218,69 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add f64.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 - ) - (func $~lib/set/Set#delete (param $0 i32) (param $1 f64) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - local.get $1 - local.get $1 + local.get $value + ) + (func $~lib/set/Set#delete (param $this i32) (param $key f64) (result i32) + (local $entry i32) + (local $halfBucketsMask i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/set/Set#find - local.set $2 - local.get $2 + local.set $entry + local.get $entry i32.eqz if i32.const 0 return end - local.get $2 - local.get $2 + local.get $entry + local.get $entry i32.load offset=8 i32.const 1 i32.or call $~lib/set/SetEntry#set:taggedNext - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 i32.const 1 i32.sub call $~lib/set/Set#set:entriesCount - local.get $0 + local.get $this i32.load offset=4 i32.const 1 i32.shr_u - local.set $3 - local.get $3 + local.set $halfBucketsMask + local.get $halfBucketsMask i32.const 1 i32.add i32.const 4 - local.tee $4 - local.get $0 + local.tee $var$4 + local.get $this i32.load offset=20 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.gt_u select i32.ge_u if (result i32) - local.get $0 + local.get $this i32.load offset=20 - local.get $0 + local.get $this i32.load offset=12 i32.const 3 i32.mul @@ -11291,49 +11291,49 @@ i32.const 0 end if - local.get $0 - local.get $3 + local.get $this + local.get $halfBucketsMask call $~lib/set/Set#rehash end i32.const 1 ) - (func $~lib/set/Set#clear (param $0 i32) - local.get $0 + (func $~lib/set/Set#clear (param $this i32) + local.get $this i32.const 0 i32.const 4 i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:buckets - local.get $0 + local.get $this i32.const 4 i32.const 1 i32.sub call $~lib/set/Set#set:bucketsMask - local.get $0 + local.get $this i32.const 0 i32.const 4 i32.const 16 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor call $~lib/set/Set#set:entries - local.get $0 + local.get $this i32.const 4 call $~lib/set/Set#set:entriesCapacity - local.get $0 + local.get $this i32.const 0 call $~lib/set/Set#set:entriesOffset - local.get $0 + local.get $this i32.const 0 call $~lib/set/Set#set:entriesCount ) (func $std/set/testNumeric - (local $0 i32) - (local $1 f64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (local $set i32) + (local $var$1 f64) + (local $vals i32) + (local $valSet i32) + (local $var$4 i32) + (local $var$5 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -11348,19 +11348,19 @@ global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/set/Set#constructor - local.tee $0 + local.tee $set i32.store f64.const 0 - local.set $1 + local.set $var$1 loop $for-loop|0 - local.get $1 + local.get $var$1 f64.const 100 f64.lt - local.set $2 - local.get $2 + local.set $vals + local.get $vals if - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz i32.eqz @@ -11372,12 +11372,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#add drop - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz if @@ -11388,14 +11388,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 f64.const 1 f64.add - local.set $1 + local.set $var$1 br $for-loop|0 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 100 i32.eq @@ -11409,16 +11409,16 @@ unreachable end f64.const 50 - local.set $1 + local.set $var$1 loop $for-loop|1 - local.get $1 + local.get $var$1 f64.const 100 f64.lt - local.set $2 - local.get $2 + local.set $vals + local.get $vals if - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz if @@ -11429,12 +11429,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#add drop - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz if @@ -11445,14 +11445,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 f64.const 1 f64.add - local.set $1 + local.set $var$1 br $for-loop|1 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 100 i32.eq @@ -11466,28 +11466,28 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $0 + local.get $set call $~lib/set/Set#values - local.tee $2 + local.tee $vals i32.store offset=4 global.get $~lib/memory/__stack_pointer i32.const 0 call $~lib/set/Set#constructor - local.tee $3 + local.tee $valSet i32.store offset=8 i32.const 0 - local.set $4 + local.set $var$4 loop $for-loop|2 - local.get $4 - local.get $2 + local.get $var$4 + local.get $vals call $~lib/array/Array#get:length i32.lt_s - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $0 - local.get $2 - local.get $4 + local.get $set + local.get $vals + local.get $var$4 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -11499,22 +11499,22 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $2 - local.get $4 + local.get $valSet + local.get $vals + local.get $var$4 call $~lib/array/Array#__get call $~lib/set/Set#add drop - local.get $4 + local.get $var$4 i32.const 1 i32.add - local.set $4 + local.set $var$4 br $for-loop|2 end end - local.get $3 + local.get $valSet call $~lib/set/Set#get:size - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.eq i32.eqz @@ -11527,16 +11527,16 @@ unreachable end f64.const 0 - local.set $1 + local.set $var$1 loop $for-loop|3 - local.get $1 + local.get $var$1 f64.const 50 f64.lt - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz if @@ -11547,12 +11547,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#delete drop - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz i32.eqz @@ -11564,14 +11564,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 f64.const 1 f64.add - local.set $1 + local.set $var$1 br $for-loop|3 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 50 i32.eq @@ -11585,16 +11585,16 @@ unreachable end f64.const 0 - local.set $1 + local.set $var$1 loop $for-loop|4 - local.get $1 + local.get $var$1 f64.const 50 f64.lt - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz i32.eqz @@ -11606,12 +11606,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#add drop - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz if @@ -11622,12 +11622,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#delete drop - local.get $0 - local.get $1 + local.get $set + local.get $var$1 call $~lib/set/Set#has i32.eqz i32.eqz @@ -11639,14 +11639,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $var$1 f64.const 1 f64.add - local.set $1 + local.set $var$1 br $for-loop|4 end end - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 50 i32.eq @@ -11659,9 +11659,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $set call $~lib/set/Set#clear - local.get $0 + local.get $set call $~lib/set/Set#get:size i32.const 0 i32.eq @@ -11680,7 +11680,7 @@ global.set $~lib/memory/__stack_pointer ) (func $~lib/rt/itcms/__collect - (local $0 i32) + (local $var$0 i32) i32.const 0 drop global.get $~lib/rt/itcms/state @@ -11691,8 +11691,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -11706,8 +11706,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -11783,19 +11783,19 @@ call $~lib/rt/itcms/__visit end ) - (func $~lib/set/Set#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/set/Set#__visit (param $this i32) (param $cookie i32) + (local $entries i32) + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $entries i32.const 0 drop - local.get $2 - local.get $1 + local.get $entries + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/set/Set~visit (param $0 i32) (param $1 i32) @@ -11803,12 +11803,12 @@ local.get $1 call $~lib/set/Set#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -11816,19 +11816,19 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/set/Set#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/set/Set#__visit (param $this i32) (param $cookie i32) + (local $entries i32) + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $entries i32.const 0 drop - local.get $2 - local.get $1 + local.get $entries + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/set/Set~visit (param $0 i32) (param $1 i32) @@ -11836,12 +11836,12 @@ local.get $1 call $~lib/set/Set#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -11849,19 +11849,19 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/set/Set#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/set/Set#__visit (param $this i32) (param $cookie i32) + (local $entries i32) + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $entries i32.const 0 drop - local.get $2 - local.get $1 + local.get $entries + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/set/Set~visit (param $0 i32) (param $1 i32) @@ -11869,12 +11869,12 @@ local.get $1 call $~lib/set/Set#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -11882,19 +11882,19 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/set/Set#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/set/Set#__visit (param $this i32) (param $cookie i32) + (local $entries i32) + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $entries i32.const 0 drop - local.get $2 - local.get $1 + local.get $entries + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/set/Set~visit (param $0 i32) (param $1 i32) @@ -11902,12 +11902,12 @@ local.get $1 call $~lib/set/Set#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -11915,19 +11915,19 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/set/Set#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/set/Set#__visit (param $this i32) (param $cookie i32) + (local $entries i32) + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $entries i32.const 0 drop - local.get $2 - local.get $1 + local.get $entries + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/set/Set~visit (param $0 i32) (param $1 i32) @@ -11935,12 +11935,12 @@ local.get $1 call $~lib/set/Set#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -11948,19 +11948,19 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/set/Set#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/set/Set#__visit (param $this i32) (param $cookie i32) + (local $entries i32) + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $entries i32.const 0 drop - local.get $2 - local.get $1 + local.get $entries + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/set/Set~visit (param $0 i32) (param $1 i32) @@ -11968,12 +11968,12 @@ local.get $1 call $~lib/set/Set#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -11981,19 +11981,19 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/set/Set#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/set/Set#__visit (param $this i32) (param $cookie i32) + (local $entries i32) + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $entries i32.const 0 drop - local.get $2 - local.get $1 + local.get $entries + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/set/Set~visit (param $0 i32) (param $1 i32) @@ -12001,12 +12001,12 @@ local.get $1 call $~lib/set/Set#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -12014,19 +12014,19 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/set/Set#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/set/Set#__visit (param $this i32) (param $cookie i32) + (local $entries i32) + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $entries i32.const 0 drop - local.get $2 - local.get $1 + local.get $entries + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/set/Set~visit (param $0 i32) (param $1 i32) @@ -12034,12 +12034,12 @@ local.get $1 call $~lib/set/Set#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -12047,19 +12047,19 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/set/Set#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/set/Set#__visit (param $this i32) (param $cookie i32) + (local $entries i32) + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $entries i32.const 0 drop - local.get $2 - local.get $1 + local.get $entries + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/set/Set~visit (param $0 i32) (param $1 i32) @@ -12067,12 +12067,12 @@ local.get $1 call $~lib/set/Set#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -12080,19 +12080,19 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/set/Set#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/set/Set#__visit (param $this i32) (param $cookie i32) + (local $entries i32) + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $entries i32.const 0 drop - local.get $2 - local.get $1 + local.get $entries + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/set/Set~visit (param $0 i32) (param $1 i32) @@ -12100,12 +12100,12 @@ local.get $1 call $~lib/set/Set#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) diff --git a/tests/compiler/std/static-array.debug.wat b/tests/compiler/std/static-array.debug.wat index a4ff7bb79e..7dcd9eb5a0 100644 --- a/tests/compiler/std/static-array.debug.wat +++ b/tests/compiler/std/static-array.debug.wat @@ -63,14 +63,14 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (start $~start) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i32) + (local $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -81,17 +81,17 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add i32.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) (func $~lib/rt/itcms/Object#set:rtSize (param $0 i32) (param $1 i32) local.get $0 @@ -108,50 +108,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -164,58 +164,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -232,12 +232,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -247,19 +247,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -270,27 +270,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -298,35 +298,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -336,15 +336,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -354,25 +354,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -380,33 +380,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -434,23 +434,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -462,15 +462,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -482,33 +482,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -516,21 +516,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -545,36 +545,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -582,67 +582,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -652,22 +652,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -677,12 +677,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -694,75 +694,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -774,38 +774,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -819,12 +819,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -835,38 +835,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -874,21 +874,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -903,101 +903,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -1008,7 +1008,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1019,26 +1019,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1051,27 +1051,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1085,11 +1085,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1100,66 +1100,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1169,10 +1169,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1183,13 +1183,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1200,109 +1200,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1310,7 +1310,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1327,23 +1327,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1355,54 +1355,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1423,30 +1423,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1456,9 +1456,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1468,8 +1468,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1477,43 +1477,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1525,17 +1525,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1549,7 +1549,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1567,7 +1567,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1577,12 +1577,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1604,7 +1604,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1624,14 +1624,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1644,8 +1644,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1656,37 +1656,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1694,16 +1694,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1711,21 +1711,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1740,12 +1740,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1753,49 +1753,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1805,90 +1805,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1897,22 +1897,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1921,27 +1921,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1956,69 +1956,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2033,29 +2033,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2068,13 +2068,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2085,25 +2085,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2113,10 +2113,10 @@ local.get $1 i32.store offset=12 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2134,48 +2134,48 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 - ) - (func $~lib/rt/itcms/__renew (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + local.get $ptr + ) + (func $~lib/rt/itcms/__renew (param $oldPtr i32) (param $size i32) (result i32) + (local $oldObj i32) + (local $newPtr i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $oldPtr i32.const 20 i32.sub - local.set $2 - local.get $1 - local.get $2 + local.set $oldObj + local.get $size + local.get $oldObj i32.load i32.const 3 i32.const -1 @@ -2185,43 +2185,43 @@ i32.sub i32.le_u if - local.get $2 - local.get $1 + local.get $oldObj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $0 + local.get $oldPtr return end - local.get $1 - local.get $2 + local.get $size + local.get $oldObj i32.load offset=12 call $~lib/rt/itcms/__new - local.set $3 - local.get $3 - local.get $0 - local.get $1 - local.tee $4 - local.get $2 + local.set $newPtr + local.get $newPtr + local.get $oldPtr + local.get $size + local.tee $var$4 + local.get $oldObj i32.load offset=16 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.lt_u select memory.copy - local.get $3 + local.get $newPtr ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32) + (local $child i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $childPtr i32.eqz if return end i32.const 1 drop - local.get $0 + local.get $parentPtr i32.eqz if i32.const 0 @@ -2231,37 +2231,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $childPtr i32.const 20 i32.sub - local.set $3 - local.get $3 + local.set $child + local.get $child call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $0 + local.get $parentPtr i32.const 20 i32.sub - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 call $~lib/rt/itcms/Object#get:color - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $2 + local.get $expectMultiple if - local.get $4 + local.get $var$4 call $~lib/rt/itcms/Object#makeGray else - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end else - local.get $5 + local.get $var$5 i32.const 3 i32.eq if (result i32) @@ -2272,30 +2272,30 @@ i32.const 0 end if - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end end end ) - (func $~lib/array/ensureCapacity (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $0 + (func $~lib/array/ensureCapacity (param $array i32) (param $newSize i32) (param $alignLog2 i32) (param $canGrow i32) + (local $oldCapacity i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $array i32.load offset=8 - local.set $4 - local.get $1 - local.get $4 - local.get $2 + local.set $oldCapacity + local.get $newSize + local.get $oldCapacity + local.get $alignLog2 i32.shr_u i32.gt_u if - local.get $1 + local.get $newSize i32.const 1073741820 - local.get $2 + local.get $alignLog2 i32.shr_u i32.gt_u if @@ -2306,66 +2306,66 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.load - local.set $5 - local.get $1 - local.tee $6 + local.set $var$5 + local.get $newSize + local.tee $var$6 i32.const 8 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.gt_u select - local.get $2 + local.get $alignLog2 i32.shl - local.set $6 - local.get $3 + local.set $var$6 + local.get $canGrow if - local.get $4 + local.get $oldCapacity i32.const 1 i32.shl - local.tee $7 + local.tee $var$7 i32.const 1073741820 - local.tee $8 - local.get $7 - local.get $8 + local.tee $var$8 + local.get $var$7 + local.get $var$8 i32.lt_u select - local.tee $8 - local.get $6 - local.tee $7 - local.get $8 - local.get $7 + local.tee $var$8 + local.get $var$6 + local.tee $var$7 + local.get $var$8 + local.get $var$7 i32.gt_u select - local.set $6 + local.set $var$6 end - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 call $~lib/rt/itcms/__renew - local.set $8 + local.set $var$8 i32.const 2 global.get $~lib/shared/runtime/Runtime.Incremental i32.ne drop - local.get $8 - local.get $5 + local.get $var$8 + local.get $var$5 i32.ne if - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.store - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.store offset=4 - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.const 0 call $~lib/rt/itcms/__link end - local.get $0 - local.get $6 + local.get $array + local.get $var$6 i32.store offset=8 end ) @@ -2374,25 +2374,25 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store i32.const 0 drop ) - (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__set (param $this i32) (param $index i32) (param $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if - local.get $1 + local.get $index i32.const 0 i32.lt_s if @@ -2403,32 +2403,32 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $this + local.get $index i32.const 1 i32.add i32.const 2 i32.const 1 call $~lib/array/ensureCapacity - local.get $0 - local.get $1 + local.get $this + local.get $index i32.const 1 i32.add call $~lib/array/Array#set:length_ end - local.get $0 - local.get $1 - local.get $2 + local.get $this + local.get $index + local.get $value call $~lib/array/Array#__uset ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i64) - (local $2 i64) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i64) + (local $value i64) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -2439,42 +2439,42 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add i64.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) (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#__uset (param $0 i32) (param $1 i32) (param $2 i64) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value i64) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add - local.get $2 + local.get $value i64.store i32.const 0 drop ) - (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 i64) - local.get $1 - local.get $0 + (func $~lib/array/Array#__set (param $this i32) (param $index i32) (param $value i64) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if - local.get $1 + local.get $index i32.const 0 i32.lt_s if @@ -2485,32 +2485,32 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $this + local.get $index i32.const 1 i32.add i32.const 3 i32.const 1 call $~lib/array/ensureCapacity - local.get $0 - local.get $1 + local.get $this + local.get $index i32.const 1 i32.add call $~lib/array/Array#set:length_ end - local.get $0 - local.get $1 - local.get $2 + local.get $this + local.get $index + local.get $value call $~lib/array/Array#__uset ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result f32) - (local $2 f32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result f32) + (local $value f32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -2521,42 +2521,42 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add f32.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) (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#__uset (param $0 i32) (param $1 i32) (param $2 f32) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value f32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value f32.store i32.const 0 drop ) - (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 f32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__set (param $this i32) (param $index i32) (param $value f32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if - local.get $1 + local.get $index i32.const 0 i32.lt_s if @@ -2567,32 +2567,32 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $this + local.get $index i32.const 1 i32.add i32.const 2 i32.const 1 call $~lib/array/ensureCapacity - local.get $0 - local.get $1 + local.get $this + local.get $index i32.const 1 i32.add call $~lib/array/Array#set:length_ end - local.get $0 - local.get $1 - local.get $2 + local.get $this + local.get $index + local.get $value call $~lib/array/Array#__uset ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result f64) - (local $2 f64) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result f64) + (local $value f64) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -2603,42 +2603,42 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add f64.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) (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#__uset (param $0 i32) (param $1 i32) (param $2 f64) - local.get $0 + (func $~lib/array/Array#__uset (param $this i32) (param $index i32) (param $value f64) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add - local.get $2 + local.get $value f64.store i32.const 0 drop ) - (func $~lib/array/Array#__set (param $0 i32) (param $1 i32) (param $2 f64) - local.get $1 - local.get $0 + (func $~lib/array/Array#__set (param $this i32) (param $index i32) (param $value f64) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if - local.get $1 + local.get $index i32.const 0 i32.lt_s if @@ -2649,22 +2649,22 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $this + local.get $index i32.const 1 i32.add i32.const 3 i32.const 1 call $~lib/array/ensureCapacity - local.get $0 - local.get $1 + local.get $this + local.get $index i32.const 1 i32.add call $~lib/array/Array#set:length_ end - local.get $0 - local.get $1 - local.get $2 + local.get $this + local.get $index + local.get $value call $~lib/array/Array#__uset ) (func $~lib/rt/__visit_globals (param $0 i32) @@ -2718,12 +2718,12 @@ call $~lib/rt/itcms/__visit end ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -2731,12 +2731,12 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -2744,12 +2744,12 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -2757,12 +2757,12 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) diff --git a/tests/compiler/std/staticarray.debug.wat b/tests/compiler/std/staticarray.debug.wat index 494edb2601..5878bc4b66 100644 --- a/tests/compiler/std/staticarray.debug.wat +++ b/tests/compiler/std/staticarray.debug.wat @@ -116,18 +116,18 @@ (elem $0 (i32.const 1) $start:std/staticarray~anonymous|0 $start:std/staticarray~anonymous|1 $start:std/staticarray~anonymous|2 $start:std/staticarray~anonymous|3 $start:std/staticarray~anonymous|4 $start:std/staticarray~anonymous|5 $start:std/staticarray~anonymous|6 $start:std/staticarray~anonymous|7 $start:std/staticarray~anonymous|8 $start:std/staticarray~anonymous|9 $start:std/staticarray~anonymous|10 $start:std/staticarray~anonymous|11 $start:std/staticarray~anonymous|12 $~lib/util/sort/COMPARATOR~anonymous|0) (export "memory" (memory $0)) (start $~start) - (func $~lib/staticarray/StaticArray#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/staticarray/StaticArray#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 2 i32.shr_u ) - (func $~lib/staticarray/StaticArray#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 + (func $~lib/staticarray/StaticArray#__get (param $this i32) (param $index i32) (result i32) + (local $value i32) + local.get $index + local.get $this call $~lib/staticarray/StaticArray#get:length i32.ge_u if @@ -138,31 +138,31 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 + local.get $this + local.get $index i32.const 2 i32.shl i32.add i32.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) - (func $~lib/staticarray/StaticArray#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 + (func $~lib/staticarray/StaticArray#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store i32.const 0 drop ) - (func $~lib/staticarray/StaticArray#__set (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - local.get $0 + (func $~lib/staticarray/StaticArray#__set (param $this i32) (param $index i32) (param $value i32) + local.get $index + local.get $this call $~lib/staticarray/StaticArray#get:length i32.ge_u if @@ -173,9 +173,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $1 - local.get $2 + local.get $this + local.get $index + local.get $value call $~lib/staticarray/StaticArray#__uset ) (func $~lib/rt/itcms/Object#set:nextWithColor (param $0 i32) (param $1 i32) @@ -188,50 +188,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -244,58 +244,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -312,12 +312,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -327,19 +327,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -350,27 +350,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -378,35 +378,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -416,15 +416,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -434,25 +434,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -460,33 +460,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -514,23 +514,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -542,15 +542,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -562,33 +562,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -596,21 +596,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -625,36 +625,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -662,67 +662,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -732,22 +732,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -757,12 +757,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -774,75 +774,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -854,38 +854,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -899,12 +899,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -915,38 +915,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -954,21 +954,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -983,101 +983,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -1088,7 +1088,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1099,26 +1099,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1131,27 +1131,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1165,11 +1165,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1180,66 +1180,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1249,10 +1249,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1263,13 +1263,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1280,109 +1280,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1390,7 +1390,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1407,23 +1407,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1435,54 +1435,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1503,30 +1503,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1536,9 +1536,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1548,8 +1548,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1557,43 +1557,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1605,17 +1605,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1629,7 +1629,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1647,7 +1647,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1657,12 +1657,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1684,7 +1684,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1704,14 +1704,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1724,8 +1724,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1736,37 +1736,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1774,16 +1774,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1791,21 +1791,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1820,12 +1820,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1833,49 +1833,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1885,90 +1885,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1977,22 +1977,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -2001,27 +2001,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -2036,69 +2036,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2113,29 +2113,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2148,13 +2148,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2165,25 +2165,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2198,10 +2198,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2219,71 +2219,71 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/rt/__newBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - local.get $1 + (func $~lib/rt/__newBuffer (param $size i32) (param $id i32) (param $data i32) (result i32) + (local $buffer i32) + local.get $size + local.get $id call $~lib/rt/itcms/__new - local.set $3 - local.get $2 + local.set $buffer + local.get $data if - local.get $3 - local.get $2 - local.get $0 + local.get $buffer + local.get $data + local.get $size memory.copy end - local.get $3 + local.get $buffer ) (func $std/staticarray/test (result i32) - (local $0 i32) + (local $var$0 i32) i32.const 12 i32.const 3 i32.const 288 call $~lib/rt/__newBuffer ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32) + (local $child i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $childPtr i32.eqz if return end i32.const 1 drop - local.get $0 + local.get $parentPtr i32.eqz if i32.const 0 @@ -2293,37 +2293,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $childPtr i32.const 20 i32.sub - local.set $3 - local.get $3 + local.set $child + local.get $child call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $0 + local.get $parentPtr i32.const 20 i32.sub - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 call $~lib/rt/itcms/Object#get:color - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $2 + local.get $expectMultiple if - local.get $4 + local.get $var$4 call $~lib/rt/itcms/Object#makeGray else - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end else - local.get $5 + local.get $var$5 i32.const 3 i32.eq if (result i32) @@ -2334,35 +2334,35 @@ i32.const 0 end if - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end end end ) - (func $~lib/staticarray/StaticArray#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 + (func $~lib/staticarray/StaticArray#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store i32.const 1 drop - local.get $0 - local.get $2 + local.get $this + local.get $value i32.const 1 call $~lib/rt/itcms/__link ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i32) + (local $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -2373,64 +2373,64 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add i32.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) - (func $~lib/staticarray/StaticArray<~lib/string/String>#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/staticarray/StaticArray<~lib/string/String>#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 2 i32.shr_u ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.get $1 + (func $~lib/util/string/compareImpl (param $str1 i32) (param $index1 i32) (param $str2 i32) (param $index2 i32) (param $len i32) (result i32) + (local $ptr1 i32) + (local $ptr2 i32) + (local $var$7 i32) + (local $a i32) + (local $b i32) + local.get $str1 + local.get $index1 i32.const 1 i32.shl i32.add - local.set $5 - local.get $2 - local.get $3 + local.set $ptr1 + local.get $str2 + local.get $index2 i32.const 1 i32.shl i32.add - local.set $6 + local.set $ptr2 i32.const 0 i32.const 2 i32.lt_s drop - local.get $4 + local.get $len i32.const 4 i32.ge_u if (result i32) - local.get $5 + local.get $ptr1 i32.const 7 i32.and - local.get $6 + local.get $ptr2 i32.const 7 i32.and i32.or @@ -2441,27 +2441,27 @@ if block $do-break|0 loop $do-loop|0 - local.get $5 + local.get $ptr1 i64.load - local.get $6 + local.get $ptr2 i64.load i64.ne if br $do-break|0 end - local.get $5 + local.get $ptr1 i32.const 8 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 8 i32.add - local.set $6 - local.get $4 + local.set $ptr2 + local.get $len i32.const 4 i32.sub - local.set $4 - local.get $4 + local.set $len + local.get $len i32.const 4 i32.ge_u br_if $do-loop|0 @@ -2469,59 +2469,59 @@ end end loop $while-continue|1 - local.get $4 - local.tee $7 + local.get $len + local.tee $var$7 i32.const 1 i32.sub - local.set $4 - local.get $7 - local.set $7 - local.get $7 + local.set $len + local.get $var$7 + local.set $var$7 + local.get $var$7 if - local.get $5 + local.get $ptr1 i32.load16_u - local.set $8 - local.get $6 + local.set $a + local.get $ptr2 i32.load16_u - local.set $9 - local.get $8 - local.get $9 + local.set $b + local.get $a + local.get $b i32.ne if - local.get $8 - local.get $9 + local.get $a + local.get $b i32.sub return end - local.get $5 + local.get $ptr1 i32.const 2 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 2 i32.add - local.set $6 + local.set $ptr2 br $while-continue|1 end end i32.const 0 ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__eq (param $left i32) (param $right i32) (result i32) + (local $leftLength i32) + local.get $left + local.get $right i32.eq if i32.const 1 return end - local.get $0 + local.get $left i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $1 + local.get $right i32.const 0 i32.eq end @@ -2529,113 +2529,113 @@ i32.const 0 return end - local.get $0 + local.get $left call $~lib/string/String#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $leftLength + local.get $leftLength + local.get $right call $~lib/string/String#get:length i32.ne if i32.const 0 return end - local.get $0 + local.get $left i32.const 0 - local.get $1 + local.get $right i32.const 0 - local.get $2 + local.get $leftLength call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/array/Array<~lib/string/String>#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array<~lib/string/String>#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/staticarray/StaticArray<~lib/string/String>#includes (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/staticarray/StaticArray<~lib/string/String>#includes (param $this i32) (param $value i32) (param $fromIndex i32) (result i32) i32.const 0 drop - local.get $0 - local.get $1 - local.get $2 + local.get $this + local.get $value + local.get $fromIndex call $~lib/staticarray/StaticArray<~lib/string/String>#indexOf i32.const 0 i32.ge_s return ) - (func $~lib/staticarray/StaticArray#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/staticarray/StaticArray#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 3 i32.shr_u ) - (func $~lib/staticarray/StaticArray#includes (param $0 i32) (param $1 f64) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 f64) + (func $~lib/staticarray/StaticArray#includes (param $this i32) (param $value f64) (param $fromIndex i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $elem f64) i32.const 1 drop - local.get $0 + local.get $this call $~lib/staticarray/StaticArray#get:length - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $2 - local.get $3 + local.get $fromIndex + local.get $var$3 i32.ge_s end if i32.const 0 return end - local.get $2 + local.get $fromIndex i32.const 0 i32.lt_s if - local.get $3 - local.get $2 + local.get $var$3 + local.get $fromIndex i32.add - local.tee $4 + local.tee $var$4 i32.const 0 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.gt_s select - local.set $2 + local.set $fromIndex end loop $while-continue|0 - local.get $2 - local.get $3 + local.get $fromIndex + local.get $var$3 i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $0 - local.get $2 + local.get $this + local.get $fromIndex i32.const 3 i32.shl i32.add f64.load - local.set $6 - local.get $6 - local.get $1 + local.set $elem + local.get $elem + local.get $value f64.eq if (result i32) i32.const 1 else - local.get $6 - local.get $6 + local.get $elem + local.get $elem f64.ne - local.get $1 - local.get $1 + local.get $value + local.get $value f64.ne i32.and end @@ -2643,89 +2643,89 @@ i32.const 1 return end - local.get $2 + local.get $fromIndex i32.const 1 i32.add - local.set $2 + local.set $fromIndex br $while-continue|0 end end i32.const 0 return ) - (func $~lib/staticarray/StaticArray#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/staticarray/StaticArray#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 2 i32.shr_u ) - (func $~lib/staticarray/StaticArray#includes (param $0 i32) (param $1 f32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 f32) + (func $~lib/staticarray/StaticArray#includes (param $this i32) (param $value f32) (param $fromIndex i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $elem f32) i32.const 1 drop - local.get $0 + local.get $this call $~lib/staticarray/StaticArray#get:length - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $2 - local.get $3 + local.get $fromIndex + local.get $var$3 i32.ge_s end if i32.const 0 return end - local.get $2 + local.get $fromIndex i32.const 0 i32.lt_s if - local.get $3 - local.get $2 + local.get $var$3 + local.get $fromIndex i32.add - local.tee $4 + local.tee $var$4 i32.const 0 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.gt_s select - local.set $2 + local.set $fromIndex end loop $while-continue|0 - local.get $2 - local.get $3 + local.get $fromIndex + local.get $var$3 i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $0 - local.get $2 + local.get $this + local.get $fromIndex i32.const 2 i32.shl i32.add f32.load - local.set $6 - local.get $6 - local.get $1 + local.set $elem + local.get $elem + local.get $value f32.eq if (result i32) i32.const 1 else - local.get $6 - local.get $6 + local.get $elem + local.get $elem f32.ne - local.get $1 - local.get $1 + local.get $value + local.get $value f32.ne i32.and end @@ -2733,142 +2733,142 @@ i32.const 1 return end - local.get $2 + local.get $fromIndex i32.const 1 i32.add - local.set $2 + local.set $fromIndex br $while-continue|0 end end i32.const 0 return ) - (func $~lib/staticarray/StaticArray#indexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/staticarray/StaticArray#indexOf (param $this i32) (param $value i32) (param $fromIndex i32) (result i32) + (local $length i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $this call $~lib/staticarray/StaticArray#get:length - local.set $3 - local.get $3 + local.set $length + local.get $length i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $2 - local.get $3 + local.get $fromIndex + local.get $length i32.ge_s end if i32.const -1 return end - local.get $2 + local.get $fromIndex i32.const 0 i32.lt_s if - local.get $3 - local.get $2 + local.get $length + local.get $fromIndex i32.add - local.tee $4 + local.tee $var$4 i32.const 0 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.gt_s select - local.set $2 + local.set $fromIndex end loop $while-continue|0 - local.get $2 - local.get $3 + local.get $fromIndex + local.get $length i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $0 - local.get $2 + local.get $this + local.get $fromIndex i32.const 2 i32.shl i32.add i32.load - local.get $1 + local.get $value i32.eq if - local.get $2 + local.get $fromIndex return end - local.get $2 + local.get $fromIndex i32.const 1 i32.add - local.set $2 + local.set $fromIndex br $while-continue|0 end end i32.const -1 ) - (func $~lib/staticarray/StaticArray#lastIndexOf (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $0 + (func $~lib/staticarray/StaticArray#lastIndexOf (param $this i32) (param $value i32) (param $fromIndex i32) (result i32) + (local $length i32) + (local $var$4 i32) + local.get $this call $~lib/staticarray/StaticArray#get:length - local.set $3 - local.get $3 + local.set $length + local.get $length i32.const 0 i32.eq if i32.const -1 return end - local.get $2 + local.get $fromIndex i32.const 0 i32.lt_s if - local.get $3 - local.get $2 + local.get $length + local.get $fromIndex i32.add - local.set $2 + local.set $fromIndex else - local.get $2 - local.get $3 + local.get $fromIndex + local.get $length i32.ge_s if - local.get $3 + local.get $length i32.const 1 i32.sub - local.set $2 + local.set $fromIndex end end loop $while-continue|0 - local.get $2 + local.get $fromIndex i32.const 0 i32.ge_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $0 - local.get $2 + local.get $this + local.get $fromIndex i32.const 2 i32.shl i32.add i32.load - local.get $1 + local.get $value i32.eq if - local.get $2 + local.get $fromIndex return end - local.get $2 + local.get $fromIndex i32.const 1 i32.sub - local.set $2 + local.set $fromIndex br $while-continue|0 end end i32.const -1 ) - (func $~lib/staticarray/StaticArray#lastIndexOf@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/staticarray/StaticArray#lastIndexOf@varargs (param $this i32) (param $value i32) (param $fromIndex i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -2879,16 +2879,16 @@ end unreachable end - local.get $0 + local.get $this call $~lib/staticarray/StaticArray#get:length - local.set $2 + local.set $fromIndex end - local.get $0 - local.get $1 - local.get $2 + local.get $this + local.get $value + local.get $fromIndex call $~lib/staticarray/StaticArray#lastIndexOf ) - (func $~lib/staticarray/StaticArray<~lib/string/String>#join (param $0 i32) (param $1 i32) (result i32) + (func $~lib/staticarray/StaticArray<~lib/string/String>#join (param $this i32) (param $separator i32) (result i32) i32.const 0 drop i32.const 0 @@ -2901,66 +2901,66 @@ drop i32.const 1 drop - local.get $0 - local.get $0 + local.get $this + local.get $this call $~lib/staticarray/StaticArray<~lib/string/String>#get:length - local.get $1 + local.get $separator call $~lib/util/string/joinStringArray return ) - (func $~lib/util/bytes/FILL (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) - (local $5 i32) - (local $6 i32) - local.get $3 + (func $~lib/util/bytes/FILL (param $ptr i32) (param $len i32) (param $value i32) (param $start i32) (param $end i32) + (local $var$5 i32) + (local $var$6 i32) + local.get $start i32.const 0 i32.lt_s if (result i32) - local.get $1 - local.get $3 + local.get $len + local.get $start i32.add - local.tee $5 + local.tee $var$5 i32.const 0 - local.tee $6 - local.get $5 - local.get $6 + local.tee $var$6 + local.get $var$5 + local.get $var$6 i32.gt_u select else - local.get $3 - local.tee $6 - local.get $1 - local.tee $5 - local.get $6 - local.get $5 + local.get $start + local.tee $var$6 + local.get $len + local.tee $var$5 + local.get $var$6 + local.get $var$5 i32.lt_s select end - local.set $3 - local.get $4 + local.set $start + local.get $end i32.const 0 i32.lt_s if (result i32) - local.get $1 - local.get $4 + local.get $len + local.get $end i32.add - local.tee $5 + local.tee $var$5 i32.const 0 - local.tee $6 - local.get $5 - local.get $6 + local.tee $var$6 + local.get $var$5 + local.get $var$6 i32.gt_u select else - local.get $4 - local.tee $6 - local.get $1 - local.tee $5 - local.get $6 - local.get $5 + local.get $end + local.tee $var$6 + local.get $len + local.tee $var$5 + local.get $var$6 + local.get $var$5 i32.lt_s select end - local.set $4 + local.set $end i32.const 4 i32.const 1 i32.eq @@ -2971,26 +2971,26 @@ drop i32.const 1 drop - local.get $2 + local.get $value i32.const 0 i32.eq - local.get $2 + local.get $value i32.const -1 i32.eq i32.or if - local.get $3 - local.get $4 + local.get $start + local.get $end i32.lt_s if - local.get $0 - local.get $3 + local.get $ptr + local.get $start i32.const 2 i32.shl i32.add - local.get $2 - local.get $4 - local.get $3 + local.get $value + local.get $end + local.get $start i32.sub i32.const 2 i32.shl @@ -2999,57 +2999,57 @@ return end loop $for-loop|0 - local.get $3 - local.get $4 + local.get $start + local.get $end i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $3 + local.get $ptr + local.get $start i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store - local.get $3 + local.get $start i32.const 1 i32.add - local.set $3 + local.set $start br $for-loop|0 end end ) - (func $~lib/staticarray/StaticArray#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/staticarray/StaticArray#fill (param $this i32) (param $value i32) (param $start i32) (param $end i32) (result i32) i32.const 0 drop - local.get $0 - local.get $0 + local.get $this + local.get $this call $~lib/staticarray/StaticArray#get:length - local.get $1 - local.get $2 - local.get $3 + local.get $value + local.get $start + local.get $end call $~lib/util/bytes/FILL - local.get $0 - ) - (func $~lib/util/bytes/REVERSE (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $1 + local.get $this + ) + (func $~lib/util/bytes/REVERSE (param $ptr i32) (param $len i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $front i32) + (local $back i32) + (local $temp i32) + local.get $len i32.const 1 i32.gt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $var$2 + local.get $len i32.const 1 i32.shr_u - local.set $4 + local.set $var$4 i32.const 0 i32.const 1 i32.lt_s @@ -3062,255 +3062,255 @@ i32.const 2 i32.eq drop - local.get $1 + local.get $len i32.const 1 i32.sub - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $4 + local.get $var$2 + local.get $var$4 i32.lt_u - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $0 - local.get $2 + local.get $ptr + local.get $var$2 i32.const 2 i32.shl i32.add - local.set $6 - local.get $0 - local.get $3 - local.get $2 + local.set $front + local.get $ptr + local.get $var$3 + local.get $var$2 i32.sub i32.const 2 i32.shl i32.add - local.set $7 - local.get $6 + local.set $back + local.get $front i32.load - local.set $8 - local.get $6 - local.get $7 + local.set $temp + local.get $front + local.get $back i32.load i32.store - local.get $7 - local.get $8 + local.get $back + local.get $temp i32.store - local.get $2 + local.get $var$2 i32.const 1 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end end ) - (func $~lib/staticarray/StaticArray#reverse (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/staticarray/StaticArray#reverse (param $this i32) (result i32) + local.get $this + local.get $this call $~lib/staticarray/StaticArray#get:length call $~lib/util/bytes/REVERSE - local.get $0 - ) - (func $~lib/staticarray/StaticArray#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 - local.set $4 - local.get $0 + local.get $this + ) + (func $~lib/staticarray/StaticArray#copyWithin (param $this i32) (param $target i32) (param $start i32) (param $end i32) (result i32) + (local $ptr i32) + (local $len i32) + (local $var$6 i32) + (local $var$7 i32) + (local $to i32) + (local $from i32) + (local $last i32) + (local $count i32) + local.get $this + local.set $ptr + local.get $this call $~lib/staticarray/StaticArray#get:length - local.set $5 - local.get $3 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 + local.set $len + local.get $end + local.tee $var$6 + local.get $len + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_s select - local.set $3 - local.get $1 + local.set $end + local.get $target i32.const 0 i32.lt_s if (result i32) - local.get $5 - local.get $1 + local.get $len + local.get $target i32.add - local.tee $7 + local.tee $var$7 i32.const 0 - local.tee $6 - local.get $7 - local.get $6 + local.tee $var$6 + local.get $var$7 + local.get $var$6 i32.gt_s select else - local.get $1 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 + local.get $target + local.tee $var$6 + local.get $len + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_s select end - local.set $8 - local.get $2 + local.set $to + local.get $start i32.const 0 i32.lt_s if (result i32) - local.get $5 - local.get $2 + local.get $len + local.get $start i32.add - local.tee $7 + local.tee $var$7 i32.const 0 - local.tee $6 - local.get $7 - local.get $6 + local.tee $var$6 + local.get $var$7 + local.get $var$6 i32.gt_s select else - local.get $2 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 + local.get $start + local.tee $var$6 + local.get $len + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_s select end - local.set $9 - local.get $3 + local.set $from + local.get $end i32.const 0 i32.lt_s if (result i32) - local.get $5 - local.get $3 + local.get $len + local.get $end i32.add - local.tee $7 + local.tee $var$7 i32.const 0 - local.tee $6 - local.get $7 - local.get $6 + local.tee $var$6 + local.get $var$7 + local.get $var$6 i32.gt_s select else - local.get $3 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 + local.get $end + local.tee $var$6 + local.get $len + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_s select end - local.set $10 - local.get $10 - local.get $9 + local.set $last + local.get $last + local.get $from i32.sub - local.tee $7 - local.get $5 - local.get $8 + local.tee $var$7 + local.get $len + local.get $to i32.sub - local.tee $6 - local.get $7 - local.get $6 + local.tee $var$6 + local.get $var$7 + local.get $var$6 i32.lt_s select - local.set $11 - local.get $4 - local.get $8 + local.set $count + local.get $ptr + local.get $to i32.const 2 i32.shl i32.add - local.get $4 - local.get $9 + local.get $ptr + local.get $from i32.const 2 i32.shl i32.add - local.get $11 + local.get $count i32.const 2 i32.shl memory.copy - local.get $0 + local.get $this ) - (func $start:std/staticarray~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $start:std/staticarray~anonymous|0 (param $x i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $x i32.const 1 i32.add ) - (func $start:std/staticarray~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) + (func $start:std/staticarray~anonymous|1 (param $x i32) (param $$1 i32) (param $$2 i32) + (local $var$3 i32) + (local $var$4 i32) global.get $std/staticarray/maxVal - local.tee $3 - local.get $0 - local.tee $4 - local.get $3 - local.get $4 + local.tee $var$3 + local.get $x + local.tee $var$4 + local.get $var$3 + local.get $var$4 i32.gt_s select global.set $std/staticarray/maxVal ) - (func $~lib/staticarray/StaticArray#forEach (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (func $~lib/staticarray/StaticArray#forEach (param $this i32) (param $fn i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) i32.const 0 - local.set $2 - local.get $0 + local.set $var$2 + local.get $this call $~lib/staticarray/StaticArray#get:length - local.set $3 + local.set $var$3 loop $for-loop|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $0 - local.get $2 + local.get $this + local.get $var$2 i32.const 2 i32.shl i32.add i32.load - local.get $2 - local.get $0 + local.get $var$2 + local.get $this i32.const 3 global.set $~argumentsLength - local.get $1 + local.get $fn i32.load call_indirect $0 (type $i32_i32_i32_=>_none) - local.get $2 + local.get $var$2 i32.const 1 i32.add - local.set $2 + local.set $var$2 br $for-loop|0 end end ) - (func $start:std/staticarray~anonymous|2 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $start:std/staticarray~anonymous|2 (param $x i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $x i32.const 2 i32.ge_s ) - (func $~lib/rt/itcms/__renew (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/rt/itcms/__renew (param $oldPtr i32) (param $size i32) (result i32) + (local $oldObj i32) + (local $newPtr i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $oldPtr i32.const 20 i32.sub - local.set $2 - local.get $1 - local.get $2 + local.set $oldObj + local.get $size + local.get $oldObj i32.load i32.const 3 i32.const -1 @@ -3320,49 +3320,49 @@ i32.sub i32.le_u if - local.get $2 - local.get $1 + local.get $oldObj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $0 + local.get $oldPtr return end - local.get $1 - local.get $2 + local.get $size + local.get $oldObj i32.load offset=12 call $~lib/rt/itcms/__new - local.set $3 - local.get $3 - local.get $0 - local.get $1 - local.tee $4 - local.get $2 + local.set $newPtr + local.get $newPtr + local.get $oldPtr + local.get $size + local.tee $var$4 + local.get $oldObj i32.load offset=16 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.lt_u select memory.copy - local.get $3 - ) - (func $~lib/array/ensureCapacity (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $0 + local.get $newPtr + ) + (func $~lib/array/ensureCapacity (param $array i32) (param $newSize i32) (param $alignLog2 i32) (param $canGrow i32) + (local $oldCapacity i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $array i32.load offset=8 - local.set $4 - local.get $1 - local.get $4 - local.get $2 + local.set $oldCapacity + local.get $newSize + local.get $oldCapacity + local.get $alignLog2 i32.shr_u i32.gt_u if - local.get $1 + local.get $newSize i32.const 1073741820 - local.get $2 + local.get $alignLog2 i32.shr_u i32.gt_u if @@ -3373,66 +3373,66 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.load - local.set $5 - local.get $1 - local.tee $6 + local.set $var$5 + local.get $newSize + local.tee $var$6 i32.const 8 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.gt_u select - local.get $2 + local.get $alignLog2 i32.shl - local.set $6 - local.get $3 + local.set $var$6 + local.get $canGrow if - local.get $4 + local.get $oldCapacity i32.const 1 i32.shl - local.tee $7 + local.tee $var$7 i32.const 1073741820 - local.tee $8 - local.get $7 - local.get $8 + local.tee $var$8 + local.get $var$7 + local.get $var$8 i32.lt_u select - local.tee $8 - local.get $6 - local.tee $7 - local.get $8 - local.get $7 + local.tee $var$8 + local.get $var$6 + local.tee $var$7 + local.get $var$8 + local.get $var$7 i32.gt_u select - local.set $6 + local.set $var$6 end - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 call $~lib/rt/itcms/__renew - local.set $8 + local.set $var$8 i32.const 2 global.get $~lib/shared/runtime/Runtime.Incremental i32.ne drop - local.get $8 - local.get $5 + local.get $var$8 + local.get $var$5 i32.ne if - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.store - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.store offset=4 - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.const 0 call $~lib/rt/itcms/__link end - local.get $0 - local.get $6 + local.get $array + local.get $var$6 i32.store offset=8 end ) @@ -3441,215 +3441,215 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#push (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/array/Array#push (param $this i32) (param $value i32) (result i32) + (local $oldLen i32) + (local $len i32) + local.get $this i32.load offset=12 - local.set $2 - local.get $2 + local.set $oldLen + local.get $oldLen i32.const 1 i32.add - local.set $3 - local.get $0 - local.get $3 + local.set $len + local.get $this + local.get $len i32.const 2 i32.const 1 call $~lib/array/ensureCapacity i32.const 0 drop - local.get $0 + local.get $this i32.load offset=4 - local.get $2 + local.get $oldLen i32.const 2 i32.shl i32.add - local.get $1 + local.get $value i32.store - local.get $0 - local.get $3 - call $~lib/array/Array#set:length_ - local.get $3 - ) - (func $start:std/staticarray~anonymous|3 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 - local.get $1 - i32.add - ) - (func $~lib/staticarray/StaticArray#reduce (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.set $3 + local.get $this + local.get $len + call $~lib/array/Array#set:length_ + local.get $len + ) + (func $start:std/staticarray~anonymous|3 (param $x i32) (param $y i32) (param $$2 i32) (param $$3 i32) (result i32) + local.get $x + local.get $y + i32.add + ) + (func $~lib/staticarray/StaticArray#reduce (param $this i32) (param $fn i32) (param $initialValue i32) (result i32) + (local $acc i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + local.get $initialValue + local.set $acc i32.const 0 - local.set $4 - local.get $0 + local.set $var$4 + local.get $this call $~lib/staticarray/StaticArray#get:length - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $3 - local.get $0 - local.get $4 + local.get $acc + local.get $this + local.get $var$4 i32.const 2 i32.shl i32.add i32.load - local.get $4 - local.get $0 + local.get $var$4 + local.get $this i32.const 4 global.set $~argumentsLength - local.get $1 + local.get $fn i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $4 + local.set $acc + local.get $var$4 i32.const 1 i32.add - local.set $4 + local.set $var$4 br $for-loop|0 end end - local.get $3 + local.get $acc ) - (func $start:std/staticarray~anonymous|4 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 - local.get $1 + (func $start:std/staticarray~anonymous|4 (param $x i32) (param $y i32) (param $$2 i32) (param $$3 i32) (result i32) + local.get $x + local.get $y i32.add ) - (func $~lib/staticarray/StaticArray#reduceRight (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $2 - local.set $3 - local.get $0 + (func $~lib/staticarray/StaticArray#reduceRight (param $this i32) (param $fn i32) (param $initialValue i32) (result i32) + (local $acc i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $initialValue + local.set $acc + local.get $this call $~lib/staticarray/StaticArray#get:length i32.const 1 i32.sub - local.set $4 + local.set $var$4 loop $for-loop|0 - local.get $4 + local.get $var$4 i32.const 0 i32.ge_s - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $3 - local.get $0 - local.get $4 + local.get $acc + local.get $this + local.get $var$4 i32.const 2 i32.shl i32.add i32.load - local.get $4 - local.get $0 + local.get $var$4 + local.get $this i32.const 4 global.set $~argumentsLength - local.get $1 + local.get $fn i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $4 + local.set $acc + local.get $var$4 i32.const 1 i32.sub - local.set $4 + local.set $var$4 br $for-loop|0 end end - local.get $3 + local.get $acc ) - (func $start:std/staticarray~anonymous|5 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $start:std/staticarray~anonymous|5 (param $x i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $x i32.const 2 i32.eq ) - (func $~lib/staticarray/StaticArray#some (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (func $~lib/staticarray/StaticArray#some (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) i32.const 0 - local.set $2 - local.get $0 + local.set $var$2 + local.get $this call $~lib/staticarray/StaticArray#get:length - local.set $3 + local.set $var$3 loop $for-loop|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $0 - local.get $2 + local.get $this + local.get $var$2 i32.const 2 i32.shl i32.add i32.load - local.get $2 - local.get $0 + local.get $var$2 + local.get $this i32.const 3 global.set $~argumentsLength - local.get $1 + local.get $fn i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if i32.const 1 return end - local.get $2 + local.get $var$2 i32.const 1 i32.add - local.set $2 + local.set $var$2 br $for-loop|0 end end i32.const 0 ) - (func $start:std/staticarray~anonymous|6 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $start:std/staticarray~anonymous|6 (param $x i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $x i32.const 4 i32.eq ) - (func $start:std/staticarray~anonymous|7 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $start:std/staticarray~anonymous|7 (param $x i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $x i32.const 3 i32.le_s ) - (func $~lib/staticarray/StaticArray#every (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (func $~lib/staticarray/StaticArray#every (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) i32.const 0 - local.set $2 - local.get $0 + local.set $var$2 + local.get $this call $~lib/staticarray/StaticArray#get:length - local.set $3 + local.set $var$3 loop $for-loop|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $0 - local.get $2 + local.get $this + local.get $var$2 i32.const 2 i32.shl i32.add i32.load - local.get $2 - local.get $0 + local.get $var$2 + local.get $this i32.const 3 global.set $~argumentsLength - local.get $1 + local.get $fn i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) i32.eqz @@ -3657,240 +3657,240 @@ i32.const 0 return end - local.get $2 + local.get $var$2 i32.const 1 i32.add - local.set $2 + local.set $var$2 br $for-loop|0 end end i32.const 1 ) - (func $start:std/staticarray~anonymous|8 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $start:std/staticarray~anonymous|8 (param $x i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $x i32.const 3 i32.gt_s ) - (func $start:std/staticarray~anonymous|9 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $start:std/staticarray~anonymous|9 (param $x i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $x i32.const 2 i32.eq ) - (func $~lib/staticarray/StaticArray#findIndex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (func $~lib/staticarray/StaticArray#findIndex (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) i32.const 0 - local.set $2 - local.get $0 + local.set $var$2 + local.get $this call $~lib/staticarray/StaticArray#get:length - local.set $3 + local.set $var$3 loop $for-loop|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $0 - local.get $2 + local.get $this + local.get $var$2 i32.const 2 i32.shl i32.add i32.load - local.get $2 - local.get $0 + local.get $var$2 + local.get $this i32.const 3 global.set $~argumentsLength - local.get $1 + local.get $fn i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if - local.get $2 + local.get $var$2 return end - local.get $2 + local.get $var$2 i32.const 1 i32.add - local.set $2 + local.set $var$2 br $for-loop|0 end end i32.const -1 ) - (func $start:std/staticarray~anonymous|10 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $start:std/staticarray~anonymous|10 (param $x i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $x i32.const 4 i32.eq ) - (func $start:std/staticarray~anonymous|11 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $start:std/staticarray~anonymous|11 (param $x i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $x i32.const 2 i32.eq ) - (func $~lib/staticarray/StaticArray#findLastIndex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/staticarray/StaticArray#findLastIndex (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + local.get $this call $~lib/staticarray/StaticArray#get:length i32.const 1 i32.sub - local.set $2 + local.set $var$2 loop $for-loop|0 - local.get $2 + local.get $var$2 i32.const 0 i32.ge_s - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $0 - local.get $2 + local.get $this + local.get $var$2 i32.const 2 i32.shl i32.add i32.load - local.get $2 - local.get $0 + local.get $var$2 + local.get $this i32.const 3 global.set $~argumentsLength - local.get $1 + local.get $fn i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if - local.get $2 + local.get $var$2 return end - local.get $2 + local.get $var$2 i32.const 1 i32.sub - local.set $2 + local.set $var$2 br $for-loop|0 end end i32.const -1 ) - (func $start:std/staticarray~anonymous|12 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $start:std/staticarray~anonymous|12 (param $x i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $x i32.const 4 i32.eq ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $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) + (func $~lib/util/sort/insertionSort (param $ptr i32) (param $left i32) (param $right i32) (param $presorted i32) (param $comparator i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 0 i32.const 1 i32.ge_s drop - local.get $2 - local.get $1 + local.get $right + local.get $left i32.sub i32.const 1 i32.add - local.set $5 - local.get $1 - local.get $5 + local.set $var$5 + local.get $left + local.get $var$5 i32.const 1 i32.and - local.get $3 - local.get $5 - local.get $3 + local.get $presorted + local.get $var$5 + local.get $presorted i32.sub i32.const 1 i32.and i32.sub - local.get $3 + local.get $presorted i32.const 0 i32.eq select i32.add - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $6 - local.get $2 + local.get $var$6 + local.get $right i32.le_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $0 - local.get $6 + local.get $ptr + local.get $var$6 i32.const 2 i32.shl i32.add i32.load - local.set $8 - local.get $0 - local.get $6 + local.set $var$8 + local.get $ptr + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $9 - local.get $9 - local.set $10 - local.get $8 - local.set $11 - local.get $8 - local.get $9 + local.set $var$9 + local.get $var$9 + local.set $var$10 + local.get $var$8 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.le_s if - local.get $8 - local.set $10 - local.get $9 - local.set $11 + local.get $var$8 + local.set $var$10 + local.get $var$9 + local.set $var$11 end - local.get $6 + local.get $var$6 i32.const 1 i32.sub - local.set $12 + local.set $var$12 block $while-break|1 loop $while-continue|1 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add i32.load - local.set $8 - local.get $8 - local.get $11 + local.set $var$8 + local.get $var$8 + local.get $var$11 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $8 + local.get $var$8 i32.store offset=8 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|1 end @@ -3898,49 +3898,49 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store offset=8 block $while-break|2 loop $while-continue|2 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add i32.load - local.set $8 - local.get $8 - local.get $10 + local.set $var$8 + local.get $var$8 + local.get $var$10 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $8 + local.get $var$8 i32.store offset=4 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|2 end @@ -3948,78 +3948,78 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.const 2 i32.add - local.set $6 + local.set $var$6 br $for-loop|0 end end ) - (func $~lib/util/sort/extendRunRight (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 - local.get $2 + (func $~lib/util/sort/extendRunRight (param $ptr i32) (param $i i32) (param $right i32) (param $comparator i32) (result i32) + (local $j i32) + (local $var$5 i32) + (local $var$6 i32) + (local $tmp i32) + local.get $i + local.get $right i32.eq if - local.get $1 + local.get $i return end - local.get $1 - local.set $4 - local.get $0 - local.get $4 + local.get $i + local.set $j + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 1 i32.add - local.tee $4 + local.tee $j i32.const 2 i32.shl i32.add i32.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if loop $while-continue|0 - local.get $4 - local.get $2 + local.get $j + local.get $right i32.lt_s if (result i32) - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load offset=4 - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 31 @@ -4027,83 +4027,83 @@ else i32.const 0 end - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 + local.get $j i32.const 1 i32.add - local.set $4 + local.set $j br $while-continue|0 end end - local.get $4 - local.set $5 + local.get $j + local.set $var$5 loop $while-continue|1 - local.get $1 - local.get $5 + local.get $i + local.get $var$5 i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $1 + local.get $ptr + local.get $i i32.const 2 i32.shl i32.add i32.load - local.set $7 - local.get $0 - local.get $1 + local.set $tmp + local.get $ptr + local.get $i i32.const 2 i32.shl i32.add - local.get $0 - local.get $5 + local.get $ptr + local.get $var$5 i32.const 2 i32.shl i32.add i32.load i32.store - local.get $1 + local.get $i i32.const 1 i32.add - local.set $1 - local.get $0 - local.get $5 + local.set $i + local.get $ptr + local.get $var$5 i32.const 2 i32.shl i32.add - local.get $7 + local.get $tmp i32.store - local.get $5 + local.get $var$5 i32.const 1 i32.sub - local.set $5 + local.set $var$5 br $while-continue|1 end end else loop $while-continue|2 - local.get $4 - local.get $2 + local.get $j + local.get $right i32.lt_s if (result i32) - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load offset=4 - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 @@ -4111,105 +4111,105 @@ else i32.const 0 end - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 + local.get $j i32.const 1 i32.add - local.set $4 + local.set $j br $while-continue|2 end end end - local.get $4 - ) - (func $~lib/util/sort/nodePower (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i64) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i64) - local.get $1 - local.get $0 + local.get $j + ) + (func $~lib/util/sort/nodePower (param $left i32) (param $right i32) (param $startA i32) (param $startB i32) (param $endB i32) (result i32) + (local $n i64) + (local $s i32) + (local $l i32) + (local $r i32) + (local $a i64) + (local $b i64) + local.get $right + local.get $left i32.sub i32.const 1 i32.add i64.extend_i32_u - local.set $5 - local.get $3 - local.get $0 + local.set $n + local.get $startB + local.get $left i32.const 1 i32.shl i32.sub - local.set $6 - local.get $2 - local.get $6 + local.set $s + local.get $startA + local.get $s i32.add - local.set $7 - local.get $4 - local.get $6 + local.set $l + local.get $endB + local.get $s i32.add i32.const 1 i32.add - local.set $8 - local.get $7 + local.set $r + local.get $l i64.extend_i32_u i64.const 30 i64.shl - local.get $5 + local.get $n i64.div_u - local.set $9 - local.get $8 + local.set $a + local.get $r i64.extend_i32_u i64.const 30 i64.shl - local.get $5 + local.get $n i64.div_u - local.set $10 - local.get $9 - local.get $10 + local.set $b + local.get $a + local.get $b i64.xor i32.wrap_i64 i32.clz ) - (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $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 $2 + (func $~lib/util/sort/mergeRuns (param $ptr i32) (param $l i32) (param $m i32) (param $r i32) (param $buffer i32) (param $comparator i32) + (local $i i32) + (local $j i32) + (local $t i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $m i32.const 1 i32.sub - local.set $2 - local.get $3 - local.get $2 + local.set $m + local.get $r + local.get $m i32.add - local.set $8 - local.get $2 + local.set $t + local.get $m i32.const 1 i32.add - local.set $6 - loop $for-loop|0 - local.get $6 - local.get $1 + local.set $i + loop $for-loop|0 + local.get $i + local.get $l i32.gt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $6 + local.get $buffer + local.get $i i32.const 1 i32.sub i32.const 2 i32.shl i32.add - local.get $0 - local.get $6 + local.get $ptr + local.get $i i32.const 1 i32.sub i32.const 2 @@ -4217,132 +4217,132 @@ i32.add i32.load i32.store - local.get $6 + local.get $i i32.const 1 i32.sub - local.set $6 + local.set $i br $for-loop|0 end end - local.get $2 - local.set $7 + local.get $m + local.set $j loop $for-loop|1 - local.get $7 - local.get $3 + local.get $j + local.get $r i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $8 - local.get $7 + local.get $buffer + local.get $t + local.get $j i32.sub i32.const 2 i32.shl i32.add - local.get $0 - local.get $7 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load offset=4 i32.store - local.get $7 + local.get $j i32.const 1 i32.add - local.set $7 + local.set $j br $for-loop|1 end end - local.get $1 - local.set $9 + local.get $l + local.set $var$9 loop $for-loop|2 - local.get $9 - local.get $3 + local.get $var$9 + local.get $r i32.le_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $4 - local.get $7 + local.get $buffer + local.get $j i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $4 - local.get $6 + local.set $var$11 + local.get $buffer + local.get $i i32.const 2 i32.shl i32.add i32.load - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 i32.const 2 global.set $~argumentsLength - local.get $5 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 2 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store - local.get $7 + local.get $j i32.const 1 i32.sub - local.set $7 + local.set $j else - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 2 i32.shl i32.add - local.get $12 + local.get $var$12 i32.store - local.get $6 + local.get $i i32.const 1 i32.add - local.set $6 + local.set $i end - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|2 end end ) - (func $~lib/util/sort/SORT (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 $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) - local.get $1 + (func $~lib/util/sort/SORT (param $ptr i32) (param $len i32) (param $comparator i32) + (local $endB i32) + (local $var$4 i32) + (local $startB i32) + (local $lgPlus2 i32) + (local $lgPlus2Size i32) + (local $leftRunStartBuf i32) + (local $leftRunEndBuf i32) + (local $buffer i32) + (local $hi i32) + (local $endA i32) + (local $lenA i32) + (local $top i32) + (local $startA i32) + (local $lenB i32) + (local $k i32) + (local $var$18 i32) + (local $var$19 i32) + (local $var$20 i32) + local.get $len i32.const 48 i32.le_s if - local.get $1 + local.get $len i32.const 1 i32.le_s if @@ -4355,391 +4355,391 @@ block $break|0 block $case1|0 block $case0|0 - local.get $1 - local.set $3 - local.get $3 + local.get $len + local.set $endB + local.get $endB i32.const 3 i32.eq br_if $case0|0 - local.get $3 + local.get $endB i32.const 2 i32.eq br_if $case1|0 br $break|0 end - local.get $0 + local.get $ptr i32.load - local.set $3 - local.get $0 + local.set $endB + local.get $ptr i32.load offset=4 - local.set $4 - local.get $3 - local.get $4 + local.set $var$4 + local.get $endB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $5 - local.get $0 - local.get $4 - local.get $3 - local.get $5 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $endB + local.get $startB select i32.store - local.get $3 - local.get $4 - local.get $5 + local.get $endB + local.get $var$4 + local.get $startB select - local.set $3 - local.get $0 + local.set $endB + local.get $ptr i32.load offset=8 - local.set $4 - local.get $3 - local.get $4 + local.set $var$4 + local.get $endB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $5 - local.get $0 - local.get $4 - local.get $3 - local.get $5 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $endB + local.get $startB select i32.store offset=4 - local.get $0 - local.get $3 - local.get $4 - local.get $5 + local.get $ptr + local.get $endB + local.get $var$4 + local.get $startB select i32.store offset=8 end - local.get $0 + local.get $ptr i32.load - local.set $5 - local.get $0 + local.set $startB + local.get $ptr i32.load offset=4 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $startB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $3 - local.get $0 - local.get $4 - local.get $5 - local.get $3 + local.set $endB + local.get $ptr + local.get $var$4 + local.get $startB + local.get $endB select i32.store - local.get $0 - local.get $5 - local.get $4 - local.get $3 + local.get $ptr + local.get $startB + local.get $var$4 + local.get $endB select i32.store offset=4 return end - local.get $0 + local.get $ptr i32.const 0 - local.get $1 + local.get $len i32.const 1 i32.sub i32.const 0 - local.get $2 + local.get $comparator call $~lib/util/sort/insertionSort return end - local.get $1 - local.set $5 + local.get $len + local.set $startB i32.const 31 - local.get $5 + local.get $startB i32.clz i32.sub i32.const 2 i32.add - local.set $6 - local.get $6 + local.set $lgPlus2 + local.get $lgPlus2 i32.const 2 i32.shl - local.set $7 - local.get $7 + local.set $lgPlus2Size + local.get $lgPlus2Size i32.const 1 i32.shl call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 - local.get $7 + local.set $leftRunStartBuf + local.get $leftRunStartBuf + local.get $lgPlus2Size i32.add - local.set $9 + local.set $leftRunEndBuf i32.const 0 - local.set $5 + local.set $startB loop $for-loop|1 - local.get $5 - local.get $6 + local.get $startB + local.get $lgPlus2 i32.lt_u - local.set $3 - local.get $3 + local.set $endB + local.get $endB if - local.get $8 - local.get $5 + local.get $leftRunStartBuf + local.get $startB i32.const 2 i32.shl i32.add i32.const -1 i32.store - local.get $5 + local.get $startB i32.const 1 i32.add - local.set $5 + local.set $startB br $for-loop|1 end end - local.get $1 + local.get $len i32.const 2 i32.shl call $~lib/rt/tlsf/__alloc - local.set $10 - local.get $1 + local.set $buffer + local.get $len i32.const 1 i32.sub - local.set $11 - local.get $0 + local.set $hi + local.get $ptr i32.const 0 - local.get $11 - local.get $2 + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight - local.set $12 - local.get $12 + local.set $endA + local.get $endA i32.const 1 i32.add - local.set $13 - local.get $13 + local.set $lenA + local.get $lenA i32.const 32 i32.lt_s if - local.get $11 - local.tee $4 + local.get $hi + local.tee $var$4 i32.const 32 i32.const 1 i32.sub - local.tee $5 - local.get $4 - local.get $5 + local.tee $startB + local.get $var$4 + local.get $startB i32.lt_s select - local.set $12 - local.get $0 + local.set $endA + local.get $ptr i32.const 0 - local.get $12 - local.get $13 - local.get $2 + local.get $endA + local.get $lenA + local.get $comparator call $~lib/util/sort/insertionSort end i32.const 0 - local.set $14 + local.set $top i32.const 0 - local.set $15 + local.set $startA loop $while-continue|2 - local.get $12 - local.get $11 + local.get $endA + local.get $hi i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $12 + local.get $endA i32.const 1 i32.add - local.set $5 - local.get $0 - local.get $5 - local.get $11 - local.get $2 + local.set $startB + local.get $ptr + local.get $startB + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight - local.set $3 - local.get $3 - local.get $5 + local.set $endB + local.get $endB + local.get $startB i32.sub i32.const 1 i32.add - local.set $16 - local.get $16 + local.set $lenB + local.get $lenB i32.const 32 i32.lt_s if - local.get $11 - local.tee $17 - local.get $5 + local.get $hi + local.tee $k + local.get $startB i32.const 32 i32.add i32.const 1 i32.sub - local.tee $18 - local.get $17 - local.get $18 + local.tee $var$18 + local.get $k + local.get $var$18 i32.lt_s select - local.set $3 - local.get $0 - local.get $5 - local.get $3 - local.get $16 - local.get $2 + local.set $endB + local.get $ptr + local.get $startB + local.get $endB + local.get $lenB + local.get $comparator call $~lib/util/sort/insertionSort end i32.const 0 - local.get $11 - local.get $15 - local.get $5 - local.get $3 + local.get $hi + local.get $startA + local.get $startB + local.get $endB call $~lib/util/sort/nodePower - local.set $17 - local.get $14 - local.set $18 + local.set $k + local.get $top + local.set $var$18 loop $for-loop|3 - local.get $18 - local.get $17 + local.get $var$18 + local.get $k i32.gt_u - local.set $19 - local.get $19 + local.set $var$19 + local.get $var$19 if - local.get $8 - local.get $18 + local.get $leftRunStartBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.load - local.set $20 - local.get $20 + local.set $var$20 + local.get $var$20 i32.const -1 i32.ne if - local.get $0 - local.get $20 - local.get $9 - local.get $18 + local.get $ptr + local.get $var$20 + local.get $leftRunEndBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $12 - local.get $10 - local.get $2 + local.get $endA + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns - local.get $20 - local.set $15 - local.get $8 - local.get $18 + local.get $var$20 + local.set $startA + local.get $leftRunStartBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.const -1 i32.store end - local.get $18 + local.get $var$18 i32.const 1 i32.sub - local.set $18 + local.set $var$18 br $for-loop|3 end end - local.get $8 - local.get $17 + local.get $leftRunStartBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $15 + local.get $startA i32.store - local.get $9 - local.get $17 + local.get $leftRunEndBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $12 + local.get $endA i32.store - local.get $5 - local.set $15 - local.get $3 - local.set $12 - local.get $17 - local.set $14 + local.get $startB + local.set $startA + local.get $endB + local.set $endA + local.get $k + local.set $top br $while-continue|2 end end - local.get $14 - local.set $4 + local.get $top + local.set $var$4 loop $for-loop|4 - local.get $4 + local.get $var$4 i32.const 0 i32.ne - local.set $18 - local.get $18 + local.set $var$18 + local.get $var$18 if - local.get $8 - local.get $4 + local.get $leftRunStartBuf + local.get $var$4 i32.const 2 i32.shl i32.add i32.load - local.set $19 - local.get $19 + local.set $var$19 + local.get $var$19 i32.const -1 i32.ne if - local.get $0 - local.get $19 - local.get $9 - local.get $4 + local.get $ptr + local.get $var$19 + local.get $leftRunEndBuf + local.get $var$4 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $11 - local.get $10 - local.get $2 + local.get $hi + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns end - local.get $4 + local.get $var$4 i32.const 1 i32.sub - local.set $4 + local.set $var$4 br $for-loop|4 end end - local.get $10 + local.get $buffer call $~lib/rt/tlsf/__free - local.get $8 + local.get $leftRunStartBuf call $~lib/rt/tlsf/__free ) - (func $~lib/staticarray/StaticArray#sort (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/staticarray/StaticArray#sort (param $this i32) (param $comparator i32) (result i32) + local.get $this + local.get $this call $~lib/staticarray/StaticArray#get:length - local.get $1 + local.get $comparator call $~lib/util/sort/SORT - local.get $0 + local.get $this ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.sub ) (func $~lib/rt/itcms/__collect - (local $0 i32) + (local $var$0 i32) i32.const 0 drop global.get $~lib/rt/itcms/state @@ -4750,8 +4750,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -4765,8 +4765,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -4843,42 +4843,42 @@ call $~lib/rt/itcms/__visit end ) - (func $~lib/staticarray/StaticArray#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/staticarray/StaticArray#__visit (param $this i32) (param $cookie i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $val i32) i32.const 1 drop - local.get $0 - local.set $2 - local.get $2 - local.get $0 + local.get $this + local.set $var$2 + local.get $var$2 + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.add - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $var$2 i32.load - local.set $5 - local.get $5 + local.set $val + local.get $val if - local.get $5 - local.get $1 + local.get $val + local.get $cookie call $~lib/rt/itcms/__visit end - local.get $2 + local.get $var$2 i32.const 4 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end @@ -4888,12 +4888,12 @@ local.get $1 call $~lib/staticarray/StaticArray#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -4901,42 +4901,42 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/staticarray/StaticArray<~lib/string/String>#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/staticarray/StaticArray<~lib/string/String>#__visit (param $this i32) (param $cookie i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $val i32) i32.const 1 drop - local.get $0 - local.set $2 - local.get $2 - local.get $0 + local.get $this + local.set $var$2 + local.get $var$2 + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.add - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $var$2 i32.load - local.set $5 - local.get $5 + local.set $val + local.get $val if - local.get $5 - local.get $1 + local.get $val + local.get $cookie call $~lib/rt/itcms/__visit end - local.get $2 + local.get $var$2 i32.const 4 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end @@ -4946,49 +4946,49 @@ local.get $1 call $~lib/staticarray/StaticArray<~lib/string/String>#__visit ) - (func $~lib/array/Array<~lib/string/String>#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array<~lib/string/String>#__visit (param $this i32) (param $cookie i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $val i32) i32.const 1 drop - local.get $0 + local.get $this i32.load offset=4 - local.set $2 - local.get $2 - local.get $0 + local.set $var$2 + local.get $var$2 + local.get $this i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $var$2 i32.load - local.set $5 - local.get $5 + local.set $val + local.get $val if - local.get $5 - local.get $1 + local.get $val + local.get $cookie call $~lib/rt/itcms/__visit end - local.get $2 + local.get $var$2 i32.const 4 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array<~lib/string/String>~visit (param $0 i32) (param $1 i32) @@ -4996,10 +4996,10 @@ local.get $1 call $~lib/array/Array<~lib/string/String>#__visit ) - (func $~lib/function/Function<%28i32%2Ci32%2C~lib/staticarray/StaticArray%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i32%2Ci32%2C~lib/staticarray/StaticArray%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i32%2Ci32%2C~lib/staticarray/StaticArray%29=>i32>~visit (param $0 i32) (param $1 i32) @@ -5007,10 +5007,10 @@ local.get $1 call $~lib/function/Function<%28i32%2Ci32%2C~lib/staticarray/StaticArray%29=>i32>#__visit ) - (func $~lib/function/Function<%28i32%2Ci32%2C~lib/staticarray/StaticArray%29=>void>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i32%2Ci32%2C~lib/staticarray/StaticArray%29=>void>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i32%2Ci32%2C~lib/staticarray/StaticArray%29=>void>~visit (param $0 i32) (param $1 i32) @@ -5018,10 +5018,10 @@ local.get $1 call $~lib/function/Function<%28i32%2Ci32%2C~lib/staticarray/StaticArray%29=>void>#__visit ) - (func $~lib/function/Function<%28i32%2Ci32%2C~lib/staticarray/StaticArray%29=>bool>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i32%2Ci32%2C~lib/staticarray/StaticArray%29=>bool>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i32%2Ci32%2C~lib/staticarray/StaticArray%29=>bool>~visit (param $0 i32) (param $1 i32) @@ -5029,10 +5029,10 @@ local.get $1 call $~lib/function/Function<%28i32%2Ci32%2C~lib/staticarray/StaticArray%29=>bool>#__visit ) - (func $~lib/function/Function<%28i32%2Ci32%2Ci32%2C~lib/staticarray/StaticArray%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i32%2Ci32%2Ci32%2C~lib/staticarray/StaticArray%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i32%2Ci32%2Ci32%2C~lib/staticarray/StaticArray%29=>i32>~visit (param $0 i32) (param $1 i32) @@ -5040,10 +5040,10 @@ local.get $1 call $~lib/function/Function<%28i32%2Ci32%2Ci32%2C~lib/staticarray/StaticArray%29=>i32>#__visit ) - (func $~lib/function/Function<%28i32%2Ci32%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i32%2Ci32%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i32%2Ci32%29=>i32>~visit (param $0 i32) (param $1 i32) diff --git a/tests/compiler/std/string-casemapping.debug.wat b/tests/compiler/std/string-casemapping.debug.wat index 4e67b66642..64b016962a 100644 --- a/tests/compiler/std/string-casemapping.debug.wat +++ b/tests/compiler/std/string-casemapping.debug.wat @@ -223,8 +223,8 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (start $~start) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 @@ -241,50 +241,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -297,58 +297,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -365,12 +365,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -380,19 +380,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -403,27 +403,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -431,35 +431,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -469,15 +469,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -487,25 +487,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -513,33 +513,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -567,23 +567,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -595,15 +595,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -615,33 +615,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -649,21 +649,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -678,36 +678,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -715,67 +715,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -785,22 +785,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -810,12 +810,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -827,75 +827,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -907,38 +907,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -952,12 +952,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -968,38 +968,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1007,21 +1007,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -1036,101 +1036,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -1141,7 +1141,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1152,26 +1152,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1184,27 +1184,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1218,11 +1218,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1233,66 +1233,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1302,10 +1302,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1316,13 +1316,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1333,109 +1333,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1443,7 +1443,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1460,23 +1460,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1488,54 +1488,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1556,30 +1556,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1589,9 +1589,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1601,8 +1601,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1610,43 +1610,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1658,17 +1658,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1682,7 +1682,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1700,7 +1700,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1710,12 +1710,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1737,7 +1737,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1757,14 +1757,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1777,8 +1777,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1789,37 +1789,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1827,16 +1827,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1844,21 +1844,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1873,12 +1873,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1886,49 +1886,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1938,90 +1938,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -2030,22 +2030,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -2054,27 +2054,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -2089,69 +2089,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2166,29 +2166,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2201,13 +2201,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2218,25 +2218,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2251,10 +2251,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2272,92 +2272,92 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/staticarray/StaticArray#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/staticarray/StaticArray#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u ) - (func $~lib/util/casemap/casemap (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 $14 i32) - local.get $0 - local.set $2 - local.get $0 + (func $~lib/util/casemap/casemap (param $c i32) (param $dir i32) (result i32) + (local $c0 i32) + (local $b i32) + (local $x i32) + (local $y i32) + (local $v i32) + (local $r i32) + (local $rt i32) + (local $rd i32) + (local $xn i32) + (local $xb i32) + (local $var$12 i32) + (local $h i32) + (local $t i32) + local.get $c + local.set $c0 + local.get $c i32.const 8 i32.shr_u - local.set $3 - local.get $0 + local.set $b + local.get $c i32.const 255 i32.and - local.set $0 - local.get $0 + local.set $c + local.get $c i32.const 3 i32.div_u - local.set $4 - local.get $0 + local.set $x + local.get $c i32.const 3 i32.rem_u - local.set $5 + local.set $y i32.const 1420 i32.const 1420 - local.get $3 + local.get $b i32.add i32.load8_u i32.const 86 i32.mul i32.add - local.get $4 + local.get $x i32.add i32.load8_u - local.set $6 - local.get $6 + local.set $v + local.get $v i32.const 4088 - local.get $5 + local.get $y i32.const 2 i32.shl i32.add @@ -2367,76 +2367,76 @@ i32.shr_u i32.const 6 i32.rem_u - local.set $6 + local.set $v i32.const 4100 i32.const 5060 - local.get $3 + local.get $b i32.add i32.load8_u - local.get $6 + local.get $v i32.add i32.const 2 i32.shl i32.add i32.load - local.set $7 - local.get $7 + local.set $r + local.get $r i32.const 255 i32.and - local.set $8 - local.get $7 + local.set $rt + local.get $r i32.const 8 i32.shr_s - local.set $9 - local.get $8 + local.set $rd + local.get $rt i32.const 2 i32.lt_u if - local.get $2 - local.get $9 + local.get $c0 + local.get $rd i32.const 0 - local.get $8 - local.get $1 + local.get $rt + local.get $dir i32.xor i32.sub i32.and i32.add return end - local.get $9 + local.get $rd i32.const 255 i32.and - local.set $10 - local.get $9 + local.set $xn + local.get $rd i32.const 8 i32.shr_u - local.set $11 + local.set $xb loop $while-continue|0 - local.get $10 - local.set $12 - local.get $12 + local.get $xn + local.set $var$12 + local.get $var$12 if - local.get $10 + local.get $xn i32.const 1 i32.shr_u - local.set $13 + local.set $h i32.const 5572 - local.get $11 - local.get $13 + local.get $xb + local.get $h i32.add i32.const 2 i32.mul i32.add i32.load8_u - local.set $14 - local.get $14 - local.get $0 + local.set $t + local.get $t + local.get $c i32.eq if i32.const 4100 i32.const 5572 - local.get $11 - local.get $13 + local.get $xb + local.get $h i32.add i32.const 2 i32.mul @@ -2446,72 +2446,72 @@ i32.shl i32.add i32.load - local.set $7 - local.get $7 + local.set $r + local.get $r i32.const 255 i32.and - local.set $8 - local.get $7 + local.set $rt + local.get $r i32.const 8 i32.shr_s - local.set $9 - local.get $8 + local.set $rd + local.get $rt i32.const 2 i32.lt_u if - local.get $2 - local.get $9 + local.get $c0 + local.get $rd i32.const 0 - local.get $8 - local.get $1 + local.get $rt + local.get $dir i32.xor i32.sub i32.and i32.add return end - local.get $2 + local.get $c0 i32.const 1 i32.add - local.get $1 + local.get $dir i32.const 1 i32.shl i32.sub return else - local.get $14 - local.get $0 + local.get $t + local.get $c i32.gt_u if - local.get $13 - local.set $10 + local.get $h + local.set $xn else - local.get $11 - local.get $13 + local.get $xb + local.get $h i32.add - local.set $11 - local.get $10 - local.get $13 + local.set $xb + local.get $xn + local.get $h i32.sub - local.set $10 + local.set $xn end end br $while-continue|0 end end - local.get $2 + local.get $c0 ) - (func $~lib/rt/itcms/__renew (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/rt/itcms/__renew (param $oldPtr i32) (param $size i32) (result i32) + (local $oldObj i32) + (local $newPtr i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $oldPtr i32.const 20 i32.sub - local.set $2 - local.get $1 - local.get $2 + local.set $oldObj + local.get $size + local.get $oldObj i32.load i32.const 3 i32.const -1 @@ -2521,61 +2521,61 @@ i32.sub i32.le_u if - local.get $2 - local.get $1 + local.get $oldObj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $0 + local.get $oldPtr return end - local.get $1 - local.get $2 + local.get $size + local.get $oldObj i32.load offset=12 call $~lib/rt/itcms/__new - local.set $3 - local.get $3 - local.get $0 - local.get $1 - local.tee $4 - local.get $2 + local.set $newPtr + local.get $newPtr + local.get $oldPtr + local.get $size + local.tee $var$4 + local.get $oldObj i32.load offset=16 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.lt_u select memory.copy - local.get $3 + local.get $newPtr ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.get $1 + (func $~lib/util/string/compareImpl (param $str1 i32) (param $index1 i32) (param $str2 i32) (param $index2 i32) (param $len i32) (result i32) + (local $ptr1 i32) + (local $ptr2 i32) + (local $var$7 i32) + (local $a i32) + (local $b i32) + local.get $str1 + local.get $index1 i32.const 1 i32.shl i32.add - local.set $5 - local.get $2 - local.get $3 + local.set $ptr1 + local.get $str2 + local.get $index2 i32.const 1 i32.shl i32.add - local.set $6 + local.set $ptr2 i32.const 0 i32.const 2 i32.lt_s drop - local.get $4 + local.get $len i32.const 4 i32.ge_u if (result i32) - local.get $5 + local.get $ptr1 i32.const 7 i32.and - local.get $6 + local.get $ptr2 i32.const 7 i32.and i32.or @@ -2586,27 +2586,27 @@ if block $do-break|0 loop $do-loop|0 - local.get $5 + local.get $ptr1 i64.load - local.get $6 + local.get $ptr2 i64.load i64.ne if br $do-break|0 end - local.get $5 + local.get $ptr1 i32.const 8 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 8 i32.add - local.set $6 - local.get $4 + local.set $ptr2 + local.get $len i32.const 4 i32.sub - local.set $4 - local.get $4 + local.set $len + local.get $len i32.const 4 i32.ge_u br_if $do-loop|0 @@ -2614,59 +2614,59 @@ end end loop $while-continue|1 - local.get $4 - local.tee $7 + local.get $len + local.tee $var$7 i32.const 1 i32.sub - local.set $4 - local.get $7 - local.set $7 - local.get $7 + local.set $len + local.get $var$7 + local.set $var$7 + local.get $var$7 if - local.get $5 + local.get $ptr1 i32.load16_u - local.set $8 - local.get $6 + local.set $a + local.get $ptr2 i32.load16_u - local.set $9 - local.get $8 - local.get $9 + local.set $b + local.get $a + local.get $b i32.ne if - local.get $8 - local.get $9 + local.get $a + local.get $b i32.sub return end - local.get $5 + local.get $ptr1 i32.const 2 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 2 i32.add - local.set $6 + local.set $ptr2 br $while-continue|1 end end i32.const 0 ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__eq (param $left i32) (param $right i32) (result i32) + (local $leftLength i32) + local.get $left + local.get $right i32.eq if i32.const 1 return end - local.get $0 + local.get $left i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $1 + local.get $right i32.const 0 i32.eq end @@ -2674,29 +2674,29 @@ i32.const 0 return end - local.get $0 + local.get $left call $~lib/string/String#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $leftLength + local.get $leftLength + local.get $right call $~lib/string/String#get:length i32.ne if i32.const 0 return end - local.get $0 + local.get $left i32.const 0 - local.get $1 + local.get $right i32.const 0 - local.get $2 + local.get $leftLength call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/util/string/stagedBinaryLookup (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $0 - local.get $1 + (func $~lib/util/string/stagedBinaryLookup (param $table i32) (param $c i32) (result i32) + local.get $table + local.get $table + local.get $c i32.const 8 i32.shr_u i32.add @@ -2704,42 +2704,42 @@ i32.const 5 i32.shl i32.add - local.get $1 + local.get $c i32.const 255 i32.and i32.const 3 i32.shr_u i32.add i32.load8_u - local.get $1 + local.get $c i32.const 7 i32.and i32.shr_u i32.const 1 i32.and ) - (func $~lib/string/String#codePointAt (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 + (func $~lib/string/String#codePointAt (param $this i32) (param $pos i32) (result i32) + (local $len i32) + (local $first i32) + (local $second i32) + local.get $this call $~lib/string/String#get:length - local.set $2 - local.get $1 - local.get $2 + local.set $len + local.get $pos + local.get $len i32.ge_u if i32.const -1 return end - local.get $0 - local.get $1 + local.get $this + local.get $pos i32.const 1 i32.shl i32.add i32.load16_u - local.set $3 - local.get $3 + local.set $first + local.get $first i32.const 64512 i32.and i32.const 55296 @@ -2747,66 +2747,66 @@ if (result i32) i32.const 1 else - local.get $1 + local.get $pos i32.const 1 i32.add - local.get $2 + local.get $len i32.eq end if - local.get $3 + local.get $first return end - local.get $0 - local.get $1 + local.get $this + local.get $pos i32.const 1 i32.shl i32.add i32.load16_u offset=2 - local.set $4 - local.get $4 + local.set $second + local.get $second i32.const 64512 i32.and i32.const 56320 i32.ne if - local.get $3 + local.get $first return end - local.get $3 + local.get $first i32.const 55296 i32.sub i32.const 10 i32.shl - local.get $4 + local.get $second i32.const 56320 i32.sub i32.add i32.const 65536 i32.add ) - (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) - local.get $0 + (func $~lib/util/number/decimalCount32 (param $value i32) (result i32) + local.get $value i32.const 100000 i32.lt_u if - local.get $0 + local.get $value i32.const 100 i32.lt_u if i32.const 1 - local.get $0 + local.get $value i32.const 10 i32.ge_u i32.add return else i32.const 3 - local.get $0 + local.get $value i32.const 10000 i32.ge_u i32.add - local.get $0 + local.get $value i32.const 1000 i32.ge_u i32.add @@ -2814,23 +2814,23 @@ end unreachable else - local.get $0 + local.get $value i32.const 10000000 i32.lt_u if i32.const 6 - local.get $0 + local.get $value i32.const 1000000 i32.ge_u i32.add return else i32.const 8 - local.get $0 + local.get $value i32.const 1000000000 i32.ge_u i32.add - local.get $0 + local.get $value i32.const 100000000 i32.ge_u i32.add @@ -2840,66 +2840,66 @@ end unreachable ) - (func $~lib/util/number/utoa32_dec_lut (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 i64) - (local $9 i64) - (local $10 i32) - (local $11 i32) + (func $~lib/util/number/utoa32_dec_lut (param $buffer i32) (param $num i32) (param $offset i32) + (local $var$3 i32) + (local $t i32) + (local $r i32) + (local $d1 i32) + (local $d2 i32) + (local $digits1 i64) + (local $digits2 i64) + (local $var$10 i32) + (local $var$11 i32) loop $while-continue|0 - local.get $1 + local.get $num i32.const 10000 i32.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $1 + local.get $num i32.const 10000 i32.div_u - local.set $4 - local.get $1 + local.set $t + local.get $num i32.const 10000 i32.rem_u - local.set $5 - local.get $4 - local.set $1 - local.get $5 + local.set $r + local.get $t + local.set $num + local.get $r i32.const 100 i32.div_u - local.set $6 - local.get $5 + local.set $d1 + local.get $r i32.const 100 i32.rem_u - local.set $7 + local.set $d2 i32.const 18188 - local.get $6 + local.get $d1 i32.const 2 i32.shl i32.add i64.load32_u - local.set $8 + local.set $digits1 i32.const 18188 - local.get $7 + local.get $d2 i32.const 2 i32.shl i32.add i64.load32_u - local.set $9 - local.get $2 + local.set $digits2 + local.get $offset i32.const 4 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $8 - local.get $9 + local.get $digits1 + local.get $digits2 i64.const 32 i64.shl i64.or @@ -2907,105 +2907,105 @@ br $while-continue|0 end end - local.get $1 + local.get $num i32.const 100 i32.ge_u if - local.get $1 + local.get $num i32.const 100 i32.div_u - local.set $3 - local.get $1 + local.set $var$3 + local.get $num i32.const 100 i32.rem_u - local.set $10 - local.get $3 - local.set $1 - local.get $2 + local.set $var$10 + local.get $var$3 + local.set $num + local.get $offset i32.const 2 i32.sub - local.set $2 + local.set $offset i32.const 18188 - local.get $10 + local.get $var$10 i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store end - local.get $1 + local.get $num i32.const 10 i32.ge_u if - local.get $2 + local.get $offset i32.const 2 i32.sub - local.set $2 + local.set $offset i32.const 18188 - local.get $1 + local.get $num i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store else - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 + local.set $offset i32.const 48 - local.get $1 + local.get $num i32.add - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store16 end ) - (func $~lib/util/number/decimalCount64High (param $0 i64) (result i32) - local.get $0 + (func $~lib/util/number/decimalCount64High (param $value i64) (result i32) + local.get $value i64.const 1000000000000000 i64.lt_u if - local.get $0 + local.get $value i64.const 1000000000000 i64.lt_u if i32.const 10 - local.get $0 + local.get $value i64.const 100000000000 i64.ge_u i32.add - local.get $0 + local.get $value i64.const 10000000000 i64.ge_u i32.add return else i32.const 13 - local.get $0 + local.get $value i64.const 100000000000000 i64.ge_u i32.add - local.get $0 + local.get $value i64.const 10000000000000 i64.ge_u i32.add @@ -3013,23 +3013,23 @@ end unreachable else - local.get $0 + local.get $value i64.const 100000000000000000 i64.lt_u if i32.const 16 - local.get $0 + local.get $value i64.const 10000000000000000 i64.ge_u i32.add return else i32.const 18 - local.get $0 + local.get $value i64.const -8446744073709551616 i64.ge_u i32.add - local.get $0 + local.get $value i64.const 1000000000000000000 i64.ge_u i32.add @@ -3039,116 +3039,116 @@ end unreachable ) - (func $~lib/util/number/utoa64_dec_lut (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i32) - (local $4 i64) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i64) - (local $13 i64) + (func $~lib/util/number/utoa64_dec_lut (param $buffer i32) (param $num i64) (param $offset i32) + (local $var$3 i32) + (local $t i64) + (local $r i32) + (local $b i32) + (local $c i32) + (local $b1 i32) + (local $b2 i32) + (local $c1 i32) + (local $c2 i32) + (local $digits1 i64) + (local $digits2 i64) loop $while-continue|0 - local.get $1 + local.get $num i64.const 100000000 i64.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $1 + local.get $num i64.const 100000000 i64.div_u - local.set $4 - local.get $1 - local.get $4 + local.set $t + local.get $num + local.get $t i64.const 100000000 i64.mul i64.sub i32.wrap_i64 - local.set $5 - local.get $4 - local.set $1 - local.get $5 + local.set $r + local.get $t + local.set $num + local.get $r i32.const 10000 i32.div_u - local.set $6 - local.get $5 + local.set $b + local.get $r i32.const 10000 i32.rem_u - local.set $7 - local.get $6 + local.set $c + local.get $b i32.const 100 i32.div_u - local.set $8 - local.get $6 + local.set $b1 + local.get $b i32.const 100 i32.rem_u - local.set $9 - local.get $7 + local.set $b2 + local.get $c i32.const 100 i32.div_u - local.set $10 - local.get $7 + local.set $c1 + local.get $c i32.const 100 i32.rem_u - local.set $11 + local.set $c2 i32.const 18188 - local.get $10 + local.get $c1 i32.const 2 i32.shl i32.add i64.load32_u - local.set $12 + local.set $digits1 i32.const 18188 - local.get $11 + local.get $c2 i32.const 2 i32.shl i32.add i64.load32_u - local.set $13 - local.get $2 + local.set $digits2 + local.get $offset i32.const 4 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $12 - local.get $13 + local.get $digits1 + local.get $digits2 i64.const 32 i64.shl i64.or i64.store i32.const 18188 - local.get $8 + local.get $b1 i32.const 2 i32.shl i32.add i64.load32_u - local.set $12 + local.set $digits1 i32.const 18188 - local.get $9 + local.get $b2 i32.const 2 i32.shl i32.add i64.load32_u - local.set $13 - local.get $2 + local.set $digits2 + local.get $offset i32.const 4 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $12 - local.get $13 + local.get $digits1 + local.get $digits2 i64.const 32 i64.shl i64.or @@ -3156,32 +3156,32 @@ br $while-continue|0 end end - local.get $0 - local.get $1 + local.get $buffer + local.get $num i32.wrap_i64 - local.get $2 + local.get $offset call $~lib/util/number/utoa32_dec_lut ) - (func $~lib/util/number/utoa_hex_lut (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i32) + (func $~lib/util/number/utoa_hex_lut (param $buffer i32) (param $num i64) (param $offset i32) + (local $var$3 i32) loop $while-continue|0 - local.get $2 + local.get $offset i32.const 2 i32.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $2 + local.get $offset i32.const 2 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 18608 - local.get $1 + local.get $num i32.wrap_i64 i32.const 255 i32.and @@ -3190,20 +3190,20 @@ i32.add i32.load i32.store - local.get $1 + local.get $num i64.const 8 i64.shr_u - local.set $1 + local.set $num br $while-continue|0 end end - local.get $2 + local.get $offset i32.const 1 i32.and if - local.get $0 + local.get $buffer i32.const 18608 - local.get $1 + local.get $num i32.wrap_i64 i32.const 6 i32.shl @@ -3212,25 +3212,25 @@ i32.store16 end ) - (func $~lib/util/number/ulog_base (param $0 i64) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) - (local $4 i64) - (local $5 i32) - local.get $1 - local.set $2 - local.get $2 + (func $~lib/util/number/ulog_base (param $num i64) (param $base i32) (result i32) + (local $var$2 i32) + (local $b64 i64) + (local $b i64) + (local $e i32) + local.get $base + local.set $var$2 + local.get $var$2 i32.popcnt i32.const 1 i32.eq if i32.const 63 - local.get $0 + local.get $num i64.clz i32.wrap_i64 i32.sub i32.const 31 - local.get $1 + local.get $base i32.clz i32.sub i32.div_u @@ -3238,95 +3238,95 @@ i32.add return end - local.get $1 + local.get $base i64.extend_i32_s - local.set $3 - local.get $3 - local.set $4 + local.set $b64 + local.get $b64 + local.set $b i32.const 1 - local.set $5 + local.set $e loop $while-continue|0 - local.get $0 - local.get $4 + local.get $num + local.get $b i64.ge_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 - local.get $4 + local.get $num + local.get $b i64.div_u - local.set $0 - local.get $4 - local.get $4 + local.set $num + local.get $b + local.get $b i64.mul - local.set $4 - local.get $5 + local.set $b + local.get $e i32.const 1 i32.shl - local.set $5 + local.set $e br $while-continue|0 end end loop $while-continue|1 - local.get $0 + local.get $num i64.const 1 i64.ge_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 - local.get $3 + local.get $num + local.get $b64 i64.div_u - local.set $0 - local.get $5 + local.set $num + local.get $e i32.const 1 i32.add - local.set $5 + local.set $e br $while-continue|1 end end - local.get $5 + local.get $e i32.const 1 i32.sub ) - (func $~lib/util/number/utoa64_any_core (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i32) - (local $4 i64) - (local $5 i64) - (local $6 i64) - local.get $3 + (func $~lib/util/number/utoa64_any_core (param $buffer i32) (param $num i64) (param $offset i32) (param $radix i32) + (local $base i64) + (local $var$5 i64) + (local $q i64) + local.get $radix i64.extend_i32_s - local.set $4 - local.get $3 - local.get $3 + local.set $base + local.get $radix + local.get $radix i32.const 1 i32.sub i32.and i32.const 0 i32.eq if - local.get $3 + local.get $radix i32.ctz i32.const 7 i32.and i64.extend_i32_s - local.set $5 - local.get $4 + local.set $var$5 + local.get $base i64.const 1 i64.sub - local.set $6 + local.set $q loop $do-loop|0 - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 19664 - local.get $1 - local.get $6 + local.get $num + local.get $q i64.and i32.wrap_i64 i32.const 1 @@ -3334,34 +3334,34 @@ i32.add i32.load16_u i32.store16 - local.get $1 - local.get $5 + local.get $num + local.get $var$5 i64.shr_u - local.set $1 - local.get $1 + local.set $num + local.get $num i64.const 0 i64.ne br_if $do-loop|0 end else loop $do-loop|1 - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 - local.get $1 - local.get $4 + local.set $offset + local.get $num + local.get $base i64.div_u - local.set $6 - local.get $0 - local.get $2 + local.set $q + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 19664 - local.get $1 - local.get $6 - local.get $4 + local.get $num + local.get $q + local.get $base i64.mul i64.sub i32.wrap_i64 @@ -3370,23 +3370,23 @@ i32.add i32.load16_u i32.store16 - local.get $6 - local.set $1 - local.get $1 + local.get $q + local.set $num + local.get $num i64.const 0 i64.ne br_if $do-loop|1 end end ) - (func $~lib/number/I64#toString (param $0 i64) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/number/I64#toString (param $this i64) (param $radix i32) (result i32) + local.get $this + local.get $radix call $~lib/util/number/itoa64 ) - (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__concat (param $left i32) (param $right i32) (result i32) + local.get $left + local.get $right call $~lib/string/String#concat ) (func $~lib/rt/__visit_globals (param $0 i32) diff --git a/tests/compiler/std/string-encoding.debug.wat b/tests/compiler/std/string-encoding.debug.wat index 4e581b748f..cbceefc6d8 100644 --- a/tests/compiler/std/string-encoding.debug.wat +++ b/tests/compiler/std/string-encoding.debug.wat @@ -63,8 +63,8 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (start $~start) - (func $~lib/string/String.UTF16.byteLength (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String.UTF16.byteLength (param $str i32) (result i32) + local.get $str i32.const 20 i32.sub i32.load offset=16 @@ -79,50 +79,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -135,58 +135,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -203,12 +203,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -218,19 +218,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -241,27 +241,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -269,35 +269,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -307,15 +307,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -325,25 +325,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -351,33 +351,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -405,23 +405,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -433,15 +433,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -453,33 +453,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -487,21 +487,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -516,36 +516,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -553,67 +553,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -623,22 +623,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -648,12 +648,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -665,75 +665,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -745,38 +745,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -790,12 +790,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -806,38 +806,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -845,21 +845,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -874,101 +874,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -979,7 +979,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -990,26 +990,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1022,27 +1022,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1056,11 +1056,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1071,66 +1071,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1140,10 +1140,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1154,13 +1154,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1171,109 +1171,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1281,7 +1281,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1298,23 +1298,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1326,54 +1326,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1394,30 +1394,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1427,9 +1427,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1439,8 +1439,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1448,43 +1448,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1496,17 +1496,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1520,7 +1520,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1538,7 +1538,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1548,12 +1548,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1575,7 +1575,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1595,14 +1595,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1615,8 +1615,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1627,37 +1627,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1665,16 +1665,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1682,21 +1682,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1711,12 +1711,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1724,49 +1724,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1776,90 +1776,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1868,22 +1868,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1892,27 +1892,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1927,69 +1927,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2004,29 +2004,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2039,13 +2039,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2056,25 +2056,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2089,10 +2089,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2110,99 +2110,99 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u ) - (func $~lib/string/String.UTF16.encodeUnsafe (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $1 + (func $~lib/string/String.UTF16.encodeUnsafe (param $str i32) (param $len i32) (param $buf i32) (result i32) + (local $size i32) + local.get $len i32.const 1 i32.shl - local.set $3 - local.get $2 - local.get $0 - local.get $3 + local.set $size + local.get $buf + local.get $str + local.get $size memory.copy - local.get $3 + local.get $size ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (param $0 i32) (result i32) - local.get $0 + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 ) - (func $~lib/string/String.UTF16.decode (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/string/String.UTF16.decode (param $buf i32) (result i32) + local.get $buf + local.get $buf call $~lib/arraybuffer/ArrayBuffer#get:byteLength call $~lib/string/String.UTF16.decodeUnsafe ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.get $1 + (func $~lib/util/string/compareImpl (param $str1 i32) (param $index1 i32) (param $str2 i32) (param $index2 i32) (param $len i32) (result i32) + (local $ptr1 i32) + (local $ptr2 i32) + (local $var$7 i32) + (local $a i32) + (local $b i32) + local.get $str1 + local.get $index1 i32.const 1 i32.shl i32.add - local.set $5 - local.get $2 - local.get $3 + local.set $ptr1 + local.get $str2 + local.get $index2 i32.const 1 i32.shl i32.add - local.set $6 + local.set $ptr2 i32.const 0 i32.const 2 i32.lt_s drop - local.get $4 + local.get $len i32.const 4 i32.ge_u if (result i32) - local.get $5 + local.get $ptr1 i32.const 7 i32.and - local.get $6 + local.get $ptr2 i32.const 7 i32.and i32.or @@ -2213,27 +2213,27 @@ if block $do-break|0 loop $do-loop|0 - local.get $5 + local.get $ptr1 i64.load - local.get $6 + local.get $ptr2 i64.load i64.ne if br $do-break|0 end - local.get $5 + local.get $ptr1 i32.const 8 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 8 i32.add - local.set $6 - local.get $4 + local.set $ptr2 + local.get $len i32.const 4 i32.sub - local.set $4 - local.get $4 + local.set $len + local.get $len i32.const 4 i32.ge_u br_if $do-loop|0 @@ -2241,59 +2241,59 @@ end end loop $while-continue|1 - local.get $4 - local.tee $7 + local.get $len + local.tee $var$7 i32.const 1 i32.sub - local.set $4 - local.get $7 - local.set $7 - local.get $7 + local.set $len + local.get $var$7 + local.set $var$7 + local.get $var$7 if - local.get $5 + local.get $ptr1 i32.load16_u - local.set $8 - local.get $6 + local.set $a + local.get $ptr2 i32.load16_u - local.set $9 - local.get $8 - local.get $9 + local.set $b + local.get $a + local.get $b i32.ne if - local.get $8 - local.get $9 + local.get $a + local.get $b i32.sub return end - local.get $5 + local.get $ptr1 i32.const 2 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 2 i32.add - local.set $6 + local.set $ptr2 br $while-continue|1 end end i32.const 0 ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__eq (param $left i32) (param $right i32) (result i32) + (local $leftLength i32) + local.get $left + local.get $right i32.eq if i32.const 1 return end - local.get $0 + local.get $left i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $1 + local.get $right i32.const 0 i32.eq end @@ -2301,306 +2301,306 @@ i32.const 0 return end - local.get $0 + local.get $left call $~lib/string/String#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $leftLength + local.get $leftLength + local.get $right call $~lib/string/String#get:length i32.ne if i32.const 0 return end - local.get $0 + local.get $left i32.const 0 - local.get $1 + local.get $right i32.const 0 - local.get $2 + local.get $leftLength call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String.UTF8.byteLength (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 - local.set $2 - local.get $2 - local.get $0 + (func $~lib/string/String.UTF8.byteLength (param $str i32) (param $nullTerminated i32) (result i32) + (local $strOff i32) + (local $strEnd i32) + (local $bufLen i32) + (local $var$5 i32) + (local $c1 i32) + local.get $str + local.set $strOff + local.get $strOff + local.get $str i32.const 20 i32.sub i32.load offset=16 i32.add - local.set $3 - local.get $1 + local.set $strEnd + local.get $nullTerminated i32.const 0 i32.ne - local.set $4 + local.set $bufLen block $while-break|0 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $strOff + local.get $strEnd i32.lt_u - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $2 + local.get $strOff i32.load16_u - local.set $6 - local.get $6 + local.set $c1 + local.get $c1 i32.const 128 i32.lt_u if - local.get $1 - local.get $6 + local.get $nullTerminated + local.get $c1 i32.eqz i32.and if br $while-break|0 end - local.get $4 + local.get $bufLen i32.const 1 i32.add - local.set $4 + local.set $bufLen else - local.get $6 + local.get $c1 i32.const 2048 i32.lt_u if - local.get $4 + local.get $bufLen i32.const 2 i32.add - local.set $4 + local.set $bufLen else - local.get $6 + local.get $c1 i32.const 64512 i32.and i32.const 55296 i32.eq if (result i32) - local.get $2 + local.get $strOff i32.const 2 i32.add - local.get $3 + local.get $strEnd i32.lt_u else i32.const 0 end if - local.get $2 + local.get $strOff i32.load16_u offset=2 i32.const 64512 i32.and i32.const 56320 i32.eq if - local.get $4 + local.get $bufLen i32.const 4 i32.add - local.set $4 - local.get $2 + local.set $bufLen + local.get $strOff i32.const 4 i32.add - local.set $2 + local.set $strOff br $while-continue|0 end end - local.get $4 + local.get $bufLen i32.const 3 i32.add - local.set $4 + local.set $bufLen end end - local.get $2 + local.get $strOff i32.const 2 i32.add - local.set $2 + local.set $strOff br $while-continue|0 end end end - local.get $4 + local.get $bufLen ) - (func $~lib/string/String.UTF8.encodeUnsafe (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result 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 $0 - local.get $1 + (func $~lib/string/String.UTF8.encodeUnsafe (param $str i32) (param $len i32) (param $buf i32) (param $nullTerminated i32) (param $errorMode i32) (result i32) + (local $strEnd i32) + (local $bufOff i32) + (local $var$7 i32) + (local $c1 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) + local.get $str + local.get $len i32.const 1 i32.shl i32.add - local.set $5 - local.get $2 - local.set $6 + local.set $strEnd + local.get $buf + local.set $bufOff loop $while-continue|0 - local.get $0 - local.get $5 + local.get $str + local.get $strEnd i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $0 + local.get $str i32.load16_u - local.set $8 - local.get $8 + local.set $c1 + local.get $c1 i32.const 128 i32.lt_u if - local.get $6 - local.get $8 + local.get $bufOff + local.get $c1 i32.store8 - local.get $6 + local.get $bufOff i32.const 1 i32.add - local.set $6 - local.get $3 - local.get $8 + local.set $bufOff + local.get $nullTerminated + local.get $c1 i32.eqz i32.and if - local.get $6 - local.get $2 + local.get $bufOff + local.get $buf i32.sub return end else - local.get $8 + local.get $c1 i32.const 2048 i32.lt_u if - local.get $8 + local.get $c1 i32.const 6 i32.shr_u i32.const 192 i32.or - local.set $9 - local.get $8 + local.set $var$9 + local.get $c1 i32.const 63 i32.and i32.const 128 i32.or - local.set $10 - local.get $6 - local.get $10 + local.set $var$10 + local.get $bufOff + local.get $var$10 i32.const 8 i32.shl - local.get $9 + local.get $var$9 i32.or i32.store16 - local.get $6 + local.get $bufOff i32.const 2 i32.add - local.set $6 + local.set $bufOff else - local.get $8 + local.get $c1 i32.const 63488 i32.and i32.const 55296 i32.eq if - local.get $8 + local.get $c1 i32.const 56320 i32.lt_u if (result i32) - local.get $0 + local.get $str i32.const 2 i32.add - local.get $5 + local.get $strEnd i32.lt_u else i32.const 0 end if - local.get $0 + local.get $str i32.load16_u offset=2 - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 i32.const 64512 i32.and i32.const 56320 i32.eq if i32.const 65536 - local.get $8 + local.get $c1 i32.const 1023 i32.and i32.const 10 i32.shl i32.add - local.get $10 + local.get $var$10 i32.const 1023 i32.and i32.or - local.set $8 - local.get $8 + local.set $c1 + local.get $c1 i32.const 18 i32.shr_u i32.const 240 i32.or - local.set $9 - local.get $8 + local.set $var$9 + local.get $c1 i32.const 12 i32.shr_u i32.const 63 i32.and i32.const 128 i32.or - local.set $11 - local.get $8 + local.set $var$11 + local.get $c1 i32.const 6 i32.shr_u i32.const 63 i32.and i32.const 128 i32.or - local.set $12 - local.get $8 + local.set $var$12 + local.get $c1 i32.const 63 i32.and i32.const 128 i32.or - local.set $13 - local.get $6 - local.get $13 + local.set $var$13 + local.get $bufOff + local.get $var$13 i32.const 24 i32.shl - local.get $12 + local.get $var$12 i32.const 16 i32.shl i32.or - local.get $11 + local.get $var$11 i32.const 8 i32.shl i32.or - local.get $9 + local.get $var$9 i32.or i32.store - local.get $6 + local.get $bufOff i32.const 4 i32.add - local.set $6 - local.get $0 + local.set $bufOff + local.get $str i32.const 4 i32.add - local.set $0 + local.set $str br $while-continue|0 end end - local.get $4 + local.get $errorMode i32.const 0 i32.ne if - local.get $4 + local.get $errorMode i32.const 2 i32.eq if @@ -2612,68 +2612,68 @@ unreachable end i32.const 65533 - local.set $8 + local.set $c1 end end - local.get $8 + local.get $c1 i32.const 12 i32.shr_u i32.const 224 i32.or - local.set $10 - local.get $8 + local.set $var$10 + local.get $c1 i32.const 6 i32.shr_u i32.const 63 i32.and i32.const 128 i32.or - local.set $13 - local.get $8 + local.set $var$13 + local.get $c1 i32.const 63 i32.and i32.const 128 i32.or - local.set $12 - local.get $6 - local.get $13 + local.set $var$12 + local.get $bufOff + local.get $var$13 i32.const 8 i32.shl - local.get $10 + local.get $var$10 i32.or i32.store16 - local.get $6 - local.get $12 + local.get $bufOff + local.get $var$12 i32.store8 offset=2 - local.get $6 + local.get $bufOff i32.const 3 i32.add - local.set $6 + local.set $bufOff end end - local.get $0 + local.get $str i32.const 2 i32.add - local.set $0 + local.set $str br $while-continue|0 end end - local.get $3 + local.get $nullTerminated if - local.get $6 - local.tee $7 + local.get $bufOff + local.tee $var$7 i32.const 1 i32.add - local.set $6 - local.get $7 + local.set $bufOff + local.get $var$7 i32.const 0 i32.store8 end - local.get $6 - local.get $2 + local.get $bufOff + local.get $buf i32.sub ) - (func $~lib/string/String.UTF8.encode@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String.UTF8.encode@varargs (param $str i32) (param $nullTerminated i32) (param $errorMode i32) (result i32) block $2of2 block $1of2 block $0of2 @@ -2686,27 +2686,27 @@ unreachable end i32.const 0 - local.set $1 + local.set $nullTerminated end i32.const 0 - local.set $2 + local.set $errorMode end - local.get $0 - local.get $1 - local.get $2 + local.get $str + local.get $nullTerminated + local.get $errorMode call $~lib/string/String.UTF8.encode ) - (func $~lib/rt/itcms/__renew (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/rt/itcms/__renew (param $oldPtr i32) (param $size i32) (result i32) + (local $oldObj i32) + (local $newPtr i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $oldPtr i32.const 20 i32.sub - local.set $2 - local.get $1 - local.get $2 + local.set $oldObj + local.get $size + local.get $oldObj i32.load i32.const 3 i32.const -1 @@ -2716,40 +2716,40 @@ i32.sub i32.le_u if - local.get $2 - local.get $1 + local.get $oldObj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $0 + local.get $oldPtr return end - local.get $1 - local.get $2 + local.get $size + local.get $oldObj i32.load offset=12 call $~lib/rt/itcms/__new - local.set $3 - local.get $3 - local.get $0 - local.get $1 - local.tee $4 - local.get $2 + local.set $newPtr + local.get $newPtr + local.get $oldPtr + local.get $size + local.tee $var$4 + local.get $oldObj i32.load offset=16 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.lt_u select memory.copy - local.get $3 + local.get $newPtr ) - (func $~lib/string/String.UTF8.decode (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/string/String.UTF8.decode (param $buf i32) (param $nullTerminated i32) (result i32) + local.get $buf + local.get $buf call $~lib/arraybuffer/ArrayBuffer#get:byteLength - local.get $1 + local.get $nullTerminated call $~lib/string/String.UTF8.decodeUnsafe ) (func $~lib/rt/itcms/__collect - (local $0 i32) + (local $var$0 i32) i32.const 0 drop global.get $~lib/rt/itcms/state @@ -2760,8 +2760,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -2775,8 +2775,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop diff --git a/tests/compiler/std/string-nonnull.debug.wat b/tests/compiler/std/string-nonnull.debug.wat index 90d8f52069..eb1a0b2355 100644 --- a/tests/compiler/std/string-nonnull.debug.wat +++ b/tests/compiler/std/string-nonnull.debug.wat @@ -18,44 +18,44 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (start $~start) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.get $1 + (func $~lib/util/string/compareImpl (param $str1 i32) (param $index1 i32) (param $str2 i32) (param $index2 i32) (param $len i32) (result i32) + (local $ptr1 i32) + (local $ptr2 i32) + (local $var$7 i32) + (local $a i32) + (local $b i32) + local.get $str1 + local.get $index1 i32.const 1 i32.shl i32.add - local.set $5 - local.get $2 - local.get $3 + local.set $ptr1 + local.get $str2 + local.get $index2 i32.const 1 i32.shl i32.add - local.set $6 + local.set $ptr2 i32.const 0 i32.const 2 i32.lt_s drop - local.get $4 + local.get $len i32.const 4 i32.ge_u if (result i32) - local.get $5 + local.get $ptr1 i32.const 7 i32.and - local.get $6 + local.get $ptr2 i32.const 7 i32.and i32.or @@ -66,27 +66,27 @@ if block $do-break|0 loop $do-loop|0 - local.get $5 + local.get $ptr1 i64.load - local.get $6 + local.get $ptr2 i64.load i64.ne if br $do-break|0 end - local.get $5 + local.get $ptr1 i32.const 8 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 8 i32.add - local.set $6 - local.get $4 + local.set $ptr2 + local.get $len i32.const 4 i32.sub - local.set $4 - local.get $4 + local.set $len + local.get $len i32.const 4 i32.ge_u br_if $do-loop|0 @@ -94,59 +94,59 @@ end end loop $while-continue|1 - local.get $4 - local.tee $7 + local.get $len + local.tee $var$7 i32.const 1 i32.sub - local.set $4 - local.get $7 - local.set $7 - local.get $7 + local.set $len + local.get $var$7 + local.set $var$7 + local.get $var$7 if - local.get $5 + local.get $ptr1 i32.load16_u - local.set $8 - local.get $6 + local.set $a + local.get $ptr2 i32.load16_u - local.set $9 - local.get $8 - local.get $9 + local.set $b + local.get $a + local.get $b i32.ne if - local.get $8 - local.get $9 + local.get $a + local.get $b i32.sub return end - local.get $5 + local.get $ptr1 i32.const 2 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 2 i32.add - local.set $6 + local.set $ptr2 br $while-continue|1 end end i32.const 0 ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__eq (param $left i32) (param $right i32) (result i32) + (local $leftLength i32) + local.get $left + local.get $right i32.eq if i32.const 1 return end - local.get $0 + local.get $left i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $1 + local.get $right i32.const 0 i32.eq end @@ -154,45 +154,45 @@ i32.const 0 return end - local.get $0 + local.get $left call $~lib/string/String#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $leftLength + local.get $leftLength + local.get $right call $~lib/string/String#get:length i32.ne if i32.const 0 return end - local.get $0 + local.get $left i32.const 0 - local.get $1 + local.get $right i32.const 0 - local.get $2 + local.get $leftLength call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String.__ne (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__ne (param $left i32) (param $right i32) (result i32) + local.get $left + local.get $right call $~lib/string/String.__eq i32.eqz ) - (func $~lib/string/String.__not (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String.__not (param $str i32) (result i32) + local.get $str i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $0 + local.get $str call $~lib/string/String#get:length i32.eqz end ) (func $start:std/string-nonnull - (local $0 i32) + (local $var$0 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -203,56 +203,56 @@ i32.store global.get $~lib/memory/__stack_pointer i32.const 32 - local.tee $0 + local.tee $var$0 i32.store - local.get $0 + local.get $var$0 i32.const 0 call $~lib/string/String.__ne if - local.get $0 + local.get $var$0 call $~lib/string/String#get:length drop end - local.get $0 + local.get $var$0 i32.const 0 call $~lib/string/String.__ne if - local.get $0 + local.get $var$0 call $~lib/string/String#get:length drop end - local.get $0 + local.get $var$0 if - local.get $0 + local.get $var$0 call $~lib/string/String#get:length drop end - local.get $0 + local.get $var$0 i32.const 0 call $~lib/string/String.__eq if nop else - local.get $0 + local.get $var$0 call $~lib/string/String#get:length drop end - local.get $0 + local.get $var$0 i32.const 0 call $~lib/string/String.__eq if nop else - local.get $0 + local.get $var$0 call $~lib/string/String#get:length drop end - local.get $0 + local.get $var$0 call $~lib/string/String.__not if nop else - local.get $0 + local.get $var$0 call $~lib/string/String#get:length drop end diff --git a/tests/compiler/std/string.debug.wat b/tests/compiler/std/string.debug.wat index 6f811c67a5..576bc9df63 100644 --- a/tests/compiler/std/string.debug.wat +++ b/tests/compiler/std/string.debug.wat @@ -539,44 +539,44 @@ (export "getString" (func $std/string/getString)) (export "memory" (memory $0)) (start $~start) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.get $1 + (func $~lib/util/string/compareImpl (param $str1 i32) (param $index1 i32) (param $str2 i32) (param $index2 i32) (param $len i32) (result i32) + (local $ptr1 i32) + (local $ptr2 i32) + (local $var$7 i32) + (local $a i32) + (local $b i32) + local.get $str1 + local.get $index1 i32.const 1 i32.shl i32.add - local.set $5 - local.get $2 - local.get $3 + local.set $ptr1 + local.get $str2 + local.get $index2 i32.const 1 i32.shl i32.add - local.set $6 + local.set $ptr2 i32.const 0 i32.const 2 i32.lt_s drop - local.get $4 + local.get $len i32.const 4 i32.ge_u if (result i32) - local.get $5 + local.get $ptr1 i32.const 7 i32.and - local.get $6 + local.get $ptr2 i32.const 7 i32.and i32.or @@ -587,27 +587,27 @@ if block $do-break|0 loop $do-loop|0 - local.get $5 + local.get $ptr1 i64.load - local.get $6 + local.get $ptr2 i64.load i64.ne if br $do-break|0 end - local.get $5 + local.get $ptr1 i32.const 8 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 8 i32.add - local.set $6 - local.get $4 + local.set $ptr2 + local.get $len i32.const 4 i32.sub - local.set $4 - local.get $4 + local.set $len + local.get $len i32.const 4 i32.ge_u br_if $do-loop|0 @@ -615,59 +615,59 @@ end end loop $while-continue|1 - local.get $4 - local.tee $7 + local.get $len + local.tee $var$7 i32.const 1 i32.sub - local.set $4 - local.get $7 - local.set $7 - local.get $7 + local.set $len + local.get $var$7 + local.set $var$7 + local.get $var$7 if - local.get $5 + local.get $ptr1 i32.load16_u - local.set $8 - local.get $6 + local.set $a + local.get $ptr2 i32.load16_u - local.set $9 - local.get $8 - local.get $9 + local.set $b + local.get $a + local.get $b i32.ne if - local.get $8 - local.get $9 + local.get $a + local.get $b i32.sub return end - local.get $5 + local.get $ptr1 i32.const 2 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 2 i32.add - local.set $6 + local.set $ptr2 br $while-continue|1 end end i32.const 0 ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__eq (param $left i32) (param $right i32) (result i32) + (local $leftLength i32) + local.get $left + local.get $right i32.eq if i32.const 1 return end - local.get $0 + local.get $left i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $1 + local.get $right i32.const 0 i32.eq end @@ -675,63 +675,63 @@ i32.const 0 return end - local.get $0 + local.get $left call $~lib/string/String#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $leftLength + local.get $leftLength + local.get $right call $~lib/string/String#get:length i32.ne if i32.const 0 return end - local.get $0 + local.get $left i32.const 0 - local.get $1 + local.get $right i32.const 0 - local.get $2 + local.get $leftLength call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String#charCodeAt (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 + (func $~lib/string/String#charCodeAt (param $this i32) (param $pos i32) (result i32) + local.get $pos + local.get $this call $~lib/string/String#get:length i32.ge_u if i32.const -1 return end - local.get $0 - local.get $1 + local.get $this + local.get $pos i32.const 1 i32.shl i32.add i32.load16_u ) - (func $~lib/string/String#codePointAt (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 + (func $~lib/string/String#codePointAt (param $this i32) (param $pos i32) (result i32) + (local $len i32) + (local $first i32) + (local $second i32) + local.get $this call $~lib/string/String#get:length - local.set $2 - local.get $1 - local.get $2 + local.set $len + local.get $pos + local.get $len i32.ge_u if i32.const -1 return end - local.get $0 - local.get $1 + local.get $this + local.get $pos i32.const 1 i32.shl i32.add i32.load16_u - local.set $3 - local.get $3 + local.set $first + local.get $first i32.const 64512 i32.and i32.const 55296 @@ -739,38 +739,38 @@ if (result i32) i32.const 1 else - local.get $1 + local.get $pos i32.const 1 i32.add - local.get $2 + local.get $len i32.eq end if - local.get $3 + local.get $first return end - local.get $0 - local.get $1 + local.get $this + local.get $pos i32.const 1 i32.shl i32.add i32.load16_u offset=2 - local.set $4 - local.get $4 + local.set $second + local.get $second i32.const 64512 i32.and i32.const 56320 i32.ne if - local.get $3 + local.get $first return end - local.get $3 + local.get $first i32.const 55296 i32.sub i32.const 10 i32.shl - local.get $4 + local.get $second i32.const 56320 i32.sub i32.add @@ -787,50 +787,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -843,58 +843,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -911,12 +911,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -926,19 +926,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -949,27 +949,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -977,35 +977,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -1015,15 +1015,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -1033,25 +1033,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -1059,33 +1059,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -1113,23 +1113,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -1141,15 +1141,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -1161,33 +1161,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1195,21 +1195,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -1224,36 +1224,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -1261,67 +1261,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -1331,22 +1331,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -1356,12 +1356,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -1373,75 +1373,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -1453,38 +1453,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -1498,12 +1498,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -1514,38 +1514,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1553,21 +1553,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -1582,101 +1582,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -1687,7 +1687,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1698,26 +1698,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1730,27 +1730,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1764,11 +1764,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1779,66 +1779,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1848,10 +1848,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1862,13 +1862,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1879,109 +1879,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1989,7 +1989,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -2006,23 +2006,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -2034,54 +2034,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -2102,30 +2102,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -2135,9 +2135,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -2147,8 +2147,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -2156,43 +2156,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -2204,17 +2204,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -2228,7 +2228,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -2246,7 +2246,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -2256,12 +2256,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -2283,7 +2283,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -2303,14 +2303,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -2323,8 +2323,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -2335,37 +2335,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -2373,16 +2373,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -2390,21 +2390,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -2419,12 +2419,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -2432,49 +2432,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -2484,90 +2484,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -2576,22 +2576,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -2600,27 +2600,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -2635,69 +2635,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2712,29 +2712,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2747,13 +2747,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2764,25 +2764,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2797,10 +2797,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2818,54 +2818,54 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/string/String#at (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/string/String#at (param $this i32) (param $pos i32) (result i32) + (local $len i32) + (local $out i32) + local.get $this call $~lib/string/String#get:length - local.set $2 - local.get $1 + local.set $len + local.get $pos i32.const 0 - local.get $2 - local.get $1 + local.get $len + local.get $pos i32.const 0 i32.ge_s select i32.add - local.set $1 - local.get $1 - local.get $2 + local.set $pos + local.get $pos + local.get $len i32.ge_u if i32.const 240 @@ -2878,30 +2878,30 @@ i32.const 2 i32.const 1 call $~lib/rt/itcms/__new - local.set $3 - local.get $3 - local.get $0 - local.get $1 + local.set $out + local.get $out + local.get $this + local.get $pos i32.const 1 i32.shl i32.add i32.load16_u i32.store16 - local.get $3 + local.get $out ) - (func $~lib/string/String.__not (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String.__not (param $str i32) (result i32) + local.get $str i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $0 + local.get $str call $~lib/string/String#get:length i32.eqz end ) - (func $~lib/string/String.fromCharCode@varargs (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.fromCharCode@varargs (param $unit i32) (param $surr i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -2913,39 +2913,39 @@ unreachable end i32.const -1 - local.set $1 + local.set $surr end - local.get $0 - local.get $1 + local.get $unit + local.get $surr call $~lib/string/String.fromCharCode ) - (func $~lib/rt/__newBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - local.get $1 + (func $~lib/rt/__newBuffer (param $size i32) (param $id i32) (param $data i32) (result i32) + (local $buffer i32) + local.get $size + local.get $id call $~lib/rt/itcms/__new - local.set $3 - local.get $2 + local.set $buffer + local.get $data if - local.get $3 - local.get $2 - local.get $0 + local.get $buffer + local.get $data + local.get $size memory.copy end - local.get $3 + local.get $buffer ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32) + (local $child i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $childPtr i32.eqz if return end i32.const 1 drop - local.get $0 + local.get $parentPtr i32.eqz if i32.const 0 @@ -2955,37 +2955,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $childPtr i32.const 20 i32.sub - local.set $3 - local.get $3 + local.set $child + local.get $child call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $0 + local.get $parentPtr i32.const 20 i32.sub - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 call $~lib/rt/itcms/Object#get:color - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $2 + local.get $expectMultiple if - local.get $4 + local.get $var$4 call $~lib/rt/itcms/Object#makeGray else - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end else - local.get $5 + local.get $var$5 i32.const 3 i32.eq if (result i32) @@ -2996,342 +2996,342 @@ i32.const 0 end if - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end end end ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/string/String#startsWith (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $0 + (func $~lib/string/String#startsWith (param $this i32) (param $search i32) (param $start i32) (result i32) + (local $len i32) + (local $var$4 i32) + (local $var$5 i32) + (local $searchStart i32) + (local $searchLength i32) + local.get $this call $~lib/string/String#get:length - local.set $3 - local.get $2 - local.tee $4 + local.set $len + local.get $start + local.tee $var$4 i32.const 0 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.gt_s select - local.tee $5 - local.get $3 - local.tee $4 - local.get $5 - local.get $4 + local.tee $var$5 + local.get $len + local.tee $var$4 + local.get $var$5 + local.get $var$4 i32.lt_s select - local.set $6 - local.get $1 + local.set $searchStart + local.get $search call $~lib/string/String#get:length - local.set $7 - local.get $7 - local.get $6 + local.set $searchLength + local.get $searchLength + local.get $searchStart i32.add - local.get $3 + local.get $len i32.gt_s if i32.const 0 return end - local.get $0 - local.get $6 - local.get $1 + local.get $this + local.get $searchStart + local.get $search i32.const 0 - local.get $7 + local.get $searchLength call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String#endsWith (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.tee $3 + (func $~lib/string/String#endsWith (param $this i32) (param $search i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $searchLength i32) + (local $searchStart i32) + local.get $end + local.tee $var$3 i32.const 0 - local.tee $4 - local.get $3 - local.get $4 + local.tee $var$4 + local.get $var$3 + local.get $var$4 i32.gt_s select - local.tee $4 - local.get $0 + local.tee $var$4 + local.get $this call $~lib/string/String#get:length - local.tee $3 - local.get $4 - local.get $3 + local.tee $var$3 + local.get $var$4 + local.get $var$3 i32.lt_s select - local.set $2 - local.get $1 + local.set $end + local.get $search call $~lib/string/String#get:length - local.set $5 - local.get $2 - local.get $5 + local.set $searchLength + local.get $end + local.get $searchLength i32.sub - local.set $6 - local.get $6 + local.set $searchStart + local.get $searchStart i32.const 0 i32.lt_s if i32.const 0 return end - local.get $0 - local.get $6 - local.get $1 + local.get $this + local.get $searchStart + local.get $search i32.const 0 - local.get $5 + local.get $searchLength call $~lib/util/string/compareImpl i32.eqz ) - (func $~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 $7 i32) - local.get $1 + (func $~lib/string/String#indexOf (param $this i32) (param $search i32) (param $start i32) (result i32) + (local $searchLen i32) + (local $len i32) + (local $var$5 i32) + (local $var$6 i32) + (local $searchStart i32) + local.get $search call $~lib/string/String#get:length - local.set $3 - local.get $3 + local.set $searchLen + local.get $searchLen i32.eqz if i32.const 0 return end - local.get $0 + local.get $this call $~lib/string/String#get:length - local.set $4 - local.get $4 + local.set $len + local.get $len i32.eqz if i32.const -1 return end - local.get $2 - local.tee $5 + local.get $start + local.tee $var$5 i32.const 0 - local.tee $6 - local.get $5 - local.get $6 + local.tee $var$6 + local.get $var$5 + local.get $var$6 i32.gt_s select - local.tee $6 - local.get $4 - local.tee $5 - local.get $6 - local.get $5 + local.tee $var$6 + local.get $len + local.tee $var$5 + local.get $var$6 + local.get $var$5 i32.lt_s select - local.set $7 - local.get $4 - local.get $3 + local.set $searchStart + local.get $len + local.get $searchLen i32.sub - local.set $4 + local.set $len loop $for-loop|0 - local.get $7 - local.get $4 + local.get $searchStart + local.get $len i32.le_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $7 - local.get $1 + local.get $this + local.get $searchStart + local.get $search i32.const 0 - local.get $3 + local.get $searchLen call $~lib/util/string/compareImpl i32.eqz if - local.get $7 + local.get $searchStart return end - local.get $7 + local.get $searchStart i32.const 1 i32.add - local.set $7 + local.set $searchStart br $for-loop|0 end end i32.const -1 ) - (func $~lib/string/String#includes (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $1 - local.get $2 + (func $~lib/string/String#includes (param $this i32) (param $search i32) (param $start i32) (result i32) + local.get $this + local.get $search + local.get $start call $~lib/string/String#indexOf i32.const -1 i32.ne ) - (func $~lib/memory/memory.repeat (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + (func $~lib/memory/memory.repeat (param $dst i32) (param $src i32) (param $srcLength i32) (param $count i32) + (local $index i32) + (local $total i32) + (local $var$6 i32) i32.const 0 - local.set $4 - local.get $2 - local.get $3 + local.set $index + local.get $srcLength + local.get $count i32.mul - local.set $5 + local.set $total loop $while-continue|0 - local.get $4 - local.get $5 + local.get $index + local.get $total i32.lt_u - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $4 + local.get $dst + local.get $index i32.add - local.get $1 - local.get $2 + local.get $src + local.get $srcLength memory.copy - local.get $4 - local.get $2 + local.get $index + local.get $srcLength i32.add - local.set $4 + local.set $index br $while-continue|0 end end ) - (func $~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 $7 i32) - local.get $1 + (func $~lib/string/String#lastIndexOf (param $this i32) (param $search i32) (param $start i32) (result i32) + (local $searchLen i32) + (local $len i32) + (local $var$5 i32) + (local $var$6 i32) + (local $searchStart i32) + local.get $search call $~lib/string/String#get:length - local.set $3 - local.get $3 + local.set $searchLen + local.get $searchLen i32.eqz if - local.get $0 + local.get $this call $~lib/string/String#get:length return end - local.get $0 + local.get $this call $~lib/string/String#get:length - local.set $4 - local.get $4 + local.set $len + local.get $len i32.eqz if i32.const -1 return end - local.get $2 - local.tee $5 + local.get $start + local.tee $var$5 i32.const 0 - local.tee $6 - local.get $5 - local.get $6 + local.tee $var$6 + local.get $var$5 + local.get $var$6 i32.gt_s select - local.tee $6 - local.get $4 - local.get $3 + local.tee $var$6 + local.get $len + local.get $searchLen i32.sub - local.tee $5 - local.get $6 - local.get $5 + local.tee $var$5 + local.get $var$6 + local.get $var$5 i32.lt_s select - local.set $7 + local.set $searchStart loop $for-loop|0 - local.get $7 + local.get $searchStart i32.const 0 i32.ge_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $7 - local.get $1 + local.get $this + local.get $searchStart + local.get $search i32.const 0 - local.get $3 + local.get $searchLen call $~lib/util/string/compareImpl i32.eqz if - local.get $7 + local.get $searchStart return end - local.get $7 + local.get $searchStart i32.const 1 i32.sub - local.set $7 + local.set $searchStart br $for-loop|0 end end i32.const -1 ) - (func $~lib/string/String#localeCompare (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - local.get $0 + (func $~lib/string/String#localeCompare (param $this i32) (param $other i32) (result i32) + (local $alen i32) + (local $blen i32) + (local $var$4 i32) + (local $var$5 i32) + (local $res i32) + local.get $other + local.get $this i32.eq if i32.const 0 return end - local.get $0 + local.get $this call $~lib/string/String#get:length - local.set $2 - local.get $1 + local.set $alen + local.get $other call $~lib/string/String#get:length - local.set $3 - local.get $0 + local.set $blen + local.get $this i32.const 0 - local.get $1 + local.get $other i32.const 0 - local.get $2 - local.tee $4 - local.get $3 - local.tee $5 - local.get $4 - local.get $5 + local.get $alen + local.tee $var$4 + local.get $blen + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.lt_s select call $~lib/util/string/compareImpl - local.set $6 - local.get $6 + local.set $res + local.get $res if (result i32) - local.get $6 + local.get $res else - local.get $2 - local.get $3 + local.get $alen + local.get $blen i32.sub end - local.set $6 - local.get $6 + local.set $res + local.get $res i32.const 0 i32.gt_s - local.get $6 + local.get $res i32.const 0 i32.lt_s i32.sub ) - (func $~lib/util/string/isSpace (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/util/string/isSpace (param $c i32) (result i32) + (local $var$1 i32) + local.get $c i32.const 5760 i32.lt_u if - local.get $0 + local.get $c i32.const 128 i32.or i32.const 160 @@ -3339,7 +3339,7 @@ if (result i32) i32.const 1 else - local.get $0 + local.get $c i32.const 9 i32.sub i32.const 13 @@ -3349,7 +3349,7 @@ end return end - local.get $0 + local.get $c i32.const 8192 i32.sub i32.const 8202 @@ -3368,33 +3368,33 @@ block $case2|0 block $case1|0 block $case0|0 - local.get $0 - local.set $1 - local.get $1 + local.get $c + local.set $var$1 + local.get $var$1 i32.const 5760 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 8232 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 8233 i32.eq br_if $case2|0 - local.get $1 + local.get $var$1 i32.const 8239 i32.eq br_if $case3|0 - local.get $1 + local.get $var$1 i32.const 8287 i32.eq br_if $case4|0 - local.get $1 + local.get $var$1 i32.const 12288 i32.eq br_if $case5|0 - local.get $1 + local.get $var$1 i32.const 65279 i32.eq br_if $case6|0 @@ -3411,18 +3411,18 @@ end i32.const 0 ) - (func $~lib/util/string/strtol (param $0 i32) (param $1 i32) (result f64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 f64) - (local $7 f64) - (local $8 i32) - local.get $0 + (func $~lib/util/string/strtol (param $str i32) (param $radix i32) (result f64) + (local $len i32) + (local $ptr i32) + (local $code i32) + (local $var$5 i32) + (local $sign f64) + (local $num f64) + (local $initial i32) + local.get $str call $~lib/string/String#get:length - local.set $2 - local.get $2 + local.set $len + local.get $len i32.eqz if i32.const 1 @@ -3430,47 +3430,47 @@ f64.const nan:0x8000000000000 return end - local.get $0 - local.set $3 - local.get $3 + local.get $str + local.set $ptr + local.get $ptr i32.load16_u - local.set $4 + local.set $code loop $while-continue|0 - local.get $4 + local.get $code call $~lib/util/string/isSpace - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $3 + local.get $ptr i32.const 2 i32.add - local.tee $3 + local.tee $ptr i32.load16_u - local.set $4 - local.get $2 + local.set $code + local.get $len i32.const 1 i32.sub - local.set $2 + local.set $len br $while-continue|0 end end f64.const 1 - local.set $6 - local.get $4 + local.set $sign + local.get $code i32.const 45 i32.eq if (result i32) i32.const 1 else - local.get $4 + local.get $code i32.const 43 i32.eq end if - local.get $2 + local.get $len i32.const 1 i32.sub - local.tee $2 + local.tee $len i32.eqz if i32.const 1 @@ -3478,29 +3478,29 @@ f64.const nan:0x8000000000000 return end - local.get $4 + local.get $code i32.const 45 i32.eq if f64.const -1 - local.set $6 + local.set $sign end - local.get $3 + local.get $ptr i32.const 2 i32.add - local.tee $3 + local.tee $ptr i32.load16_u - local.set $4 + local.set $code end - local.get $1 + local.get $radix if - local.get $1 + local.get $radix i32.const 2 i32.lt_s if (result i32) i32.const 1 else - local.get $1 + local.get $radix i32.const 36 i32.gt_s end @@ -3510,22 +3510,22 @@ f64.const nan:0x8000000000000 return end - local.get $1 + local.get $radix i32.const 16 i32.eq if - local.get $2 + local.get $len i32.const 2 i32.gt_s if (result i32) - local.get $4 + local.get $code i32.const 48 i32.eq else i32.const 0 end if (result i32) - local.get $3 + local.get $ptr i32.load16_u offset=2 i32.const 32 i32.or @@ -3535,22 +3535,22 @@ i32.const 0 end if - local.get $3 + local.get $ptr i32.const 4 i32.add - local.set $3 - local.get $2 + local.set $ptr + local.get $len i32.const 2 i32.sub - local.set $2 + local.set $len end end else - local.get $4 + local.get $code i32.const 48 i32.eq if (result i32) - local.get $2 + local.get $len i32.const 2 i32.gt_s else @@ -3561,101 +3561,101 @@ block $case2|1 block $case1|1 block $case0|1 - local.get $3 + local.get $ptr i32.load16_u offset=2 i32.const 32 i32.or - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.const 98 i32.eq br_if $case0|1 - local.get $5 + local.get $var$5 i32.const 111 i32.eq br_if $case1|1 - local.get $5 + local.get $var$5 i32.const 120 i32.eq br_if $case2|1 br $break|1 end - local.get $3 + local.get $ptr i32.const 4 i32.add - local.set $3 - local.get $2 + local.set $ptr + local.get $len i32.const 2 i32.sub - local.set $2 + local.set $len i32.const 2 - local.set $1 + local.set $radix br $break|1 end - local.get $3 + local.get $ptr i32.const 4 i32.add - local.set $3 - local.get $2 + local.set $ptr + local.get $len i32.const 2 i32.sub - local.set $2 + local.set $len i32.const 8 - local.set $1 + local.set $radix br $break|1 end - local.get $3 + local.get $ptr i32.const 4 i32.add - local.set $3 - local.get $2 + local.set $ptr + local.get $len i32.const 2 i32.sub - local.set $2 + local.set $len i32.const 16 - local.set $1 + local.set $radix br $break|1 end end - local.get $1 + local.get $radix i32.eqz if i32.const 10 - local.set $1 + local.set $radix end end f64.const 0 - local.set $7 - local.get $2 + local.set $num + local.get $len i32.const 1 i32.sub - local.set $8 + local.set $initial block $while-break|2 loop $while-continue|2 - local.get $2 - local.tee $5 + local.get $len + local.tee $var$5 i32.const 1 i32.sub - local.set $2 - local.get $5 - local.set $5 - local.get $5 + local.set $len + local.get $var$5 + local.set $var$5 + local.get $var$5 if - local.get $3 + local.get $ptr i32.load16_u - local.set $4 - local.get $4 + local.set $code + local.get $code i32.const 48 i32.sub i32.const 10 i32.lt_u if - local.get $4 + local.get $code i32.const 48 i32.sub - local.set $4 + local.set $code else - local.get $4 + local.get $code i32.const 65 i32.sub i32.const 90 @@ -3663,14 +3663,14 @@ i32.sub i32.le_u if - local.get $4 + local.get $code i32.const 65 i32.const 10 i32.sub i32.sub - local.set $4 + local.set $code else - local.get $4 + local.get $code i32.const 97 i32.sub i32.const 122 @@ -3678,21 +3678,21 @@ i32.sub i32.le_u if - local.get $4 + local.get $code i32.const 97 i32.const 10 i32.sub i32.sub - local.set $4 + local.set $code end end end - local.get $4 - local.get $1 + local.get $code + local.get $radix i32.ge_u if - local.get $8 - local.get $2 + local.get $initial + local.get $len i32.eq if i32.const 1 @@ -3702,54 +3702,54 @@ end br $while-break|2 end - local.get $7 - local.get $1 + local.get $num + local.get $radix f64.convert_i32_s f64.mul - local.get $4 + local.get $code f64.convert_i32_u f64.add - local.set $7 - local.get $3 + local.set $num + local.get $ptr i32.const 2 i32.add - local.set $3 + local.set $ptr br $while-continue|2 end end end - local.get $6 - local.get $7 + local.get $sign + local.get $num f64.mul ) - (func $~lib/string/parseInt (param $0 i32) (param $1 i32) (result f64) - local.get $0 - local.get $1 + (func $~lib/string/parseInt (param $str i32) (param $radix i32) (result f64) + local.get $str + local.get $radix call $~lib/util/string/strtol ) - (func $~lib/number/F32.parseInt (param $0 i32) (param $1 i32) (result f32) - local.get $0 - local.get $1 + (func $~lib/number/F32.parseInt (param $value i32) (param $radix i32) (result f32) + local.get $value + local.get $radix call $~lib/util/string/strtol f32.demote_f64 ) - (func $~lib/number/F64.parseInt (param $0 i32) (param $1 i32) (result f64) - local.get $0 - local.get $1 + (func $~lib/number/F64.parseInt (param $value i32) (param $radix i32) (result f64) + local.get $value + local.get $radix call $~lib/util/string/strtol ) - (func $~lib/util/string/strtol (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 + (func $~lib/util/string/strtol (param $str i32) (param $radix i32) (result i32) + (local $len i32) + (local $ptr i32) + (local $code i32) + (local $var$5 i32) + (local $sign i32) + (local $num i32) + (local $initial i32) + local.get $str call $~lib/string/String#get:length - local.set $2 - local.get $2 + local.set $len + local.get $len i32.eqz if i32.const 0 @@ -3757,47 +3757,47 @@ i32.const 0 return end - local.get $0 - local.set $3 - local.get $3 + local.get $str + local.set $ptr + local.get $ptr i32.load16_u - local.set $4 + local.set $code loop $while-continue|0 - local.get $4 + local.get $code call $~lib/util/string/isSpace - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $3 + local.get $ptr i32.const 2 i32.add - local.tee $3 + local.tee $ptr i32.load16_u - local.set $4 - local.get $2 + local.set $code + local.get $len i32.const 1 i32.sub - local.set $2 + local.set $len br $while-continue|0 end end i32.const 1 - local.set $6 - local.get $4 + local.set $sign + local.get $code i32.const 45 i32.eq if (result i32) i32.const 1 else - local.get $4 + local.get $code i32.const 43 i32.eq end if - local.get $2 + local.get $len i32.const 1 i32.sub - local.tee $2 + local.tee $len i32.eqz if i32.const 0 @@ -3805,29 +3805,29 @@ i32.const 0 return end - local.get $4 + local.get $code i32.const 45 i32.eq if i32.const -1 - local.set $6 + local.set $sign end - local.get $3 + local.get $ptr i32.const 2 i32.add - local.tee $3 + local.tee $ptr i32.load16_u - local.set $4 + local.set $code end - local.get $1 + local.get $radix if - local.get $1 + local.get $radix i32.const 2 i32.lt_s if (result i32) i32.const 1 else - local.get $1 + local.get $radix i32.const 36 i32.gt_s end @@ -3837,22 +3837,22 @@ i32.const 0 return end - local.get $1 + local.get $radix i32.const 16 i32.eq if - local.get $2 + local.get $len i32.const 2 i32.gt_s if (result i32) - local.get $4 + local.get $code i32.const 48 i32.eq else i32.const 0 end if (result i32) - local.get $3 + local.get $ptr i32.load16_u offset=2 i32.const 32 i32.or @@ -3862,22 +3862,22 @@ i32.const 0 end if - local.get $3 + local.get $ptr i32.const 4 i32.add - local.set $3 - local.get $2 + local.set $ptr + local.get $len i32.const 2 i32.sub - local.set $2 + local.set $len end end else - local.get $4 + local.get $code i32.const 48 i32.eq if (result i32) - local.get $2 + local.get $len i32.const 2 i32.gt_s else @@ -3888,101 +3888,101 @@ block $case2|1 block $case1|1 block $case0|1 - local.get $3 + local.get $ptr i32.load16_u offset=2 i32.const 32 i32.or - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.const 98 i32.eq br_if $case0|1 - local.get $5 + local.get $var$5 i32.const 111 i32.eq br_if $case1|1 - local.get $5 + local.get $var$5 i32.const 120 i32.eq br_if $case2|1 br $break|1 end - local.get $3 + local.get $ptr i32.const 4 i32.add - local.set $3 - local.get $2 + local.set $ptr + local.get $len i32.const 2 i32.sub - local.set $2 + local.set $len i32.const 2 - local.set $1 + local.set $radix br $break|1 end - local.get $3 + local.get $ptr i32.const 4 i32.add - local.set $3 - local.get $2 + local.set $ptr + local.get $len i32.const 2 i32.sub - local.set $2 + local.set $len i32.const 8 - local.set $1 + local.set $radix br $break|1 end - local.get $3 + local.get $ptr i32.const 4 i32.add - local.set $3 - local.get $2 + local.set $ptr + local.get $len i32.const 2 i32.sub - local.set $2 + local.set $len i32.const 16 - local.set $1 + local.set $radix br $break|1 end end - local.get $1 + local.get $radix i32.eqz if i32.const 10 - local.set $1 + local.set $radix end end i32.const 0 - local.set $7 - local.get $2 + local.set $num + local.get $len i32.const 1 i32.sub - local.set $8 + local.set $initial block $while-break|2 loop $while-continue|2 - local.get $2 - local.tee $5 + local.get $len + local.tee $var$5 i32.const 1 i32.sub - local.set $2 - local.get $5 - local.set $5 - local.get $5 + local.set $len + local.get $var$5 + local.set $var$5 + local.get $var$5 if - local.get $3 + local.get $ptr i32.load16_u - local.set $4 - local.get $4 + local.set $code + local.get $code i32.const 48 i32.sub i32.const 10 i32.lt_u if - local.get $4 + local.get $code i32.const 48 i32.sub - local.set $4 + local.set $code else - local.get $4 + local.get $code i32.const 65 i32.sub i32.const 90 @@ -3990,14 +3990,14 @@ i32.sub i32.le_u if - local.get $4 + local.get $code i32.const 65 i32.const 10 i32.sub i32.sub - local.set $4 + local.set $code else - local.get $4 + local.get $code i32.const 97 i32.sub i32.const 122 @@ -4005,21 +4005,21 @@ i32.sub i32.le_u if - local.get $4 + local.get $code i32.const 97 i32.const 10 i32.sub i32.sub - local.set $4 + local.set $code end end end - local.get $4 - local.get $1 + local.get $code + local.get $radix i32.ge_u if - local.get $8 - local.get $2 + local.get $initial + local.get $len i32.eq if i32.const 0 @@ -4029,41 +4029,41 @@ end br $while-break|2 end - local.get $7 - local.get $1 + local.get $num + local.get $radix i32.mul - local.get $4 + local.get $code i32.add - local.set $7 - local.get $3 + local.set $num + local.get $ptr i32.const 2 i32.add - local.set $3 + local.set $ptr br $while-continue|2 end end end - local.get $6 - local.get $7 + local.get $sign + local.get $num i32.mul ) - (func $~lib/number/I32.parseInt (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/number/I32.parseInt (param $value i32) (param $radix i32) (result i32) + local.get $value + local.get $radix call $~lib/util/string/strtol ) - (func $~lib/util/string/strtol (param $0 i32) (param $1 i32) (result i64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i64) - (local $7 i64) - (local $8 i32) - local.get $0 + (func $~lib/util/string/strtol (param $str i32) (param $radix i32) (result i64) + (local $len i32) + (local $ptr i32) + (local $code i32) + (local $var$5 i32) + (local $sign i64) + (local $num i64) + (local $initial i32) + local.get $str call $~lib/string/String#get:length - local.set $2 - local.get $2 + local.set $len + local.get $len i32.eqz if i32.const 0 @@ -4071,47 +4071,47 @@ i64.const 0 return end - local.get $0 - local.set $3 - local.get $3 + local.get $str + local.set $ptr + local.get $ptr i32.load16_u - local.set $4 + local.set $code loop $while-continue|0 - local.get $4 + local.get $code call $~lib/util/string/isSpace - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $3 + local.get $ptr i32.const 2 i32.add - local.tee $3 + local.tee $ptr i32.load16_u - local.set $4 - local.get $2 + local.set $code + local.get $len i32.const 1 i32.sub - local.set $2 + local.set $len br $while-continue|0 end end i64.const 1 - local.set $6 - local.get $4 + local.set $sign + local.get $code i32.const 45 i32.eq if (result i32) i32.const 1 else - local.get $4 + local.get $code i32.const 43 i32.eq end if - local.get $2 + local.get $len i32.const 1 i32.sub - local.tee $2 + local.tee $len i32.eqz if i32.const 0 @@ -4119,29 +4119,29 @@ i64.const 0 return end - local.get $4 + local.get $code i32.const 45 i32.eq if i64.const -1 - local.set $6 + local.set $sign end - local.get $3 + local.get $ptr i32.const 2 i32.add - local.tee $3 + local.tee $ptr i32.load16_u - local.set $4 + local.set $code end - local.get $1 + local.get $radix if - local.get $1 + local.get $radix i32.const 2 i32.lt_s if (result i32) i32.const 1 else - local.get $1 + local.get $radix i32.const 36 i32.gt_s end @@ -4151,22 +4151,22 @@ i64.const 0 return end - local.get $1 + local.get $radix i32.const 16 i32.eq if - local.get $2 + local.get $len i32.const 2 i32.gt_s if (result i32) - local.get $4 + local.get $code i32.const 48 i32.eq else i32.const 0 end if (result i32) - local.get $3 + local.get $ptr i32.load16_u offset=2 i32.const 32 i32.or @@ -4176,22 +4176,22 @@ i32.const 0 end if - local.get $3 + local.get $ptr i32.const 4 i32.add - local.set $3 - local.get $2 + local.set $ptr + local.get $len i32.const 2 i32.sub - local.set $2 + local.set $len end end else - local.get $4 + local.get $code i32.const 48 i32.eq if (result i32) - local.get $2 + local.get $len i32.const 2 i32.gt_s else @@ -4202,101 +4202,101 @@ block $case2|1 block $case1|1 block $case0|1 - local.get $3 + local.get $ptr i32.load16_u offset=2 i32.const 32 i32.or - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.const 98 i32.eq br_if $case0|1 - local.get $5 + local.get $var$5 i32.const 111 i32.eq br_if $case1|1 - local.get $5 + local.get $var$5 i32.const 120 i32.eq br_if $case2|1 br $break|1 end - local.get $3 + local.get $ptr i32.const 4 i32.add - local.set $3 - local.get $2 + local.set $ptr + local.get $len i32.const 2 i32.sub - local.set $2 + local.set $len i32.const 2 - local.set $1 + local.set $radix br $break|1 end - local.get $3 + local.get $ptr i32.const 4 i32.add - local.set $3 - local.get $2 + local.set $ptr + local.get $len i32.const 2 i32.sub - local.set $2 + local.set $len i32.const 8 - local.set $1 + local.set $radix br $break|1 end - local.get $3 + local.get $ptr i32.const 4 i32.add - local.set $3 - local.get $2 + local.set $ptr + local.get $len i32.const 2 i32.sub - local.set $2 + local.set $len i32.const 16 - local.set $1 + local.set $radix br $break|1 end end - local.get $1 + local.get $radix i32.eqz if i32.const 10 - local.set $1 + local.set $radix end end i64.const 0 - local.set $7 - local.get $2 + local.set $num + local.get $len i32.const 1 i32.sub - local.set $8 + local.set $initial block $while-break|2 loop $while-continue|2 - local.get $2 - local.tee $5 + local.get $len + local.tee $var$5 i32.const 1 i32.sub - local.set $2 - local.get $5 - local.set $5 - local.get $5 + local.set $len + local.get $var$5 + local.set $var$5 + local.get $var$5 if - local.get $3 + local.get $ptr i32.load16_u - local.set $4 - local.get $4 + local.set $code + local.get $code i32.const 48 i32.sub i32.const 10 i32.lt_u if - local.get $4 + local.get $code i32.const 48 i32.sub - local.set $4 + local.set $code else - local.get $4 + local.get $code i32.const 65 i32.sub i32.const 90 @@ -4304,14 +4304,14 @@ i32.sub i32.le_u if - local.get $4 + local.get $code i32.const 65 i32.const 10 i32.sub i32.sub - local.set $4 + local.set $code else - local.get $4 + local.get $code i32.const 97 i32.sub i32.const 122 @@ -4319,21 +4319,21 @@ i32.sub i32.le_u if - local.get $4 + local.get $code i32.const 97 i32.const 10 i32.sub i32.sub - local.set $4 + local.set $code end end end - local.get $4 - local.get $1 + local.get $code + local.get $radix i32.ge_u if - local.get $8 - local.get $2 + local.get $initial + local.get $len i32.eq if i32.const 0 @@ -4343,334 +4343,334 @@ end br $while-break|2 end - local.get $7 - local.get $1 + local.get $num + local.get $radix i64.extend_i32_s i64.mul - local.get $4 + local.get $code i64.extend_i32_u i64.add - local.set $7 - local.get $3 + local.set $num + local.get $ptr i32.const 2 i32.add - local.set $3 + local.set $ptr br $while-continue|2 end end end - local.get $6 - local.get $7 + local.get $sign + local.get $num i64.mul ) - (func $~lib/number/I64.parseInt (param $0 i32) (param $1 i32) (result i64) - local.get $0 - local.get $1 + (func $~lib/number/I64.parseInt (param $value i32) (param $radix i32) (result i64) + local.get $value + local.get $radix call $~lib/util/string/strtol ) - (func $~lib/math/ipow32 (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (func $~lib/math/ipow32 (param $x i32) (param $e i32) (result i32) + (local $out i32) + (local $var$3 i32) + (local $var$4 i32) i32.const 1 - local.set $2 + local.set $out i32.const 0 i32.const 1 i32.lt_s drop - local.get $0 + local.get $x i32.const 2 i32.eq if i32.const 1 - local.get $1 + local.get $e i32.shl i32.const 0 - local.get $1 + local.get $e i32.const 32 i32.lt_u select return end - local.get $1 + local.get $e i32.const 0 i32.le_s if - local.get $0 + local.get $x i32.const -1 i32.eq if i32.const -1 i32.const 1 - local.get $1 + local.get $e i32.const 1 i32.and select return end - local.get $1 + local.get $e i32.const 0 i32.eq - local.get $0 + local.get $x i32.const 1 i32.eq i32.or return else - local.get $1 + local.get $e i32.const 1 i32.eq if - local.get $0 + local.get $x return else - local.get $1 + local.get $e i32.const 2 i32.eq if - local.get $0 - local.get $0 + local.get $x + local.get $x i32.mul return else - local.get $1 + local.get $e i32.const 32 i32.lt_s if i32.const 32 - local.get $1 + local.get $e i32.clz i32.sub - local.set $3 + local.set $var$3 block $break|0 block $case4|0 block $case3|0 block $case2|0 block $case1|0 block $case0|0 - local.get $3 - local.set $4 - local.get $4 + local.get $var$3 + local.set $var$4 + local.get $var$4 i32.const 5 i32.eq br_if $case0|0 - local.get $4 + local.get $var$4 i32.const 4 i32.eq br_if $case1|0 - local.get $4 + local.get $var$4 i32.const 3 i32.eq br_if $case2|0 - local.get $4 + local.get $var$4 i32.const 2 i32.eq br_if $case3|0 - local.get $4 + local.get $var$4 i32.const 1 i32.eq br_if $case4|0 br $break|0 end - local.get $1 + local.get $e i32.const 1 i32.and if - local.get $2 - local.get $0 + local.get $out + local.get $x i32.mul - local.set $2 + local.set $out end - local.get $1 + local.get $e i32.const 1 i32.shr_u - local.set $1 - local.get $0 - local.get $0 + local.set $e + local.get $x + local.get $x i32.mul - local.set $0 + local.set $x end - local.get $1 + local.get $e i32.const 1 i32.and if - local.get $2 - local.get $0 + local.get $out + local.get $x i32.mul - local.set $2 + local.set $out end - local.get $1 + local.get $e i32.const 1 i32.shr_u - local.set $1 - local.get $0 - local.get $0 + local.set $e + local.get $x + local.get $x i32.mul - local.set $0 + local.set $x end - local.get $1 + local.get $e i32.const 1 i32.and if - local.get $2 - local.get $0 + local.get $out + local.get $x i32.mul - local.set $2 + local.set $out end - local.get $1 + local.get $e i32.const 1 i32.shr_u - local.set $1 - local.get $0 - local.get $0 + local.set $e + local.get $x + local.get $x i32.mul - local.set $0 + local.set $x end - local.get $1 + local.get $e i32.const 1 i32.and if - local.get $2 - local.get $0 + local.get $out + local.get $x i32.mul - local.set $2 + local.set $out end - local.get $1 + local.get $e i32.const 1 i32.shr_u - local.set $1 - local.get $0 - local.get $0 + local.set $e + local.get $x + local.get $x i32.mul - local.set $0 + local.set $x end - local.get $1 + local.get $e i32.const 1 i32.and if - local.get $2 - local.get $0 + local.get $out + local.get $x i32.mul - local.set $2 + local.set $out end end - local.get $2 + local.get $out return end end end end loop $while-continue|1 - local.get $1 - local.set $3 - local.get $3 + local.get $e + local.set $var$3 + local.get $var$3 if - local.get $1 + local.get $e i32.const 1 i32.and if - local.get $2 - local.get $0 + local.get $out + local.get $x i32.mul - local.set $2 + local.set $out end - local.get $1 + local.get $e i32.const 1 i32.shr_u - local.set $1 - local.get $0 - local.get $0 + local.set $e + local.get $x + local.get $x i32.mul - local.set $0 + local.set $x br $while-continue|1 end end - local.get $2 + local.get $out ) - (func $~lib/math/NativeMath.scalbn (param $0 f64) (param $1 i32) (result f64) - (local $2 f64) - (local $3 i32) - (local $4 i32) - local.get $0 - local.set $2 - local.get $1 + (func $~lib/math/NativeMath.scalbn (param $x f64) (param $n i32) (result f64) + (local $y f64) + (local $var$3 i32) + (local $var$4 i32) + local.get $x + local.set $y + local.get $n i32.const 1023 i32.gt_s if - local.get $2 + local.get $y f64.const 8988465674311579538646525e283 f64.mul - local.set $2 - local.get $1 + local.set $y + local.get $n i32.const 1023 i32.sub - local.set $1 - local.get $1 + local.set $n + local.get $n i32.const 1023 i32.gt_s if - local.get $2 + local.get $y f64.const 8988465674311579538646525e283 f64.mul - local.set $2 - local.get $1 + local.set $y + local.get $n i32.const 1023 i32.sub - local.tee $3 + local.tee $var$3 i32.const 1023 - local.tee $4 - local.get $3 - local.get $4 + local.tee $var$4 + local.get $var$3 + local.get $var$4 i32.lt_s select - local.set $1 + local.set $n end else - local.get $1 + local.get $n i32.const -1022 i32.lt_s if - local.get $2 + local.get $y f64.const 2.2250738585072014e-308 f64.const 9007199254740992 f64.mul f64.mul - local.set $2 - local.get $1 + local.set $y + local.get $n i32.const 1022 i32.const 53 i32.sub i32.add - local.set $1 - local.get $1 + local.set $n + local.get $n i32.const -1022 i32.lt_s if - local.get $2 + local.get $y f64.const 2.2250738585072014e-308 f64.const 9007199254740992 f64.mul f64.mul - local.set $2 - local.get $1 + local.set $y + local.get $n i32.const 1022 i32.add i32.const 53 i32.sub - local.tee $4 + local.tee $var$4 i32.const -1022 - local.tee $3 - local.get $4 - local.get $3 + local.tee $var$3 + local.get $var$4 + local.get $var$3 i32.gt_s select - local.set $1 + local.set $n end end end - local.get $2 + local.get $y i64.const 1023 - local.get $1 + local.get $n i64.extend_i32_s i64.add i64.const 52 @@ -4678,137 +4678,137 @@ f64.reinterpret_i64 f64.mul ) - (func $~lib/util/string/strtod (param $0 i32) (result f64) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 f64) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i64) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i64) - (local $18 f64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i64) - (local $24 i64) - local.get $0 + (func $~lib/util/string/strtod (param $str i32) (result f64) + (local $len i32) + (local $ptr i32) + (local $code i32) + (local $sign f64) + (local $var$5 i32) + (local $savedPtr i32) + (local $pointed i32) + (local $consumed i32) + (local $position i32) + (local $x i64) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) + (local $var$14 i32) + (local $var$15 i32) + (local $var$16 i32) + (local $var$17 i64) + (local $var$18 f64) + (local $var$19 i64) + (local $var$20 i64) + (local $var$21 i64) + (local $var$22 i64) + (local $var$23 i64) + (local $var$24 i64) + local.get $str call $~lib/string/String#get:length - local.set $1 - local.get $1 + local.set $len + local.get $len i32.eqz if f64.const nan:0x8000000000000 return end - local.get $0 - local.set $2 - local.get $2 + local.get $str + local.set $ptr + local.get $ptr i32.load16_u - local.set $3 + local.set $code f64.const 1 - local.set $4 + local.set $sign loop $while-continue|0 - local.get $1 + local.get $len if (result i32) - local.get $3 + local.get $code call $~lib/util/string/isSpace else i32.const 0 end - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $2 + local.get $ptr i32.const 2 i32.add - local.tee $2 + local.tee $ptr i32.load16_u - local.set $3 - local.get $1 + local.set $code + local.get $len i32.const 1 i32.sub - local.set $1 + local.set $len br $while-continue|0 end end - local.get $1 + local.get $len i32.eqz if f64.const nan:0x8000000000000 return end - local.get $3 + local.get $code i32.const 45 i32.eq if - local.get $1 + local.get $len i32.const 1 i32.sub - local.tee $1 + local.tee $len i32.eqz if f64.const nan:0x8000000000000 return end - local.get $2 + local.get $ptr i32.const 2 i32.add - local.tee $2 + local.tee $ptr i32.load16_u - local.set $3 + local.set $code f64.const -1 - local.set $4 + local.set $sign else - local.get $3 + local.get $code i32.const 43 i32.eq if - local.get $1 + local.get $len i32.const 1 i32.sub - local.tee $1 + local.tee $len i32.eqz if f64.const nan:0x8000000000000 return end - local.get $2 + local.get $ptr i32.const 2 i32.add - local.tee $2 + local.tee $ptr i32.load16_u - local.set $3 + local.set $code end end - local.get $1 + local.get $len i32.const 8 i32.ge_s if (result i32) - local.get $3 + local.get $code i32.const 73 i32.eq else i32.const 0 end if - local.get $2 + local.get $ptr i64.load i64.const 29555310648492105 i64.eq if (result i32) - local.get $2 + local.get $ptr i64.load offset=8 i64.const 34058970405077102 i64.eq @@ -4817,18 +4817,18 @@ end if f64.const inf - local.get $4 + local.get $sign f64.mul return end f64.const nan:0x8000000000000 return end - local.get $3 + local.get $code i32.const 46 i32.ne if (result i32) - local.get $3 + local.get $code i32.const 48 i32.sub i32.const 10 @@ -4840,29 +4840,29 @@ f64.const nan:0x8000000000000 return end - local.get $2 - local.set $6 + local.get $ptr + local.set $savedPtr loop $while-continue|1 - local.get $3 + local.get $code i32.const 48 i32.eq - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $2 + local.get $ptr i32.const 2 i32.add - local.tee $2 + local.tee $ptr i32.load16_u - local.set $3 - local.get $1 + local.set $code + local.get $len i32.const 1 i32.sub - local.set $1 + local.set $len br $while-continue|1 end end - local.get $1 + local.get $len i32.const 0 i32.le_s if @@ -4870,34 +4870,34 @@ return end i32.const 0 - local.set $7 + local.set $pointed i32.const 0 - local.set $8 + local.set $consumed i32.const 0 - local.set $9 + local.set $position i64.const 0 - local.set $10 - local.get $3 + local.set $x + local.get $code i32.const 46 i32.eq if - local.get $6 - local.get $2 + local.get $savedPtr + local.get $ptr i32.sub i32.eqz - local.set $5 - local.get $2 + local.set $var$5 + local.get $ptr i32.const 2 i32.add - local.set $2 - local.get $1 + local.set $ptr + local.get $len i32.const 1 i32.sub - local.set $1 - local.get $1 + local.set $len + local.get $len i32.eqz if (result i32) - local.get $5 + local.get $var$5 else i32.const 0 end @@ -4906,47 +4906,47 @@ return end i32.const 1 - local.set $7 + local.set $pointed loop $for-loop|2 - local.get $2 + local.get $ptr i32.load16_u - local.tee $3 + local.tee $code i32.const 48 i32.eq - local.set $11 - local.get $11 + local.set $var$11 + local.get $var$11 if - local.get $1 + local.get $len i32.const 1 i32.sub - local.set $1 - local.get $9 + local.set $len + local.get $position i32.const 1 i32.sub - local.set $9 - local.get $2 + local.set $position + local.get $ptr i32.const 2 i32.add - local.set $2 + local.set $ptr br $for-loop|2 end end - local.get $1 + local.get $len i32.const 0 i32.le_s if f64.const 0 return end - local.get $9 + local.get $position i32.eqz if (result i32) - local.get $5 + local.get $var$5 else i32.const 0 end if (result i32) - local.get $3 + local.get $code i32.const 48 i32.sub i32.const 10 @@ -4959,118 +4959,118 @@ return end end - local.get $3 + local.get $code i32.const 48 i32.sub - local.set $5 + local.set $var$5 block $for-break3 loop $for-loop|3 - local.get $5 + local.get $var$5 i32.const 10 i32.lt_u if (result i32) i32.const 1 else - local.get $3 + local.get $code i32.const 46 i32.eq if (result i32) - local.get $7 + local.get $pointed i32.eqz else i32.const 0 end end - local.set $11 - local.get $11 + local.set $var$11 + local.get $var$11 if - local.get $5 + local.get $var$5 i32.const 10 i32.lt_u if - local.get $8 + local.get $consumed i32.const 19 i32.lt_s if (result i64) i64.const 10 - local.get $10 + local.get $x i64.mul - local.get $5 + local.get $var$5 i64.extend_i32_u i64.add else - local.get $10 - local.get $5 + local.get $x + local.get $var$5 i32.eqz i32.eqz i64.extend_i32_u i64.or end - local.set $10 - local.get $8 + local.set $x + local.get $consumed i32.const 1 i32.add - local.set $8 + local.set $consumed else - local.get $8 - local.set $9 + local.get $consumed + local.set $position i32.const 1 - local.set $7 + local.set $pointed end - local.get $1 + local.get $len i32.const 1 i32.sub - local.tee $1 + local.tee $len i32.eqz if br $for-break3 end - local.get $2 + local.get $ptr i32.const 2 i32.add - local.tee $2 + local.tee $ptr i32.load16_u - local.set $3 - local.get $3 + local.set $code + local.get $code i32.const 48 i32.sub - local.set $5 + local.set $var$5 br $for-loop|3 end end end - local.get $7 + local.get $pointed i32.eqz if - local.get $8 - local.set $9 + local.get $consumed + local.set $position end block $~lib/util/string/scientific|inlined.0 (result f64) - local.get $10 - local.set $17 - local.get $9 + local.get $x + local.set $var$17 + local.get $position i32.const 19 - local.tee $11 - local.get $8 - local.tee $5 - local.get $11 - local.get $5 + local.tee $var$11 + local.get $consumed + local.tee $var$5 + local.get $var$11 + local.get $var$5 i32.lt_s select i32.sub block $~lib/util/string/parseExp|inlined.0 (result i32) - local.get $2 - local.set $11 - local.get $1 - local.set $5 + local.get $ptr + local.set $var$11 + local.get $len + local.set $var$5 i32.const 1 - local.set $12 + local.set $var$12 i32.const 0 - local.set $13 - local.get $11 + local.set $var$13 + local.get $var$11 i32.load16_u - local.set $14 - local.get $14 + local.set $var$14 + local.get $var$14 i32.const 32 i32.or i32.const 101 @@ -5079,151 +5079,151 @@ i32.const 0 br $~lib/util/string/parseExp|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.sub - local.tee $5 + local.tee $var$5 i32.eqz if i32.const 0 br $~lib/util/string/parseExp|inlined.0 end - local.get $11 + local.get $var$11 i32.const 2 i32.add - local.tee $11 + local.tee $var$11 i32.load16_u - local.set $14 - local.get $14 + local.set $var$14 + local.get $var$14 i32.const 45 i32.eq if - local.get $5 + local.get $var$5 i32.const 1 i32.sub - local.tee $5 + local.tee $var$5 i32.eqz if i32.const 0 br $~lib/util/string/parseExp|inlined.0 end - local.get $11 + local.get $var$11 i32.const 2 i32.add - local.tee $11 + local.tee $var$11 i32.load16_u - local.set $14 + local.set $var$14 i32.const -1 - local.set $12 + local.set $var$12 else - local.get $14 + local.get $var$14 i32.const 43 i32.eq if - local.get $5 + local.get $var$5 i32.const 1 i32.sub - local.tee $5 + local.tee $var$5 i32.eqz if i32.const 0 br $~lib/util/string/parseExp|inlined.0 end - local.get $11 + local.get $var$11 i32.const 2 i32.add - local.tee $11 + local.tee $var$11 i32.load16_u - local.set $14 + local.set $var$14 end end loop $while-continue|4 - local.get $14 + local.get $var$14 i32.const 48 i32.eq - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 if - local.get $5 + local.get $var$5 i32.const 1 i32.sub - local.tee $5 + local.tee $var$5 i32.eqz if i32.const 0 br $~lib/util/string/parseExp|inlined.0 end - local.get $11 + local.get $var$11 i32.const 2 i32.add - local.tee $11 + local.tee $var$11 i32.load16_u - local.set $14 + local.set $var$14 br $while-continue|4 end end - local.get $14 + local.get $var$14 i32.const 48 i32.sub - local.set $15 + local.set $var$15 loop $for-loop|5 - local.get $5 + local.get $var$5 if (result i32) - local.get $15 + local.get $var$15 i32.const 10 i32.lt_u else i32.const 0 end - local.set $16 - local.get $16 + local.set $var$16 + local.get $var$16 if - local.get $13 + local.get $var$13 i32.const 3200 i32.ge_s if - local.get $12 + local.get $var$12 i32.const 3200 i32.mul br $~lib/util/string/parseExp|inlined.0 end i32.const 10 - local.get $13 + local.get $var$13 i32.mul - local.get $15 + local.get $var$15 i32.add - local.set $13 - local.get $11 + local.set $var$13 + local.get $var$11 i32.const 2 i32.add - local.tee $11 + local.tee $var$11 i32.load16_u - local.set $14 - local.get $5 + local.set $var$14 + local.get $var$5 i32.const 1 i32.sub - local.set $5 - local.get $14 + local.set $var$5 + local.get $var$14 i32.const 48 i32.sub - local.set $15 + local.set $var$15 br $for-loop|5 end end - local.get $12 - local.get $13 + local.get $var$12 + local.get $var$13 i32.mul end i32.add - local.set $16 - local.get $17 + local.set $var$16 + local.get $var$17 i64.const 0 i64.ne i32.eqz if (result i32) i32.const 1 else - local.get $16 + local.get $var$16 i32.const -342 i32.lt_s end @@ -5231,27 +5231,27 @@ f64.const 0 br $~lib/util/string/scientific|inlined.0 end - local.get $16 + local.get $var$16 i32.const 308 i32.gt_s if f64.const inf br $~lib/util/string/scientific|inlined.0 end - local.get $17 + local.get $var$17 f64.convert_i64_u - local.set $18 - local.get $16 + local.set $var$18 + local.get $var$16 i32.eqz if - local.get $18 + local.get $var$18 br $~lib/util/string/scientific|inlined.0 end - local.get $16 + local.get $var$16 i32.const 22 i32.gt_s if (result i32) - local.get $16 + local.get $var$16 i32.const 22 i32.const 15 i32.add @@ -5260,34 +5260,34 @@ i32.const 0 end if - local.get $18 - local.get $16 + local.get $var$18 + local.get $var$16 i32.const 22 i32.sub - local.set $15 + local.set $var$15 i32.const 3520 - local.get $15 + local.get $var$15 i32.const 3 i32.shl i32.add f64.load f64.mul - local.set $18 + local.set $var$18 i32.const 22 - local.set $16 + local.set $var$16 end - local.get $17 + local.get $var$17 i64.const 9007199254740991 i64.le_u if (result i32) - local.get $16 - local.tee $15 + local.get $var$16 + local.tee $var$15 i32.const 31 i32.shr_s - local.tee $14 - local.get $15 + local.tee $var$14 + local.get $var$15 i32.add - local.get $14 + local.get $var$14 i32.xor i32.const 22 i32.le_s @@ -5295,15 +5295,15 @@ i32.const 0 end if - local.get $16 + local.get $var$16 i32.const 0 i32.gt_s if - local.get $18 - local.get $16 - local.set $5 + local.get $var$18 + local.get $var$16 + local.set $var$5 i32.const 3520 - local.get $5 + local.get $var$5 i32.const 3 i32.shl i32.add @@ -5311,13 +5311,13 @@ f64.mul br $~lib/util/string/scientific|inlined.0 end - local.get $18 + local.get $var$18 i32.const 0 - local.get $16 + local.get $var$16 i32.sub - local.set $11 + local.set $var$11 i32.const 3520 - local.get $11 + local.get $var$11 i32.const 3 i32.shl i32.add @@ -5325,50 +5325,50 @@ f64.div br $~lib/util/string/scientific|inlined.0 else - local.get $16 + local.get $var$16 i32.const 0 i32.lt_s if - local.get $17 - local.set $19 - local.get $16 - local.set $12 - local.get $19 + local.get $var$17 + local.set $var$19 + local.get $var$16 + local.set $var$12 + local.get $var$19 i64.clz - local.set $20 - local.get $19 - local.get $20 + local.set $var$20 + local.get $var$19 + local.get $var$20 i64.shl - local.set $19 - local.get $12 + local.set $var$19 + local.get $var$12 i64.extend_i32_s - local.get $20 + local.get $var$20 i64.sub - local.set $20 + local.set $var$20 loop $for-loop|6 - local.get $12 + local.get $var$12 i32.const -14 i32.le_s - local.set $11 - local.get $11 + local.set $var$11 + local.get $var$11 if - local.get $19 + local.get $var$19 i64.const 6103515625 i64.div_u - local.set $21 - local.get $19 + local.set $var$21 + local.get $var$19 i64.const 6103515625 i64.rem_u - local.set $22 - local.get $21 + local.set $var$22 + local.get $var$21 i64.clz - local.set $23 - local.get $21 - local.get $23 + local.set $var$23 + local.get $var$21 + local.get $var$23 i64.shl f64.const 0.00004294967296 - local.get $22 - local.get $23 + local.get $var$22 + local.get $var$23 i64.const 18 i64.sub i64.shl @@ -5377,140 +5377,140 @@ f64.nearest i64.trunc_sat_f64_u i64.add - local.set $19 - local.get $20 - local.get $23 + local.set $var$19 + local.get $var$20 + local.get $var$23 i64.sub - local.set $20 - local.get $12 + local.set $var$20 + local.get $var$12 i32.const 14 i32.add - local.set $12 + local.set $var$12 br $for-loop|6 end end i32.const 5 i32.const 0 - local.get $12 + local.get $var$12 i32.sub call $~lib/math/ipow32 i64.extend_i32_s - local.set $23 - local.get $19 - local.get $23 + local.set $var$23 + local.get $var$19 + local.get $var$23 i64.div_u - local.set $22 - local.get $19 - local.get $23 + local.set $var$22 + local.get $var$19 + local.get $var$23 i64.rem_u - local.set $21 - local.get $22 + local.set $var$21 + local.get $var$22 i64.clz - local.set $24 - local.get $22 - local.get $24 + local.set $var$24 + local.get $var$22 + local.get $var$24 i64.shl - local.get $21 + local.get $var$21 f64.convert_i64_u i64.reinterpret_f64 - local.get $24 + local.get $var$24 i64.const 52 i64.shl i64.add f64.reinterpret_i64 - local.get $23 + local.get $var$23 f64.convert_i64_u f64.div i64.trunc_sat_f64_u i64.add - local.set $19 - local.get $20 - local.get $24 + local.set $var$19 + local.get $var$20 + local.get $var$24 i64.sub - local.set $20 - local.get $19 + local.set $var$20 + local.get $var$19 f64.convert_i64_u - local.get $20 + local.get $var$20 i32.wrap_i64 call $~lib/math/NativeMath.scalbn br $~lib/util/string/scientific|inlined.0 else - local.get $17 - local.set $19 - local.get $16 - local.set $13 - local.get $19 + local.get $var$17 + local.set $var$19 + local.get $var$16 + local.set $var$13 + local.get $var$19 i64.ctz - local.set $24 - local.get $19 - local.get $24 + local.set $var$24 + local.get $var$19 + local.get $var$24 i64.shr_u - local.set $19 - local.get $24 - local.get $13 + local.set $var$19 + local.get $var$24 + local.get $var$13 i64.extend_i32_s i64.add - local.set $24 - local.get $24 + local.set $var$24 + local.get $var$24 global.set $~lib/util/string/__fixmulShift loop $for-loop|7 - local.get $13 + local.get $var$13 i32.const 13 i32.ge_s - local.set $12 - local.get $12 + local.set $var$12 + local.get $var$12 if - local.get $19 - local.set $20 + local.get $var$19 + local.set $var$20 i32.const 1220703125 - local.set $14 - local.get $20 + local.set $var$14 + local.get $var$20 i64.const 4294967295 i64.and - local.get $14 + local.get $var$14 i64.extend_i32_u i64.mul - local.set $21 - local.get $20 + local.set $var$21 + local.get $var$20 i64.const 32 i64.shr_u - local.get $14 + local.get $var$14 i64.extend_i32_u i64.mul - local.get $21 + local.get $var$21 i64.const 32 i64.shr_u i64.add - local.set $22 - local.get $22 + local.set $var$22 + local.get $var$22 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $11 - local.get $11 + local.set $var$11 + local.get $var$11 i32.clz - local.set $5 + local.set $var$5 i64.const 32 - local.get $5 + local.get $var$5 i64.extend_i32_u i64.sub - local.set $23 + local.set $var$23 global.get $~lib/util/string/__fixmulShift - local.get $23 + local.get $var$23 i64.add global.set $~lib/util/string/__fixmulShift - local.get $22 - local.get $5 + local.get $var$22 + local.get $var$5 i64.extend_i32_u i64.shl - local.get $21 + local.get $var$21 i64.const 4294967295 i64.and - local.get $23 + local.get $var$23 i64.shr_u i64.or - local.get $21 - local.get $5 + local.get $var$21 + local.get $var$5 i64.extend_i32_u i64.shl i64.const 31 @@ -5518,67 +5518,67 @@ i64.const 1 i64.and i64.add - local.set $19 - local.get $13 + local.set $var$19 + local.get $var$13 i32.const 13 i32.sub - local.set $13 + local.set $var$13 br $for-loop|7 end end - local.get $19 - local.set $20 + local.get $var$19 + local.set $var$20 i32.const 5 - local.get $13 + local.get $var$13 call $~lib/math/ipow32 - local.set $15 - local.get $20 + local.set $var$15 + local.get $var$20 i64.const 4294967295 i64.and - local.get $15 + local.get $var$15 i64.extend_i32_u i64.mul - local.set $23 - local.get $20 + local.set $var$23 + local.get $var$20 i64.const 32 i64.shr_u - local.get $15 + local.get $var$15 i64.extend_i32_u i64.mul - local.get $23 + local.get $var$23 i64.const 32 i64.shr_u i64.add - local.set $22 - local.get $22 + local.set $var$22 + local.get $var$22 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $12 - local.get $12 + local.set $var$12 + local.get $var$12 i32.clz - local.set $5 + local.set $var$5 i64.const 32 - local.get $5 + local.get $var$5 i64.extend_i32_u i64.sub - local.set $21 + local.set $var$21 global.get $~lib/util/string/__fixmulShift - local.get $21 + local.get $var$21 i64.add global.set $~lib/util/string/__fixmulShift - local.get $22 - local.get $5 + local.get $var$22 + local.get $var$5 i64.extend_i32_u i64.shl - local.get $23 + local.get $var$23 i64.const 4294967295 i64.and - local.get $21 + local.get $var$21 i64.shr_u i64.or - local.get $23 - local.get $5 + local.get $var$23 + local.get $var$5 i64.extend_i32_u i64.shl i64.const 31 @@ -5586,12 +5586,12 @@ i64.const 1 i64.and i64.add - local.set $19 + local.set $var$19 global.get $~lib/util/string/__fixmulShift - local.set $24 - local.get $19 + local.set $var$24 + local.get $var$19 f64.convert_i64_u - local.get $24 + local.get $var$24 i32.wrap_i64 call $~lib/math/NativeMath.scalbn br $~lib/util/string/scientific|inlined.0 @@ -5600,159 +5600,159 @@ end unreachable end - local.get $4 + local.get $sign f64.copysign ) - (func $~lib/string/parseFloat (param $0 i32) (result f64) - local.get $0 + (func $~lib/string/parseFloat (param $str i32) (result f64) + local.get $str call $~lib/util/string/strtod ) - (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__concat (param $left i32) (param $right i32) (result i32) + local.get $left + local.get $right call $~lib/string/String#concat ) - (func $~lib/string/String.__ne (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__ne (param $left i32) (param $right i32) (result i32) + local.get $left + local.get $right call $~lib/string/String.__eq i32.eqz ) - (func $~lib/string/String.__gt (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 - local.get $1 + (func $~lib/string/String.__gt (param $left i32) (param $right i32) (result i32) + (local $leftLength i32) + (local $rightLength i32) + (local $var$4 i32) + (local $var$5 i32) + (local $res i32) + local.get $left + local.get $right i32.eq if i32.const 0 return end - local.get $0 + local.get $left call $~lib/string/String#get:length - local.set $2 - local.get $2 + local.set $leftLength + local.get $leftLength i32.eqz if i32.const 0 return end - local.get $1 + local.get $right call $~lib/string/String#get:length - local.set $3 - local.get $3 + local.set $rightLength + local.get $rightLength i32.eqz if i32.const 1 return end - local.get $0 + local.get $left i32.const 0 - local.get $1 + local.get $right i32.const 0 - local.get $2 - local.tee $4 - local.get $3 - local.tee $5 - local.get $4 - local.get $5 + local.get $leftLength + local.tee $var$4 + local.get $rightLength + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.lt_s select call $~lib/util/string/compareImpl - local.set $6 - local.get $6 + local.set $res + local.get $res if (result i32) - local.get $6 + local.get $res i32.const 0 i32.gt_s else - local.get $2 - local.get $3 + local.get $leftLength + local.get $rightLength i32.gt_s end ) - (func $~lib/string/String.__lt (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 - local.get $1 + (func $~lib/string/String.__lt (param $left i32) (param $right i32) (result i32) + (local $rightLength i32) + (local $leftLength i32) + (local $var$4 i32) + (local $var$5 i32) + (local $res i32) + local.get $left + local.get $right i32.eq if i32.const 0 return end - local.get $1 + local.get $right call $~lib/string/String#get:length - local.set $2 - local.get $2 + local.set $rightLength + local.get $rightLength i32.eqz if i32.const 0 return end - local.get $0 + local.get $left call $~lib/string/String#get:length - local.set $3 - local.get $3 + local.set $leftLength + local.get $leftLength i32.eqz if i32.const 1 return end - local.get $0 + local.get $left i32.const 0 - local.get $1 + local.get $right i32.const 0 - local.get $3 - local.tee $4 - local.get $2 - local.tee $5 - local.get $4 - local.get $5 + local.get $leftLength + local.tee $var$4 + local.get $rightLength + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.lt_s select call $~lib/util/string/compareImpl - local.set $6 - local.get $6 + local.set $res + local.get $res if (result i32) - local.get $6 + local.get $res i32.const 0 i32.lt_s else - local.get $3 - local.get $2 + local.get $leftLength + local.get $rightLength i32.lt_s end ) - (func $~lib/string/String.__gte (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__gte (param $left i32) (param $right i32) (result i32) + local.get $left + local.get $right call $~lib/string/String.__lt i32.eqz ) - (func $~lib/string/String.__lte (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__lte (param $left i32) (param $right i32) (result i32) + local.get $left + local.get $right call $~lib/string/String.__gt i32.eqz ) - (func $~lib/rt/itcms/__renew (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/rt/itcms/__renew (param $oldPtr i32) (param $size i32) (result i32) + (local $oldObj i32) + (local $newPtr i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $oldPtr i32.const 20 i32.sub - local.set $2 - local.get $1 - local.get $2 + local.set $oldObj + local.get $size + local.get $oldObj i32.load i32.const 3 i32.const -1 @@ -5762,65 +5762,65 @@ i32.sub i32.le_u if - local.get $2 - local.get $1 + local.get $oldObj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $0 + local.get $oldPtr return end - local.get $1 - local.get $2 + local.get $size + local.get $oldObj i32.load offset=12 call $~lib/rt/itcms/__new - local.set $3 - local.get $3 - local.get $0 - local.get $1 - local.tee $4 - local.get $2 + local.set $newPtr + local.get $newPtr + local.get $oldPtr + local.get $size + local.tee $var$4 + local.get $oldObj i32.load offset=16 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.lt_u select memory.copy - local.get $3 + local.get $newPtr ) - (func $~lib/array/Array<~lib/string/String>#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 + (func $~lib/array/Array<~lib/string/String>#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store i32.const 1 drop - local.get $0 - local.get $2 + local.get $this + local.get $value i32.const 1 call $~lib/rt/itcms/__link ) - (func $~lib/array/ensureCapacity (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $0 + (func $~lib/array/ensureCapacity (param $array i32) (param $newSize i32) (param $alignLog2 i32) (param $canGrow i32) + (local $oldCapacity i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $array i32.load offset=8 - local.set $4 - local.get $1 - local.get $4 - local.get $2 + local.set $oldCapacity + local.get $newSize + local.get $oldCapacity + local.get $alignLog2 i32.shr_u i32.gt_u if - local.get $1 + local.get $newSize i32.const 1073741820 - local.get $2 + local.get $alignLog2 i32.shr_u i32.gt_u if @@ -5831,66 +5831,66 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.load - local.set $5 - local.get $1 - local.tee $6 + local.set $var$5 + local.get $newSize + local.tee $var$6 i32.const 8 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.gt_u select - local.get $2 + local.get $alignLog2 i32.shl - local.set $6 - local.get $3 + local.set $var$6 + local.get $canGrow if - local.get $4 + local.get $oldCapacity i32.const 1 i32.shl - local.tee $7 + local.tee $var$7 i32.const 1073741820 - local.tee $8 - local.get $7 - local.get $8 + local.tee $var$8 + local.get $var$7 + local.get $var$8 i32.lt_u select - local.tee $8 - local.get $6 - local.tee $7 - local.get $8 - local.get $7 + local.tee $var$8 + local.get $var$6 + local.tee $var$7 + local.get $var$8 + local.get $var$7 i32.gt_u select - local.set $6 + local.set $var$6 end - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 call $~lib/rt/itcms/__renew - local.set $8 + local.set $var$8 i32.const 2 global.get $~lib/shared/runtime/Runtime.Incremental i32.ne drop - local.get $8 - local.get $5 + local.get $var$8 + local.get $var$5 i32.ne if - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.store - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.store offset=4 - local.get $0 - local.get $8 + local.get $array + local.get $var$8 i32.const 0 call $~lib/rt/itcms/__link end - local.get $0 - local.get $6 + local.get $array + local.get $var$6 i32.store offset=8 end ) @@ -5899,66 +5899,66 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array<~lib/string/String>#push (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/array/Array<~lib/string/String>#push (param $this i32) (param $value i32) (result i32) + (local $oldLen i32) + (local $len i32) + local.get $this i32.load offset=12 - local.set $2 - local.get $2 + local.set $oldLen + local.get $oldLen i32.const 1 i32.add - local.set $3 - local.get $0 - local.get $3 + local.set $len + local.get $this + local.get $len i32.const 2 i32.const 1 call $~lib/array/ensureCapacity i32.const 1 drop - local.get $0 + local.get $this i32.load offset=4 - local.get $2 + local.get $oldLen i32.const 2 i32.shl i32.add - local.get $1 + local.get $value i32.store - local.get $0 - local.get $1 + local.get $this + local.get $value i32.const 1 call $~lib/rt/itcms/__link - local.get $0 - local.get $3 + local.get $this + local.get $len call $~lib/array/Array<~lib/string/String>#set:length_ - local.get $3 + local.get $len ) - (func $~lib/array/Array<~lib/string/String>#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array<~lib/string/String>#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) - local.get $0 + (func $~lib/util/number/decimalCount32 (param $value i32) (result i32) + local.get $value i32.const 100000 i32.lt_u if - local.get $0 + local.get $value i32.const 100 i32.lt_u if i32.const 1 - local.get $0 + local.get $value i32.const 10 i32.ge_u i32.add return else i32.const 3 - local.get $0 + local.get $value i32.const 10000 i32.ge_u i32.add - local.get $0 + local.get $value i32.const 1000 i32.ge_u i32.add @@ -5966,23 +5966,23 @@ end unreachable else - local.get $0 + local.get $value i32.const 10000000 i32.lt_u if i32.const 6 - local.get $0 + local.get $value i32.const 1000000 i32.ge_u i32.add return else i32.const 8 - local.get $0 + local.get $value i32.const 1000000000 i32.ge_u i32.add - local.get $0 + local.get $value i32.const 100000000 i32.ge_u i32.add @@ -5992,66 +5992,66 @@ end unreachable ) - (func $~lib/util/number/utoa32_dec_lut (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 i64) - (local $9 i64) - (local $10 i32) - (local $11 i32) + (func $~lib/util/number/utoa32_dec_lut (param $buffer i32) (param $num i32) (param $offset i32) + (local $var$3 i32) + (local $t i32) + (local $r i32) + (local $d1 i32) + (local $d2 i32) + (local $digits1 i64) + (local $digits2 i64) + (local $var$10 i32) + (local $var$11 i32) loop $while-continue|0 - local.get $1 + local.get $num i32.const 10000 i32.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $1 + local.get $num i32.const 10000 i32.div_u - local.set $4 - local.get $1 + local.set $t + local.get $num i32.const 10000 i32.rem_u - local.set $5 - local.get $4 - local.set $1 - local.get $5 + local.set $r + local.get $t + local.set $num + local.get $r i32.const 100 i32.div_u - local.set $6 - local.get $5 + local.set $d1 + local.get $r i32.const 100 i32.rem_u - local.set $7 + local.set $d2 i32.const 14988 - local.get $6 + local.get $d1 i32.const 2 i32.shl i32.add i64.load32_u - local.set $8 + local.set $digits1 i32.const 14988 - local.get $7 + local.get $d2 i32.const 2 i32.shl i32.add i64.load32_u - local.set $9 - local.get $2 + local.set $digits2 + local.get $offset i32.const 4 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $8 - local.get $9 + local.get $digits1 + local.get $digits2 i64.const 32 i64.shl i64.or @@ -6059,99 +6059,99 @@ br $while-continue|0 end end - local.get $1 + local.get $num i32.const 100 i32.ge_u if - local.get $1 + local.get $num i32.const 100 i32.div_u - local.set $3 - local.get $1 + local.set $var$3 + local.get $num i32.const 100 i32.rem_u - local.set $10 - local.get $3 - local.set $1 - local.get $2 + local.set $var$10 + local.get $var$3 + local.set $num + local.get $offset i32.const 2 i32.sub - local.set $2 + local.set $offset i32.const 14988 - local.get $10 + local.get $var$10 i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store end - local.get $1 + local.get $num i32.const 10 i32.ge_u if - local.get $2 + local.get $offset i32.const 2 i32.sub - local.set $2 + local.set $offset i32.const 14988 - local.get $1 + local.get $num i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store else - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 + local.set $offset i32.const 48 - local.get $1 + local.get $num i32.add - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store16 end ) - (func $~lib/util/number/utoa_hex_lut (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i32) + (func $~lib/util/number/utoa_hex_lut (param $buffer i32) (param $num i64) (param $offset i32) + (local $var$3 i32) loop $while-continue|0 - local.get $2 + local.get $offset i32.const 2 i32.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $2 + local.get $offset i32.const 2 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 15408 - local.get $1 + local.get $num i32.wrap_i64 i32.const 255 i32.and @@ -6160,20 +6160,20 @@ i32.add i32.load i32.store - local.get $1 + local.get $num i64.const 8 i64.shr_u - local.set $1 + local.set $num br $while-continue|0 end end - local.get $2 + local.get $offset i32.const 1 i32.and if - local.get $0 + local.get $buffer i32.const 15408 - local.get $1 + local.get $num i32.wrap_i64 i32.const 6 i32.shl @@ -6182,25 +6182,25 @@ i32.store16 end ) - (func $~lib/util/number/ulog_base (param $0 i64) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) - (local $4 i64) - (local $5 i32) - local.get $1 - local.set $2 - local.get $2 + (func $~lib/util/number/ulog_base (param $num i64) (param $base i32) (result i32) + (local $var$2 i32) + (local $b64 i64) + (local $b i64) + (local $e i32) + local.get $base + local.set $var$2 + local.get $var$2 i32.popcnt i32.const 1 i32.eq if i32.const 63 - local.get $0 + local.get $num i64.clz i32.wrap_i64 i32.sub i32.const 31 - local.get $1 + local.get $base i32.clz i32.sub i32.div_u @@ -6208,95 +6208,95 @@ i32.add return end - local.get $1 + local.get $base i64.extend_i32_s - local.set $3 - local.get $3 - local.set $4 + local.set $b64 + local.get $b64 + local.set $b i32.const 1 - local.set $5 + local.set $e loop $while-continue|0 - local.get $0 - local.get $4 + local.get $num + local.get $b i64.ge_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 - local.get $4 + local.get $num + local.get $b i64.div_u - local.set $0 - local.get $4 - local.get $4 + local.set $num + local.get $b + local.get $b i64.mul - local.set $4 - local.get $5 + local.set $b + local.get $e i32.const 1 i32.shl - local.set $5 + local.set $e br $while-continue|0 end end loop $while-continue|1 - local.get $0 + local.get $num i64.const 1 i64.ge_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 - local.get $3 + local.get $num + local.get $b64 i64.div_u - local.set $0 - local.get $5 + local.set $num + local.get $e i32.const 1 i32.add - local.set $5 + local.set $e br $while-continue|1 end end - local.get $5 + local.get $e i32.const 1 i32.sub ) - (func $~lib/util/number/utoa64_any_core (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i32) - (local $4 i64) - (local $5 i64) - (local $6 i64) - local.get $3 + (func $~lib/util/number/utoa64_any_core (param $buffer i32) (param $num i64) (param $offset i32) (param $radix i32) + (local $base i64) + (local $var$5 i64) + (local $q i64) + local.get $radix i64.extend_i32_s - local.set $4 - local.get $3 - local.get $3 + local.set $base + local.get $radix + local.get $radix i32.const 1 i32.sub i32.and i32.const 0 i32.eq if - local.get $3 + local.get $radix i32.ctz i32.const 7 i32.and i64.extend_i32_s - local.set $5 - local.get $4 + local.set $var$5 + local.get $base i64.const 1 i64.sub - local.set $6 + local.set $q loop $do-loop|0 - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 16464 - local.get $1 - local.get $6 + local.get $num + local.get $q i64.and i32.wrap_i64 i32.const 1 @@ -6304,34 +6304,34 @@ i32.add i32.load16_u i32.store16 - local.get $1 - local.get $5 + local.get $num + local.get $var$5 i64.shr_u - local.set $1 - local.get $1 + local.set $num + local.get $num i64.const 0 i64.ne br_if $do-loop|0 end else loop $do-loop|1 - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 - local.get $1 - local.get $4 + local.set $offset + local.get $num + local.get $base i64.div_u - local.set $6 - local.get $0 - local.get $2 + local.set $q + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 16464 - local.get $1 - local.get $6 - local.get $4 + local.get $num + local.get $q + local.get $base i64.mul i64.sub i32.wrap_i64 @@ -6340,41 +6340,41 @@ i32.add i32.load16_u i32.store16 - local.get $6 - local.set $1 - local.get $1 + local.get $q + local.set $num + local.get $num i64.const 0 i64.ne br_if $do-loop|1 end end ) - (func $~lib/util/number/decimalCount64High (param $0 i64) (result i32) - local.get $0 + (func $~lib/util/number/decimalCount64High (param $value i64) (result i32) + local.get $value i64.const 1000000000000000 i64.lt_u if - local.get $0 + local.get $value i64.const 1000000000000 i64.lt_u if i32.const 10 - local.get $0 + local.get $value i64.const 100000000000 i64.ge_u i32.add - local.get $0 + local.get $value i64.const 10000000000 i64.ge_u i32.add return else i32.const 13 - local.get $0 + local.get $value i64.const 100000000000000 i64.ge_u i32.add - local.get $0 + local.get $value i64.const 10000000000000 i64.ge_u i32.add @@ -6382,23 +6382,23 @@ end unreachable else - local.get $0 + local.get $value i64.const 100000000000000000 i64.lt_u if i32.const 16 - local.get $0 + local.get $value i64.const 10000000000000000 i64.ge_u i32.add return else i32.const 18 - local.get $0 + local.get $value i64.const -8446744073709551616 i64.ge_u i32.add - local.get $0 + local.get $value i64.const 1000000000000000000 i64.ge_u i32.add @@ -6408,116 +6408,116 @@ end unreachable ) - (func $~lib/util/number/utoa64_dec_lut (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i32) - (local $4 i64) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i64) - (local $13 i64) + (func $~lib/util/number/utoa64_dec_lut (param $buffer i32) (param $num i64) (param $offset i32) + (local $var$3 i32) + (local $t i64) + (local $r i32) + (local $b i32) + (local $c i32) + (local $b1 i32) + (local $b2 i32) + (local $c1 i32) + (local $c2 i32) + (local $digits1 i64) + (local $digits2 i64) loop $while-continue|0 - local.get $1 + local.get $num i64.const 100000000 i64.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $1 + local.get $num i64.const 100000000 i64.div_u - local.set $4 - local.get $1 - local.get $4 + local.set $t + local.get $num + local.get $t i64.const 100000000 i64.mul i64.sub i32.wrap_i64 - local.set $5 - local.get $4 - local.set $1 - local.get $5 + local.set $r + local.get $t + local.set $num + local.get $r i32.const 10000 i32.div_u - local.set $6 - local.get $5 + local.set $b + local.get $r i32.const 10000 i32.rem_u - local.set $7 - local.get $6 + local.set $c + local.get $b i32.const 100 i32.div_u - local.set $8 - local.get $6 + local.set $b1 + local.get $b i32.const 100 i32.rem_u - local.set $9 - local.get $7 + local.set $b2 + local.get $c i32.const 100 i32.div_u - local.set $10 - local.get $7 + local.set $c1 + local.get $c i32.const 100 i32.rem_u - local.set $11 + local.set $c2 i32.const 14988 - local.get $10 + local.get $c1 i32.const 2 i32.shl i32.add i64.load32_u - local.set $12 + local.set $digits1 i32.const 14988 - local.get $11 + local.get $c2 i32.const 2 i32.shl i32.add i64.load32_u - local.set $13 - local.get $2 + local.set $digits2 + local.get $offset i32.const 4 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $12 - local.get $13 + local.get $digits1 + local.get $digits2 i64.const 32 i64.shl i64.or i64.store i32.const 14988 - local.get $8 + local.get $b1 i32.const 2 i32.shl i32.add i64.load32_u - local.set $12 + local.set $digits1 i32.const 14988 - local.get $9 + local.get $b2 i32.const 2 i32.shl i32.add i64.load32_u - local.set $13 - local.get $2 + local.set $digits2 + local.get $offset i32.const 4 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $12 - local.get $13 + local.get $digits1 + local.get $digits2 i64.const 32 i64.shl i64.or @@ -6525,72 +6525,72 @@ br $while-continue|0 end end - local.get $0 - local.get $1 + local.get $buffer + local.get $num i32.wrap_i64 - local.get $2 + local.get $offset call $~lib/util/number/utoa32_dec_lut - ) - (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i64) - (local $11 i32) - (local $12 i64) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i32) - (local $24 i32) - (local $25 i32) - (local $26 i32) - (local $27 i64) + ) + (func $~lib/util/number/genDigits (param $buffer i32) (param $w_frc i64) (param $w_exp i32) (param $mp_frc i64) (param $mp_exp i32) (param $delta i64) (param $sign i32) (result i32) + (local $one_exp i32) + (local $one_frc i64) + (local $mask i64) + (local $wp_w_frc i64) + (local $p1 i32) + (local $p2 i64) + (local $kappa i32) + (local $len i32) + (local $var$15 i32) + (local $d i32) + (local $var$17 i32) + (local $tmp i64) + (local $var$19 i64) + (local $var$20 i64) + (local $var$21 i64) + (local $d_0 i64) + (local $var$23 i32) + (local $var$24 i32) + (local $var$25 i32) + (local $var$26 i32) + (local $var$27 i64) i32.const 0 - local.get $4 + local.get $mp_exp i32.sub - local.set $7 + local.set $one_exp i64.const 1 - local.get $7 + local.get $one_exp i64.extend_i32_s i64.shl - local.set $8 - local.get $8 + local.set $one_frc + local.get $one_frc i64.const 1 i64.sub - local.set $9 - local.get $3 - local.get $1 + local.set $mask + local.get $mp_frc + local.get $w_frc i64.sub - local.set $10 - local.get $3 - local.get $7 + local.set $wp_w_frc + local.get $mp_frc + local.get $one_exp i64.extend_i32_s i64.shr_u i32.wrap_i64 - local.set $11 - local.get $3 - local.get $9 + local.set $p1 + local.get $mp_frc + local.get $mask i64.and - local.set $12 - local.get $11 + local.set $p2 + local.get $p1 call $~lib/util/number/decimalCount32 - local.set $13 - local.get $6 - local.set $14 + local.set $kappa + local.get $sign + local.set $len loop $while-continue|0 - local.get $13 + local.get $kappa i32.const 0 i32.gt_s - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 if block $break|1 block $case10|1 @@ -6604,275 +6604,275 @@ block $case2|1 block $case1|1 block $case0|1 - local.get $13 - local.set $17 - local.get $17 + local.get $kappa + local.set $var$17 + local.get $var$17 i32.const 10 i32.eq br_if $case0|1 - local.get $17 + local.get $var$17 i32.const 9 i32.eq br_if $case1|1 - local.get $17 + local.get $var$17 i32.const 8 i32.eq br_if $case2|1 - local.get $17 + local.get $var$17 i32.const 7 i32.eq br_if $case3|1 - local.get $17 + local.get $var$17 i32.const 6 i32.eq br_if $case4|1 - local.get $17 + local.get $var$17 i32.const 5 i32.eq br_if $case5|1 - local.get $17 + local.get $var$17 i32.const 4 i32.eq br_if $case6|1 - local.get $17 + local.get $var$17 i32.const 3 i32.eq br_if $case7|1 - local.get $17 + local.get $var$17 i32.const 2 i32.eq br_if $case8|1 - local.get $17 + local.get $var$17 i32.const 1 i32.eq br_if $case9|1 br $case10|1 end - local.get $11 + local.get $p1 i32.const 1000000000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 1000000000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 100000000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 100000000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 10000000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 10000000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 1000000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 1000000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 100000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 100000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 10000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 10000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 1000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 1000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 100 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 100 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 10 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 10 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 - local.set $16 + local.get $p1 + local.set $d i32.const 0 - local.set $11 + local.set $p1 br $break|1 end i32.const 0 - local.set $16 + local.set $d br $break|1 end - local.get $16 - local.get $14 + local.get $d + local.get $len i32.or if - local.get $0 - local.get $14 - local.tee $17 + local.get $buffer + local.get $len + local.tee $var$17 i32.const 1 i32.add - local.set $14 - local.get $17 + local.set $len + local.get $var$17 i32.const 1 i32.shl i32.add i32.const 48 - local.get $16 + local.get $d i32.const 65535 i32.and i32.add i32.store16 end - local.get $13 + local.get $kappa i32.const 1 i32.sub - local.set $13 - local.get $11 + local.set $kappa + local.get $p1 i64.extend_i32_u - local.get $7 + local.get $one_exp i64.extend_i32_s i64.shl - local.get $12 + local.get $p2 i64.add - local.set $18 - local.get $18 - local.get $5 + local.set $tmp + local.get $tmp + local.get $delta i64.le_u if global.get $~lib/util/number/_K - local.get $13 + local.get $kappa i32.add global.set $~lib/util/number/_K - local.get $0 - local.set $23 - local.get $14 - local.set $17 - local.get $5 - local.set $22 - local.get $18 - local.set $21 + local.get $buffer + local.set $var$23 + local.get $len + local.set $var$17 + local.get $delta + local.set $d_0 + local.get $tmp + local.set $var$21 i32.const 23040 - local.get $13 + local.get $kappa i32.const 2 i32.shl i32.add i64.load32_u - local.get $7 + local.get $one_exp i64.extend_i32_s i64.shl - local.set $20 - local.get $10 - local.set $19 - local.get $23 - local.get $17 + local.set $var$20 + local.get $wp_w_frc + local.set $var$19 + local.get $var$23 + local.get $var$17 i32.const 1 i32.sub i32.const 1 i32.shl i32.add - local.set $24 - local.get $24 + local.set $var$24 + local.get $var$24 i32.load16_u - local.set $25 + local.set $var$25 loop $while-continue|3 - local.get $21 - local.get $19 + local.get $var$21 + local.get $var$19 i64.lt_u if (result i32) - local.get $22 - local.get $21 + local.get $d_0 + local.get $var$21 i64.sub - local.get $20 + local.get $var$20 i64.ge_u else i32.const 0 end if (result i32) - local.get $21 - local.get $20 + local.get $var$21 + local.get $var$20 i64.add - local.get $19 + local.get $var$19 i64.lt_u if (result i32) i32.const 1 else - local.get $19 - local.get $21 + local.get $var$19 + local.get $var$21 i64.sub - local.get $21 - local.get $20 + local.get $var$21 + local.get $var$20 i64.add - local.get $19 + local.get $var$19 i64.sub i64.gt_u end else i32.const 0 end - local.set $26 - local.get $26 + local.set $var$26 + local.get $var$26 if - local.get $25 + local.get $var$25 i32.const 1 i32.sub - local.set $25 - local.get $21 - local.get $20 + local.set $var$25 + local.get $var$21 + local.get $var$20 i64.add - local.set $21 + local.set $var$21 br $while-continue|3 end end - local.get $24 - local.get $25 + local.get $var$24 + local.get $var$25 i32.store16 - local.get $14 + local.get $len return end br $while-continue|0 @@ -6880,150 +6880,150 @@ end loop $while-continue|4 i32.const 1 - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 if - local.get $12 + local.get $p2 i64.const 10 i64.mul - local.set $12 - local.get $5 + local.set $p2 + local.get $delta i64.const 10 i64.mul - local.set $5 - local.get $12 - local.get $7 + local.set $delta + local.get $p2 + local.get $one_exp i64.extend_i32_s i64.shr_u - local.set $22 - local.get $22 - local.get $14 + local.set $d_0 + local.get $d_0 + local.get $len i64.extend_i32_s i64.or i64.const 0 i64.ne if - local.get $0 - local.get $14 - local.tee $25 + local.get $buffer + local.get $len + local.tee $var$25 i32.const 1 i32.add - local.set $14 - local.get $25 + local.set $len + local.get $var$25 i32.const 1 i32.shl i32.add i32.const 48 - local.get $22 + local.get $d_0 i32.wrap_i64 i32.const 65535 i32.and i32.add i32.store16 end - local.get $12 - local.get $9 + local.get $p2 + local.get $mask i64.and - local.set $12 - local.get $13 + local.set $p2 + local.get $kappa i32.const 1 i32.sub - local.set $13 - local.get $12 - local.get $5 + local.set $kappa + local.get $p2 + local.get $delta i64.lt_u if global.get $~lib/util/number/_K - local.get $13 + local.get $kappa i32.add global.set $~lib/util/number/_K - local.get $10 + local.get $wp_w_frc i32.const 23040 i32.const 0 - local.get $13 + local.get $kappa i32.sub i32.const 2 i32.shl i32.add i64.load32_u i64.mul - local.set $10 - local.get $0 - local.set $17 - local.get $14 - local.set $26 - local.get $5 - local.set $27 - local.get $12 - local.set $21 - local.get $8 - local.set $20 - local.get $10 - local.set $19 - local.get $17 - local.get $26 + local.set $wp_w_frc + local.get $buffer + local.set $var$17 + local.get $len + local.set $var$26 + local.get $delta + local.set $var$27 + local.get $p2 + local.set $var$21 + local.get $one_frc + local.set $var$20 + local.get $wp_w_frc + local.set $var$19 + local.get $var$17 + local.get $var$26 i32.const 1 i32.sub i32.const 1 i32.shl i32.add - local.set $25 - local.get $25 + local.set $var$25 + local.get $var$25 i32.load16_u - local.set $24 + local.set $var$24 loop $while-continue|6 - local.get $21 - local.get $19 + local.get $var$21 + local.get $var$19 i64.lt_u if (result i32) - local.get $27 - local.get $21 + local.get $var$27 + local.get $var$21 i64.sub - local.get $20 + local.get $var$20 i64.ge_u else i32.const 0 end if (result i32) - local.get $21 - local.get $20 + local.get $var$21 + local.get $var$20 i64.add - local.get $19 + local.get $var$19 i64.lt_u if (result i32) i32.const 1 else - local.get $19 - local.get $21 + local.get $var$19 + local.get $var$21 i64.sub - local.get $21 - local.get $20 + local.get $var$21 + local.get $var$20 i64.add - local.get $19 + local.get $var$19 i64.sub i64.gt_u end else i32.const 0 end - local.set $23 - local.get $23 + local.set $var$23 + local.get $var$23 if - local.get $24 + local.get $var$24 i32.const 1 i32.sub - local.set $24 - local.get $21 - local.get $20 + local.set $var$24 + local.get $var$21 + local.get $var$20 i64.add - local.set $21 + local.set $var$21 br $while-continue|6 end end - local.get $25 - local.get $24 + local.get $var$25 + local.get $var$24 i32.store16 - local.get $14 + local.get $len return end br $while-continue|4 @@ -7031,21 +7031,21 @@ end unreachable ) - (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $2 - i32.eqz - if - local.get $0 - local.get $1 + (func $~lib/util/number/prettify (param $buffer i32) (param $length i32) (param $k i32) (result i32) + (local $kk i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $k + i32.eqz + if + local.get $buffer + local.get $length i32.const 1 i32.shl i32.add @@ -7055,51 +7055,51 @@ i32.shl i32.or i32.store - local.get $1 + local.get $length i32.const 2 i32.add return end - local.get $1 - local.get $2 + local.get $length + local.get $k i32.add - local.set $3 - local.get $1 - local.get $3 + local.set $kk + local.get $length + local.get $kk i32.le_s if (result i32) - local.get $3 + local.get $kk i32.const 21 i32.le_s else i32.const 0 end if - local.get $1 - local.set $4 + local.get $length + local.set $var$4 loop $for-loop|0 - local.get $4 - local.get $3 + local.get $var$4 + local.get $kk i32.lt_s - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $0 - local.get $4 + local.get $buffer + local.get $var$4 i32.const 1 i32.shl i32.add i32.const 48 i32.store16 - local.get $4 + local.get $var$4 i32.const 1 i32.add - local.set $4 + local.set $var$4 br $for-loop|0 end end - local.get $0 - local.get $3 + local.get $buffer + local.get $kk i32.const 1 i32.shl i32.add @@ -7109,55 +7109,55 @@ i32.shl i32.or i32.store - local.get $3 + local.get $kk i32.const 2 i32.add return else - local.get $3 + local.get $kk i32.const 0 i32.gt_s if (result i32) - local.get $3 + local.get $kk i32.const 21 i32.le_s else i32.const 0 end if - local.get $0 - local.get $3 + local.get $buffer + local.get $kk i32.const 1 i32.shl i32.add - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 i32.const 2 i32.add - local.get $4 + local.get $var$4 i32.const 0 - local.get $2 + local.get $k i32.sub i32.const 1 i32.shl memory.copy - local.get $0 - local.get $3 + local.get $buffer + local.get $kk i32.const 1 i32.shl i32.add i32.const 46 i32.store16 - local.get $1 + local.get $length i32.const 1 i32.add return else i32.const -6 - local.get $3 + local.get $kk i32.lt_s if (result i32) - local.get $3 + local.get $kk i32.const 0 i32.le_s else @@ -7165,20 +7165,20 @@ end if i32.const 2 - local.get $3 + local.get $kk i32.sub - local.set $4 - local.get $0 - local.get $4 + local.set $var$4 + local.get $buffer + local.get $var$4 i32.const 1 i32.shl i32.add - local.get $0 - local.get $1 + local.get $buffer + local.get $length i32.const 1 i32.shl memory.copy - local.get $0 + local.get $buffer i32.const 48 i32.const 46 i32.const 16 @@ -7186,164 +7186,164 @@ i32.or i32.store i32.const 2 - local.set $5 + local.set $var$5 loop $for-loop|1 - local.get $5 - local.get $4 + local.get $var$5 + local.get $var$4 i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $5 + local.get $buffer + local.get $var$5 i32.const 1 i32.shl i32.add i32.const 48 i32.store16 - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|1 end end - local.get $1 - local.get $4 + local.get $length + local.get $var$4 i32.add return else - local.get $1 + local.get $length i32.const 1 i32.eq if - local.get $0 + local.get $buffer i32.const 101 i32.store16 offset=2 - local.get $0 + local.get $buffer i32.const 4 i32.add - local.set $5 - local.get $3 + local.set $var$5 + local.get $kk i32.const 1 i32.sub - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 i32.const 0 i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if i32.const 0 - local.get $6 + local.get $var$6 i32.sub - local.set $6 + local.set $var$6 end - local.get $6 + local.get $var$6 call $~lib/util/number/decimalCount32 i32.const 1 i32.add - local.set $7 - local.get $5 - local.set $10 - local.get $6 - local.set $9 - local.get $7 - local.set $8 + local.set $var$7 + local.get $var$5 + local.set $var$10 + local.get $var$6 + local.set $var$9 + local.get $var$7 + local.set $var$8 i32.const 0 i32.const 1 i32.ge_s drop - local.get $10 - local.get $9 - local.get $8 + local.get $var$10 + local.get $var$9 + local.get $var$8 call $~lib/util/number/utoa32_dec_lut - local.get $5 + local.get $var$5 i32.const 45 i32.const 43 - local.get $4 + local.get $var$4 select i32.store16 - local.get $7 - local.set $1 - local.get $1 + local.get $var$7 + local.set $length + local.get $length i32.const 2 i32.add return else - local.get $1 + local.get $length i32.const 1 i32.shl - local.set $7 - local.get $0 + local.set $var$7 + local.get $buffer i32.const 4 i32.add - local.get $0 + local.get $buffer i32.const 2 i32.add - local.get $7 + local.get $var$7 i32.const 2 i32.sub memory.copy - local.get $0 + local.get $buffer i32.const 46 i32.store16 offset=2 - local.get $0 - local.get $7 + local.get $buffer + local.get $var$7 i32.add i32.const 101 i32.store16 offset=2 - local.get $1 - local.get $0 - local.get $7 + local.get $length + local.get $buffer + local.get $var$7 i32.add i32.const 4 i32.add - local.set $9 - local.get $3 + local.set $var$9 + local.get $kk i32.const 1 i32.sub - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 i32.const 0 i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if i32.const 0 - local.get $8 + local.get $var$8 i32.sub - local.set $8 + local.set $var$8 end - local.get $8 + local.get $var$8 call $~lib/util/number/decimalCount32 i32.const 1 i32.add - local.set $5 - local.get $9 - local.set $11 - local.get $8 - local.set $6 - local.get $5 - local.set $10 + local.set $var$5 + local.get $var$9 + local.set $var$11 + local.get $var$8 + local.set $var$6 + local.get $var$5 + local.set $var$10 i32.const 0 i32.const 1 i32.ge_s drop - local.get $11 - local.get $6 - local.get $10 + local.get $var$11 + local.get $var$6 + local.get $var$10 call $~lib/util/number/utoa32_dec_lut - local.get $9 + local.get $var$9 i32.const 45 i32.const 43 - local.get $4 + local.get $var$4 select i32.store16 - local.get $5 + local.get $var$5 i32.add - local.set $1 - local.get $1 + local.set $length + local.get $length i32.const 2 i32.add return @@ -7356,434 +7356,434 @@ end unreachable ) - (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f64) - (local $6 i64) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i32) - (local $11 i64) - (local $12 i64) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 f64) - (local $17 i64) - (local $18 i64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i64) - (local $24 i64) - (local $25 i64) - (local $26 i32) - (local $27 i64) - (local $28 i32) - local.get $1 + (func $~lib/util/number/dtoa_core (param $buffer i32) (param $value f64) (result i32) + (local $sign i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 f64) + (local $var$6 i64) + (local $var$7 i32) + (local $var$8 i64) + (local $var$9 i64) + (local $var$10 i32) + (local $var$11 i64) + (local $var$12 i64) + (local $var$13 i32) + (local $var$14 i32) + (local $var$15 i32) + (local $var$16 f64) + (local $var$17 i64) + (local $var$18 i64) + (local $var$19 i64) + (local $var$20 i64) + (local $var$21 i64) + (local $var$22 i64) + (local $var$23 i64) + (local $var$24 i64) + (local $var$25 i64) + (local $var$26 i32) + (local $var$27 i64) + (local $len i32) + local.get $value f64.const 0 f64.lt - local.set $2 - local.get $2 + local.set $sign + local.get $sign if - local.get $1 + local.get $value f64.neg - local.set $1 - local.get $0 + local.set $value + local.get $buffer i32.const 45 i32.store16 end - local.get $1 - local.set $5 - local.get $0 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.get $value + local.set $var$5 + local.get $buffer + local.set $var$4 + local.get $sign + local.set $var$3 + local.get $var$5 i64.reinterpret_f64 - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 i64.const 9218868437227405312 i64.and i64.const 52 i64.shr_u i32.wrap_i64 - local.set $7 - local.get $6 + local.set $var$7 + local.get $var$6 i64.const 4503599627370495 i64.and - local.set $8 - local.get $7 + local.set $var$8 + local.get $var$7 i32.const 0 i32.ne i64.extend_i32_u i64.const 52 i64.shl - local.get $8 + local.get $var$8 i64.add - local.set $9 - local.get $7 + local.set $var$9 + local.get $var$7 i32.const 1 - local.get $7 + local.get $var$7 select i32.const 1023 i32.const 52 i32.add i32.sub - local.set $7 - local.get $9 - local.set $11 - local.get $7 - local.set $10 - local.get $11 + local.set $var$7 + local.get $var$9 + local.set $var$11 + local.get $var$7 + local.set $var$10 + local.get $var$11 i64.const 1 i64.shl i64.const 1 i64.add - local.set $12 - local.get $10 + local.set $var$12 + local.get $var$10 i32.const 1 i32.sub - local.set $13 - local.get $12 + local.set $var$13 + local.get $var$12 i64.clz i32.wrap_i64 - local.set $14 - local.get $12 - local.get $14 + local.set $var$14 + local.get $var$12 + local.get $var$14 i64.extend_i32_s i64.shl - local.set $12 - local.get $13 - local.get $14 + local.set $var$12 + local.get $var$13 + local.get $var$14 i32.sub - local.set $13 + local.set $var$13 i32.const 1 - local.get $11 + local.get $var$11 i64.const 4503599627370496 i64.eq i32.add - local.set $15 - local.get $12 + local.set $var$15 + local.get $var$12 global.set $~lib/util/number/_frc_plus - local.get $11 - local.get $15 + local.get $var$11 + local.get $var$15 i64.extend_i32_s i64.shl i64.const 1 i64.sub - local.get $10 - local.get $15 + local.get $var$10 + local.get $var$15 i32.sub - local.get $13 + local.get $var$13 i32.sub i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_minus - local.get $13 + local.get $var$13 global.set $~lib/util/number/_exp global.get $~lib/util/number/_exp - local.set $10 + local.set $var$10 i32.const -61 - local.get $10 + local.get $var$10 i32.sub f64.convert_i32_s f64.const 0.30102999566398114 f64.mul f64.const 347 f64.add - local.set $16 - local.get $16 + local.set $var$16 + local.get $var$16 i32.trunc_sat_f64_s - local.set $15 - local.get $15 - local.get $15 + local.set $var$15 + local.get $var$15 + local.get $var$15 f64.convert_i32_s - local.get $16 + local.get $var$16 f64.ne i32.add - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 i32.const 3 i32.shr_s i32.const 1 i32.add - local.set $14 + local.set $var$14 i32.const 348 - local.get $14 + local.get $var$14 i32.const 3 i32.shl i32.sub global.set $~lib/util/number/_K i32.const 22168 - local.get $14 + local.get $var$14 i32.const 3 i32.shl i32.add i64.load global.set $~lib/util/number/_frc_pow i32.const 22864 - local.get $14 + local.get $var$14 i32.const 1 i32.shl i32.add i32.load16_s global.set $~lib/util/number/_exp_pow - local.get $9 + local.get $var$9 i64.clz i32.wrap_i64 - local.set $14 - local.get $9 - local.get $14 + local.set $var$14 + local.get $var$9 + local.get $var$14 i64.extend_i32_s i64.shl - local.set $9 - local.get $7 - local.get $14 + local.set $var$9 + local.get $var$7 + local.get $var$14 i32.sub - local.set $7 + local.set $var$7 global.get $~lib/util/number/_frc_pow - local.set $12 + local.set $var$12 global.get $~lib/util/number/_exp_pow - local.set $15 - local.get $9 - local.set $17 - local.get $12 - local.set $11 - local.get $17 + local.set $var$15 + local.get $var$9 + local.set $var$17 + local.get $var$12 + local.set $var$11 + local.get $var$17 i64.const 4294967295 i64.and - local.set $18 - local.get $11 + local.set $var$18 + local.get $var$11 i64.const 4294967295 i64.and - local.set $19 - local.get $17 + local.set $var$19 + local.get $var$17 i64.const 32 i64.shr_u - local.set $20 - local.get $11 + local.set $var$20 + local.get $var$11 i64.const 32 i64.shr_u - local.set $21 - local.get $18 - local.get $19 + local.set $var$21 + local.get $var$18 + local.get $var$19 i64.mul - local.set $22 - local.get $20 - local.get $19 + local.set $var$22 + local.get $var$20 + local.get $var$19 i64.mul - local.get $22 + local.get $var$22 i64.const 32 i64.shr_u i64.add - local.set $23 - local.get $18 - local.get $21 + local.set $var$23 + local.get $var$18 + local.get $var$21 i64.mul - local.get $23 + local.get $var$23 i64.const 4294967295 i64.and i64.add - local.set $24 - local.get $24 + local.set $var$24 + local.get $var$24 i64.const 2147483647 i64.add - local.set $24 - local.get $23 + local.set $var$24 + local.get $var$23 i64.const 32 i64.shr_u - local.set $23 - local.get $24 + local.set $var$23 + local.get $var$24 i64.const 32 i64.shr_u - local.set $24 - local.get $20 - local.get $21 + local.set $var$24 + local.get $var$20 + local.get $var$21 i64.mul - local.get $23 + local.get $var$23 i64.add - local.get $24 + local.get $var$24 i64.add - local.set $24 - local.get $7 - local.set $10 - local.get $15 - local.set $13 - local.get $10 - local.get $13 + local.set $var$24 + local.get $var$7 + local.set $var$10 + local.get $var$15 + local.set $var$13 + local.get $var$10 + local.get $var$13 i32.add i32.const 64 i32.add - local.set $10 + local.set $var$10 global.get $~lib/util/number/_frc_plus - local.set $17 - local.get $12 - local.set $11 - local.get $17 + local.set $var$17 + local.get $var$12 + local.set $var$11 + local.get $var$17 i64.const 4294967295 i64.and - local.set $23 - local.get $11 + local.set $var$23 + local.get $var$11 i64.const 4294967295 i64.and - local.set $22 - local.get $17 + local.set $var$22 + local.get $var$17 i64.const 32 i64.shr_u - local.set $21 - local.get $11 + local.set $var$21 + local.get $var$11 i64.const 32 i64.shr_u - local.set $20 - local.get $23 - local.get $22 + local.set $var$20 + local.get $var$23 + local.get $var$22 i64.mul - local.set $19 - local.get $21 - local.get $22 + local.set $var$19 + local.get $var$21 + local.get $var$22 i64.mul - local.get $19 + local.get $var$19 i64.const 32 i64.shr_u i64.add - local.set $18 - local.get $23 - local.get $20 + local.set $var$18 + local.get $var$23 + local.get $var$20 i64.mul - local.get $18 + local.get $var$18 i64.const 4294967295 i64.and i64.add - local.set $25 - local.get $25 + local.set $var$25 + local.get $var$25 i64.const 2147483647 i64.add - local.set $25 - local.get $18 + local.set $var$25 + local.get $var$18 i64.const 32 i64.shr_u - local.set $18 - local.get $25 + local.set $var$18 + local.get $var$25 i64.const 32 i64.shr_u - local.set $25 - local.get $21 - local.get $20 + local.set $var$25 + local.get $var$21 + local.get $var$20 i64.mul - local.get $18 + local.get $var$18 i64.add - local.get $25 + local.get $var$25 i64.add i64.const 1 i64.sub - local.set $25 + local.set $var$25 global.get $~lib/util/number/_exp - local.set $26 - local.get $15 - local.set $13 - local.get $26 - local.get $13 + local.set $var$26 + local.get $var$15 + local.set $var$13 + local.get $var$26 + local.get $var$13 i32.add i32.const 64 i32.add - local.set $26 + local.set $var$26 global.get $~lib/util/number/_frc_minus - local.set $17 - local.get $12 - local.set $11 - local.get $17 + local.set $var$17 + local.get $var$12 + local.set $var$11 + local.get $var$17 i64.const 4294967295 i64.and - local.set $18 - local.get $11 + local.set $var$18 + local.get $var$11 i64.const 4294967295 i64.and - local.set $19 - local.get $17 + local.set $var$19 + local.get $var$17 i64.const 32 i64.shr_u - local.set $20 - local.get $11 + local.set $var$20 + local.get $var$11 i64.const 32 i64.shr_u - local.set $21 - local.get $18 - local.get $19 + local.set $var$21 + local.get $var$18 + local.get $var$19 i64.mul - local.set $22 - local.get $20 - local.get $19 + local.set $var$22 + local.get $var$20 + local.get $var$19 i64.mul - local.get $22 + local.get $var$22 i64.const 32 i64.shr_u i64.add - local.set $23 - local.get $18 - local.get $21 + local.set $var$23 + local.get $var$18 + local.get $var$21 i64.mul - local.get $23 + local.get $var$23 i64.const 4294967295 i64.and i64.add - local.set $27 - local.get $27 + local.set $var$27 + local.get $var$27 i64.const 2147483647 i64.add - local.set $27 - local.get $23 + local.set $var$27 + local.get $var$23 i64.const 32 i64.shr_u - local.set $23 - local.get $27 + local.set $var$23 + local.get $var$27 i64.const 32 i64.shr_u - local.set $27 - local.get $20 - local.get $21 + local.set $var$27 + local.get $var$20 + local.get $var$21 i64.mul - local.get $23 + local.get $var$23 i64.add - local.get $27 + local.get $var$27 i64.add i64.const 1 i64.add - local.set $27 - local.get $25 - local.get $27 + local.set $var$27 + local.get $var$25 + local.get $var$27 i64.sub - local.set $23 - local.get $4 - local.get $24 - local.get $10 - local.get $25 - local.get $26 - local.get $23 - local.get $3 + local.set $var$23 + local.get $var$4 + local.get $var$24 + local.get $var$10 + local.get $var$25 + local.get $var$26 + local.get $var$23 + local.get $var$3 call $~lib/util/number/genDigits - local.set $28 - local.get $0 - local.get $2 + local.set $len + local.get $buffer + local.get $sign i32.const 1 i32.shl i32.add - local.get $28 - local.get $2 + local.get $len + local.get $sign i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.set $28 - local.get $28 - local.get $2 + local.set $len + local.get $len + local.get $sign i32.add ) (func $~lib/rt/itcms/__collect - (local $0 i32) + (local $var$0 i32) i32.const 0 drop global.get $~lib/rt/itcms/state @@ -7794,8 +7794,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -7809,8 +7809,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -7882,12 +7882,12 @@ call $~lib/rt/itcms/__visit end ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -7895,49 +7895,49 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array<~lib/string/String>#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array<~lib/string/String>#__visit (param $this i32) (param $cookie i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $val i32) i32.const 1 drop - local.get $0 + local.get $this i32.load offset=4 - local.set $2 - local.get $2 - local.get $0 + local.set $var$2 + local.get $var$2 + local.get $this i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $var$2 i32.load - local.set $5 - local.get $5 + local.set $val + local.get $val if - local.get $5 - local.get $1 + local.get $val + local.get $cookie call $~lib/rt/itcms/__visit end - local.get $2 + local.get $var$2 i32.const 4 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array<~lib/string/String>~visit (param $0 i32) (param $1 i32) diff --git a/tests/compiler/std/symbol.debug.wat b/tests/compiler/std/symbol.debug.wat index 173abee490..0ddd6d5803 100644 --- a/tests/compiler/std/symbol.debug.wat +++ b/tests/compiler/std/symbol.debug.wat @@ -85,22 +85,22 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (export "_start" (func $~start)) - (func $~lib/symbol/Symbol (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $~lib/symbol/Symbol (param $description i32) (result i32) + (local $var$1 i32) + (local $id i32) global.get $~lib/symbol/nextId - local.tee $1 + local.tee $var$1 i32.const 1 i32.add global.set $~lib/symbol/nextId - local.get $1 - local.set $2 - local.get $2 + local.get $var$1 + local.set $id + local.get $id i32.eqz if unreachable end - local.get $2 + local.get $id ) (func $~lib/rt/itcms/Object#set:nextWithColor (param $0 i32) (param $1 i32) local.get $0 @@ -112,50 +112,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -168,58 +168,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -236,12 +236,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -251,19 +251,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -274,27 +274,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -302,35 +302,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -340,15 +340,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -358,25 +358,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -384,33 +384,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -438,23 +438,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -466,15 +466,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -486,33 +486,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -520,21 +520,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -549,36 +549,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -586,67 +586,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -656,22 +656,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -681,12 +681,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -698,75 +698,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -778,38 +778,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -823,12 +823,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -839,38 +839,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -878,21 +878,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -907,101 +907,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -1012,7 +1012,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1023,26 +1023,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1055,27 +1055,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1089,11 +1089,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1104,66 +1104,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1173,10 +1173,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1187,13 +1187,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1204,109 +1204,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1314,7 +1314,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1331,23 +1331,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1359,54 +1359,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1427,30 +1427,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1460,9 +1460,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1472,8 +1472,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1481,43 +1481,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1529,17 +1529,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1553,7 +1553,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1571,7 +1571,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1581,12 +1581,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1608,7 +1608,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1628,14 +1628,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1648,8 +1648,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1660,37 +1660,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1698,16 +1698,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1715,21 +1715,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1744,12 +1744,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1757,49 +1757,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1809,90 +1809,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1901,22 +1901,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1925,27 +1925,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1960,69 +1960,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2037,29 +2037,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2072,13 +2072,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2089,25 +2089,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2122,10 +2122,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2143,49 +2143,49 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32) + (local $child i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $childPtr i32.eqz if return end i32.const 1 drop - local.get $0 + local.get $parentPtr i32.eqz if i32.const 0 @@ -2195,37 +2195,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $childPtr i32.const 20 - i32.sub - local.set $3 - local.get $3 + i32.sub + local.set $child + local.get $child call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $0 + local.get $parentPtr i32.const 20 i32.sub - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 call $~lib/rt/itcms/Object#get:color - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $2 + local.get $expectMultiple if - local.get $4 + local.get $var$4 call $~lib/rt/itcms/Object#makeGray else - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end else - local.get $5 + local.get $var$5 i32.const 3 i32.eq if (result i32) @@ -2236,7 +2236,7 @@ i32.const 0 end if - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end end @@ -2318,49 +2318,49 @@ local.get $1 i32.store offset=20 ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u ) - (func $~lib/util/hash/HASH<~lib/string/String> (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (func $~lib/util/hash/HASH<~lib/string/String> (param $key i32) (result i32) + (local $var$1 i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) i32.const 1 drop block $~lib/util/hash/hashStr|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 + local.get $key + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq if i32.const 0 br $~lib/util/hash/hashStr|inlined.0 end - local.get $1 + local.get $var$1 call $~lib/string/String#get:length i32.const 1 i32.shl - local.set $2 - local.get $2 - local.set $3 - local.get $1 - local.set $4 - local.get $3 + local.set $var$2 + local.get $var$2 + local.set $var$3 + local.get $var$1 + local.set $var$4 + local.get $var$3 i32.const 16 i32.ge_u if @@ -2369,37 +2369,37 @@ i32.add i32.const -2048144777 i32.add - local.set $5 + local.set $var$5 i32.const 0 i32.const -2048144777 i32.add - local.set $6 + local.set $var$6 i32.const 0 - local.set $7 + local.set $var$7 i32.const 0 i32.const -1640531535 i32.sub - local.set $8 - local.get $3 - local.get $4 + local.set $var$8 + local.get $var$3 + local.get $var$4 i32.add i32.const 16 i32.sub - local.set $9 + local.set $var$9 loop $while-continue|0 - local.get $4 - local.get $9 + local.get $var$4 + local.get $var$9 i32.le_u - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $5 - local.set $12 - local.get $4 + local.get $var$5 + local.set $var$12 + local.get $var$4 i32.load - local.set $11 - local.get $12 - local.get $11 + local.set $var$11 + local.get $var$12 + local.get $var$11 i32.const -2048144777 i32.mul i32.add @@ -2407,14 +2407,14 @@ i32.rotl i32.const -1640531535 i32.mul - local.set $5 - local.get $6 - local.set $12 - local.get $4 + local.set $var$5 + local.get $var$6 + local.set $var$12 + local.get $var$4 i32.load offset=4 - local.set $11 - local.get $12 - local.get $11 + local.set $var$11 + local.get $var$12 + local.get $var$11 i32.const -2048144777 i32.mul i32.add @@ -2422,14 +2422,14 @@ i32.rotl i32.const -1640531535 i32.mul - local.set $6 - local.get $7 - local.set $12 - local.get $4 + local.set $var$6 + local.get $var$7 + local.set $var$12 + local.get $var$4 i32.load offset=8 - local.set $11 - local.get $12 - local.get $11 + local.set $var$11 + local.get $var$12 + local.get $var$11 i32.const -2048144777 i32.mul i32.add @@ -2437,14 +2437,14 @@ i32.rotl i32.const -1640531535 i32.mul - local.set $7 - local.get $8 - local.set $12 - local.get $4 + local.set $var$7 + local.get $var$8 + local.set $var$12 + local.get $var$4 i32.load offset=12 - local.set $11 - local.get $12 - local.get $11 + local.set $var$11 + local.get $var$12 + local.get $var$11 i32.const -2048144777 i32.mul i32.add @@ -2452,164 +2452,164 @@ i32.rotl i32.const -1640531535 i32.mul - local.set $8 - local.get $4 + local.set $var$8 + local.get $var$4 i32.const 16 i32.add - local.set $4 + local.set $var$4 br $while-continue|0 end end - local.get $2 - local.get $5 + local.get $var$2 + local.get $var$5 i32.const 1 i32.rotl - local.get $6 + local.get $var$6 i32.const 7 i32.rotl i32.add - local.get $7 + local.get $var$7 i32.const 12 i32.rotl i32.add - local.get $8 + local.get $var$8 i32.const 18 i32.rotl i32.add i32.add - local.set $2 + local.set $var$2 else - local.get $2 + local.get $var$2 i32.const 0 i32.const 374761393 i32.add i32.add - local.set $2 + local.set $var$2 end - local.get $1 - local.get $3 + local.get $var$1 + local.get $var$3 i32.add i32.const 4 i32.sub - local.set $9 + local.set $var$9 loop $while-continue|1 - local.get $4 - local.get $9 + local.get $var$4 + local.get $var$9 i32.le_u - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 if - local.get $2 - local.get $4 + local.get $var$2 + local.get $var$4 i32.load i32.const -1028477379 i32.mul i32.add - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $2 - local.get $4 + local.set $var$2 + local.get $var$4 i32.const 4 i32.add - local.set $4 + local.set $var$4 br $while-continue|1 end end - local.get $1 - local.get $3 + local.get $var$1 + local.get $var$3 i32.add - local.set $9 + local.set $var$9 loop $while-continue|2 - local.get $4 - local.get $9 + local.get $var$4 + local.get $var$9 i32.lt_u - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 if - local.get $2 - local.get $4 + local.get $var$2 + local.get $var$4 i32.load8_u i32.const 374761393 i32.mul i32.add - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const 11 i32.rotl i32.const -1640531535 i32.mul - local.set $2 - local.get $4 + local.set $var$2 + local.get $var$4 i32.const 1 i32.add - local.set $4 + local.set $var$4 br $while-continue|2 end end - local.get $2 - local.get $2 + local.get $var$2 + local.get $var$2 i32.const 15 i32.shr_u i32.xor - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const -2048144777 i32.mul - local.set $2 - local.get $2 - local.get $2 + local.set $var$2 + local.get $var$2 + local.get $var$2 i32.const 13 i32.shr_u i32.xor - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 i32.const -1028477379 i32.mul - local.set $2 - local.get $2 - local.get $2 + local.set $var$2 + local.get $var$2 + local.get $var$2 i32.const 16 i32.shr_u i32.xor - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 end return ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.get $1 + (func $~lib/util/string/compareImpl (param $str1 i32) (param $index1 i32) (param $str2 i32) (param $index2 i32) (param $len i32) (result i32) + (local $ptr1 i32) + (local $ptr2 i32) + (local $var$7 i32) + (local $a i32) + (local $b i32) + local.get $str1 + local.get $index1 i32.const 1 i32.shl i32.add - local.set $5 - local.get $2 - local.get $3 + local.set $ptr1 + local.get $str2 + local.get $index2 i32.const 1 i32.shl i32.add - local.set $6 + local.set $ptr2 i32.const 0 i32.const 2 i32.lt_s drop - local.get $4 + local.get $len i32.const 4 i32.ge_u if (result i32) - local.get $5 + local.get $ptr1 i32.const 7 i32.and - local.get $6 + local.get $ptr2 i32.const 7 i32.and i32.or @@ -2620,27 +2620,27 @@ if block $do-break|0 loop $do-loop|0 - local.get $5 + local.get $ptr1 i64.load - local.get $6 + local.get $ptr2 i64.load i64.ne if br $do-break|0 end - local.get $5 + local.get $ptr1 i32.const 8 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 8 i32.add - local.set $6 - local.get $4 + local.set $ptr2 + local.get $len i32.const 4 i32.sub - local.set $4 - local.get $4 + local.set $len + local.get $len i32.const 4 i32.ge_u br_if $do-loop|0 @@ -2648,59 +2648,59 @@ end end loop $while-continue|1 - local.get $4 - local.tee $7 + local.get $len + local.tee $var$7 i32.const 1 i32.sub - local.set $4 - local.get $7 - local.set $7 - local.get $7 + local.set $len + local.get $var$7 + local.set $var$7 + local.get $var$7 if - local.get $5 + local.get $ptr1 i32.load16_u - local.set $8 - local.get $6 + local.set $a + local.get $ptr2 i32.load16_u - local.set $9 - local.get $8 - local.get $9 + local.set $b + local.get $a + local.get $b i32.ne if - local.get $8 - local.get $9 + local.get $a + local.get $b i32.sub return end - local.get $5 + local.get $ptr1 i32.const 2 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 2 i32.add - local.set $6 + local.set $ptr2 br $while-continue|1 end end i32.const 0 ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__eq (param $left i32) (param $right i32) (result i32) + (local $leftLength i32) + local.get $left + local.get $right i32.eq if i32.const 1 return end - local.get $0 + local.get $left i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $1 + local.get $right i32.const 0 i32.eq end @@ -2708,43 +2708,43 @@ i32.const 0 return end - local.get $0 + local.get $left call $~lib/string/String#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $leftLength + local.get $leftLength + local.get $right call $~lib/string/String#get:length i32.ne if i32.const 0 return end - local.get $0 + local.get $left i32.const 0 - local.get $1 + local.get $right i32.const 0 - local.get $2 + local.get $leftLength call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/map/Map<~lib/string/String,usize>#has (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map<~lib/string/String,usize>#has (param $this i32) (param $key i32) (result i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH<~lib/string/String> call $~lib/map/Map<~lib/string/String,usize>#find i32.const 0 i32.ne ) - (func $~lib/map/Map<~lib/string/String,usize>#get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map<~lib/string/String,usize>#get (param $this i32) (param $key i32) (result i32) + (local $entry i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH<~lib/string/String> call $~lib/map/Map<~lib/string/String,usize>#find - local.set $2 - local.get $2 + local.set $entry + local.get $entry i32.eqz if i32.const 624 @@ -2754,7 +2754,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $entry i32.load offset=4 ) (func $~lib/map/MapEntry<~lib/string/String,usize>#set:value (param $0 i32) (param $1 i32) @@ -2772,20 +2772,20 @@ local.get $1 i32.store offset=8 ) - (func $~lib/map/Map<~lib/string/String,usize>#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) + (func $~lib/map/Map<~lib/string/String,usize>#rehash (param $this i32) (param $newBucketsMask i32) + (local $newBucketsCapacity i32) + (local $newBuckets i32) + (local $newEntriesCapacity i32) + (local $newEntries i32) + (local $oldPtr i32) + (local $oldEnd i32) + (local $newPtr i32) + (local $var$9 i32) + (local $oldEntry i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) + (local $var$14 i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -2797,117 +2797,117 @@ global.get $~lib/memory/__stack_pointer i32.const 0 i32.store offset=8 - local.get $1 + local.get $newBucketsMask i32.const 1 i32.add - local.set $2 + local.set $newBucketsCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 + local.get $newBucketsCapacity i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $newBuckets i32.store - local.get $2 + local.get $newBucketsCapacity i32.const 8 i32.mul i32.const 3 i32.div_s - local.set $4 + local.set $newEntriesCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 + local.get $newEntriesCapacity i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $newEntries i32.store offset=4 - local.get $0 + local.get $this i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 + local.set $oldPtr + local.get $oldPtr + local.get $this i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $7 - local.get $5 - local.set $8 + local.set $oldEnd + local.get $newEntries + local.set $newPtr loop $while-continue|0 - local.get $6 - local.get $7 + local.get $oldPtr + local.get $oldEnd i32.ne - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $6 - local.set $10 - local.get $10 + local.get $oldPtr + local.set $oldEntry + local.get $oldEntry i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $8 - local.set $11 + local.get $newPtr + local.set $var$11 global.get $~lib/memory/__stack_pointer - local.get $10 + local.get $oldEntry i32.load - local.tee $12 + local.tee $var$12 i32.store offset=8 - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 call $~lib/map/MapEntry<~lib/string/String,usize>#set:key - local.get $11 - local.get $10 + local.get $var$11 + local.get $oldEntry i32.load offset=4 call $~lib/map/MapEntry<~lib/string/String,usize>#set:value - local.get $12 + local.get $var$12 call $~lib/util/hash/HASH<~lib/string/String> - local.get $1 + local.get $newBucketsMask i32.and - local.set $13 - local.get $3 - local.get $13 + local.set $var$13 + local.get $newBuckets + local.get $var$13 i32.const 4 i32.mul i32.add - local.set $14 - local.get $11 - local.get $14 + local.set $var$14 + local.get $var$11 + local.get $var$14 i32.load call $~lib/map/MapEntry<~lib/string/String,usize>#set:taggedNext - local.get $14 - local.get $8 + local.get $var$14 + local.get $newPtr i32.store - local.get $8 + local.get $newPtr i32.const 12 i32.add - local.set $8 + local.set $newPtr end - local.get $6 + local.get $oldPtr i32.const 12 i32.add - local.set $6 + local.set $oldPtr br $while-continue|0 end end - local.get $0 - local.get $3 + local.get $this + local.get $newBuckets call $~lib/map/Map<~lib/string/String,usize>#set:buckets - local.get $0 - local.get $1 + local.get $this + local.get $newBucketsMask call $~lib/map/Map<~lib/string/String,usize>#set:bucketsMask - local.get $0 - local.get $5 + local.get $this + local.get $newEntries call $~lib/map/Map<~lib/string/String,usize>#set:entries - local.get $0 - local.get $4 + local.get $this + local.get $newEntriesCapacity call $~lib/map/Map<~lib/string/String,usize>#set:entriesCapacity - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 call $~lib/map/Map<~lib/string/String,usize>#set:entriesOffset global.get $~lib/memory/__stack_pointer @@ -2915,10 +2915,10 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/util/hash/HASH (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + (func $~lib/util/hash/HASH (param $key i32) (result i32) + (local $var$1 i32) + (local $var$2 i32) + (local $var$3 i32) i32.const 0 drop i32.const 0 @@ -2929,102 +2929,102 @@ i32.const 4 i32.le_u drop - local.get $0 - local.set $2 + local.get $key + local.set $var$2 i32.const 4 - local.set $1 + local.set $var$1 i32.const 0 i32.const 374761393 i32.add - local.get $1 + local.get $var$1 i32.add - local.set $3 - local.get $3 - local.get $2 + local.set $var$3 + local.get $var$3 + local.get $var$2 i32.const -1028477379 i32.mul i32.add - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const 17 i32.rotl i32.const 668265263 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 15 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const -2048144777 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 13 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.const -1028477379 i32.mul - local.set $3 - local.get $3 - local.get $3 + local.set $var$3 + local.get $var$3 + local.get $var$3 i32.const 16 i32.shr_u i32.xor - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 return ) - (func $~lib/map/Map#find (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/map/Map#find (param $this i32) (param $key i32) (param $hashCode i32) (result i32) + (local $entry i32) + (local $var$4 i32) + (local $taggedNext i32) + local.get $this i32.load - local.get $2 - local.get $0 + local.get $hashCode + local.get $this i32.load offset=4 i32.and i32.const 4 i32.mul i32.add i32.load - local.set $3 + local.set $entry loop $while-continue|0 - local.get $3 - local.set $4 - local.get $4 + local.get $entry + local.set $var$4 + local.get $var$4 if - local.get $3 + local.get $entry i32.load offset=8 - local.set $5 - local.get $5 + local.set $taggedNext + local.get $taggedNext i32.const 1 i32.and i32.eqz if (result i32) - local.get $3 + local.get $entry i32.load - local.get $1 + local.get $key i32.eq else i32.const 0 end if - local.get $3 + local.get $entry return end - local.get $5 + local.get $taggedNext i32.const 1 i32.const -1 i32.xor i32.and - local.set $3 + local.set $entry br $while-continue|0 end end @@ -3045,20 +3045,20 @@ local.get $1 i32.store offset=8 ) - (func $~lib/map/Map#rehash (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) + (func $~lib/map/Map#rehash (param $this i32) (param $newBucketsMask i32) + (local $newBucketsCapacity i32) + (local $newBuckets i32) + (local $newEntriesCapacity i32) + (local $newEntries i32) + (local $oldPtr i32) + (local $oldEnd i32) + (local $newPtr i32) + (local $var$9 i32) + (local $oldEntry i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) + (local $var$14 i32) global.get $~lib/memory/__stack_pointer i32.const 8 i32.sub @@ -3067,115 +3067,115 @@ global.get $~lib/memory/__stack_pointer i64.const 0 i64.store - local.get $1 + local.get $newBucketsMask i32.const 1 i32.add - local.set $2 + local.set $newBucketsCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $2 + local.get $newBucketsCapacity i32.const 4 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $3 + local.tee $newBuckets i32.store - local.get $2 + local.get $newBucketsCapacity i32.const 8 i32.mul i32.const 3 i32.div_s - local.set $4 + local.set $newEntriesCapacity global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $4 + local.get $newEntriesCapacity i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.tee $5 + local.tee $newEntries i32.store offset=4 - local.get $0 + local.get $this i32.load offset=8 - local.set $6 - local.get $6 - local.get $0 + local.set $oldPtr + local.get $oldPtr + local.get $this i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $7 - local.get $5 - local.set $8 + local.set $oldEnd + local.get $newEntries + local.set $newPtr loop $while-continue|0 - local.get $6 - local.get $7 + local.get $oldPtr + local.get $oldEnd i32.ne - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $6 - local.set $10 - local.get $10 + local.get $oldPtr + local.set $oldEntry + local.get $oldEntry i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $8 - local.set $11 - local.get $10 + local.get $newPtr + local.set $var$11 + local.get $oldEntry i32.load - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 call $~lib/map/MapEntry#set:key - local.get $11 - local.get $10 + local.get $var$11 + local.get $oldEntry i32.load offset=4 call $~lib/map/MapEntry#set:value - local.get $12 + local.get $var$12 call $~lib/util/hash/HASH - local.get $1 + local.get $newBucketsMask i32.and - local.set $13 - local.get $3 - local.get $13 + local.set $var$13 + local.get $newBuckets + local.get $var$13 i32.const 4 i32.mul i32.add - local.set $14 - local.get $11 - local.get $14 + local.set $var$14 + local.get $var$11 + local.get $var$14 i32.load call $~lib/map/MapEntry#set:taggedNext - local.get $14 - local.get $8 + local.get $var$14 + local.get $newPtr i32.store - local.get $8 + local.get $newPtr i32.const 12 i32.add - local.set $8 + local.set $newPtr end - local.get $6 + local.get $oldPtr i32.const 12 i32.add - local.set $6 + local.set $oldPtr br $while-continue|0 end end - local.get $0 - local.get $3 + local.get $this + local.get $newBuckets call $~lib/map/Map#set:buckets - local.get $0 - local.get $1 + local.get $this + local.get $newBucketsMask call $~lib/map/Map#set:bucketsMask - local.get $0 - local.get $5 + local.get $this + local.get $newEntries call $~lib/map/Map#set:entries - local.get $0 - local.get $4 + local.get $this + local.get $newEntriesCapacity call $~lib/map/Map#set:entriesCapacity - local.get $0 - local.get $0 + local.get $this + local.get $this i32.load offset=20 call $~lib/map/Map#set:entriesOffset global.get $~lib/memory/__stack_pointer @@ -3183,24 +3183,24 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/map/Map#has (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map#has (param $this i32) (param $key i32) (result i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 - local.get $1 + (func $~lib/map/Map#get (param $this i32) (param $key i32) (result i32) + (local $entry i32) + local.get $this + local.get $key + local.get $key call $~lib/util/hash/HASH call $~lib/map/Map#find - local.set $2 - local.get $2 + local.set $entry + local.get $entry i32.eqz if i32.const 624 @@ -3210,12 +3210,12 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $entry i32.load offset=4 ) - (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__concat (param $left i32) (param $right i32) (result i32) + local.get $left + local.get $right call $~lib/string/String#concat ) (func $~lib/rt/__visit_globals (param $0 i32) @@ -3286,41 +3286,41 @@ call $~lib/rt/itcms/__visit end ) - (func $~lib/map/Map<~lib/string/String,usize>#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $0 + (func $~lib/map/Map<~lib/string/String,usize>#__visit (param $this i32) (param $cookie i32) + (local $entries i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $entry i32) + (local $var$7 i32) + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $entries i32.const 1 drop - local.get $2 - local.set $3 - local.get $3 - local.get $0 + local.get $entries + local.set $var$3 + local.get $var$3 + local.get $this i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $4 + local.set $var$4 loop $while-continue|0 - local.get $3 - local.get $4 + local.get $var$3 + local.get $var$4 i32.lt_u - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $3 - local.set $6 - local.get $6 + local.get $var$3 + local.set $entry + local.get $entry i32.load offset=8 i32.const 1 i32.and @@ -3328,26 +3328,26 @@ if i32.const 1 drop - local.get $6 + local.get $entry i32.load - local.set $7 + local.set $var$7 i32.const 0 drop - local.get $7 - local.get $1 + local.get $var$7 + local.get $cookie call $~lib/rt/itcms/__visit i32.const 0 drop end - local.get $3 + local.get $var$3 i32.const 12 i32.add - local.set $3 + local.set $var$3 br $while-continue|0 end end - local.get $2 - local.get $1 + local.get $entries + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/map/Map<~lib/string/String,usize>~visit (param $0 i32) (param $1 i32) @@ -3355,41 +3355,41 @@ local.get $1 call $~lib/map/Map<~lib/string/String,usize>#__visit ) - (func $~lib/map/Map#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $0 + (func $~lib/map/Map#__visit (param $this i32) (param $cookie i32) + (local $entries i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $entry i32) + (local $var$7 i32) + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $entries i32.const 1 drop - local.get $2 - local.set $3 - local.get $3 - local.get $0 + local.get $entries + local.set $var$3 + local.get $var$3 + local.get $this i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $4 + local.set $var$4 loop $while-continue|0 - local.get $3 - local.get $4 + local.get $var$3 + local.get $var$4 i32.lt_u - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $3 - local.set $6 - local.get $6 + local.get $var$3 + local.set $entry + local.get $entry i32.load offset=8 i32.const 1 i32.and @@ -3399,24 +3399,24 @@ drop i32.const 1 drop - local.get $6 + local.get $entry i32.load offset=4 - local.set $7 + local.set $var$7 i32.const 0 drop - local.get $7 - local.get $1 + local.get $var$7 + local.get $cookie call $~lib/rt/itcms/__visit end - local.get $3 + local.get $var$3 i32.const 12 i32.add - local.set $3 + local.set $var$3 br $while-continue|0 end end - local.get $2 - local.get $1 + local.get $entries + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/map/Map~visit (param $0 i32) (param $1 i32) diff --git a/tests/compiler/std/typedarray.debug.wat b/tests/compiler/std/typedarray.debug.wat index e70cfe814c..e1aa1059d4 100644 --- a/tests/compiler/std/typedarray.debug.wat +++ b/tests/compiler/std/typedarray.debug.wat @@ -422,50 +422,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -478,58 +478,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -546,12 +546,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -561,19 +561,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -584,27 +584,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -612,35 +612,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -650,15 +650,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -668,25 +668,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -694,33 +694,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -748,23 +748,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -776,15 +776,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -796,33 +796,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -830,21 +830,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -859,36 +859,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -896,67 +896,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -966,22 +966,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -991,12 +991,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -1008,75 +1008,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -1088,38 +1088,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -1133,12 +1133,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -1149,38 +1149,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1188,21 +1188,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -1217,101 +1217,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -1322,7 +1322,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1333,26 +1333,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1365,27 +1365,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1399,11 +1399,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1414,66 +1414,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1483,10 +1483,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1497,13 +1497,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1514,109 +1514,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1624,7 +1624,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1641,23 +1641,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1669,54 +1669,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1737,30 +1737,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1770,9 +1770,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1782,8 +1782,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1791,43 +1791,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1839,17 +1839,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1863,7 +1863,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1881,7 +1881,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1891,12 +1891,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1918,7 +1918,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1938,14 +1938,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1958,8 +1958,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1970,37 +1970,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -2008,16 +2008,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -2025,21 +2025,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -2054,12 +2054,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -2067,49 +2067,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -2119,90 +2119,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -2211,22 +2211,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -2235,27 +2235,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -2270,69 +2270,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2347,29 +2347,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2382,13 +2382,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2399,25 +2399,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2432,10 +2432,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2453,49 +2453,49 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32) + (local $child i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $childPtr i32.eqz if return end i32.const 1 drop - local.get $0 + local.get $parentPtr i32.eqz if i32.const 0 @@ -2505,37 +2505,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $childPtr i32.const 20 i32.sub - local.set $3 - local.get $3 + local.set $child + local.get $child call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $0 + local.get $parentPtr i32.const 20 i32.sub - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 call $~lib/rt/itcms/Object#get:color - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $2 + local.get $expectMultiple if - local.get $4 + local.get $var$4 call $~lib/rt/itcms/Object#makeGray else - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end else - local.get $5 + local.get $var$5 i32.const 3 i32.eq if (result i32) @@ -2546,7 +2546,7 @@ i32.const 0 end if - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end end @@ -2571,85 +2571,85 @@ local.get $1 i32.store offset=8 ) - (func $~lib/arraybuffer/ArrayBufferView#get:byteOffset (param $0 i32) (result i32) - local.get $0 + (func $~lib/arraybuffer/ArrayBufferView#get:byteOffset (param $this i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this i32.load i32.sub ) - (func $~lib/typedarray/Int8Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Int8Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=8 ) - (func $~lib/typedarray/Uint8Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Uint8Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=8 ) - (func $~lib/typedarray/Uint8ClampedArray#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Uint8ClampedArray#get:length (param $this i32) (result i32) + local.get $this i32.load offset=8 ) - (func $~lib/typedarray/Int16Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Int16Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=8 i32.const 1 i32.shr_u ) - (func $~lib/typedarray/Uint16Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Uint16Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=8 i32.const 1 i32.shr_u ) - (func $~lib/typedarray/Int32Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Int32Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=8 i32.const 2 i32.shr_u ) - (func $~lib/typedarray/Uint32Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Uint32Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=8 i32.const 2 i32.shr_u ) - (func $~lib/typedarray/Int64Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Int64Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=8 i32.const 3 i32.shr_u ) - (func $~lib/typedarray/Uint64Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Uint64Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=8 i32.const 3 i32.shr_u ) - (func $~lib/typedarray/Float32Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Float32Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=8 i32.const 2 i32.shr_u ) - (func $~lib/typedarray/Float64Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Float64Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=8 i32.const 3 i32.shr_u ) - (func $std/typedarray/testInstantiate (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) + (func $std/typedarray/testInstantiate (param $len i32) + (local $i8a i32) + (local $u8a i32) + (local $c8a i32) + (local $i16a i32) + (local $u16a i32) + (local $i32a i32) + (local $u32a i32) + (local $i64a i32) + (local $u64a i32) + (local $f32a i32) + (local $f64a i32) global.get $~lib/memory/__stack_pointer i32.const 44 i32.sub @@ -2661,11 +2661,11 @@ memory.fill global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $0 + local.get $len call $~lib/typedarray/Int8Array#constructor - local.tee $1 + local.tee $i8a i32.store - local.get $1 + local.get $i8a call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq @@ -2678,9 +2678,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $i8a i32.load offset=8 - local.get $0 + local.get $len global.get $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT i32.mul i32.eq @@ -2693,9 +2693,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $i8a call $~lib/typedarray/Int8Array#get:length - local.get $0 + local.get $len i32.eq i32.eqz if @@ -2708,11 +2708,11 @@ end global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $0 + local.get $len call $~lib/typedarray/Uint8Array#constructor - local.tee $2 + local.tee $u8a i32.store offset=4 - local.get $2 + local.get $u8a call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq @@ -2725,9 +2725,9 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $u8a i32.load offset=8 - local.get $0 + local.get $len global.get $~lib/typedarray/Uint8Array.BYTES_PER_ELEMENT i32.mul i32.eq @@ -2740,9 +2740,9 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $u8a call $~lib/typedarray/Uint8Array#get:length - local.get $0 + local.get $len i32.eq i32.eqz if @@ -2755,11 +2755,11 @@ end global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $0 + local.get $len call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $3 + local.tee $c8a i32.store offset=8 - local.get $3 + local.get $c8a call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq @@ -2772,9 +2772,9 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $c8a i32.load offset=8 - local.get $0 + local.get $len global.get $~lib/typedarray/Uint8Array.BYTES_PER_ELEMENT i32.mul i32.eq @@ -2787,9 +2787,9 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $c8a call $~lib/typedarray/Uint8ClampedArray#get:length - local.get $0 + local.get $len i32.eq i32.eqz if @@ -2802,11 +2802,11 @@ end global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $0 + local.get $len call $~lib/typedarray/Int16Array#constructor - local.tee $4 + local.tee $i16a i32.store offset=12 - local.get $4 + local.get $i16a call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq @@ -2819,9 +2819,9 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $i16a i32.load offset=8 - local.get $0 + local.get $len global.get $~lib/typedarray/Int16Array.BYTES_PER_ELEMENT i32.mul i32.eq @@ -2834,9 +2834,9 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $i16a call $~lib/typedarray/Int16Array#get:length - local.get $0 + local.get $len i32.eq i32.eqz if @@ -2849,11 +2849,11 @@ end global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $0 + local.get $len call $~lib/typedarray/Uint16Array#constructor - local.tee $5 + local.tee $u16a i32.store offset=16 - local.get $5 + local.get $u16a call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq @@ -2866,9 +2866,9 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $u16a i32.load offset=8 - local.get $0 + local.get $len global.get $~lib/typedarray/Uint16Array.BYTES_PER_ELEMENT i32.mul i32.eq @@ -2881,9 +2881,9 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $u16a call $~lib/typedarray/Uint16Array#get:length - local.get $0 + local.get $len i32.eq i32.eqz if @@ -2896,11 +2896,11 @@ end global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $0 + local.get $len call $~lib/typedarray/Int32Array#constructor - local.tee $6 + local.tee $i32a i32.store offset=20 - local.get $6 + local.get $i32a call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq @@ -2913,9 +2913,9 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $i32a i32.load offset=8 - local.get $0 + local.get $len global.get $~lib/typedarray/Int32Array.BYTES_PER_ELEMENT i32.mul i32.eq @@ -2928,9 +2928,9 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $i32a call $~lib/typedarray/Int32Array#get:length - local.get $0 + local.get $len i32.eq i32.eqz if @@ -2943,11 +2943,11 @@ end global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $0 + local.get $len call $~lib/typedarray/Uint32Array#constructor - local.tee $7 + local.tee $u32a i32.store offset=24 - local.get $7 + local.get $u32a call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq @@ -2960,9 +2960,9 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $u32a i32.load offset=8 - local.get $0 + local.get $len global.get $~lib/typedarray/Uint32Array.BYTES_PER_ELEMENT i32.mul i32.eq @@ -2975,9 +2975,9 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $u32a call $~lib/typedarray/Uint32Array#get:length - local.get $0 + local.get $len i32.eq i32.eqz if @@ -2990,11 +2990,11 @@ end global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $0 + local.get $len call $~lib/typedarray/Int64Array#constructor - local.tee $8 + local.tee $i64a i32.store offset=28 - local.get $8 + local.get $i64a call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq @@ -3007,9 +3007,9 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $i64a i32.load offset=8 - local.get $0 + local.get $len global.get $~lib/typedarray/Int64Array.BYTES_PER_ELEMENT i32.mul i32.eq @@ -3022,9 +3022,9 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $i64a call $~lib/typedarray/Int64Array#get:length - local.get $0 + local.get $len i32.eq i32.eqz if @@ -3037,11 +3037,11 @@ end global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $0 + local.get $len call $~lib/typedarray/Uint64Array#constructor - local.tee $9 + local.tee $u64a i32.store offset=32 - local.get $9 + local.get $u64a call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq @@ -3054,9 +3054,9 @@ call $~lib/builtins/abort unreachable end - local.get $9 + local.get $u64a i32.load offset=8 - local.get $0 + local.get $len global.get $~lib/typedarray/Uint64Array.BYTES_PER_ELEMENT i32.mul i32.eq @@ -3069,9 +3069,9 @@ call $~lib/builtins/abort unreachable end - local.get $9 + local.get $u64a call $~lib/typedarray/Uint64Array#get:length - local.get $0 + local.get $len i32.eq i32.eqz if @@ -3084,11 +3084,11 @@ end global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $0 + local.get $len call $~lib/typedarray/Float32Array#constructor - local.tee $10 + local.tee $f32a i32.store offset=36 - local.get $10 + local.get $f32a call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq @@ -3101,9 +3101,9 @@ call $~lib/builtins/abort unreachable end - local.get $10 + local.get $f32a i32.load offset=8 - local.get $0 + local.get $len global.get $~lib/typedarray/Float32Array.BYTES_PER_ELEMENT i32.mul i32.eq @@ -3116,9 +3116,9 @@ call $~lib/builtins/abort unreachable end - local.get $10 + local.get $f32a call $~lib/typedarray/Float32Array#get:length - local.get $0 + local.get $len i32.eq i32.eqz if @@ -3131,11 +3131,11 @@ end global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $0 + local.get $len call $~lib/typedarray/Float64Array#constructor - local.tee $11 + local.tee $f64a i32.store offset=40 - local.get $11 + local.get $f64a call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq @@ -3148,9 +3148,9 @@ call $~lib/builtins/abort unreachable end - local.get $11 + local.get $f64a i32.load offset=8 - local.get $0 + local.get $len global.get $~lib/typedarray/Float64Array.BYTES_PER_ELEMENT i32.mul i32.eq @@ -3163,9 +3163,9 @@ call $~lib/builtins/abort unreachable end - local.get $11 + local.get $f64a call $~lib/typedarray/Float64Array#get:length - local.get $0 + local.get $len i32.eq i32.eqz if @@ -3181,9 +3181,9 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/typedarray/Int32Array#__set (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - local.get $0 + (func $~lib/typedarray/Int32Array#__set (param $this i32) (param $index i32) (param $value i32) + local.get $index + local.get $this i32.load offset=8 i32.const 2 i32.shr_u @@ -3196,18 +3196,18 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store ) - (func $~lib/typedarray/Int32Array#__get (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 + (func $~lib/typedarray/Int32Array#__get (param $this i32) (param $index i32) (result i32) + local.get $index + local.get $this i32.load offset=8 i32.const 2 i32.shr_u @@ -3220,17 +3220,17 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add i32.load ) - (func $~lib/typedarray/Float64Array#__set (param $0 i32) (param $1 i32) (param $2 f64) - local.get $1 - local.get $0 + (func $~lib/typedarray/Float64Array#__set (param $this i32) (param $index i32) (param $value f64) + local.get $index + local.get $this i32.load offset=8 i32.const 3 i32.shr_u @@ -3243,132 +3243,132 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add - local.get $2 + local.get $value f64.store ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 f64) - (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 i32) - (local $13 i32) + (func $~lib/util/sort/insertionSort (param $ptr i32) (param $left i32) (param $right i32) (param $presorted i32) (param $comparator i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 f64) + (local $var$9 f64) + (local $var$10 f64) + (local $var$11 f64) + (local $var$12 i32) + (local $var$13 i32) i32.const 0 i32.const 1 i32.ge_s drop - local.get $2 - local.get $1 + local.get $right + local.get $left i32.sub i32.const 1 i32.add - local.set $5 - local.get $1 - local.get $5 + local.set $var$5 + local.get $left + local.get $var$5 i32.const 1 i32.and - local.get $3 - local.get $5 - local.get $3 + local.get $presorted + local.get $var$5 + local.get $presorted i32.sub i32.const 1 i32.and i32.sub - local.get $3 + local.get $presorted i32.const 0 i32.eq select i32.add - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $6 - local.get $2 + local.get $var$6 + local.get $right i32.le_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $0 - local.get $6 + local.get $ptr + local.get $var$6 i32.const 3 i32.shl i32.add f64.load - local.set $8 - local.get $0 - local.get $6 + local.set $var$8 + local.get $ptr + local.get $var$6 i32.const 3 i32.shl i32.add f64.load offset=8 - local.set $9 - local.get $9 - local.set $10 - local.get $8 - local.set $11 - local.get $8 - local.get $9 + local.set $var$9 + local.get $var$9 + local.set $var$10 + local.get $var$8 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $f64_f64_=>_i32) i32.const 0 i32.le_s if - local.get $8 - local.set $10 - local.get $9 - local.set $11 + local.get $var$8 + local.set $var$10 + local.get $var$9 + local.set $var$11 end - local.get $6 + local.get $var$6 i32.const 1 i32.sub - local.set $12 + local.set $var$12 block $while-break|1 loop $while-continue|1 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 3 i32.shl i32.add f64.load - local.set $8 - local.get $8 - local.get $11 + local.set $var$8 + local.get $var$8 + local.get $var$11 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $f64_f64_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 3 i32.shl i32.add - local.get $8 + local.get $var$8 f64.store offset=16 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|1 end @@ -3376,49 +3376,49 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 3 i32.shl i32.add - local.get $11 + local.get $var$11 f64.store offset=16 block $while-break|2 loop $while-continue|2 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 3 i32.shl i32.add f64.load - local.set $8 - local.get $8 - local.get $10 + local.set $var$8 + local.get $var$8 + local.get $var$10 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $f64_f64_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 3 i32.shl i32.add - local.get $8 + local.get $var$8 f64.store offset=8 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|2 end @@ -3426,78 +3426,78 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 3 i32.shl i32.add - local.get $10 + local.get $var$10 f64.store offset=8 - local.get $6 + local.get $var$6 i32.const 2 i32.add - local.set $6 + local.set $var$6 br $for-loop|0 end end ) - (func $~lib/util/sort/extendRunRight (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 f64) - local.get $1 - local.get $2 + (func $~lib/util/sort/extendRunRight (param $ptr i32) (param $i i32) (param $right i32) (param $comparator i32) (result i32) + (local $j i32) + (local $var$5 i32) + (local $var$6 i32) + (local $tmp f64) + local.get $i + local.get $right i32.eq if - local.get $1 + local.get $i return end - local.get $1 - local.set $4 - local.get $0 - local.get $4 + local.get $i + local.set $j + local.get $ptr + local.get $j i32.const 3 i32.shl i32.add f64.load - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 1 i32.add - local.tee $4 + local.tee $j i32.const 3 i32.shl i32.add f64.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $f64_f64_=>_i32) i32.const 0 i32.gt_s if loop $while-continue|0 - local.get $4 - local.get $2 + local.get $j + local.get $right i32.lt_s if (result i32) - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 3 i32.shl i32.add f64.load offset=8 - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 3 i32.shl i32.add f64.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $f64_f64_=>_i32) i32.const 31 @@ -3505,83 +3505,83 @@ else i32.const 0 end - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 + local.get $j i32.const 1 i32.add - local.set $4 + local.set $j br $while-continue|0 end end - local.get $4 - local.set $5 + local.get $j + local.set $var$5 loop $while-continue|1 - local.get $1 - local.get $5 + local.get $i + local.get $var$5 i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $1 + local.get $ptr + local.get $i i32.const 3 i32.shl i32.add f64.load - local.set $7 - local.get $0 - local.get $1 + local.set $tmp + local.get $ptr + local.get $i i32.const 3 i32.shl i32.add - local.get $0 - local.get $5 + local.get $ptr + local.get $var$5 i32.const 3 i32.shl i32.add f64.load f64.store - local.get $1 + local.get $i i32.const 1 i32.add - local.set $1 - local.get $0 - local.get $5 + local.set $i + local.get $ptr + local.get $var$5 i32.const 3 i32.shl i32.add - local.get $7 + local.get $tmp f64.store - local.get $5 + local.get $var$5 i32.const 1 i32.sub - local.set $5 + local.set $var$5 br $while-continue|1 end end else loop $while-continue|2 - local.get $4 - local.get $2 + local.get $j + local.get $right i32.lt_s if (result i32) - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 3 i32.shl i32.add f64.load offset=8 - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 3 i32.shl i32.add f64.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $f64_f64_=>_i32) i32.const 0 @@ -3589,105 +3589,105 @@ else i32.const 0 end - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 + local.get $j i32.const 1 i32.add - local.set $4 + local.set $j br $while-continue|2 end end end - local.get $4 + local.get $j ) - (func $~lib/util/sort/nodePower (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i64) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i64) - local.get $1 - local.get $0 + (func $~lib/util/sort/nodePower (param $left i32) (param $right i32) (param $startA i32) (param $startB i32) (param $endB i32) (result i32) + (local $n i64) + (local $s i32) + (local $l i32) + (local $r i32) + (local $a i64) + (local $b i64) + local.get $right + local.get $left i32.sub i32.const 1 i32.add i64.extend_i32_u - local.set $5 - local.get $3 - local.get $0 + local.set $n + local.get $startB + local.get $left i32.const 1 i32.shl i32.sub - local.set $6 - local.get $2 - local.get $6 + local.set $s + local.get $startA + local.get $s i32.add - local.set $7 - local.get $4 - local.get $6 + local.set $l + local.get $endB + local.get $s i32.add i32.const 1 i32.add - local.set $8 - local.get $7 + local.set $r + local.get $l i64.extend_i32_u i64.const 30 i64.shl - local.get $5 + local.get $n i64.div_u - local.set $9 - local.get $8 + local.set $a + local.get $r i64.extend_i32_u i64.const 30 i64.shl - local.get $5 + local.get $n i64.div_u - local.set $10 - local.get $9 - local.get $10 + local.set $b + local.get $a + local.get $b i64.xor i32.wrap_i64 i32.clz ) - (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 f64) - (local $12 f64) - local.get $2 + (func $~lib/util/sort/mergeRuns (param $ptr i32) (param $l i32) (param $m i32) (param $r i32) (param $buffer i32) (param $comparator i32) + (local $i i32) + (local $j i32) + (local $t i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 f64) + (local $var$12 f64) + local.get $m i32.const 1 i32.sub - local.set $2 - local.get $3 - local.get $2 + local.set $m + local.get $r + local.get $m i32.add - local.set $8 - local.get $2 + local.set $t + local.get $m i32.const 1 i32.add - local.set $6 + local.set $i loop $for-loop|0 - local.get $6 - local.get $1 + local.get $i + local.get $l i32.gt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $6 + local.get $buffer + local.get $i i32.const 1 i32.sub i32.const 3 i32.shl i32.add - local.get $0 - local.get $6 + local.get $ptr + local.get $i i32.const 1 i32.sub i32.const 3 @@ -3695,134 +3695,134 @@ i32.add f64.load f64.store - local.get $6 + local.get $i i32.const 1 i32.sub - local.set $6 + local.set $i br $for-loop|0 end end - local.get $2 - local.set $7 + local.get $m + local.set $j loop $for-loop|1 - local.get $7 - local.get $3 + local.get $j + local.get $r i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $8 - local.get $7 + local.get $buffer + local.get $t + local.get $j i32.sub i32.const 3 i32.shl i32.add - local.get $0 - local.get $7 + local.get $ptr + local.get $j i32.const 3 i32.shl i32.add f64.load offset=8 f64.store - local.get $7 + local.get $j i32.const 1 i32.add - local.set $7 + local.set $j br $for-loop|1 end end - local.get $1 - local.set $9 + local.get $l + local.set $var$9 loop $for-loop|2 - local.get $9 - local.get $3 + local.get $var$9 + local.get $r i32.le_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $4 - local.get $7 + local.get $buffer + local.get $j i32.const 3 i32.shl i32.add f64.load - local.set $11 - local.get $4 - local.get $6 + local.set $var$11 + local.get $buffer + local.get $i i32.const 3 i32.shl i32.add f64.load - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 i32.const 2 global.set $~argumentsLength - local.get $5 + local.get $comparator i32.load call_indirect $0 (type $f64_f64_=>_i32) i32.const 0 i32.lt_s if - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 3 i32.shl i32.add - local.get $11 + local.get $var$11 f64.store - local.get $7 + local.get $j i32.const 1 i32.sub - local.set $7 + local.set $j else - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 3 i32.shl i32.add - local.get $12 + local.get $var$12 f64.store - local.get $6 + local.get $i i32.const 1 i32.add - local.set $6 + local.set $i end - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|2 end end ) - (func $~lib/util/sort/SORT (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 f64) - (local $5 f64) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) - (local $21 i32) - (local $22 i32) - local.get $1 + (func $~lib/util/sort/SORT (param $ptr i32) (param $len i32) (param $comparator i32) + (local $startB i32) + (local $var$4 f64) + (local $var$5 f64) + (local $lgPlus2 i32) + (local $lgPlus2Size i32) + (local $leftRunStartBuf i32) + (local $leftRunEndBuf i32) + (local $var$10 i32) + (local $buffer i32) + (local $hi i32) + (local $endA i32) + (local $lenA i32) + (local $top i32) + (local $startA i32) + (local $endB i32) + (local $lenB i32) + (local $k i32) + (local $var$20 i32) + (local $var$21 i32) + (local $var$22 i32) + local.get $len i32.const 48 i32.le_s if - local.get $1 + local.get $len i32.const 1 i32.le_s if @@ -3835,421 +3835,421 @@ block $break|0 block $case1|0 block $case0|0 - local.get $1 - local.set $3 - local.get $3 + local.get $len + local.set $startB + local.get $startB i32.const 3 i32.eq br_if $case0|0 - local.get $3 + local.get $startB i32.const 2 i32.eq br_if $case1|0 br $break|0 end - local.get $0 + local.get $ptr f64.load - local.set $4 - local.get $0 + local.set $var$4 + local.get $ptr f64.load offset=8 - local.set $5 - local.get $4 - local.get $5 + local.set $var$5 + local.get $var$4 + local.get $var$5 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $f64_f64_=>_i32) i32.const 0 i32.gt_s - local.set $3 - local.get $0 - local.get $5 - local.get $4 - local.get $3 + local.set $startB + local.get $ptr + local.get $var$5 + local.get $var$4 + local.get $startB select f64.store - local.get $4 - local.get $5 - local.get $3 + local.get $var$4 + local.get $var$5 + local.get $startB select - local.set $4 - local.get $0 + local.set $var$4 + local.get $ptr f64.load offset=16 - local.set $5 - local.get $4 - local.get $5 + local.set $var$5 + local.get $var$4 + local.get $var$5 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $f64_f64_=>_i32) i32.const 0 i32.gt_s - local.set $3 - local.get $0 - local.get $5 - local.get $4 - local.get $3 + local.set $startB + local.get $ptr + local.get $var$5 + local.get $var$4 + local.get $startB select f64.store offset=8 - local.get $0 - local.get $4 - local.get $5 - local.get $3 + local.get $ptr + local.get $var$4 + local.get $var$5 + local.get $startB select f64.store offset=16 end - local.get $0 + local.get $ptr f64.load - local.set $5 - local.get $0 + local.set $var$5 + local.get $ptr f64.load offset=8 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $f64_f64_=>_i32) i32.const 0 i32.gt_s - local.set $3 - local.get $0 - local.get $4 - local.get $5 - local.get $3 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $var$5 + local.get $startB select f64.store - local.get $0 - local.get $5 - local.get $4 - local.get $3 + local.get $ptr + local.get $var$5 + local.get $var$4 + local.get $startB select f64.store offset=8 return end - local.get $0 + local.get $ptr i32.const 0 - local.get $1 + local.get $len i32.const 1 i32.sub i32.const 0 - local.get $2 + local.get $comparator call $~lib/util/sort/insertionSort return end - local.get $1 - local.set $3 + local.get $len + local.set $startB i32.const 31 - local.get $3 + local.get $startB i32.clz i32.sub i32.const 2 i32.add - local.set $6 - local.get $6 + local.set $lgPlus2 + local.get $lgPlus2 i32.const 2 i32.shl - local.set $7 - local.get $7 + local.set $lgPlus2Size + local.get $lgPlus2Size i32.const 1 i32.shl call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 - local.get $7 + local.set $leftRunStartBuf + local.get $leftRunStartBuf + local.get $lgPlus2Size i32.add - local.set $9 + local.set $leftRunEndBuf i32.const 0 - local.set $3 + local.set $startB loop $for-loop|1 - local.get $3 - local.get $6 + local.get $startB + local.get $lgPlus2 i32.lt_u - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $8 - local.get $3 + local.get $leftRunStartBuf + local.get $startB i32.const 2 i32.shl i32.add i32.const -1 i32.store - local.get $3 + local.get $startB i32.const 1 i32.add - local.set $3 + local.set $startB br $for-loop|1 end end - local.get $1 + local.get $len i32.const 3 i32.shl call $~lib/rt/tlsf/__alloc - local.set $11 - local.get $1 + local.set $buffer + local.get $len i32.const 1 i32.sub - local.set $12 - local.get $0 + local.set $hi + local.get $ptr i32.const 0 - local.get $12 - local.get $2 + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight - local.set $13 - local.get $13 + local.set $endA + local.get $endA i32.const 1 i32.add - local.set $14 - local.get $14 + local.set $lenA + local.get $lenA i32.const 32 i32.lt_s if - local.get $12 - local.tee $10 + local.get $hi + local.tee $var$10 i32.const 32 i32.const 1 i32.sub - local.tee $3 - local.get $10 - local.get $3 + local.tee $startB + local.get $var$10 + local.get $startB i32.lt_s select - local.set $13 - local.get $0 + local.set $endA + local.get $ptr i32.const 0 - local.get $13 - local.get $14 - local.get $2 + local.get $endA + local.get $lenA + local.get $comparator call $~lib/util/sort/insertionSort end i32.const 0 - local.set $15 + local.set $top i32.const 0 - local.set $16 + local.set $startA loop $while-continue|2 - local.get $13 - local.get $12 + local.get $endA + local.get $hi i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $13 + local.get $endA i32.const 1 i32.add - local.set $3 - local.get $0 - local.get $3 - local.get $12 - local.get $2 + local.set $startB + local.get $ptr + local.get $startB + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight - local.set $17 - local.get $17 - local.get $3 + local.set $endB + local.get $endB + local.get $startB i32.sub i32.const 1 i32.add - local.set $18 - local.get $18 + local.set $lenB + local.get $lenB i32.const 32 i32.lt_s if - local.get $12 - local.tee $19 - local.get $3 + local.get $hi + local.tee $k + local.get $startB i32.const 32 i32.add i32.const 1 i32.sub - local.tee $20 - local.get $19 - local.get $20 + local.tee $var$20 + local.get $k + local.get $var$20 i32.lt_s select - local.set $17 - local.get $0 - local.get $3 - local.get $17 - local.get $18 - local.get $2 + local.set $endB + local.get $ptr + local.get $startB + local.get $endB + local.get $lenB + local.get $comparator call $~lib/util/sort/insertionSort end i32.const 0 - local.get $12 - local.get $16 - local.get $3 - local.get $17 + local.get $hi + local.get $startA + local.get $startB + local.get $endB call $~lib/util/sort/nodePower - local.set $19 - local.get $15 - local.set $20 + local.set $k + local.get $top + local.set $var$20 loop $for-loop|3 - local.get $20 - local.get $19 + local.get $var$20 + local.get $k i32.gt_u - local.set $21 - local.get $21 + local.set $var$21 + local.get $var$21 if - local.get $8 - local.get $20 + local.get $leftRunStartBuf + local.get $var$20 i32.const 2 i32.shl i32.add i32.load - local.set $22 - local.get $22 + local.set $var$22 + local.get $var$22 i32.const -1 i32.ne if - local.get $0 - local.get $22 - local.get $9 - local.get $20 + local.get $ptr + local.get $var$22 + local.get $leftRunEndBuf + local.get $var$20 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $13 - local.get $11 - local.get $2 + local.get $endA + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns - local.get $22 - local.set $16 - local.get $8 - local.get $20 + local.get $var$22 + local.set $startA + local.get $leftRunStartBuf + local.get $var$20 i32.const 2 i32.shl i32.add i32.const -1 i32.store end - local.get $20 + local.get $var$20 i32.const 1 i32.sub - local.set $20 + local.set $var$20 br $for-loop|3 end end - local.get $8 - local.get $19 + local.get $leftRunStartBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $16 + local.get $startA i32.store - local.get $9 - local.get $19 + local.get $leftRunEndBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $13 + local.get $endA i32.store - local.get $3 - local.set $16 - local.get $17 - local.set $13 - local.get $19 - local.set $15 + local.get $startB + local.set $startA + local.get $endB + local.set $endA + local.get $k + local.set $top br $while-continue|2 end end - local.get $15 - local.set $10 + local.get $top + local.set $var$10 loop $for-loop|4 - local.get $10 + local.get $var$10 i32.const 0 i32.ne - local.set $20 - local.get $20 + local.set $var$20 + local.get $var$20 if - local.get $8 - local.get $10 + local.get $leftRunStartBuf + local.get $var$10 i32.const 2 i32.shl i32.add i32.load - local.set $21 - local.get $21 + local.set $var$21 + local.get $var$21 i32.const -1 i32.ne if - local.get $0 - local.get $21 - local.get $9 - local.get $10 + local.get $ptr + local.get $var$21 + local.get $leftRunEndBuf + local.get $var$10 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $12 - local.get $11 - local.get $2 + local.get $hi + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns end - local.get $10 + local.get $var$10 i32.const 1 i32.sub - local.set $10 + local.set $var$10 br $for-loop|4 end end - local.get $11 + local.get $buffer call $~lib/rt/tlsf/__free - local.get $8 + local.get $leftRunStartBuf call $~lib/rt/tlsf/__free ) - (func $~lib/typedarray/Float64Array#sort (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Float64Array#sort (param $this i32) (param $comparator i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Float64Array#get:length - local.get $1 + local.get $comparator call $~lib/util/sort/SORT - local.get $0 + local.get $this ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 f64) (param $1 f64) (result i32) - (local $2 i64) - (local $3 i64) - local.get $0 + (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $a f64) (param $b f64) (result i32) + (local $ia i64) + (local $ib i64) + local.get $a i64.reinterpret_f64 - local.set $2 - local.get $1 + local.set $ia + local.get $b i64.reinterpret_f64 - local.set $3 - local.get $2 - local.get $2 + local.set $ib + local.get $ia + local.get $ia i64.const 63 i64.shr_s i64.const 1 i64.shr_u i64.xor - local.set $2 - local.get $3 - local.get $3 + local.set $ia + local.get $ib + local.get $ib i64.const 63 i64.shr_s i64.const 1 i64.shr_u i64.xor - local.set $3 - local.get $2 - local.get $3 + local.set $ib + local.get $ia + local.get $ib i64.gt_s - local.get $2 - local.get $3 + local.get $ia + local.get $ib i64.lt_s i32.sub ) - (func $~lib/typedarray/Float64Array#__get (param $0 i32) (param $1 i32) (result f64) - local.get $1 - local.get $0 + (func $~lib/typedarray/Float64Array#__get (param $this i32) (param $index i32) (result f64) + local.get $index + local.get $this i32.load offset=8 i32.const 3 i32.shr_u @@ -4262,17 +4262,17 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add f64.load ) - (func $~lib/typedarray/Uint8ClampedArray#__set (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - local.get $0 + (func $~lib/typedarray/Uint8ClampedArray#__set (param $this i32) (param $index i32) (param $value i32) + local.get $index + local.get $this i32.load offset=8 i32.ge_u if @@ -4283,28 +4283,28 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.add - local.get $2 + local.get $value i32.const 31 i32.shr_s i32.const -1 i32.xor i32.const 255 - local.get $2 + local.get $value i32.sub i32.const 31 i32.shr_s - local.get $2 + local.get $value i32.or i32.and i32.store8 ) - (func $~lib/typedarray/Uint8ClampedArray#__get (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 + (func $~lib/typedarray/Uint8ClampedArray#__get (param $this i32) (param $index i32) (result i32) + local.get $index + local.get $this i32.load offset=8 i32.ge_u if @@ -4315,15 +4315,15 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.add i32.load8_u ) - (func $~lib/typedarray/Int8Array#__set (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - local.get $0 + (func $~lib/typedarray/Int8Array#__set (param $this i32) (param $index i32) (param $value i32) + local.get $index + local.get $this i32.load offset=8 i32.ge_u if @@ -4334,117 +4334,117 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.add - local.get $2 + local.get $value i32.store8 ) - (func $~lib/util/bytes/FILL (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) - (local $5 i32) - (local $6 i32) - local.get $3 + (func $~lib/util/bytes/FILL (param $ptr i32) (param $len i32) (param $value i32) (param $start i32) (param $end i32) + (local $var$5 i32) + (local $var$6 i32) + local.get $start i32.const 0 i32.lt_s if (result i32) - local.get $1 - local.get $3 + local.get $len + local.get $start i32.add - local.tee $5 + local.tee $var$5 i32.const 0 - local.tee $6 - local.get $5 - local.get $6 + local.tee $var$6 + local.get $var$5 + local.get $var$6 i32.gt_u select else - local.get $3 - local.tee $6 - local.get $1 - local.tee $5 - local.get $6 - local.get $5 + local.get $start + local.tee $var$6 + local.get $len + local.tee $var$5 + local.get $var$6 + local.get $var$5 i32.lt_s select end - local.set $3 - local.get $4 + local.set $start + local.get $end i32.const 0 i32.lt_s if (result i32) - local.get $1 - local.get $4 + local.get $len + local.get $end i32.add - local.tee $5 + local.tee $var$5 i32.const 0 - local.tee $6 - local.get $5 - local.get $6 + local.tee $var$6 + local.get $var$5 + local.get $var$6 i32.gt_u select else - local.get $4 - local.tee $6 - local.get $1 - local.tee $5 - local.get $6 - local.get $5 + local.get $end + local.tee $var$6 + local.get $len + local.tee $var$5 + local.get $var$6 + local.get $var$5 i32.lt_s select end - local.set $4 + local.set $end i32.const 1 i32.const 1 i32.eq drop - local.get $3 - local.get $4 + local.get $start + local.get $end i32.lt_s if - local.get $0 - local.get $3 + local.get $ptr + local.get $start i32.add - local.get $2 - local.get $4 - local.get $3 + local.get $value + local.get $end + local.get $start i32.sub memory.fill end ) - (func $~lib/typedarray/Int8Array#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Int8Array#fill (param $this i32) (param $value i32) (param $start i32) (param $end i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Int8Array#get:length - local.get $1 - local.get $2 - local.get $3 + local.get $value + local.get $start + local.get $end call $~lib/util/bytes/FILL - local.get $0 + local.get $this ) - (func $~lib/rt/__newBuffer (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - local.get $1 + (func $~lib/rt/__newBuffer (param $size i32) (param $id i32) (param $data i32) (result i32) + (local $buffer i32) + local.get $size + local.get $id call $~lib/rt/itcms/__new - local.set $3 - local.get $2 + local.set $buffer + local.get $data if - local.get $3 - local.get $2 - local.get $0 + local.get $buffer + local.get $data + local.get $size memory.copy end - local.get $3 + local.get $buffer ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/typedarray/Int8Array#__get (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 + (func $~lib/typedarray/Int8Array#__get (param $this i32) (param $index i32) (result i32) + local.get $index + local.get $this i32.load offset=8 i32.ge_u if @@ -4455,16 +4455,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.add i32.load8_s ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i32) + (local $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -4475,25 +4475,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 0 i32.shl i32.add i32.load8_s - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) - (func $std/typedarray/isInt8ArrayEqual (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 + (func $std/typedarray/isInt8ArrayEqual (param $a i32) (param $b i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + local.get $a call $~lib/typedarray/Int8Array#get:length - local.get $1 + local.get $b call $~lib/array/Array#get:length i32.ne if @@ -4501,90 +4501,90 @@ return end i32.const 0 - local.set $2 - local.get $0 + local.set $var$2 + local.get $a call $~lib/typedarray/Int8Array#get:length - local.set $3 + local.set $var$3 loop $for-loop|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $0 - local.get $2 + local.get $a + local.get $var$2 call $~lib/typedarray/Int8Array#__get - local.get $1 - local.get $2 + local.get $b + local.get $var$2 call $~lib/array/Array#__get i32.ne if i32.const 0 return end - local.get $2 + local.get $var$2 i32.const 1 i32.add - local.set $2 + local.set $var$2 br $for-loop|0 end end i32.const 1 ) - (func $~lib/util/bytes/FILL (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) - (local $5 i32) - (local $6 i32) - local.get $3 + (func $~lib/util/bytes/FILL (param $ptr i32) (param $len i32) (param $value i32) (param $start i32) (param $end i32) + (local $var$5 i32) + (local $var$6 i32) + local.get $start i32.const 0 i32.lt_s if (result i32) - local.get $1 - local.get $3 + local.get $len + local.get $start i32.add - local.tee $5 + local.tee $var$5 i32.const 0 - local.tee $6 - local.get $5 - local.get $6 + local.tee $var$6 + local.get $var$5 + local.get $var$6 i32.gt_u select else - local.get $3 - local.tee $6 - local.get $1 - local.tee $5 - local.get $6 - local.get $5 + local.get $start + local.tee $var$6 + local.get $len + local.tee $var$5 + local.get $var$6 + local.get $var$5 i32.lt_s select end - local.set $3 - local.get $4 + local.set $start + local.get $end i32.const 0 i32.lt_s if (result i32) - local.get $1 - local.get $4 + local.get $len + local.get $end i32.add - local.tee $5 + local.tee $var$5 i32.const 0 - local.tee $6 - local.get $5 - local.get $6 + local.tee $var$6 + local.get $var$5 + local.get $var$6 i32.gt_u select else - local.get $4 - local.tee $6 - local.get $1 - local.tee $5 - local.get $6 - local.get $5 + local.get $end + local.tee $var$6 + local.get $len + local.tee $var$5 + local.get $var$6 + local.get $var$5 i32.lt_s select end - local.set $4 + local.set $end i32.const 4 i32.const 1 i32.eq @@ -4595,26 +4595,26 @@ drop i32.const 1 drop - local.get $2 + local.get $value i32.const 0 i32.eq - local.get $2 + local.get $value i32.const -1 i32.eq i32.or if - local.get $3 - local.get $4 + local.get $start + local.get $end i32.lt_s if - local.get $0 - local.get $3 + local.get $ptr + local.get $start i32.const 2 i32.shl i32.add - local.get $2 - local.get $4 - local.get $3 + local.get $value + local.get $end + local.get $start i32.sub i32.const 2 i32.shl @@ -4623,46 +4623,46 @@ return end loop $for-loop|0 - local.get $3 - local.get $4 + local.get $start + local.get $end i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $3 + local.get $ptr + local.get $start i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store - local.get $3 + local.get $start i32.const 1 i32.add - local.set $3 + local.set $start br $for-loop|0 end end ) - (func $~lib/typedarray/Int32Array#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Int32Array#fill (param $this i32) (param $value i32) (param $start i32) (param $end i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Int32Array#get:length - local.get $1 - local.get $2 - local.get $3 + local.get $value + local.get $start + local.get $end call $~lib/util/bytes/FILL - local.get $0 + local.get $this ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - local.get $0 + (func $~lib/array/Array#__get (param $this i32) (param $index i32) (result i32) + (local $value i32) + local.get $index + local.get $this i32.load offset=12 i32.ge_u if @@ -4673,25 +4673,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add i32.load - local.set $2 + local.set $value i32.const 0 drop - local.get $2 + local.get $value ) - (func $std/typedarray/isInt32ArrayEqual (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 + (func $std/typedarray/isInt32ArrayEqual (param $a i32) (param $b i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + local.get $a call $~lib/typedarray/Int32Array#get:length - local.get $1 + local.get $b call $~lib/array/Array#get:length i32.ne if @@ -4699,237 +4699,237 @@ return end i32.const 0 - local.set $2 - local.get $0 + local.set $var$2 + local.get $a call $~lib/typedarray/Int32Array#get:length - local.set $3 + local.set $var$3 loop $for-loop|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $0 - local.get $2 + local.get $a + local.get $var$2 call $~lib/typedarray/Int32Array#__get - local.get $1 - local.get $2 + local.get $b + local.get $var$2 call $~lib/array/Array#__get i32.ne if i32.const 0 return end - local.get $2 + local.get $var$2 i32.const 1 i32.add - local.set $2 + local.set $var$2 br $for-loop|0 end end i32.const 1 ) - (func $~lib/typedarray/Int32Array#copyWithin (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $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 - local.set $7 - local.get $1 - local.set $6 - local.get $2 - local.set $5 - local.get $3 - local.set $4 - local.get $7 + (func $~lib/typedarray/Int32Array#copyWithin (param $this i32) (param $target i32) (param $start i32) (param $end i32) (result i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) + (local $var$14 i32) + local.get $this + local.set $var$7 + local.get $target + local.set $var$6 + local.get $start + local.set $var$5 + local.get $end + local.set $var$4 + local.get $var$7 call $~lib/typedarray/Int32Array#get:length - local.set $8 - local.get $7 + local.set $var$8 + local.get $var$7 i32.load offset=4 - local.set $9 - local.get $4 - local.tee $10 - local.get $8 - local.tee $11 - local.get $10 - local.get $11 + local.set $var$9 + local.get $var$4 + local.tee $var$10 + local.get $var$8 + local.tee $var$11 + local.get $var$10 + local.get $var$11 i32.lt_s select - local.set $4 - local.get $6 + local.set $var$4 + local.get $var$6 i32.const 0 i32.lt_s if (result i32) - local.get $8 - local.get $6 + local.get $var$8 + local.get $var$6 i32.add - local.tee $11 + local.tee $var$11 i32.const 0 - local.tee $10 - local.get $11 - local.get $10 + local.tee $var$10 + local.get $var$11 + local.get $var$10 i32.gt_s select else - local.get $6 - local.tee $10 - local.get $8 - local.tee $11 - local.get $10 - local.get $11 + local.get $var$6 + local.tee $var$10 + local.get $var$8 + local.tee $var$11 + local.get $var$10 + local.get $var$11 i32.lt_s select end - local.set $10 - local.get $5 + local.set $var$10 + local.get $var$5 i32.const 0 i32.lt_s if (result i32) - local.get $8 - local.get $5 + local.get $var$8 + local.get $var$5 i32.add - local.tee $11 + local.tee $var$11 i32.const 0 - local.tee $12 - local.get $11 - local.get $12 + local.tee $var$12 + local.get $var$11 + local.get $var$12 i32.gt_s select else - local.get $5 - local.tee $12 - local.get $8 - local.tee $11 - local.get $12 - local.get $11 + local.get $var$5 + local.tee $var$12 + local.get $var$8 + local.tee $var$11 + local.get $var$12 + local.get $var$11 i32.lt_s select end - local.set $12 - local.get $4 + local.set $var$12 + local.get $var$4 i32.const 0 i32.lt_s if (result i32) - local.get $8 - local.get $4 + local.get $var$8 + local.get $var$4 i32.add - local.tee $11 + local.tee $var$11 i32.const 0 - local.tee $13 - local.get $11 - local.get $13 + local.tee $var$13 + local.get $var$11 + local.get $var$13 i32.gt_s select else - local.get $4 - local.tee $13 - local.get $8 - local.tee $11 - local.get $13 - local.get $11 + local.get $var$4 + local.tee $var$13 + local.get $var$8 + local.tee $var$11 + local.get $var$13 + local.get $var$11 i32.lt_s select end - local.set $13 - local.get $13 - local.get $12 + local.set $var$13 + local.get $var$13 + local.get $var$12 i32.sub - local.tee $11 - local.get $8 - local.get $10 + local.tee $var$11 + local.get $var$8 + local.get $var$10 i32.sub - local.tee $14 - local.get $11 - local.get $14 + local.tee $var$14 + local.get $var$11 + local.get $var$14 i32.lt_s select - local.set $11 - local.get $9 - local.get $10 + local.set $var$11 + local.get $var$9 + local.get $var$10 i32.const 2 i32.shl i32.add - local.get $9 - local.get $12 + local.get $var$9 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $11 + local.get $var$11 i32.const 2 i32.shl memory.copy - local.get $7 - ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 - local.get $1 - i32.add - ) - (func $~lib/typedarray/Int8Array#reduce (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.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.get $var$7 + ) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $acc i32) (param $val i32) (param $$2 i32) (param $$3 i32) (result i32) + local.get $acc + local.get $val + i32.add + ) + (func $~lib/typedarray/Int8Array#reduce (param $this i32) (param $fn i32) (param $initialValue i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $this + local.set $var$5 + local.get $fn + local.set $var$4 + local.get $initialValue + local.set $var$3 + local.get $var$5 i32.load offset=4 - local.set $6 + local.set $var$6 i32.const 0 - local.set $7 - local.get $5 + local.set $var$7 + local.get $var$5 call $~lib/typedarray/Int8Array#get:length - local.set $8 + local.set $var$8 loop $for-loop|0 - local.get $7 - local.get $8 + local.get $var$7 + local.get $var$8 i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $3 - local.get $6 - local.get $7 + local.get $var$3 + local.get $var$6 + local.get $var$7 i32.const 0 i32.shl i32.add i32.load8_s - local.get $7 - local.get $5 + local.get $var$7 + local.get $var$5 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $var$4 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $7 + local.set $var$3 + local.get $var$7 i32.const 1 i32.add - local.set $7 + local.set $var$7 br $for-loop|0 end end - local.get $3 + local.get $var$3 ) - (func $~lib/typedarray/Uint8Array#__set (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - local.get $0 + (func $~lib/typedarray/Uint8Array#__set (param $this i32) (param $index i32) (param $value i32) + local.get $index + local.get $this i32.load offset=8 i32.ge_u if @@ -4940,132 +4940,132 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.add - local.get $2 + local.get $value i32.store8 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 - local.get $1 - i32.add - ) - (func $~lib/typedarray/Uint8Array#reduce (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.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $acc i32) (param $val i32) (param $$2 i32) (param $$3 i32) (result i32) + local.get $acc + local.get $val + i32.add + ) + (func $~lib/typedarray/Uint8Array#reduce (param $this i32) (param $fn i32) (param $initialValue i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $this + local.set $var$5 + local.get $fn + local.set $var$4 + local.get $initialValue + local.set $var$3 + local.get $var$5 i32.load offset=4 - local.set $6 + local.set $var$6 i32.const 0 - local.set $7 - local.get $5 + local.set $var$7 + local.get $var$5 call $~lib/typedarray/Uint8Array#get:length - local.set $8 + local.set $var$8 loop $for-loop|0 - local.get $7 - local.get $8 + local.get $var$7 + local.get $var$8 i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $3 - local.get $6 - local.get $7 + local.get $var$3 + local.get $var$6 + local.get $var$7 i32.const 0 i32.shl i32.add i32.load8_u - local.get $7 - local.get $5 + local.get $var$7 + local.get $var$5 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $var$4 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $7 + local.set $var$3 + local.get $var$7 i32.const 1 i32.add - local.set $7 + local.set $var$7 br $for-loop|0 end end - local.get $3 - ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 - local.get $1 - i32.add - ) - (func $~lib/typedarray/Uint8ClampedArray#reduce (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.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.get $var$3 + ) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (param $acc i32) (param $val i32) (param $$2 i32) (param $$3 i32) (result i32) + local.get $acc + local.get $val + i32.add + ) + (func $~lib/typedarray/Uint8ClampedArray#reduce (param $this i32) (param $fn i32) (param $initialValue i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $this + local.set $var$5 + local.get $fn + local.set $var$4 + local.get $initialValue + local.set $var$3 + local.get $var$5 i32.load offset=4 - local.set $6 + local.set $var$6 i32.const 0 - local.set $7 - local.get $5 + local.set $var$7 + local.get $var$5 call $~lib/typedarray/Uint8ClampedArray#get:length - local.set $8 + local.set $var$8 loop $for-loop|0 - local.get $7 - local.get $8 + local.get $var$7 + local.get $var$8 i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $3 - local.get $6 - local.get $7 + local.get $var$3 + local.get $var$6 + local.get $var$7 i32.const 0 i32.shl i32.add i32.load8_u - local.get $7 - local.get $5 + local.get $var$7 + local.get $var$5 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $var$4 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $7 + local.set $var$3 + local.get $var$7 i32.const 1 i32.add - local.set $7 + local.set $var$7 br $for-loop|0 end end - local.get $3 + local.get $var$3 ) - (func $~lib/typedarray/Int16Array#__set (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - local.get $0 + (func $~lib/typedarray/Int16Array#__set (param $this i32) (param $index i32) (param $value i32) + local.get $index + local.get $this i32.load offset=8 i32.const 1 i32.shr_u @@ -5078,76 +5078,76 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 1 i32.shl i32.add - local.get $2 + local.get $value i32.store16 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 - local.get $1 - i32.add - ) - (func $~lib/typedarray/Int16Array#reduce (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.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $acc i32) (param $val i32) (param $$2 i32) (param $$3 i32) (result i32) + local.get $acc + local.get $val + i32.add + ) + (func $~lib/typedarray/Int16Array#reduce (param $this i32) (param $fn i32) (param $initialValue i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $this + local.set $var$5 + local.get $fn + local.set $var$4 + local.get $initialValue + local.set $var$3 + local.get $var$5 i32.load offset=4 - local.set $6 + local.set $var$6 i32.const 0 - local.set $7 - local.get $5 + local.set $var$7 + local.get $var$5 call $~lib/typedarray/Int16Array#get:length - local.set $8 + local.set $var$8 loop $for-loop|0 - local.get $7 - local.get $8 + local.get $var$7 + local.get $var$8 i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $3 - local.get $6 - local.get $7 + local.get $var$3 + local.get $var$6 + local.get $var$7 i32.const 1 i32.shl i32.add i32.load16_s - local.get $7 - local.get $5 + local.get $var$7 + local.get $var$5 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $var$4 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $7 + local.set $var$3 + local.get $var$7 i32.const 1 i32.add - local.set $7 + local.set $var$7 br $for-loop|0 end end - local.get $3 + local.get $var$3 ) - (func $~lib/typedarray/Uint16Array#__set (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - local.get $0 + (func $~lib/typedarray/Uint16Array#__set (param $this i32) (param $index i32) (param $value i32) + local.get $index + local.get $this i32.load offset=8 i32.const 1 i32.shr_u @@ -5160,134 +5160,134 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 1 i32.shl i32.add - local.get $2 + local.get $value i32.store16 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 - local.get $1 - i32.add - ) - (func $~lib/typedarray/Uint16Array#reduce (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.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16>~anonymous|0 (param $acc i32) (param $val i32) (param $$2 i32) (param $$3 i32) (result i32) + local.get $acc + local.get $val + i32.add + ) + (func $~lib/typedarray/Uint16Array#reduce (param $this i32) (param $fn i32) (param $initialValue i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $this + local.set $var$5 + local.get $fn + local.set $var$4 + local.get $initialValue + local.set $var$3 + local.get $var$5 i32.load offset=4 - local.set $6 + local.set $var$6 i32.const 0 - local.set $7 - local.get $5 + local.set $var$7 + local.get $var$5 call $~lib/typedarray/Uint16Array#get:length - local.set $8 + local.set $var$8 loop $for-loop|0 - local.get $7 - local.get $8 + local.get $var$7 + local.get $var$8 i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $3 - local.get $6 - local.get $7 + local.get $var$3 + local.get $var$6 + local.get $var$7 i32.const 1 i32.shl i32.add i32.load16_u - local.get $7 - local.get $5 + local.get $var$7 + local.get $var$5 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $var$4 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $7 + local.set $var$3 + local.get $var$7 i32.const 1 i32.add - local.set $7 + local.set $var$7 br $for-loop|0 end end - local.get $3 - ) - (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 - local.get $1 - i32.add - ) - (func $~lib/typedarray/Int32Array#reduce (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.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.get $var$3 + ) + (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $acc i32) (param $val i32) (param $$2 i32) (param $$3 i32) (result i32) + local.get $acc + local.get $val + i32.add + ) + (func $~lib/typedarray/Int32Array#reduce (param $this i32) (param $fn i32) (param $initialValue i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $this + local.set $var$5 + local.get $fn + local.set $var$4 + local.get $initialValue + local.set $var$3 + local.get $var$5 i32.load offset=4 - local.set $6 + local.set $var$6 i32.const 0 - local.set $7 - local.get $5 + local.set $var$7 + local.get $var$5 call $~lib/typedarray/Int32Array#get:length - local.set $8 + local.set $var$8 loop $for-loop|0 - local.get $7 - local.get $8 + local.get $var$7 + local.get $var$8 i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $3 - local.get $6 - local.get $7 + local.get $var$3 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load - local.get $7 - local.get $5 + local.get $var$7 + local.get $var$5 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $var$4 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $7 + local.set $var$3 + local.get $var$7 i32.const 1 i32.add - local.set $7 + local.set $var$7 br $for-loop|0 end end - local.get $3 + local.get $var$3 ) - (func $~lib/typedarray/Uint32Array#__set (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - local.get $0 + (func $~lib/typedarray/Uint32Array#__set (param $this i32) (param $index i32) (param $value i32) + local.get $index + local.get $this i32.load offset=8 i32.const 2 i32.shr_u @@ -5300,76 +5300,76 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 - local.get $1 - i32.add - ) - (func $~lib/typedarray/Uint32Array#reduce (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.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32>~anonymous|0 (param $acc i32) (param $val i32) (param $$2 i32) (param $$3 i32) (result i32) + local.get $acc + local.get $val + i32.add + ) + (func $~lib/typedarray/Uint32Array#reduce (param $this i32) (param $fn i32) (param $initialValue i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $this + local.set $var$5 + local.get $fn + local.set $var$4 + local.get $initialValue + local.set $var$3 + local.get $var$5 i32.load offset=4 - local.set $6 + local.set $var$6 i32.const 0 - local.set $7 - local.get $5 + local.set $var$7 + local.get $var$5 call $~lib/typedarray/Uint32Array#get:length - local.set $8 + local.set $var$8 loop $for-loop|0 - local.get $7 - local.get $8 + local.get $var$7 + local.get $var$8 i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $3 - local.get $6 - local.get $7 + local.get $var$3 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load - local.get $7 - local.get $5 + local.get $var$7 + local.get $var$5 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $var$4 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $7 + local.set $var$3 + local.get $var$7 i32.const 1 i32.add - local.set $7 + local.set $var$7 br $for-loop|0 end end - local.get $3 + local.get $var$3 ) - (func $~lib/typedarray/Int64Array#__set (param $0 i32) (param $1 i32) (param $2 i64) - local.get $1 - local.get $0 + (func $~lib/typedarray/Int64Array#__set (param $this i32) (param $index i32) (param $value i64) + local.get $index + local.get $this i32.load offset=8 i32.const 3 i32.shr_u @@ -5382,76 +5382,76 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add - local.get $2 + local.get $value i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) - local.get $0 - local.get $1 + (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $acc i64) (param $val i64) (param $$2 i32) (param $$3 i32) (result i64) + local.get $acc + local.get $val i64.add ) - (func $~lib/typedarray/Int64Array#reduce (param $0 i32) (param $1 i32) (param $2 i64) (result i64) - (local $3 i64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + (func $~lib/typedarray/Int64Array#reduce (param $this i32) (param $fn i32) (param $initialValue i64) (result i64) + (local $var$3 i64) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $this + local.set $var$5 + local.get $fn + local.set $var$4 + local.get $initialValue + local.set $var$3 + local.get $var$5 i32.load offset=4 - local.set $6 + local.set $var$6 i32.const 0 - local.set $7 - local.get $5 + local.set $var$7 + local.get $var$5 call $~lib/typedarray/Int64Array#get:length - local.set $8 + local.set $var$8 loop $for-loop|0 - local.get $7 - local.get $8 + local.get $var$7 + local.get $var$8 i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $3 - local.get $6 - local.get $7 + local.get $var$3 + local.get $var$6 + local.get $var$7 i32.const 3 i32.shl i32.add i64.load - local.get $7 - local.get $5 + local.get $var$7 + local.get $var$5 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $var$4 i32.load call_indirect $0 (type $i64_i64_i32_i32_=>_i64) - local.set $3 - local.get $7 + local.set $var$3 + local.get $var$7 i32.const 1 i32.add - local.set $7 + local.set $var$7 br $for-loop|0 end end - local.get $3 + local.get $var$3 ) - (func $~lib/typedarray/Uint64Array#__set (param $0 i32) (param $1 i32) (param $2 i64) - local.get $1 - local.get $0 + (func $~lib/typedarray/Uint64Array#__set (param $this i32) (param $index i32) (param $value i64) + local.get $index + local.get $this i32.load offset=8 i32.const 3 i32.shr_u @@ -5464,76 +5464,76 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add - local.get $2 + local.get $value i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) - local.get $0 - local.get $1 + (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $acc i64) (param $val i64) (param $$2 i32) (param $$3 i32) (result i64) + local.get $acc + local.get $val i64.add ) - (func $~lib/typedarray/Uint64Array#reduce (param $0 i32) (param $1 i32) (param $2 i64) (result i64) - (local $3 i64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + (func $~lib/typedarray/Uint64Array#reduce (param $this i32) (param $fn i32) (param $initialValue i64) (result i64) + (local $var$3 i64) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $this + local.set $var$5 + local.get $fn + local.set $var$4 + local.get $initialValue + local.set $var$3 + local.get $var$5 i32.load offset=4 - local.set $6 + local.set $var$6 i32.const 0 - local.set $7 - local.get $5 + local.set $var$7 + local.get $var$5 call $~lib/typedarray/Uint64Array#get:length - local.set $8 + local.set $var$8 loop $for-loop|0 - local.get $7 - local.get $8 + local.get $var$7 + local.get $var$8 i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $3 - local.get $6 - local.get $7 + local.get $var$3 + local.get $var$6 + local.get $var$7 i32.const 3 i32.shl i32.add i64.load - local.get $7 - local.get $5 + local.get $var$7 + local.get $var$5 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $var$4 i32.load call_indirect $0 (type $i64_i64_i32_i32_=>_i64) - local.set $3 - local.get $7 + local.set $var$3 + local.get $var$7 i32.const 1 i32.add - local.set $7 + local.set $var$7 br $for-loop|0 end end - local.get $3 + local.get $var$3 ) - (func $~lib/typedarray/Float32Array#__set (param $0 i32) (param $1 i32) (param $2 f32) - local.get $1 - local.get $0 + (func $~lib/typedarray/Float32Array#__set (param $this i32) (param $index i32) (param $value f32) + local.get $index + local.get $this i32.load offset=8 i32.const 2 i32.shr_u @@ -5546,147 +5546,147 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value f32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) - local.get $0 - local.get $1 + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $acc f32) (param $val f32) (param $$2 i32) (param $$3 i32) (result f32) + local.get $acc + local.get $val f32.add ) - (func $~lib/typedarray/Float32Array#reduce (param $0 i32) (param $1 i32) (param $2 f32) (result f32) - (local $3 f32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + (func $~lib/typedarray/Float32Array#reduce (param $this i32) (param $fn i32) (param $initialValue f32) (result f32) + (local $var$3 f32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $this + local.set $var$5 + local.get $fn + local.set $var$4 + local.get $initialValue + local.set $var$3 + local.get $var$5 i32.load offset=4 - local.set $6 + local.set $var$6 i32.const 0 - local.set $7 - local.get $5 + local.set $var$7 + local.get $var$5 call $~lib/typedarray/Float32Array#get:length - local.set $8 + local.set $var$8 loop $for-loop|0 - local.get $7 - local.get $8 + local.get $var$7 + local.get $var$8 i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $3 - local.get $6 - local.get $7 + local.get $var$3 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add f32.load - local.get $7 - local.get $5 + local.get $var$7 + local.get $var$5 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $var$4 i32.load call_indirect $0 (type $f32_f32_i32_i32_=>_f32) - local.set $3 - local.get $7 + local.set $var$3 + local.get $var$7 i32.const 1 i32.add - local.set $7 + local.set $var$7 br $for-loop|0 end end - local.get $3 - ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) - local.get $0 - local.get $1 + local.get $var$3 + ) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $acc f64) (param $val f64) (param $$2 i32) (param $$3 i32) (result f64) + local.get $acc + local.get $val f64.add ) - (func $~lib/typedarray/Float64Array#reduce (param $0 i32) (param $1 i32) (param $2 f64) (result f64) - (local $3 f64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + (func $~lib/typedarray/Float64Array#reduce (param $this i32) (param $fn i32) (param $initialValue f64) (result f64) + (local $var$3 f64) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $this + local.set $var$5 + local.get $fn + local.set $var$4 + local.get $initialValue + local.set $var$3 + local.get $var$5 i32.load offset=4 - local.set $6 + local.set $var$6 i32.const 0 - local.set $7 - local.get $5 + local.set $var$7 + local.get $var$5 call $~lib/typedarray/Float64Array#get:length - local.set $8 + local.set $var$8 loop $for-loop|0 - local.get $7 - local.get $8 + local.get $var$7 + local.get $var$8 i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $3 - local.get $6 - local.get $7 + local.get $var$3 + local.get $var$6 + local.get $var$7 i32.const 3 i32.shl i32.add f64.load - local.get $7 - local.get $5 + local.get $var$7 + local.get $var$5 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $var$4 i32.load call_indirect $0 (type $f64_f64_i32_i32_=>_f64) - local.set $3 - local.get $7 + local.set $var$3 + local.get $var$7 i32.const 1 i32.add - local.set $7 + local.set $var$7 br $for-loop|0 end end - local.get $3 + local.get $var$3 ) - (func $~lib/typedarray/Int8Array#at (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 + (func $~lib/typedarray/Int8Array#at (param $this i32) (param $index i32) (result i32) + (local $len i32) + local.get $this i32.load offset=8 - local.set $2 - local.get $1 + local.set $len + local.get $index i32.const 0 - local.get $2 - local.get $1 + local.get $len + local.get $index i32.const 0 i32.ge_s select i32.add - local.set $1 - local.get $1 - local.get $2 + local.set $index + local.get $index + local.get $len i32.ge_u if i32.const 336 @@ -5696,14 +5696,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.add i32.load8_s ) (func $std/typedarray/testAt<~lib/typedarray/Int8Array,i8> - (local $0 i32) + (local $array i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -5716,21 +5716,21 @@ i32.const 0 i32.const 3 call $~lib/typedarray/Int8Array#constructor - local.tee $0 + local.tee $array i32.store - local.get $0 + local.get $array i32.const 0 i32.const 1 call $~lib/typedarray/Int8Array#__set - local.get $0 + local.get $array i32.const 1 i32.const 2 call $~lib/typedarray/Int8Array#__set - local.get $0 + local.get $array i32.const 2 i32.const 3 call $~lib/typedarray/Int8Array#__set - local.get $0 + local.get $array i32.const 0 call $~lib/typedarray/Int8Array#at i32.const 1 @@ -5744,7 +5744,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.const -1 call $~lib/typedarray/Int8Array#at i32.const 3 @@ -5758,7 +5758,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.const -3 call $~lib/typedarray/Int8Array#at i32.const 1 @@ -5777,22 +5777,22 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/typedarray/Uint8Array#at (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 + (func $~lib/typedarray/Uint8Array#at (param $this i32) (param $index i32) (result i32) + (local $len i32) + local.get $this i32.load offset=8 - local.set $2 - local.get $1 + local.set $len + local.get $index i32.const 0 - local.get $2 - local.get $1 + local.get $len + local.get $index i32.const 0 i32.ge_s select i32.add - local.set $1 - local.get $1 - local.get $2 + local.set $index + local.get $index + local.get $len i32.ge_u if i32.const 336 @@ -5802,14 +5802,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.add i32.load8_u ) (func $std/typedarray/testAt<~lib/typedarray/Uint8Array,u8> - (local $0 i32) + (local $array i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -5822,21 +5822,21 @@ i32.const 0 i32.const 3 call $~lib/typedarray/Uint8Array#constructor - local.tee $0 + local.tee $array i32.store - local.get $0 + local.get $array i32.const 0 i32.const 1 call $~lib/typedarray/Uint8Array#__set - local.get $0 + local.get $array i32.const 1 i32.const 2 call $~lib/typedarray/Uint8Array#__set - local.get $0 + local.get $array i32.const 2 i32.const 3 call $~lib/typedarray/Uint8Array#__set - local.get $0 + local.get $array i32.const 0 call $~lib/typedarray/Uint8Array#at i32.const 1 @@ -5850,7 +5850,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.const -1 call $~lib/typedarray/Uint8Array#at i32.const 3 @@ -5864,7 +5864,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.const -3 call $~lib/typedarray/Uint8Array#at i32.const 1 @@ -5883,22 +5883,22 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/typedarray/Uint8ClampedArray#at (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 + (func $~lib/typedarray/Uint8ClampedArray#at (param $this i32) (param $index i32) (result i32) + (local $len i32) + local.get $this i32.load offset=8 - local.set $2 - local.get $1 + local.set $len + local.get $index i32.const 0 - local.get $2 - local.get $1 + local.get $len + local.get $index i32.const 0 i32.ge_s select i32.add - local.set $1 - local.get $1 - local.get $2 + local.set $index + local.get $index + local.get $len i32.ge_u if i32.const 336 @@ -5908,14 +5908,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.add i32.load8_u ) (func $std/typedarray/testAt<~lib/typedarray/Uint8ClampedArray,u8> - (local $0 i32) + (local $array i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -5928,21 +5928,21 @@ i32.const 0 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $0 + local.tee $array i32.store - local.get $0 + local.get $array i32.const 0 i32.const 1 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $array i32.const 1 i32.const 2 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $array i32.const 2 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $array i32.const 0 call $~lib/typedarray/Uint8ClampedArray#at i32.const 1 @@ -5956,7 +5956,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.const -1 call $~lib/typedarray/Uint8ClampedArray#at i32.const 3 @@ -5970,7 +5970,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.const -3 call $~lib/typedarray/Uint8ClampedArray#at i32.const 1 @@ -5989,24 +5989,24 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/typedarray/Int16Array#at (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 + (func $~lib/typedarray/Int16Array#at (param $this i32) (param $index i32) (result i32) + (local $len i32) + local.get $this i32.load offset=8 i32.const 1 i32.shr_u - local.set $2 - local.get $1 + local.set $len + local.get $index i32.const 0 - local.get $2 - local.get $1 + local.get $len + local.get $index i32.const 0 i32.ge_s select i32.add - local.set $1 - local.get $1 - local.get $2 + local.set $index + local.get $index + local.get $len i32.ge_u if i32.const 336 @@ -6016,16 +6016,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 1 i32.shl i32.add i32.load16_s ) (func $std/typedarray/testAt<~lib/typedarray/Int16Array,i16> - (local $0 i32) + (local $array i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -6038,21 +6038,21 @@ i32.const 0 i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $0 + local.tee $array i32.store - local.get $0 + local.get $array i32.const 0 i32.const 1 call $~lib/typedarray/Int16Array#__set - local.get $0 + local.get $array i32.const 1 i32.const 2 call $~lib/typedarray/Int16Array#__set - local.get $0 + local.get $array i32.const 2 i32.const 3 call $~lib/typedarray/Int16Array#__set - local.get $0 + local.get $array i32.const 0 call $~lib/typedarray/Int16Array#at i32.const 1 @@ -6066,7 +6066,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.const -1 call $~lib/typedarray/Int16Array#at i32.const 3 @@ -6080,7 +6080,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.const -3 call $~lib/typedarray/Int16Array#at i32.const 1 @@ -6099,24 +6099,24 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/typedarray/Uint16Array#at (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 + (func $~lib/typedarray/Uint16Array#at (param $this i32) (param $index i32) (result i32) + (local $len i32) + local.get $this i32.load offset=8 i32.const 1 i32.shr_u - local.set $2 - local.get $1 + local.set $len + local.get $index i32.const 0 - local.get $2 - local.get $1 + local.get $len + local.get $index i32.const 0 i32.ge_s select i32.add - local.set $1 - local.get $1 - local.get $2 + local.set $index + local.get $index + local.get $len i32.ge_u if i32.const 336 @@ -6126,16 +6126,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 1 i32.shl i32.add i32.load16_u ) (func $std/typedarray/testAt<~lib/typedarray/Uint16Array,u16> - (local $0 i32) + (local $array i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -6148,21 +6148,21 @@ i32.const 0 i32.const 3 call $~lib/typedarray/Uint16Array#constructor - local.tee $0 + local.tee $array i32.store - local.get $0 + local.get $array i32.const 0 i32.const 1 call $~lib/typedarray/Uint16Array#__set - local.get $0 + local.get $array i32.const 1 i32.const 2 call $~lib/typedarray/Uint16Array#__set - local.get $0 + local.get $array i32.const 2 i32.const 3 call $~lib/typedarray/Uint16Array#__set - local.get $0 + local.get $array i32.const 0 call $~lib/typedarray/Uint16Array#at i32.const 1 @@ -6176,7 +6176,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.const -1 call $~lib/typedarray/Uint16Array#at i32.const 3 @@ -6190,7 +6190,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.const -3 call $~lib/typedarray/Uint16Array#at i32.const 1 @@ -6209,24 +6209,24 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/typedarray/Int32Array#at (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 + (func $~lib/typedarray/Int32Array#at (param $this i32) (param $index i32) (result i32) + (local $len i32) + local.get $this i32.load offset=8 i32.const 2 i32.shr_u - local.set $2 - local.get $1 + local.set $len + local.get $index i32.const 0 - local.get $2 - local.get $1 + local.get $len + local.get $index i32.const 0 i32.ge_s select i32.add - local.set $1 - local.get $1 - local.get $2 + local.set $index + local.get $index + local.get $len i32.ge_u if i32.const 336 @@ -6236,16 +6236,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add i32.load ) (func $std/typedarray/testAt<~lib/typedarray/Int32Array,i32> - (local $0 i32) + (local $array i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -6258,21 +6258,21 @@ i32.const 0 i32.const 3 call $~lib/typedarray/Int32Array#constructor - local.tee $0 + local.tee $array i32.store - local.get $0 + local.get $array i32.const 0 i32.const 1 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $array i32.const 1 i32.const 2 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $array i32.const 2 i32.const 3 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $array i32.const 0 call $~lib/typedarray/Int32Array#at i32.const 1 @@ -6286,7 +6286,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.const -1 call $~lib/typedarray/Int32Array#at i32.const 3 @@ -6300,7 +6300,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.const -3 call $~lib/typedarray/Int32Array#at i32.const 1 @@ -6319,24 +6319,24 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/typedarray/Uint32Array#at (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 + (func $~lib/typedarray/Uint32Array#at (param $this i32) (param $index i32) (result i32) + (local $len i32) + local.get $this i32.load offset=8 i32.const 2 i32.shr_u - local.set $2 - local.get $1 + local.set $len + local.get $index i32.const 0 - local.get $2 - local.get $1 + local.get $len + local.get $index i32.const 0 i32.ge_s select i32.add - local.set $1 - local.get $1 - local.get $2 + local.set $index + local.get $index + local.get $len i32.ge_u if i32.const 336 @@ -6346,16 +6346,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add i32.load ) (func $std/typedarray/testAt<~lib/typedarray/Uint32Array,u32> - (local $0 i32) + (local $array i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -6368,21 +6368,21 @@ i32.const 0 i32.const 3 call $~lib/typedarray/Uint32Array#constructor - local.tee $0 + local.tee $array i32.store - local.get $0 + local.get $array i32.const 0 i32.const 1 call $~lib/typedarray/Uint32Array#__set - local.get $0 + local.get $array i32.const 1 i32.const 2 call $~lib/typedarray/Uint32Array#__set - local.get $0 + local.get $array i32.const 2 i32.const 3 call $~lib/typedarray/Uint32Array#__set - local.get $0 + local.get $array i32.const 0 call $~lib/typedarray/Uint32Array#at i32.const 1 @@ -6396,7 +6396,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.const -1 call $~lib/typedarray/Uint32Array#at i32.const 3 @@ -6410,7 +6410,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.const -3 call $~lib/typedarray/Uint32Array#at i32.const 1 @@ -6429,24 +6429,24 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/typedarray/Int64Array#at (param $0 i32) (param $1 i32) (result i64) - (local $2 i32) - local.get $0 + (func $~lib/typedarray/Int64Array#at (param $this i32) (param $index i32) (result i64) + (local $len i32) + local.get $this i32.load offset=8 i32.const 3 i32.shr_u - local.set $2 - local.get $1 + local.set $len + local.get $index i32.const 0 - local.get $2 - local.get $1 + local.get $len + local.get $index i32.const 0 i32.ge_s select i32.add - local.set $1 - local.get $1 - local.get $2 + local.set $index + local.get $index + local.get $len i32.ge_u if i32.const 336 @@ -6456,16 +6456,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add i64.load ) (func $std/typedarray/testAt<~lib/typedarray/Int64Array,i64> - (local $0 i32) + (local $array i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -6478,21 +6478,21 @@ i32.const 0 i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $0 + local.tee $array i32.store - local.get $0 + local.get $array i32.const 0 i64.const 1 call $~lib/typedarray/Int64Array#__set - local.get $0 + local.get $array i32.const 1 i64.const 2 call $~lib/typedarray/Int64Array#__set - local.get $0 + local.get $array i32.const 2 i64.const 3 call $~lib/typedarray/Int64Array#__set - local.get $0 + local.get $array i32.const 0 call $~lib/typedarray/Int64Array#at i64.const 1 @@ -6506,7 +6506,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.const -1 call $~lib/typedarray/Int64Array#at i64.const 3 @@ -6520,7 +6520,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.const -3 call $~lib/typedarray/Int64Array#at i64.const 1 @@ -6539,24 +6539,24 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/typedarray/Uint64Array#at (param $0 i32) (param $1 i32) (result i64) - (local $2 i32) - local.get $0 + (func $~lib/typedarray/Uint64Array#at (param $this i32) (param $index i32) (result i64) + (local $len i32) + local.get $this i32.load offset=8 i32.const 3 i32.shr_u - local.set $2 - local.get $1 + local.set $len + local.get $index i32.const 0 - local.get $2 - local.get $1 + local.get $len + local.get $index i32.const 0 i32.ge_s select i32.add - local.set $1 - local.get $1 - local.get $2 + local.set $index + local.get $index + local.get $len i32.ge_u if i32.const 336 @@ -6566,16 +6566,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add i64.load ) (func $std/typedarray/testAt<~lib/typedarray/Uint64Array,u64> - (local $0 i32) + (local $array i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -6588,21 +6588,21 @@ i32.const 0 i32.const 3 call $~lib/typedarray/Uint64Array#constructor - local.tee $0 + local.tee $array i32.store - local.get $0 + local.get $array i32.const 0 i64.const 1 call $~lib/typedarray/Uint64Array#__set - local.get $0 + local.get $array i32.const 1 i64.const 2 call $~lib/typedarray/Uint64Array#__set - local.get $0 + local.get $array i32.const 2 i64.const 3 call $~lib/typedarray/Uint64Array#__set - local.get $0 + local.get $array i32.const 0 call $~lib/typedarray/Uint64Array#at i64.const 1 @@ -6616,7 +6616,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.const -1 call $~lib/typedarray/Uint64Array#at i64.const 3 @@ -6630,7 +6630,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.const -3 call $~lib/typedarray/Uint64Array#at i64.const 1 @@ -6649,24 +6649,24 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/typedarray/Float32Array#at (param $0 i32) (param $1 i32) (result f32) - (local $2 i32) - local.get $0 + (func $~lib/typedarray/Float32Array#at (param $this i32) (param $index i32) (result f32) + (local $len i32) + local.get $this i32.load offset=8 i32.const 2 i32.shr_u - local.set $2 - local.get $1 + local.set $len + local.get $index i32.const 0 - local.get $2 - local.get $1 + local.get $len + local.get $index i32.const 0 i32.ge_s select i32.add - local.set $1 - local.get $1 - local.get $2 + local.set $index + local.get $index + local.get $len i32.ge_u if i32.const 336 @@ -6676,16 +6676,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add f32.load ) (func $std/typedarray/testAt<~lib/typedarray/Float32Array,f32> - (local $0 i32) + (local $array i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -6698,21 +6698,21 @@ i32.const 0 i32.const 3 call $~lib/typedarray/Float32Array#constructor - local.tee $0 + local.tee $array i32.store - local.get $0 + local.get $array i32.const 0 f32.const 1 call $~lib/typedarray/Float32Array#__set - local.get $0 + local.get $array i32.const 1 f32.const 2 call $~lib/typedarray/Float32Array#__set - local.get $0 + local.get $array i32.const 2 f32.const 3 call $~lib/typedarray/Float32Array#__set - local.get $0 + local.get $array i32.const 0 call $~lib/typedarray/Float32Array#at f32.const 1 @@ -6726,7 +6726,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.const -1 call $~lib/typedarray/Float32Array#at f32.const 3 @@ -6740,7 +6740,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.const -3 call $~lib/typedarray/Float32Array#at f32.const 1 @@ -6759,24 +6759,24 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/typedarray/Float64Array#at (param $0 i32) (param $1 i32) (result f64) - (local $2 i32) - local.get $0 + (func $~lib/typedarray/Float64Array#at (param $this i32) (param $index i32) (result f64) + (local $len i32) + local.get $this i32.load offset=8 i32.const 3 i32.shr_u - local.set $2 - local.get $1 + local.set $len + local.get $index i32.const 0 - local.get $2 - local.get $1 + local.get $len + local.get $index i32.const 0 i32.ge_s select i32.add - local.set $1 - local.get $1 - local.get $2 + local.set $index + local.get $index + local.get $len i32.ge_u if i32.const 336 @@ -6786,16 +6786,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add f64.load ) (func $std/typedarray/testAt<~lib/typedarray/Float64Array,f64> - (local $0 i32) + (local $array i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -6808,21 +6808,21 @@ i32.const 0 i32.const 3 call $~lib/typedarray/Float64Array#constructor - local.tee $0 + local.tee $array i32.store - local.get $0 + local.get $array i32.const 0 f64.const 1 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $array i32.const 1 f64.const 2 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $array i32.const 2 f64.const 3 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $array i32.const 0 call $~lib/typedarray/Float64Array#at f64.const 1 @@ -6836,7 +6836,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.const -1 call $~lib/typedarray/Float64Array#at f64.const 3 @@ -6850,7 +6850,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $array i32.const -3 call $~lib/typedarray/Float64Array#at f64.const 1 @@ -6869,646 +6869,646 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 - local.get $1 + (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $acc i32) (param $val i32) (param $$2 i32) (param $$3 i32) (result i32) + local.get $acc + local.get $val i32.add ) - (func $~lib/typedarray/Int8Array#reduceRight (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 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + (func $~lib/typedarray/Int8Array#reduceRight (param $this i32) (param $fn i32) (param $initialValue i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $this + local.set $var$5 + local.get $fn + local.set $var$4 + local.get $initialValue + local.set $var$3 + local.get $var$5 i32.load offset=4 - local.set $6 - local.get $5 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Int8Array#get:length i32.const 1 i32.sub - local.set $7 + local.set $var$7 loop $for-loop|0 - local.get $7 + local.get $var$7 i32.const 0 i32.ge_s - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 if - local.get $3 - local.get $6 - local.get $7 + local.get $var$3 + local.get $var$6 + local.get $var$7 i32.const 0 i32.shl i32.add i32.load8_s - local.get $7 - local.get $5 + local.get $var$7 + local.get $var$5 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $var$4 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $7 + local.set $var$3 + local.get $var$7 i32.const 1 i32.sub - local.set $7 + local.set $var$7 br $for-loop|0 end end - local.get $3 + local.get $var$3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 - local.get $1 + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $acc i32) (param $val i32) (param $$2 i32) (param $$3 i32) (result i32) + local.get $acc + local.get $val i32.add ) - (func $~lib/typedarray/Uint8Array#reduceRight (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 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + (func $~lib/typedarray/Uint8Array#reduceRight (param $this i32) (param $fn i32) (param $initialValue i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $this + local.set $var$5 + local.get $fn + local.set $var$4 + local.get $initialValue + local.set $var$3 + local.get $var$5 i32.load offset=4 - local.set $6 - local.get $5 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Uint8Array#get:length i32.const 1 i32.sub - local.set $7 + local.set $var$7 loop $for-loop|0 - local.get $7 + local.get $var$7 i32.const 0 i32.ge_s - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 if - local.get $3 - local.get $6 - local.get $7 + local.get $var$3 + local.get $var$6 + local.get $var$7 i32.const 0 i32.shl i32.add i32.load8_u - local.get $7 - local.get $5 + local.get $var$7 + local.get $var$5 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $var$4 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $7 + local.set $var$3 + local.get $var$7 i32.const 1 i32.sub - local.set $7 + local.set $var$7 br $for-loop|0 end end - local.get $3 + local.get $var$3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 - local.get $1 + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (param $acc i32) (param $val i32) (param $$2 i32) (param $$3 i32) (result i32) + local.get $acc + local.get $val i32.add ) - (func $~lib/typedarray/Uint8ClampedArray#reduceRight (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 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + (func $~lib/typedarray/Uint8ClampedArray#reduceRight (param $this i32) (param $fn i32) (param $initialValue i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $this + local.set $var$5 + local.get $fn + local.set $var$4 + local.get $initialValue + local.set $var$3 + local.get $var$5 i32.load offset=4 - local.set $6 - local.get $5 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Uint8ClampedArray#get:length i32.const 1 i32.sub - local.set $7 + local.set $var$7 loop $for-loop|0 - local.get $7 + local.get $var$7 i32.const 0 i32.ge_s - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 if - local.get $3 - local.get $6 - local.get $7 + local.get $var$3 + local.get $var$6 + local.get $var$7 i32.const 0 i32.shl i32.add i32.load8_u - local.get $7 - local.get $5 + local.get $var$7 + local.get $var$5 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $var$4 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $7 + local.set $var$3 + local.get $var$7 i32.const 1 i32.sub - local.set $7 + local.set $var$7 br $for-loop|0 end end - local.get $3 + local.get $var$3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 - local.get $1 + (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $acc i32) (param $val i32) (param $$2 i32) (param $$3 i32) (result i32) + local.get $acc + local.get $val i32.add ) - (func $~lib/typedarray/Int16Array#reduceRight (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 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + (func $~lib/typedarray/Int16Array#reduceRight (param $this i32) (param $fn i32) (param $initialValue i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $this + local.set $var$5 + local.get $fn + local.set $var$4 + local.get $initialValue + local.set $var$3 + local.get $var$5 i32.load offset=4 - local.set $6 - local.get $5 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Int16Array#get:length i32.const 1 i32.sub - local.set $7 + local.set $var$7 loop $for-loop|0 - local.get $7 + local.get $var$7 i32.const 0 i32.ge_s - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 if - local.get $3 - local.get $6 - local.get $7 + local.get $var$3 + local.get $var$6 + local.get $var$7 i32.const 1 i32.shl i32.add i32.load16_s - local.get $7 - local.get $5 + local.get $var$7 + local.get $var$5 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $var$4 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $7 + local.set $var$3 + local.get $var$7 i32.const 1 i32.sub - local.set $7 + local.set $var$7 br $for-loop|0 end end - local.get $3 + local.get $var$3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 - local.get $1 + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16>~anonymous|0 (param $acc i32) (param $val i32) (param $$2 i32) (param $$3 i32) (result i32) + local.get $acc + local.get $val i32.add ) - (func $~lib/typedarray/Uint16Array#reduceRight (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 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + (func $~lib/typedarray/Uint16Array#reduceRight (param $this i32) (param $fn i32) (param $initialValue i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $this + local.set $var$5 + local.get $fn + local.set $var$4 + local.get $initialValue + local.set $var$3 + local.get $var$5 i32.load offset=4 - local.set $6 - local.get $5 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Uint16Array#get:length i32.const 1 i32.sub - local.set $7 + local.set $var$7 loop $for-loop|0 - local.get $7 + local.get $var$7 i32.const 0 i32.ge_s - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 if - local.get $3 - local.get $6 - local.get $7 + local.get $var$3 + local.get $var$6 + local.get $var$7 i32.const 1 i32.shl i32.add i32.load16_u - local.get $7 - local.get $5 + local.get $var$7 + local.get $var$5 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $var$4 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $7 + local.set $var$3 + local.get $var$7 i32.const 1 i32.sub - local.set $7 + local.set $var$7 br $for-loop|0 end end - local.get $3 + local.get $var$3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 - local.get $1 + (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $acc i32) (param $val i32) (param $$2 i32) (param $$3 i32) (result i32) + local.get $acc + local.get $val i32.add ) - (func $~lib/typedarray/Int32Array#reduceRight (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 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + (func $~lib/typedarray/Int32Array#reduceRight (param $this i32) (param $fn i32) (param $initialValue i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $this + local.set $var$5 + local.get $fn + local.set $var$4 + local.get $initialValue + local.set $var$3 + local.get $var$5 i32.load offset=4 - local.set $6 - local.get $5 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Int32Array#get:length i32.const 1 i32.sub - local.set $7 + local.set $var$7 loop $for-loop|0 - local.get $7 + local.get $var$7 i32.const 0 i32.ge_s - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 if - local.get $3 - local.get $6 - local.get $7 + local.get $var$3 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load - local.get $7 - local.get $5 + local.get $var$7 + local.get $var$5 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $var$4 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $7 + local.set $var$3 + local.get $var$7 i32.const 1 i32.sub - local.set $7 + local.set $var$7 br $for-loop|0 end end - local.get $3 + local.get $var$3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 - local.get $1 + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32>~anonymous|0 (param $acc i32) (param $val i32) (param $$2 i32) (param $$3 i32) (result i32) + local.get $acc + local.get $val i32.add ) - (func $~lib/typedarray/Uint32Array#reduceRight (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 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + (func $~lib/typedarray/Uint32Array#reduceRight (param $this i32) (param $fn i32) (param $initialValue i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $this + local.set $var$5 + local.get $fn + local.set $var$4 + local.get $initialValue + local.set $var$3 + local.get $var$5 i32.load offset=4 - local.set $6 - local.get $5 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Uint32Array#get:length i32.const 1 i32.sub - local.set $7 + local.set $var$7 loop $for-loop|0 - local.get $7 + local.get $var$7 i32.const 0 i32.ge_s - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 if - local.get $3 - local.get $6 - local.get $7 + local.get $var$3 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load - local.get $7 - local.get $5 + local.get $var$7 + local.get $var$5 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $var$4 i32.load call_indirect $0 (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $7 + local.set $var$3 + local.get $var$7 i32.const 1 i32.sub - local.set $7 + local.set $var$7 br $for-loop|0 end end - local.get $3 + local.get $var$3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) - local.get $0 - local.get $1 + (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $acc i64) (param $val i64) (param $$2 i32) (param $$3 i32) (result i64) + local.get $acc + local.get $val i64.add ) - (func $~lib/typedarray/Int64Array#reduceRight (param $0 i32) (param $1 i32) (param $2 i64) (result i64) - (local $3 i64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + (func $~lib/typedarray/Int64Array#reduceRight (param $this i32) (param $fn i32) (param $initialValue i64) (result i64) + (local $var$3 i64) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $this + local.set $var$5 + local.get $fn + local.set $var$4 + local.get $initialValue + local.set $var$3 + local.get $var$5 i32.load offset=4 - local.set $6 - local.get $5 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Int64Array#get:length i32.const 1 i32.sub - local.set $7 + local.set $var$7 loop $for-loop|0 - local.get $7 + local.get $var$7 i32.const 0 i32.ge_s - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 if - local.get $3 - local.get $6 - local.get $7 + local.get $var$3 + local.get $var$6 + local.get $var$7 i32.const 3 i32.shl i32.add i64.load - local.get $7 - local.get $5 + local.get $var$7 + local.get $var$5 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $var$4 i32.load call_indirect $0 (type $i64_i64_i32_i32_=>_i64) - local.set $3 - local.get $7 + local.set $var$3 + local.get $var$7 i32.const 1 i32.sub - local.set $7 + local.set $var$7 br $for-loop|0 end end - local.get $3 + local.get $var$3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) - local.get $0 - local.get $1 + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $acc i64) (param $val i64) (param $$2 i32) (param $$3 i32) (result i64) + local.get $acc + local.get $val i64.add ) - (func $~lib/typedarray/Uint64Array#reduceRight (param $0 i32) (param $1 i32) (param $2 i64) (result i64) - (local $3 i64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + (func $~lib/typedarray/Uint64Array#reduceRight (param $this i32) (param $fn i32) (param $initialValue i64) (result i64) + (local $var$3 i64) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $this + local.set $var$5 + local.get $fn + local.set $var$4 + local.get $initialValue + local.set $var$3 + local.get $var$5 i32.load offset=4 - local.set $6 - local.get $5 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Uint64Array#get:length i32.const 1 i32.sub - local.set $7 + local.set $var$7 loop $for-loop|0 - local.get $7 + local.get $var$7 i32.const 0 i32.ge_s - local.set $8 - local.get $8 - if - local.get $3 - local.get $6 - local.get $7 + local.set $var$8 + local.get $var$8 + if + local.get $var$3 + local.get $var$6 + local.get $var$7 i32.const 3 i32.shl i32.add i64.load - local.get $7 - local.get $5 + local.get $var$7 + local.get $var$5 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $var$4 i32.load call_indirect $0 (type $i64_i64_i32_i32_=>_i64) - local.set $3 - local.get $7 + local.set $var$3 + local.get $var$7 i32.const 1 i32.sub - local.set $7 + local.set $var$7 br $for-loop|0 end end - local.get $3 + local.get $var$3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) - local.get $0 - local.get $1 + (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $acc f32) (param $val f32) (param $$2 i32) (param $$3 i32) (result f32) + local.get $acc + local.get $val f32.add ) - (func $~lib/typedarray/Float32Array#reduceRight (param $0 i32) (param $1 i32) (param $2 f32) (result f32) - (local $3 f32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + (func $~lib/typedarray/Float32Array#reduceRight (param $this i32) (param $fn i32) (param $initialValue f32) (result f32) + (local $var$3 f32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $this + local.set $var$5 + local.get $fn + local.set $var$4 + local.get $initialValue + local.set $var$3 + local.get $var$5 i32.load offset=4 - local.set $6 - local.get $5 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Float32Array#get:length i32.const 1 i32.sub - local.set $7 + local.set $var$7 loop $for-loop|0 - local.get $7 + local.get $var$7 i32.const 0 i32.ge_s - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 if - local.get $3 - local.get $6 - local.get $7 + local.get $var$3 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add f32.load - local.get $7 - local.get $5 + local.get $var$7 + local.get $var$5 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $var$4 i32.load call_indirect $0 (type $f32_f32_i32_i32_=>_f32) - local.set $3 - local.get $7 + local.set $var$3 + local.get $var$7 i32.const 1 i32.sub - local.set $7 + local.set $var$7 br $for-loop|0 end end - local.get $3 + local.get $var$3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) - local.get $0 - local.get $1 + (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $acc f64) (param $val f64) (param $$2 i32) (param $$3 i32) (result f64) + local.get $acc + local.get $val f64.add ) - (func $~lib/typedarray/Float64Array#reduceRight (param $0 i32) (param $1 i32) (param $2 f64) (result f64) - (local $3 f64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + (func $~lib/typedarray/Float64Array#reduceRight (param $this i32) (param $fn i32) (param $initialValue f64) (result f64) + (local $var$3 f64) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $this + local.set $var$5 + local.get $fn + local.set $var$4 + local.get $initialValue + local.set $var$3 + local.get $var$5 i32.load offset=4 - local.set $6 - local.get $5 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Float64Array#get:length i32.const 1 i32.sub - local.set $7 + local.set $var$7 loop $for-loop|0 - local.get $7 + local.get $var$7 i32.const 0 i32.ge_s - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 if - local.get $3 - local.get $6 - local.get $7 + local.get $var$3 + local.get $var$6 + local.get $var$7 i32.const 3 i32.shl i32.add f64.load - local.get $7 - local.get $5 + local.get $var$7 + local.get $var$5 i32.const 4 global.set $~argumentsLength - local.get $4 + local.get $var$4 i32.load call_indirect $0 (type $f64_f64_i32_i32_=>_f64) - local.set $3 - local.get $7 + local.set $var$3 + local.get $var$7 i32.const 1 i32.sub - local.set $7 + local.set $var$7 br $for-loop|0 end end - local.get $3 + local.get $var$3 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $0 + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value + local.get $value i32.mul ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $0 + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value + local.get $value i32.mul ) - (func $~lib/typedarray/Uint8Array#__get (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 + (func $~lib/typedarray/Uint8Array#__get (param $this i32) (param $index i32) (result i32) + local.get $index + local.get $this i32.load offset=8 i32.ge_u if @@ -7519,25 +7519,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.add i32.load8_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $0 + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value + local.get $value i32.mul ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $0 + (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value + local.get $value i32.mul ) - (func $~lib/typedarray/Int16Array#__get (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 + (func $~lib/typedarray/Int16Array#__get (param $this i32) (param $index i32) (result i32) + local.get $index + local.get $this i32.load offset=8 i32.const 1 i32.shr_u @@ -7550,22 +7550,22 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 1 i32.shl i32.add i32.load16_s ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $0 + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value + local.get $value i32.mul ) - (func $~lib/typedarray/Uint16Array#__get (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 + (func $~lib/typedarray/Uint16Array#__get (param $this i32) (param $index i32) (result i32) + local.get $index + local.get $this i32.load offset=8 i32.const 1 i32.shr_u @@ -7578,27 +7578,27 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 1 i32.shl i32.add i32.load16_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $0 + (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value + local.get $value i32.mul ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $0 + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value + local.get $value i32.mul ) - (func $~lib/typedarray/Uint32Array#__get (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 + (func $~lib/typedarray/Uint32Array#__get (param $this i32) (param $index i32) (result i32) + local.get $index + local.get $this i32.load offset=8 i32.const 2 i32.shr_u @@ -7611,22 +7611,22 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add i32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i64) - local.get $0 - local.get $0 + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $value i64) (param $$1 i32) (param $$2 i32) (result i64) + local.get $value + local.get $value i64.mul ) - (func $~lib/typedarray/Int64Array#__get (param $0 i32) (param $1 i32) (result i64) - local.get $1 - local.get $0 + (func $~lib/typedarray/Int64Array#__get (param $this i32) (param $index i32) (result i64) + local.get $index + local.get $this i32.load offset=8 i32.const 3 i32.shr_u @@ -7639,22 +7639,22 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i64) - local.get $0 - local.get $0 + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $value i64) (param $$1 i32) (param $$2 i32) (result i64) + local.get $value + local.get $value i64.mul ) - (func $~lib/typedarray/Uint64Array#__get (param $0 i32) (param $1 i32) (result i64) - local.get $1 - local.get $0 + (func $~lib/typedarray/Uint64Array#__get (param $this i32) (param $index i32) (result i64) + local.get $index + local.get $this i32.load offset=8 i32.const 3 i32.shr_u @@ -7667,22 +7667,22 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result f32) - local.get $0 - local.get $0 + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $value f32) (param $$1 i32) (param $$2 i32) (result f32) + local.get $value + local.get $value f32.mul ) - (func $~lib/typedarray/Float32Array#__get (param $0 i32) (param $1 i32) (result f32) - local.get $1 - local.get $0 + (func $~lib/typedarray/Float32Array#__get (param $this i32) (param $index i32) (result f32) + local.get $index + local.get $this i32.load offset=8 i32.const 2 i32.shr_u @@ -7695,36 +7695,36 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add f32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result f64) - local.get $0 - local.get $0 + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $value f64) (param $$1 i32) (param $$2 i32) (result f64) + local.get $value + local.get $value f64.mul ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.extend8_s i32.const 2 i32.gt_s ) - (func $~lib/rt/itcms/__renew (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/rt/itcms/__renew (param $oldPtr i32) (param $size i32) (result i32) + (local $oldObj i32) + (local $newPtr i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $oldPtr i32.const 20 i32.sub - local.set $2 - local.get $1 - local.get $2 + local.set $oldObj + local.get $size + local.get $oldObj i32.load i32.const 3 i32.const -1 @@ -7734,2284 +7734,2284 @@ i32.sub i32.le_u if - local.get $2 - local.get $1 + local.get $oldObj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $0 + local.get $oldPtr return end - local.get $1 - local.get $2 + local.get $size + local.get $oldObj i32.load offset=12 call $~lib/rt/itcms/__new - local.set $3 - local.get $3 - local.get $0 - local.get $1 - local.tee $4 - local.get $2 + local.set $newPtr + local.get $newPtr + local.get $oldPtr + local.get $size + local.tee $var$4 + local.get $oldObj i32.load offset=16 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.lt_u select memory.copy - local.get $3 + local.get $newPtr ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 255 i32.and i32.const 2 i32.gt_u ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 255 i32.and i32.const 2 i32.gt_u ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.extend16_s i32.const 2 i32.gt_s ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 65535 i32.and i32.const 2 i32.gt_u ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 2 i32.gt_s ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 2 i32.gt_u ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $value i64) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i64.const 2 i64.gt_s ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $value i64) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i64.const 2 i64.gt_u ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $value f32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value f32.const 2 f32.gt ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $value f64) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value f64.const 2 f64.gt ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.extend8_s i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#some (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/typedarray/Int8Array#some (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Int8Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 0 i32.shl i32.add i32.load8_s - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if i32.const 1 br $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.extend8_s i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8Array#some (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/typedarray/Uint8Array#some (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Uint8Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 0 i32.shl i32.add i32.load8_u - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if i32.const 1 br $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 255 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#some (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/typedarray/Uint8ClampedArray#some (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/SOME<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Uint8ClampedArray#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 0 i32.shl i32.add i32.load8_u - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if i32.const 1 br $~lib/typedarray/SOME<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 255 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.extend16_s i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#some (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/typedarray/Int16Array#some (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Int16Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 1 i32.shl i32.add i32.load16_s - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if i32.const 1 br $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.extend16_s i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint16Array#some (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/typedarray/Uint16Array#some (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Uint16Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 1 i32.shl i32.add i32.load16_u - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if i32.const 1 br $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|1 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 65535 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#some (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/typedarray/Int32Array#some (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Int32Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 2 i32.shl i32.add i32.load - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if i32.const 1 br $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint32Array#some (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/typedarray/Uint32Array#some (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/SOME<~lib/typedarray/Uint32Array,u32>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Uint32Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 2 i32.shl i32.add i32.load - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if i32.const 1 br $~lib/typedarray/SOME<~lib/typedarray/Uint32Array,u32>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|1 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $value i64) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#some (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/typedarray/Int64Array#some (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Int64Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 3 i32.shl i32.add i64.load - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i64_i32_i32_=>_i32) if i32.const 1 br $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (param $value i64) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i64.const 0 i64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $value i64) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i64.const 2 i64.eq ) - (func $~lib/typedarray/Uint64Array#some (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/typedarray/Uint64Array#some (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/SOME<~lib/typedarray/Uint64Array,u64>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Uint64Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 3 i32.shl i32.add i64.load - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i64_i32_i32_=>_i32) if i32.const 1 br $~lib/typedarray/SOME<~lib/typedarray/Uint64Array,u64>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|1 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|1 (param $value i64) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i64.const 0 i64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $value f32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#some (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/typedarray/Float32Array#some (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Float32Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 2 i32.shl i32.add f32.load - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $f32_i32_i32_=>_i32) if i32.const 1 br $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (param $value f32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value f32.const 0 f32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $value f64) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#some (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/typedarray/Float64Array#some (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Float64Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 3 i32.shl i32.add f64.load - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $f64_i32_i32_=>_i32) if i32.const 1 br $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (param $value f64) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value f64.const 0 f64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.extend8_s i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#findIndex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/typedarray/Int8Array#findIndex (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Int8Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 0 i32.shl i32.add i32.load8_s - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if - local.get $5 + local.get $var$5 br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.extend8_s i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8Array#findIndex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/typedarray/Uint8Array#findIndex (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Uint8Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 0 i32.shl i32.add i32.load8_u - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if - local.get $5 + local.get $var$5 br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#findIndex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/typedarray/Uint8ClampedArray#findIndex (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Uint8ClampedArray#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 - if - local.get $4 - local.get $5 + local.set $var$7 + local.get $var$7 + if + local.get $var$4 + local.get $var$5 i32.const 0 i32.shl i32.add i32.load8_u - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if - local.get $5 + local.get $var$5 br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.extend16_s i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#findIndex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/typedarray/Int16Array#findIndex (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Int16Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 1 i32.shl i32.add i32.load16_s - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if - local.get $5 + local.get $var$5 br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.extend16_s i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint16Array#findIndex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/typedarray/Uint16Array#findIndex (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Uint16Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 1 i32.shl i32.add i32.load16_u - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if - local.get $5 + local.get $var$5 br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 65535 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#findIndex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/typedarray/Int32Array#findIndex (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Int32Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 2 i32.shl i32.add i32.load - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if - local.get $5 + local.get $var$5 br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint32Array#findIndex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/typedarray/Uint32Array#findIndex (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint32Array,u32>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Uint32Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 2 i32.shl i32.add i32.load - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if - local.get $5 + local.get $var$5 br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint32Array,u32>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|1 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $value i64) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#findIndex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/typedarray/Int64Array#findIndex (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Int64Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 3 i32.shl i32.add i64.load - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i64_i32_i32_=>_i32) if - local.get $5 + local.get $var$5 br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (param $value i64) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $value i64) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i64.const 2 i64.eq ) - (func $~lib/typedarray/Uint64Array#findIndex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/typedarray/Uint64Array#findIndex (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint64Array,u64>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Uint64Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 3 i32.shl i32.add i64.load - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i64_i32_i32_=>_i32) if - local.get $5 + local.get $var$5 br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint64Array,u64>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|1 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|1 (param $value i64) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $value f32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#findIndex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/typedarray/Float32Array#findIndex (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Float32Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 2 i32.shl i32.add f32.load - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $f32_i32_i32_=>_i32) if - local.get $5 + local.get $var$5 br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (param $value f32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value f32.const 4 f32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $value f64) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#findIndex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/typedarray/Float64Array#findIndex (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Float64Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 3 i32.shl i32.add f64.load - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $f64_i32_i32_=>_i32) if - local.get $5 + local.get $var$5 br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (param $value f64) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value f64.const 4 f64.eq ) - (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.extend8_s i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#findLastIndex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + (func $~lib/typedarray/Int8Array#findLastIndex (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 - local.get $3 + local.set $var$4 + local.get $var$3 call $~lib/typedarray/Int8Array#get:length i32.const 1 i32.sub - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 0 i32.ge_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 0 i32.shl i32.add i32.load8_s - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if - local.get $5 + local.get $var$5 br $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.sub - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const -1 end ) - (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.extend8_s i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8Array#findLastIndex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + (func $~lib/typedarray/Uint8Array#findLastIndex (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 - local.get $3 + local.set $var$4 + local.get $var$3 call $~lib/typedarray/Uint8Array#get:length i32.const 1 i32.sub - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 0 i32.ge_s - local.set $6 - local.get $6 - if - local.get $4 - local.get $5 + local.set $var$6 + local.get $var$6 + if + local.get $var$4 + local.get $var$5 i32.const 0 i32.shl i32.add i32.load8_u - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if - local.get $5 + local.get $var$5 br $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.sub - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const -1 end ) - (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#findLastIndex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + (func $~lib/typedarray/Uint8ClampedArray#findLastIndex (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 - local.get $3 + local.set $var$4 + local.get $var$3 call $~lib/typedarray/Uint8ClampedArray#get:length i32.const 1 i32.sub - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 0 i32.ge_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 0 i32.shl i32.add i32.load8_u - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if - local.get $5 + local.get $var$5 br $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.sub - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const -1 end ) - (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.extend16_s i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#findLastIndex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + (func $~lib/typedarray/Int16Array#findLastIndex (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 - local.get $3 + local.set $var$4 + local.get $var$3 call $~lib/typedarray/Int16Array#get:length i32.const 1 i32.sub - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 0 i32.ge_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 1 i32.shl i32.add i32.load16_s - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if - local.get $5 + local.get $var$5 br $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.sub - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const -1 end ) - (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.extend16_s i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Uint16Array,u16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Uint16Array,u16>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint16Array#findLastIndex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + (func $~lib/typedarray/Uint16Array#findLastIndex (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 - local.get $3 + local.set $var$4 + local.get $var$3 call $~lib/typedarray/Uint16Array#get:length i32.const 1 i32.sub - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 0 i32.ge_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 1 i32.shl i32.add i32.load16_u - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if - local.get $5 + local.get $var$5 br $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.sub - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const -1 end ) - (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 65535 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#findLastIndex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + (func $~lib/typedarray/Int32Array#findLastIndex (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 - local.get $3 + local.set $var$4 + local.get $var$3 call $~lib/typedarray/Int32Array#get:length i32.const 1 i32.sub - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 0 i32.ge_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 2 i32.shl i32.add i32.load - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if - local.get $5 + local.get $var$5 br $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.sub - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const -1 end ) - (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Uint32Array,u32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Uint32Array,u32>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint32Array#findLastIndex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + (func $~lib/typedarray/Uint32Array#findLastIndex (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint32Array,u32>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 - local.get $3 + local.set $var$4 + local.get $var$3 call $~lib/typedarray/Uint32Array#get:length i32.const 1 i32.sub - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 0 i32.ge_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 2 i32.shl i32.add i32.load - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if - local.get $5 + local.get $var$5 br $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint32Array,u32>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.sub - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const -1 end ) - (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Uint32Array,u32>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Uint32Array,u32>~anonymous|1 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $value i64) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#findLastIndex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + (func $~lib/typedarray/Int64Array#findLastIndex (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 - local.get $3 + local.set $var$4 + local.get $var$3 call $~lib/typedarray/Int64Array#get:length i32.const 1 i32.sub - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 0 i32.ge_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 3 i32.shl i32.add i64.load - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i64_i32_i32_=>_i32) if - local.get $5 + local.get $var$5 br $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.sub - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const -1 end ) - (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (param $value i64) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $value i64) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i64.const 2 i64.eq ) - (func $~lib/typedarray/Uint64Array#findLastIndex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + (func $~lib/typedarray/Uint64Array#findLastIndex (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint64Array,u64>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 - local.get $3 + local.set $var$4 + local.get $var$3 call $~lib/typedarray/Uint64Array#get:length i32.const 1 i32.sub - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 0 i32.ge_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 3 i32.shl i32.add i64.load - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i64_i32_i32_=>_i32) if - local.get $5 + local.get $var$5 br $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Uint64Array,u64>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.sub - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const -1 end ) - (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Uint64Array,u64>~anonymous|1 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Uint64Array,u64>~anonymous|1 (param $value i64) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $value f32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#findLastIndex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + (func $~lib/typedarray/Float32Array#findLastIndex (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 - local.get $3 + local.set $var$4 + local.get $var$3 call $~lib/typedarray/Float32Array#get:length i32.const 1 i32.sub - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 0 i32.ge_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 2 i32.shl i32.add f32.load - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $f32_i32_i32_=>_i32) if - local.get $5 + local.get $var$5 br $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.sub - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const -1 end ) - (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (param $value f32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value f32.const 4 f32.eq ) - (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $value f64) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#findLastIndex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + (func $~lib/typedarray/Float64Array#findLastIndex (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) block $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 - local.get $3 + local.set $var$4 + local.get $var$3 call $~lib/typedarray/Float64Array#get:length i32.const 1 i32.sub - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 0 i32.ge_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 3 i32.shl i32.add f64.load - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $f64_i32_i32_=>_i32) if - local.get $5 + local.get $var$5 br $~lib/typedarray/FIND_LAST_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.sub - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const -1 end ) - (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayFindLastIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (param $value f64) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value f64.const 4 f64.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.extend8_s i32.const 2 i32.rem_s i32.const 0 i32.eq ) - (func $~lib/typedarray/Int8Array#every (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/typedarray/Int8Array#every (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Int8Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if block $for-continue|0 - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 0 i32.shl i32.add i32.load8_s - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if @@ -10020,24 +10020,24 @@ i32.const 0 br $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.extend8_s i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 255 i32.and i32.const 2 @@ -10045,45 +10045,45 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint8Array#every (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/typedarray/Uint8Array#every (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Uint8Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if block $for-continue|0 - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 0 i32.shl i32.add i32.load8_u - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if @@ -10092,25 +10092,25 @@ i32.const 0 br $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|1 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 255 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 255 i32.and i32.const 2 @@ -10118,45 +10118,45 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#every (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) + (func $~lib/typedarray/Uint8ClampedArray#every (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/EVERY<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Uint8ClampedArray#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if block $for-continue|0 - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 0 i32.shl i32.add i32.load8_u - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if @@ -10165,70 +10165,70 @@ i32.const 0 br $~lib/typedarray/EVERY<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 255 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.extend16_s i32.const 2 i32.rem_s i32.const 0 i32.eq ) - (func $~lib/typedarray/Int16Array#every (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/typedarray/Int16Array#every (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Int16Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if block $for-continue|0 - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 1 i32.shl i32.add i32.load16_s - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if @@ -10237,24 +10237,24 @@ i32.const 0 br $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|1 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.extend16_s i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 65535 i32.and i32.const 2 @@ -10262,45 +10262,45 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint16Array#every (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/typedarray/Uint16Array#every (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Uint16Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if block $for-continue|0 - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 1 i32.shl i32.add i32.load16_u - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if @@ -10309,69 +10309,69 @@ i32.const 0 br $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|1 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 2 i32.rem_s i32.const 0 i32.eq ) - (func $~lib/typedarray/Int32Array#every (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/typedarray/Int32Array#every (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Int32Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if block $for-continue|0 - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 2 i32.shl i32.add i32.load - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if @@ -10380,67 +10380,67 @@ i32.const 0 br $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|1 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|0 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 2 i32.rem_u i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint32Array#every (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) + (func $~lib/typedarray/Uint32Array#every (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/EVERY<~lib/typedarray/Uint32Array,u32>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Uint32Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if block $for-continue|0 - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 2 i32.shl i32.add i32.load - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_i32) if @@ -10449,67 +10449,67 @@ i32.const 0 br $~lib/typedarray/EVERY<~lib/typedarray/Uint32Array,u32>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|1 (param $value i32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $value i64) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i64.const 2 i64.rem_s i64.const 0 i64.eq ) - (func $~lib/typedarray/Int64Array#every (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) + (func $~lib/typedarray/Int64Array#every (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Int64Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if block $for-continue|0 - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 3 i32.shl i32.add i64.load - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i64_i32_i32_=>_i32) if @@ -10518,67 +10518,67 @@ i32.const 0 br $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|1 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|1 (param $value i64) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i64.const 2 i64.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $value i64) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i64.const 2 i64.rem_u i64.const 0 i64.eq ) - (func $~lib/typedarray/Uint64Array#every (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) + (func $~lib/typedarray/Uint64Array#every (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/EVERY<~lib/typedarray/Uint64Array,u64>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Uint64Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if block $for-continue|0 - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 3 i32.shl i32.add i64.load - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i64_i32_i32_=>_i32) if @@ -10587,318 +10587,318 @@ i32.const 0 br $~lib/typedarray/EVERY<~lib/typedarray/Uint64Array,u64>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|1 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|1 (param $value i64) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value i64.const 2 i64.eq ) - (func $~lib/math/NativeMathf.mod (param $0 f32) (param $1 f32) (result f32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 f32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/math/NativeMathf.mod (param $x f32) (param $y f32) (result f32) + (local $ux i32) + (local $uy i32) + (local $ex i32) + (local $ey i32) + (local $sm i32) + (local $uy1 i32) + (local $var$8 f32) + (local $ux1 i32) + (local $var$10 i32) + (local $shift i32) + local.get $y f32.abs f32.const 1 f32.eq if - local.get $0 - local.get $0 + local.get $x + local.get $x f32.trunc f32.sub - local.get $0 + local.get $x f32.copysign return end - local.get $0 + local.get $x i32.reinterpret_f32 - local.set $2 - local.get $1 + local.set $ux + local.get $y i32.reinterpret_f32 - local.set $3 - local.get $2 + local.set $uy + local.get $ux i32.const 23 i32.shr_u i32.const 255 i32.and - local.set $4 - local.get $3 + local.set $ex + local.get $uy i32.const 23 i32.shr_u i32.const 255 i32.and - local.set $5 - local.get $2 + local.set $ey + local.get $ux i32.const -2147483648 i32.and - local.set $6 - local.get $3 + local.set $sm + local.get $uy i32.const 1 i32.shl - local.set $7 - local.get $7 + local.set $uy1 + local.get $uy1 i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $4 + local.get $ex i32.const 255 i32.eq end if (result i32) i32.const 1 else - local.get $1 - local.get $1 + local.get $y + local.get $y f32.ne end if - local.get $0 - local.get $1 + local.get $x + local.get $y f32.mul - local.set $8 - local.get $8 - local.get $8 + local.set $var$8 + local.get $var$8 + local.get $var$8 f32.div return end - local.get $2 + local.get $ux i32.const 1 i32.shl - local.set $9 - local.get $9 - local.get $7 + local.set $ux1 + local.get $ux1 + local.get $uy1 i32.le_u if - local.get $0 - local.get $9 - local.get $7 + local.get $x + local.get $ux1 + local.get $uy1 i32.ne f32.convert_i32_u f32.mul return end - local.get $4 + local.get $ex i32.eqz if - local.get $4 - local.get $2 + local.get $ex + local.get $ux i32.const 9 i32.shl i32.clz i32.sub - local.set $4 - local.get $2 + local.set $ex + local.get $ux i32.const 1 - local.get $4 + local.get $ex i32.sub i32.shl - local.set $2 + local.set $ux else - local.get $2 + local.get $ux i32.const -1 i32.const 9 i32.shr_u i32.and - local.set $2 - local.get $2 + local.set $ux + local.get $ux i32.const 1 i32.const 23 i32.shl i32.or - local.set $2 + local.set $ux end - local.get $5 + local.get $ey i32.eqz if - local.get $5 - local.get $3 + local.get $ey + local.get $uy i32.const 9 i32.shl i32.clz i32.sub - local.set $5 - local.get $3 + local.set $ey + local.get $uy i32.const 1 - local.get $5 + local.get $ey i32.sub i32.shl - local.set $3 + local.set $uy else - local.get $3 + local.get $uy i32.const -1 i32.const 9 i32.shr_u i32.and - local.set $3 - local.get $3 + local.set $uy + local.get $uy i32.const 1 i32.const 23 i32.shl i32.or - local.set $3 + local.set $uy end loop $while-continue|0 - local.get $4 - local.get $5 + local.get $ex + local.get $ey i32.gt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $2 - local.get $3 + local.get $ux + local.get $uy i32.ge_u if - local.get $2 - local.get $3 + local.get $ux + local.get $uy i32.eq if f32.const 0 - local.get $0 + local.get $x f32.mul return end - local.get $2 - local.get $3 + local.get $ux + local.get $uy i32.sub - local.set $2 + local.set $ux end - local.get $2 + local.get $ux i32.const 1 i32.shl - local.set $2 - local.get $4 + local.set $ux + local.get $ex i32.const 1 i32.sub - local.set $4 + local.set $ex br $while-continue|0 end end - local.get $2 - local.get $3 + local.get $ux + local.get $uy i32.ge_u if - local.get $2 - local.get $3 + local.get $ux + local.get $uy i32.eq if f32.const 0 - local.get $0 + local.get $x f32.mul return end - local.get $2 - local.get $3 + local.get $ux + local.get $uy i32.sub - local.set $2 + local.set $ux end - local.get $2 + local.get $ux i32.const 8 i32.shl i32.clz - local.set $11 - local.get $4 - local.get $11 + local.set $shift + local.get $ex + local.get $shift i32.sub - local.set $4 - local.get $2 - local.get $11 + local.set $ex + local.get $ux + local.get $shift i32.shl - local.set $2 - local.get $4 + local.set $ux + local.get $ex i32.const 0 i32.gt_s if - local.get $2 + local.get $ux i32.const 1 i32.const 23 i32.shl i32.sub - local.set $2 - local.get $2 - local.get $4 + local.set $ux + local.get $ux + local.get $ex i32.const 23 i32.shl i32.or - local.set $2 + local.set $ux else - local.get $2 + local.get $ux i32.const 0 - local.get $4 + local.get $ex i32.sub i32.const 1 i32.add i32.shr_u - local.set $2 + local.set $ux end - local.get $2 - local.get $6 + local.get $ux + local.get $sm i32.or f32.reinterpret_i32 ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - f32.const 2 - call $~lib/math/NativeMathf.mod - f32.const 0 - f32.eq - ) - (func $~lib/typedarray/Float32Array#every (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $value f32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value + f32.const 2 + call $~lib/math/NativeMathf.mod + f32.const 0 + f32.eq + ) + (func $~lib/typedarray/Float32Array#every (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Float32Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if block $for-continue|0 - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 2 i32.shl i32.add f32.load - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $f32_i32_i32_=>_i32) if @@ -10907,324 +10907,324 @@ i32.const 0 br $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|1 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|1 (param $value f32) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value f32.const 2 f32.eq ) - (func $~lib/math/NativeMath.mod (param $0 f64) (param $1 f64) (result f64) - (local $2 i64) - (local $3 i64) - (local $4 i64) - (local $5 i64) - (local $6 i64) - (local $7 i64) - (local $8 f64) - (local $9 i64) - (local $10 i32) - (local $11 i64) - local.get $1 + (func $~lib/math/NativeMath.mod (param $x f64) (param $y f64) (result f64) + (local $ux i64) + (local $uy i64) + (local $ex i64) + (local $ey i64) + (local $sx i64) + (local $uy1 i64) + (local $var$8 f64) + (local $ux1 i64) + (local $var$10 i32) + (local $shift i64) + local.get $y f64.abs f64.const 1 f64.eq if - local.get $0 - local.get $0 + local.get $x + local.get $x f64.trunc f64.sub - local.get $0 + local.get $x f64.copysign return end - local.get $0 + local.get $x i64.reinterpret_f64 - local.set $2 - local.get $1 + local.set $ux + local.get $y i64.reinterpret_f64 - local.set $3 - local.get $2 + local.set $uy + local.get $ux i64.const 52 i64.shr_u i64.const 2047 i64.and - local.set $4 - local.get $3 + local.set $ex + local.get $uy i64.const 52 i64.shr_u i64.const 2047 i64.and - local.set $5 - local.get $2 + local.set $ey + local.get $ux i64.const 63 i64.shr_u - local.set $6 - local.get $3 + local.set $sx + local.get $uy i64.const 1 i64.shl - local.set $7 - local.get $7 + local.set $uy1 + local.get $uy1 i64.const 0 i64.eq if (result i32) i32.const 1 else - local.get $4 + local.get $ex i64.const 2047 i64.eq end if (result i32) i32.const 1 else - local.get $1 - local.get $1 + local.get $y + local.get $y f64.ne end if - local.get $0 - local.get $1 + local.get $x + local.get $y f64.mul - local.set $8 - local.get $8 - local.get $8 + local.set $var$8 + local.get $var$8 + local.get $var$8 f64.div return end - local.get $2 + local.get $ux i64.const 1 i64.shl - local.set $9 - local.get $9 - local.get $7 + local.set $ux1 + local.get $ux1 + local.get $uy1 i64.le_u if - local.get $0 - local.get $9 - local.get $7 + local.get $x + local.get $ux1 + local.get $uy1 i64.ne f64.convert_i32_u f64.mul return end - local.get $4 + local.get $ex i64.const 0 i64.ne i32.eqz if - local.get $4 - local.get $2 + local.get $ex + local.get $ux i64.const 12 i64.shl i64.clz i64.sub - local.set $4 - local.get $2 + local.set $ex + local.get $ux i64.const 1 - local.get $4 + local.get $ex i64.sub i64.shl - local.set $2 + local.set $ux else - local.get $2 + local.get $ux i64.const -1 i64.const 12 i64.shr_u i64.and - local.set $2 - local.get $2 + local.set $ux + local.get $ux i64.const 1 i64.const 52 i64.shl i64.or - local.set $2 + local.set $ux end - local.get $5 + local.get $ey i64.const 0 i64.ne i32.eqz if - local.get $5 - local.get $3 + local.get $ey + local.get $uy i64.const 12 i64.shl i64.clz i64.sub - local.set $5 - local.get $3 + local.set $ey + local.get $uy i64.const 1 - local.get $5 + local.get $ey i64.sub i64.shl - local.set $3 + local.set $uy else - local.get $3 + local.get $uy i64.const -1 i64.const 12 i64.shr_u i64.and - local.set $3 - local.get $3 + local.set $uy + local.get $uy i64.const 1 i64.const 52 i64.shl i64.or - local.set $3 + local.set $uy end loop $while-continue|0 - local.get $4 - local.get $5 + local.get $ex + local.get $ey i64.gt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $2 - local.get $3 + local.get $ux + local.get $uy i64.ge_u if - local.get $2 - local.get $3 + local.get $ux + local.get $uy i64.eq if f64.const 0 - local.get $0 + local.get $x f64.mul return end - local.get $2 - local.get $3 + local.get $ux + local.get $uy i64.sub - local.set $2 + local.set $ux end - local.get $2 + local.get $ux i64.const 1 i64.shl - local.set $2 - local.get $4 + local.set $ux + local.get $ex i64.const 1 i64.sub - local.set $4 + local.set $ex br $while-continue|0 end end - local.get $2 - local.get $3 + local.get $ux + local.get $uy i64.ge_u if - local.get $2 - local.get $3 + local.get $ux + local.get $uy i64.eq if f64.const 0 - local.get $0 + local.get $x f64.mul return end - local.get $2 - local.get $3 + local.get $ux + local.get $uy i64.sub - local.set $2 + local.set $ux end - local.get $2 + local.get $ux i64.const 11 i64.shl i64.clz - local.set $11 - local.get $4 - local.get $11 + local.set $shift + local.get $ex + local.get $shift i64.sub - local.set $4 - local.get $2 - local.get $11 + local.set $ex + local.get $ux + local.get $shift i64.shl - local.set $2 - local.get $4 + local.set $ux + local.get $ex i64.const 0 i64.gt_s if - local.get $2 + local.get $ux i64.const 1 i64.const 52 i64.shl i64.sub - local.set $2 - local.get $2 - local.get $4 + local.set $ux + local.get $ux + local.get $ex i64.const 52 i64.shl i64.or - local.set $2 + local.set $ux else - local.get $2 + local.get $ux i64.const 0 - local.get $4 + local.get $ex i64.sub i64.const 1 i64.add i64.shr_u - local.set $2 + local.set $ux end - local.get $2 - local.get $6 + local.get $ux + local.get $sx i64.const 63 i64.shl i64.or f64.reinterpret_i64 ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $value f64) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value f64.const 2 call $~lib/math/NativeMath.mod f64.const 0 f64.eq ) - (func $~lib/typedarray/Float64Array#every (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/typedarray/Float64Array#every (param $this i32) (param $fn i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) block $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Float64Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if block $for-continue|0 - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 3 i32.shl i32.add f64.load - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $f64_i32_i32_=>_i32) if @@ -11233,561 +11233,561 @@ i32.const 0 br $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64>|inlined.0 end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|1 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|1 (param $value f64) (param $$1 i32) (param $$2 i32) (result i32) + local.get $value f64.const 2 f64.eq ) - (func $~lib/typedarray/Int8Array#forEach (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + (func $~lib/typedarray/Int8Array#forEach (param $this i32) (param $fn i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Int8Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 0 i32.shl i32.add i32.load8_s - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_none) - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint8Array#forEach (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + (func $~lib/typedarray/Uint8Array#forEach (param $this i32) (param $fn i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Uint8Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 0 i32.shl i32.add i32.load8_u - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_none) - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint8ClampedArray#forEach (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + (func $~lib/typedarray/Uint8ClampedArray#forEach (param $this i32) (param $fn i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Uint8ClampedArray#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 0 i32.shl i32.add i32.load8_u - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_none) - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end ) - (func $~lib/typedarray/Int16Array#forEach (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + (func $~lib/typedarray/Int16Array#forEach (param $this i32) (param $fn i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Int16Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 1 i32.shl i32.add i32.load16_s - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_none) - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint16Array#forEach (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + (func $~lib/typedarray/Uint16Array#forEach (param $this i32) (param $fn i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Uint16Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 1 i32.shl i32.add i32.load16_u - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_none) - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end ) - (func $~lib/typedarray/Int32Array#forEach (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + (func $~lib/typedarray/Int32Array#forEach (param $this i32) (param $fn i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Int32Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 2 i32.shl i32.add i32.load - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_none) - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint32Array#forEach (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + (func $~lib/typedarray/Uint32Array#forEach (param $this i32) (param $fn i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Uint32Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 2 i32.shl i32.add i32.load - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i32_i32_i32_=>_none) - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end ) - (func $~lib/typedarray/Int64Array#forEach (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + (func $~lib/typedarray/Int64Array#forEach (param $this i32) (param $fn i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Int64Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 3 i32.shl i32.add i64.load - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i64_i32_i32_=>_none) - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint64Array#forEach (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + (func $~lib/typedarray/Uint64Array#forEach (param $this i32) (param $fn i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Uint64Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 3 i32.shl i32.add i64.load - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $i64_i32_i32_=>_none) - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end ) - (func $~lib/typedarray/Float32Array#forEach (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + (func $~lib/typedarray/Float32Array#forEach (param $this i32) (param $fn i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Float32Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 2 i32.shl i32.add f32.load - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $f32_i32_i32_=>_none) - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end ) - (func $~lib/typedarray/Float64Array#forEach (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $0 - local.set $3 - local.get $1 - local.set $2 - local.get $3 + (func $~lib/typedarray/Float64Array#forEach (param $this i32) (param $fn i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + local.get $this + local.set $var$3 + local.get $fn + local.set $var$2 + local.get $var$3 i32.load offset=4 - local.set $4 + local.set $var$4 i32.const 0 - local.set $5 - local.get $3 + local.set $var$5 + local.get $var$3 call $~lib/typedarray/Float64Array#get:length - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $5 - local.get $6 + local.get $var$5 + local.get $var$6 i32.lt_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $4 - local.get $5 + local.get $var$4 + local.get $var$5 i32.const 3 i32.shl i32.add f64.load - local.get $5 - local.get $3 + local.get $var$5 + local.get $var$3 i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $var$2 i32.load call_indirect $0 (type $f64_i32_i32_=>_none) - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end ) - (func $~lib/util/bytes/REVERSE (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i64) - (local $11 i32) - (local $12 i32) - (local $13 i32) - local.get $1 + (func $~lib/util/bytes/REVERSE (param $ptr i32) (param $len i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $front i32) + (local $back i32) + (local $temp i64) + (local $var$9 i64) + (local $var$10 i64) + (local $front_0 i32) + (local $back_0 i32) + (local $temp_0 i32) + local.get $len i32.const 1 i32.gt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $var$2 + local.get $len i32.const 1 i32.shr_u - local.set $4 + local.set $var$4 i32.const 0 i32.const 1 i32.lt_s @@ -11796,48 +11796,48 @@ i32.const 1 i32.eq drop - local.get $1 + local.get $len i32.const 8 i32.sub - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 + local.get $var$2 i32.const 7 i32.add - local.get $4 + local.get $var$4 i32.lt_u - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $0 - local.get $2 + local.get $ptr + local.get $var$2 i32.add - local.set $6 - local.get $0 - local.get $3 + local.set $front + local.get $ptr + local.get $var$3 i32.add - local.get $2 + local.get $var$2 i32.sub - local.set $7 - local.get $6 + local.set $back + local.get $front i64.load - local.tee $8 + local.tee $temp i64.const 8 i64.shr_u i64.const 71777214294589695 i64.and - local.get $8 + local.get $temp i64.const 71777214294589695 i64.and i64.const 8 i64.shl i64.or - local.tee $9 + local.tee $var$9 i64.const 16 i64.shr_u i64.const 281470681808895 i64.and - local.get $9 + local.get $var$9 i64.const 281470681808895 i64.and i64.const 16 @@ -11845,27 +11845,27 @@ i64.or i64.const 32 i64.rotr - local.set $8 - local.get $6 - local.get $7 + local.set $temp + local.get $front + local.get $back i64.load - local.tee $9 + local.tee $var$9 i64.const 8 i64.shr_u i64.const 71777214294589695 i64.and - local.get $9 + local.get $var$9 i64.const 71777214294589695 i64.and i64.const 8 i64.shl i64.or - local.tee $10 + local.tee $var$10 i64.const 16 i64.shr_u i64.const 281470681808895 i64.and - local.get $10 + local.get $var$10 i64.const 281470681808895 i64.and i64.const 16 @@ -11874,13 +11874,13 @@ i64.const 32 i64.rotr i64.store - local.get $7 - local.get $8 + local.get $back + local.get $temp i64.store - local.get $2 + local.get $var$2 i32.const 8 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end @@ -11888,95 +11888,95 @@ i32.const 2 i32.eq drop - local.get $1 + local.get $len i32.const 1 i32.sub - local.set $3 + local.set $var$3 loop $while-continue|1 - local.get $2 - local.get $4 + local.get $var$2 + local.get $var$4 i32.lt_u - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $0 - local.get $2 + local.get $ptr + local.get $var$2 i32.const 0 i32.shl i32.add - local.set $11 - local.get $0 - local.get $3 - local.get $2 + local.set $front_0 + local.get $ptr + local.get $var$3 + local.get $var$2 i32.sub i32.const 0 i32.shl i32.add - local.set $12 - local.get $11 + local.set $back_0 + local.get $front_0 i32.load8_u - local.set $13 - local.get $11 - local.get $12 + local.set $temp_0 + local.get $front_0 + local.get $back_0 i32.load8_u i32.store8 - local.get $12 - local.get $13 + local.get $back_0 + local.get $temp_0 i32.store8 - local.get $2 + local.get $var$2 i32.const 1 i32.add - local.set $2 + local.set $var$2 br $while-continue|1 end end end ) - (func $~lib/typedarray/Int8Array#reverse (param $0 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Int8Array#reverse (param $this i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Int8Array#get:length call $~lib/util/bytes/REVERSE - local.get $0 + local.get $this ) - (func $~lib/typedarray/Uint8Array#reverse (param $0 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Uint8Array#reverse (param $this i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Uint8Array#get:length call $~lib/util/bytes/REVERSE - local.get $0 + local.get $this ) - (func $~lib/typedarray/Uint8ClampedArray#reverse (param $0 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Uint8ClampedArray#reverse (param $this i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Uint8ClampedArray#get:length call $~lib/util/bytes/REVERSE - local.get $0 - ) - (func $~lib/util/bytes/REVERSE (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + local.get $this + ) + (func $~lib/util/bytes/REVERSE (param $ptr i32) (param $len i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $front i32) + (local $back i32) + (local $temp i32) + (local $front_0 i32) + (local $back_0 i32) + (local $temp_0 i32) + local.get $len i32.const 1 i32.gt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $var$2 + local.get $len i32.const 1 i32.shr_u - local.set $4 + local.set $var$4 i32.const 0 i32.const 1 i32.lt_s @@ -11989,132 +11989,132 @@ i32.const 2 i32.eq drop - local.get $1 + local.get $len i32.const 2 i32.sub - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 + local.get $var$2 i32.const 1 i32.add - local.get $4 + local.get $var$4 i32.lt_u - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $0 - local.get $2 + local.get $ptr + local.get $var$2 i32.const 1 i32.shl i32.add - local.set $6 - local.get $0 - local.get $3 - local.get $2 + local.set $front + local.get $ptr + local.get $var$3 + local.get $var$2 i32.sub i32.const 1 i32.shl i32.add - local.set $7 - local.get $7 + local.set $back + local.get $back i32.load i32.const 16 i32.rotr - local.set $8 - local.get $7 - local.get $6 + local.set $temp + local.get $back + local.get $front i32.load i32.const 16 i32.rotr i32.store - local.get $6 - local.get $8 + local.get $front + local.get $temp i32.store - local.get $2 + local.get $var$2 i32.const 2 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end - local.get $1 + local.get $len i32.const 1 i32.sub - local.set $3 + local.set $var$3 loop $while-continue|1 - local.get $2 - local.get $4 + local.get $var$2 + local.get $var$4 i32.lt_u - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $0 - local.get $2 + local.get $ptr + local.get $var$2 i32.const 1 i32.shl i32.add - local.set $9 - local.get $0 - local.get $3 - local.get $2 + local.set $front_0 + local.get $ptr + local.get $var$3 + local.get $var$2 i32.sub i32.const 1 i32.shl i32.add - local.set $10 - local.get $9 + local.set $back_0 + local.get $front_0 i32.load16_u - local.set $11 - local.get $9 - local.get $10 + local.set $temp_0 + local.get $front_0 + local.get $back_0 i32.load16_u i32.store16 - local.get $10 - local.get $11 + local.get $back_0 + local.get $temp_0 i32.store16 - local.get $2 + local.get $var$2 i32.const 1 i32.add - local.set $2 + local.set $var$2 br $while-continue|1 end end end ) - (func $~lib/typedarray/Int16Array#reverse (param $0 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Int16Array#reverse (param $this i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Int16Array#get:length call $~lib/util/bytes/REVERSE - local.get $0 + local.get $this ) - (func $~lib/typedarray/Uint16Array#reverse (param $0 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Uint16Array#reverse (param $this i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Uint16Array#get:length call $~lib/util/bytes/REVERSE - local.get $0 - ) - (func $~lib/util/bytes/REVERSE (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $1 + local.get $this + ) + (func $~lib/util/bytes/REVERSE (param $ptr i32) (param $len i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $front i32) + (local $back i32) + (local $temp i32) + local.get $len i32.const 1 i32.gt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $var$2 + local.get $len i32.const 1 i32.shr_u - local.set $4 + local.set $var$4 i32.const 0 i32.const 1 i32.lt_s @@ -12127,84 +12127,84 @@ i32.const 2 i32.eq drop - local.get $1 + local.get $len i32.const 1 i32.sub - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $4 + local.get $var$2 + local.get $var$4 i32.lt_u - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $0 - local.get $2 + local.get $ptr + local.get $var$2 i32.const 2 i32.shl i32.add - local.set $6 - local.get $0 - local.get $3 - local.get $2 + local.set $front + local.get $ptr + local.get $var$3 + local.get $var$2 i32.sub i32.const 2 i32.shl i32.add - local.set $7 - local.get $6 + local.set $back + local.get $front i32.load - local.set $8 - local.get $6 - local.get $7 + local.set $temp + local.get $front + local.get $back i32.load i32.store - local.get $7 - local.get $8 + local.get $back + local.get $temp i32.store - local.get $2 + local.get $var$2 i32.const 1 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end end ) - (func $~lib/typedarray/Int32Array#reverse (param $0 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Int32Array#reverse (param $this i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Int32Array#get:length call $~lib/util/bytes/REVERSE - local.get $0 + local.get $this ) - (func $~lib/typedarray/Uint32Array#reverse (param $0 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Uint32Array#reverse (param $this i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Uint32Array#get:length call $~lib/util/bytes/REVERSE - local.get $0 - ) - (func $~lib/util/bytes/REVERSE (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i64) - local.get $1 + local.get $this + ) + (func $~lib/util/bytes/REVERSE (param $ptr i32) (param $len i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $front i32) + (local $back i32) + (local $temp i64) + local.get $len i32.const 1 i32.gt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $var$2 + local.get $len i32.const 1 i32.shr_u - local.set $4 + local.set $var$4 i32.const 0 i32.const 1 i32.lt_s @@ -12217,84 +12217,84 @@ i32.const 2 i32.eq drop - local.get $1 + local.get $len i32.const 1 i32.sub - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $4 + local.get $var$2 + local.get $var$4 i32.lt_u - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $0 - local.get $2 + local.get $ptr + local.get $var$2 i32.const 3 i32.shl i32.add - local.set $6 - local.get $0 - local.get $3 - local.get $2 + local.set $front + local.get $ptr + local.get $var$3 + local.get $var$2 i32.sub i32.const 3 i32.shl i32.add - local.set $7 - local.get $6 + local.set $back + local.get $front i64.load - local.set $8 - local.get $6 - local.get $7 + local.set $temp + local.get $front + local.get $back i64.load i64.store - local.get $7 - local.get $8 + local.get $back + local.get $temp i64.store - local.get $2 + local.get $var$2 i32.const 1 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end end ) - (func $~lib/typedarray/Int64Array#reverse (param $0 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Int64Array#reverse (param $this i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Int64Array#get:length call $~lib/util/bytes/REVERSE - local.get $0 + local.get $this ) - (func $~lib/typedarray/Uint64Array#reverse (param $0 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Uint64Array#reverse (param $this i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Uint64Array#get:length call $~lib/util/bytes/REVERSE - local.get $0 - ) - (func $~lib/util/bytes/REVERSE (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 f32) - local.get $1 + local.get $this + ) + (func $~lib/util/bytes/REVERSE (param $ptr i32) (param $len i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $front i32) + (local $back i32) + (local $temp f32) + local.get $len i32.const 1 i32.gt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $var$2 + local.get $len i32.const 1 i32.shr_u - local.set $4 + local.set $var$4 i32.const 0 i32.const 1 i32.lt_s @@ -12307,76 +12307,76 @@ i32.const 2 i32.eq drop - local.get $1 + local.get $len i32.const 1 i32.sub - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $4 + local.get $var$2 + local.get $var$4 i32.lt_u - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $0 - local.get $2 + local.get $ptr + local.get $var$2 i32.const 2 i32.shl i32.add - local.set $6 - local.get $0 - local.get $3 - local.get $2 + local.set $front + local.get $ptr + local.get $var$3 + local.get $var$2 i32.sub i32.const 2 i32.shl i32.add - local.set $7 - local.get $6 + local.set $back + local.get $front f32.load - local.set $8 - local.get $6 - local.get $7 + local.set $temp + local.get $front + local.get $back f32.load f32.store - local.get $7 - local.get $8 + local.get $back + local.get $temp f32.store - local.get $2 + local.get $var$2 i32.const 1 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end end ) - (func $~lib/typedarray/Float32Array#reverse (param $0 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Float32Array#reverse (param $this i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Float32Array#get:length call $~lib/util/bytes/REVERSE - local.get $0 - ) - (func $~lib/util/bytes/REVERSE (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 f64) - local.get $1 + local.get $this + ) + (func $~lib/util/bytes/REVERSE (param $ptr i32) (param $len i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $front i32) + (local $back i32) + (local $temp f64) + local.get $len i32.const 1 i32.gt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $var$2 + local.get $len i32.const 1 i32.shr_u - local.set $4 + local.set $var$4 i32.const 0 i32.const 1 i32.lt_s @@ -12389,221 +12389,221 @@ i32.const 2 i32.eq drop - local.get $1 + local.get $len i32.const 1 i32.sub - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $4 + local.get $var$2 + local.get $var$4 i32.lt_u - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $0 - local.get $2 + local.get $ptr + local.get $var$2 i32.const 3 i32.shl i32.add - local.set $6 - local.get $0 - local.get $3 - local.get $2 + local.set $front + local.get $ptr + local.get $var$3 + local.get $var$2 i32.sub i32.const 3 i32.shl i32.add - local.set $7 - local.get $6 + local.set $back + local.get $front f64.load - local.set $8 - local.get $6 - local.get $7 + local.set $temp + local.get $front + local.get $back f64.load f64.store - local.get $7 - local.get $8 + local.get $back + local.get $temp f64.store - local.get $2 + local.get $var$2 i32.const 1 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end end ) - (func $~lib/typedarray/Float64Array#reverse (param $0 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Float64Array#reverse (param $this i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Float64Array#get:length call $~lib/util/bytes/REVERSE - local.get $0 - ) - (func $~lib/typedarray/Int8Array#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 $7 i32) - (local $8 i32) - (local $9 i32) + local.get $this + ) + (func $~lib/typedarray/Int8Array#indexOf (param $this i32) (param $searchElement i32) (param $fromIndex i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 (result i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $3 - local.set $6 - local.get $5 + local.get $this + local.set $var$5 + local.get $searchElement + local.set $var$4 + local.get $fromIndex + local.set $var$3 + local.get $var$3 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Int8Array#get:length - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.ge_s end if i32.const -1 br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 0 i32.lt_s if - local.get $7 - local.get $6 + local.get $var$7 + local.get $var$6 i32.add - local.tee $8 + local.tee $var$8 i32.const 0 - local.tee $9 - local.get $8 - local.get $9 + local.tee $var$9 + local.get $var$8 + local.get $var$9 i32.gt_s select - local.set $6 + local.set $var$6 end - local.get $5 + local.get $var$5 i32.load offset=4 - local.set $8 + local.set $var$8 loop $while-continue|0 - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $8 - local.get $6 + local.get $var$8 + local.get $var$6 i32.const 0 i32.shl i32.add i32.load8_s - local.get $4 + local.get $var$4 i32.extend8_s i32.eq if - local.get $6 + local.get $var$6 br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 1 i32.add - local.set $6 + local.set $var$6 br $while-continue|0 end end i32.const -1 end ) - (func $~lib/typedarray/Int8Array#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 $7 i32) - (local $8 i32) - (local $9 i32) + (func $~lib/typedarray/Int8Array#lastIndexOf (param $this i32) (param $searchElement i32) (param $fromIndex i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 (result i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $3 - local.set $6 - local.get $5 + local.get $this + local.set $var$5 + local.get $searchElement + local.set $var$4 + local.get $fromIndex + local.set $var$3 + local.get $var$3 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Int8Array#get:length - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 i32.const 0 i32.eq if i32.const -1 br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 0 i32.lt_s if - local.get $7 - local.get $6 + local.get $var$7 + local.get $var$6 i32.add - local.set $6 + local.set $var$6 else - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.ge_s if - local.get $7 + local.get $var$7 i32.const 1 i32.sub - local.set $6 + local.set $var$6 end end - local.get $5 + local.get $var$5 i32.load offset=4 - local.set $8 + local.set $var$8 loop $while-continue|0 - local.get $6 + local.get $var$6 i32.const 0 i32.ge_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $8 - local.get $6 + local.get $var$8 + local.get $var$6 i32.const 0 i32.shl i32.add i32.load8_s - local.get $4 + local.get $var$4 i32.extend8_s i32.eq if - local.get $6 + local.get $var$6 br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 1 i32.sub - local.set $6 + local.set $var$6 br $while-continue|0 end end i32.const -1 end ) - (func $~lib/typedarray/Int8Array#lastIndexOf@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#lastIndexOf@varargs (param $this i32) (param $searchElement i32) (param $fromIndex i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -12614,22 +12614,22 @@ end unreachable end - local.get $0 + local.get $this call $~lib/typedarray/Int8Array#get:length - local.set $2 + local.set $fromIndex end - local.get $0 - local.get $1 - local.get $2 + local.get $this + local.get $searchElement + local.get $fromIndex call $~lib/typedarray/Int8Array#lastIndexOf ) (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int8Array,i8> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (local $values i32) + (local $length i32) + (local $array i32) + (local $var$3 i32) + (local $var$4 i32) + (local $sliced i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -12643,41 +12643,41 @@ i32.store offset=8 global.get $~lib/memory/__stack_pointer global.get $std/typedarray/testArrayIndexOfAndLastIndexOfValues - local.tee $0 + local.tee $values i32.store - local.get $0 + local.get $values call $~lib/array/Array#get:length - local.set $1 + local.set $length global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $1 + local.get $length call $~lib/typedarray/Int8Array#constructor - local.tee $2 + local.tee $array i32.store offset=4 i32.const 0 - local.set $3 + local.set $var$3 loop $for-loop|0 - local.get $3 - local.get $1 + local.get $var$3 + local.get $length i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 - local.get $3 - local.get $0 - local.get $3 + local.get $array + local.get $var$3 + local.get $values + local.get $var$3 call $~lib/array/Array#__get i32.extend8_s call $~lib/typedarray/Int8Array#__set - local.get $3 + local.get $var$3 i32.const 1 i32.add - local.set $3 + local.set $var$3 br $for-loop|0 end end - local.get $2 + local.get $array i32.const 0 i32.const 0 call $~lib/typedarray/Int8Array#indexOf @@ -12692,7 +12692,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 11 i32.const 0 call $~lib/typedarray/Int8Array#indexOf @@ -12707,7 +12707,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const -1 i32.const 0 call $~lib/typedarray/Int8Array#indexOf @@ -12722,7 +12722,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 0 call $~lib/typedarray/Int8Array#indexOf @@ -12737,7 +12737,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 2 call $~lib/typedarray/Int8Array#indexOf @@ -12752,7 +12752,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 3 call $~lib/typedarray/Int8Array#indexOf @@ -12767,7 +12767,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 4 call $~lib/typedarray/Int8Array#indexOf @@ -12782,7 +12782,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const 10 call $~lib/typedarray/Int8Array#indexOf @@ -12797,7 +12797,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const -100 call $~lib/typedarray/Int8Array#indexOf @@ -12812,7 +12812,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 0 i32.const 1 global.set $~argumentsLength @@ -12829,7 +12829,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 11 i32.const 1 global.set $~argumentsLength @@ -12846,7 +12846,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const -1 i32.const 1 global.set $~argumentsLength @@ -12863,7 +12863,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 1 global.set $~argumentsLength @@ -12880,7 +12880,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 4 call $~lib/typedarray/Int8Array#lastIndexOf @@ -12895,7 +12895,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 3 call $~lib/typedarray/Int8Array#lastIndexOf @@ -12910,7 +12910,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 2 call $~lib/typedarray/Int8Array#lastIndexOf @@ -12925,7 +12925,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const 100 call $~lib/typedarray/Int8Array#lastIndexOf @@ -12940,7 +12940,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const -10 call $~lib/typedarray/Int8Array#lastIndexOf @@ -12955,7 +12955,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const -11 call $~lib/typedarray/Int8Array#lastIndexOf @@ -12971,13 +12971,13 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $2 + local.get $array i32.const 4 i32.const 9 call $~lib/typedarray/Int8Array#subarray - local.tee $5 + local.tee $sliced i32.store offset=8 - local.get $5 + local.get $sliced i32.const 3 i32.const 0 call $~lib/typedarray/Int8Array#indexOf @@ -12992,7 +12992,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 4 i32.const 0 call $~lib/typedarray/Int8Array#indexOf @@ -13009,7 +13009,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 5 i32.const 0 call $~lib/typedarray/Int8Array#indexOf @@ -13026,7 +13026,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 9 i32.const 0 call $~lib/typedarray/Int8Array#indexOf @@ -13041,7 +13041,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 10 i32.const 0 call $~lib/typedarray/Int8Array#indexOf @@ -13056,7 +13056,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 11 i32.const 0 call $~lib/typedarray/Int8Array#indexOf @@ -13071,7 +13071,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 5 i32.const 1 call $~lib/typedarray/Int8Array#indexOf @@ -13088,7 +13088,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 5 i32.const 2 call $~lib/typedarray/Int8Array#indexOf @@ -13108,171 +13108,171 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/typedarray/Uint8Array#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 $7 i32) - (local $8 i32) - (local $9 i32) + (func $~lib/typedarray/Uint8Array#indexOf (param $this i32) (param $searchElement i32) (param $fromIndex i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.0 (result i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $3 - local.set $6 - local.get $5 + local.get $this + local.set $var$5 + local.get $searchElement + local.set $var$4 + local.get $fromIndex + local.set $var$3 + local.get $var$3 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Uint8Array#get:length - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.ge_s end if i32.const -1 br $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 0 i32.lt_s if - local.get $7 - local.get $6 + local.get $var$7 + local.get $var$6 i32.add - local.tee $8 + local.tee $var$8 i32.const 0 - local.tee $9 - local.get $8 - local.get $9 + local.tee $var$9 + local.get $var$8 + local.get $var$9 i32.gt_s select - local.set $6 + local.set $var$6 end - local.get $5 + local.get $var$5 i32.load offset=4 - local.set $8 + local.set $var$8 loop $while-continue|0 - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $8 - local.get $6 + local.get $var$8 + local.get $var$6 i32.const 0 i32.shl i32.add i32.load8_u - local.get $4 + local.get $var$4 i32.const 255 i32.and i32.eq if - local.get $6 + local.get $var$6 br $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 1 i32.add - local.set $6 + local.set $var$6 br $while-continue|0 end end i32.const -1 end ) - (func $~lib/typedarray/Uint8Array#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 $7 i32) - (local $8 i32) - (local $9 i32) + (func $~lib/typedarray/Uint8Array#lastIndexOf (param $this i32) (param $searchElement i32) (param $fromIndex i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.0 (result i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $3 - local.set $6 - local.get $5 + local.get $this + local.set $var$5 + local.get $searchElement + local.set $var$4 + local.get $fromIndex + local.set $var$3 + local.get $var$3 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Uint8Array#get:length - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 i32.const 0 i32.eq if i32.const -1 br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 0 i32.lt_s if - local.get $7 - local.get $6 + local.get $var$7 + local.get $var$6 i32.add - local.set $6 + local.set $var$6 else - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.ge_s if - local.get $7 + local.get $var$7 i32.const 1 i32.sub - local.set $6 + local.set $var$6 end end - local.get $5 + local.get $var$5 i32.load offset=4 - local.set $8 + local.set $var$8 loop $while-continue|0 - local.get $6 + local.get $var$6 i32.const 0 i32.ge_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $8 - local.get $6 + local.get $var$8 + local.get $var$6 i32.const 0 i32.shl i32.add i32.load8_u - local.get $4 + local.get $var$4 i32.const 255 i32.and i32.eq if - local.get $6 + local.get $var$6 br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8Array,u8>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 1 i32.sub - local.set $6 + local.set $var$6 br $while-continue|0 end end i32.const -1 end ) - (func $~lib/typedarray/Uint8Array#lastIndexOf@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#lastIndexOf@varargs (param $this i32) (param $searchElement i32) (param $fromIndex i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -13283,22 +13283,22 @@ end unreachable end - local.get $0 + local.get $this call $~lib/typedarray/Uint8Array#get:length - local.set $2 + local.set $fromIndex end - local.get $0 - local.get $1 - local.get $2 + local.get $this + local.get $searchElement + local.get $fromIndex call $~lib/typedarray/Uint8Array#lastIndexOf ) (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (local $values i32) + (local $length i32) + (local $array i32) + (local $var$3 i32) + (local $var$4 i32) + (local $sliced i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -13312,42 +13312,42 @@ i32.store offset=8 global.get $~lib/memory/__stack_pointer global.get $std/typedarray/testArrayIndexOfAndLastIndexOfValues - local.tee $0 + local.tee $values i32.store - local.get $0 + local.get $values call $~lib/array/Array#get:length - local.set $1 + local.set $length global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $1 + local.get $length call $~lib/typedarray/Uint8Array#constructor - local.tee $2 + local.tee $array i32.store offset=4 i32.const 0 - local.set $3 + local.set $var$3 loop $for-loop|0 - local.get $3 - local.get $1 + local.get $var$3 + local.get $length i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 - local.get $3 - local.get $0 - local.get $3 + local.get $array + local.get $var$3 + local.get $values + local.get $var$3 call $~lib/array/Array#__get i32.const 255 i32.and call $~lib/typedarray/Uint8Array#__set - local.get $3 + local.get $var$3 i32.const 1 i32.add - local.set $3 + local.set $var$3 br $for-loop|0 end end - local.get $2 + local.get $array i32.const 0 i32.const 0 call $~lib/typedarray/Uint8Array#indexOf @@ -13362,7 +13362,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 11 i32.const 0 call $~lib/typedarray/Uint8Array#indexOf @@ -13377,7 +13377,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const -1 i32.const 0 call $~lib/typedarray/Uint8Array#indexOf @@ -13392,7 +13392,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 0 call $~lib/typedarray/Uint8Array#indexOf @@ -13407,7 +13407,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 2 call $~lib/typedarray/Uint8Array#indexOf @@ -13422,7 +13422,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 3 call $~lib/typedarray/Uint8Array#indexOf @@ -13437,7 +13437,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 4 call $~lib/typedarray/Uint8Array#indexOf @@ -13452,7 +13452,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const 10 call $~lib/typedarray/Uint8Array#indexOf @@ -13467,7 +13467,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const -100 call $~lib/typedarray/Uint8Array#indexOf @@ -13482,7 +13482,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 0 i32.const 1 global.set $~argumentsLength @@ -13499,7 +13499,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 11 i32.const 1 global.set $~argumentsLength @@ -13516,7 +13516,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const -1 i32.const 1 global.set $~argumentsLength @@ -13533,7 +13533,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 1 global.set $~argumentsLength @@ -13550,7 +13550,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 4 call $~lib/typedarray/Uint8Array#lastIndexOf @@ -13565,7 +13565,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 3 call $~lib/typedarray/Uint8Array#lastIndexOf @@ -13580,7 +13580,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 2 call $~lib/typedarray/Uint8Array#lastIndexOf @@ -13595,7 +13595,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const 100 call $~lib/typedarray/Uint8Array#lastIndexOf @@ -13610,7 +13610,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const -10 call $~lib/typedarray/Uint8Array#lastIndexOf @@ -13625,7 +13625,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const -11 call $~lib/typedarray/Uint8Array#lastIndexOf @@ -13641,13 +13641,13 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $2 + local.get $array i32.const 4 i32.const 9 call $~lib/typedarray/Uint8Array#subarray - local.tee $5 + local.tee $sliced i32.store offset=8 - local.get $5 + local.get $sliced i32.const 3 i32.const 0 call $~lib/typedarray/Uint8Array#indexOf @@ -13662,7 +13662,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 4 i32.const 0 call $~lib/typedarray/Uint8Array#indexOf @@ -13679,7 +13679,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 5 i32.const 0 call $~lib/typedarray/Uint8Array#indexOf @@ -13696,7 +13696,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 9 i32.const 0 call $~lib/typedarray/Uint8Array#indexOf @@ -13711,7 +13711,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 10 i32.const 0 call $~lib/typedarray/Uint8Array#indexOf @@ -13726,7 +13726,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 11 i32.const 0 call $~lib/typedarray/Uint8Array#indexOf @@ -13741,7 +13741,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 5 i32.const 1 call $~lib/typedarray/Uint8Array#indexOf @@ -13758,7 +13758,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 5 i32.const 2 call $~lib/typedarray/Uint8Array#indexOf @@ -13778,171 +13778,171 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/typedarray/Uint8ClampedArray#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 $7 i32) - (local $8 i32) - (local $9 i32) + (func $~lib/typedarray/Uint8ClampedArray#indexOf (param $this i32) (param $searchElement i32) (param $fromIndex i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 (result i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $3 - local.set $6 - local.get $5 + local.get $this + local.set $var$5 + local.get $searchElement + local.set $var$4 + local.get $fromIndex + local.set $var$3 + local.get $var$3 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Uint8ClampedArray#get:length - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.ge_s end if i32.const -1 br $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 0 i32.lt_s if - local.get $7 - local.get $6 + local.get $var$7 + local.get $var$6 i32.add - local.tee $8 + local.tee $var$8 i32.const 0 - local.tee $9 - local.get $8 - local.get $9 + local.tee $var$9 + local.get $var$8 + local.get $var$9 i32.gt_s select - local.set $6 + local.set $var$6 end - local.get $5 + local.get $var$5 i32.load offset=4 - local.set $8 + local.set $var$8 loop $while-continue|0 - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $8 - local.get $6 + local.get $var$8 + local.get $var$6 i32.const 0 i32.shl i32.add i32.load8_u - local.get $4 + local.get $var$4 i32.const 255 i32.and i32.eq if - local.get $6 + local.get $var$6 br $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 1 i32.add - local.set $6 + local.set $var$6 br $while-continue|0 end end i32.const -1 end ) - (func $~lib/typedarray/Uint8ClampedArray#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 $7 i32) - (local $8 i32) - (local $9 i32) + (func $~lib/typedarray/Uint8ClampedArray#lastIndexOf (param $this i32) (param $searchElement i32) (param $fromIndex i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 (result i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $3 - local.set $6 - local.get $5 + local.get $this + local.set $var$5 + local.get $searchElement + local.set $var$4 + local.get $fromIndex + local.set $var$3 + local.get $var$3 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Uint8ClampedArray#get:length - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 i32.const 0 i32.eq if i32.const -1 br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 0 i32.lt_s if - local.get $7 - local.get $6 + local.get $var$7 + local.get $var$6 i32.add - local.set $6 + local.set $var$6 else - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.ge_s if - local.get $7 + local.get $var$7 i32.const 1 i32.sub - local.set $6 + local.set $var$6 end end - local.get $5 + local.get $var$5 i32.load offset=4 - local.set $8 + local.set $var$8 loop $while-continue|0 - local.get $6 + local.get $var$6 i32.const 0 i32.ge_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $8 - local.get $6 + local.get $var$8 + local.get $var$6 i32.const 0 i32.shl i32.add i32.load8_u - local.get $4 + local.get $var$4 i32.const 255 i32.and i32.eq if - local.get $6 + local.get $var$6 br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 1 i32.sub - local.set $6 + local.set $var$6 br $while-continue|0 end end i32.const -1 end ) - (func $~lib/typedarray/Uint8ClampedArray#lastIndexOf@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#lastIndexOf@varargs (param $this i32) (param $searchElement i32) (param $fromIndex i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -13953,22 +13953,22 @@ end unreachable end - local.get $0 + local.get $this call $~lib/typedarray/Uint8ClampedArray#get:length - local.set $2 + local.set $fromIndex end - local.get $0 - local.get $1 - local.get $2 + local.get $this + local.get $searchElement + local.get $fromIndex call $~lib/typedarray/Uint8ClampedArray#lastIndexOf ) (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8ClampedArray,u8> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (local $values i32) + (local $length i32) + (local $array i32) + (local $var$3 i32) + (local $var$4 i32) + (local $sliced i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -13982,42 +13982,42 @@ i32.store offset=8 global.get $~lib/memory/__stack_pointer global.get $std/typedarray/testArrayIndexOfAndLastIndexOfValues - local.tee $0 + local.tee $values i32.store - local.get $0 + local.get $values call $~lib/array/Array#get:length - local.set $1 + local.set $length global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $1 + local.get $length call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $2 + local.tee $array i32.store offset=4 i32.const 0 - local.set $3 + local.set $var$3 loop $for-loop|0 - local.get $3 - local.get $1 + local.get $var$3 + local.get $length i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 - local.get $3 - local.get $0 - local.get $3 + local.get $array + local.get $var$3 + local.get $values + local.get $var$3 call $~lib/array/Array#__get i32.const 255 i32.and call $~lib/typedarray/Uint8ClampedArray#__set - local.get $3 + local.get $var$3 i32.const 1 i32.add - local.set $3 + local.set $var$3 br $for-loop|0 end end - local.get $2 + local.get $array i32.const 0 i32.const 0 call $~lib/typedarray/Uint8ClampedArray#indexOf @@ -14032,7 +14032,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 11 i32.const 0 call $~lib/typedarray/Uint8ClampedArray#indexOf @@ -14047,7 +14047,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const -1 i32.const 0 call $~lib/typedarray/Uint8ClampedArray#indexOf @@ -14062,7 +14062,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 0 call $~lib/typedarray/Uint8ClampedArray#indexOf @@ -14077,7 +14077,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 2 call $~lib/typedarray/Uint8ClampedArray#indexOf @@ -14092,7 +14092,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#indexOf @@ -14107,7 +14107,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 4 call $~lib/typedarray/Uint8ClampedArray#indexOf @@ -14122,7 +14122,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const 10 call $~lib/typedarray/Uint8ClampedArray#indexOf @@ -14137,7 +14137,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const -100 call $~lib/typedarray/Uint8ClampedArray#indexOf @@ -14152,7 +14152,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 0 i32.const 1 global.set $~argumentsLength @@ -14169,7 +14169,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 11 i32.const 1 global.set $~argumentsLength @@ -14186,7 +14186,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const -1 i32.const 1 global.set $~argumentsLength @@ -14203,7 +14203,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 1 global.set $~argumentsLength @@ -14220,7 +14220,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 4 call $~lib/typedarray/Uint8ClampedArray#lastIndexOf @@ -14235,7 +14235,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#lastIndexOf @@ -14250,7 +14250,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 2 call $~lib/typedarray/Uint8ClampedArray#lastIndexOf @@ -14265,7 +14265,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const 100 call $~lib/typedarray/Uint8ClampedArray#lastIndexOf @@ -14280,7 +14280,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const -10 call $~lib/typedarray/Uint8ClampedArray#lastIndexOf @@ -14295,7 +14295,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const -11 call $~lib/typedarray/Uint8ClampedArray#lastIndexOf @@ -14311,13 +14311,13 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $2 + local.get $array i32.const 4 i32.const 9 call $~lib/typedarray/Uint8ClampedArray#subarray - local.tee $5 + local.tee $sliced i32.store offset=8 - local.get $5 + local.get $sliced i32.const 3 i32.const 0 call $~lib/typedarray/Uint8ClampedArray#indexOf @@ -14332,7 +14332,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 4 i32.const 0 call $~lib/typedarray/Uint8ClampedArray#indexOf @@ -14349,7 +14349,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 5 i32.const 0 call $~lib/typedarray/Uint8ClampedArray#indexOf @@ -14366,7 +14366,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 9 i32.const 0 call $~lib/typedarray/Uint8ClampedArray#indexOf @@ -14381,7 +14381,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 10 i32.const 0 call $~lib/typedarray/Uint8ClampedArray#indexOf @@ -14396,7 +14396,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 11 i32.const 0 call $~lib/typedarray/Uint8ClampedArray#indexOf @@ -14411,7 +14411,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 5 i32.const 1 call $~lib/typedarray/Uint8ClampedArray#indexOf @@ -14428,7 +14428,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 5 i32.const 2 call $~lib/typedarray/Uint8ClampedArray#indexOf @@ -14448,169 +14448,169 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/typedarray/Int16Array#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 $7 i32) - (local $8 i32) - (local $9 i32) + (func $~lib/typedarray/Int16Array#indexOf (param $this i32) (param $searchElement i32) (param $fromIndex i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 (result i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $3 - local.set $6 - local.get $5 + local.get $this + local.set $var$5 + local.get $searchElement + local.set $var$4 + local.get $fromIndex + local.set $var$3 + local.get $var$3 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Int16Array#get:length - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.ge_s end if i32.const -1 br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 0 i32.lt_s if - local.get $7 - local.get $6 + local.get $var$7 + local.get $var$6 i32.add - local.tee $8 + local.tee $var$8 i32.const 0 - local.tee $9 - local.get $8 - local.get $9 + local.tee $var$9 + local.get $var$8 + local.get $var$9 i32.gt_s select - local.set $6 + local.set $var$6 end - local.get $5 + local.get $var$5 i32.load offset=4 - local.set $8 + local.set $var$8 loop $while-continue|0 - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $8 - local.get $6 + local.get $var$8 + local.get $var$6 i32.const 1 i32.shl i32.add i32.load16_s - local.get $4 + local.get $var$4 i32.extend16_s i32.eq if - local.get $6 + local.get $var$6 br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 1 i32.add - local.set $6 + local.set $var$6 br $while-continue|0 end end i32.const -1 end ) - (func $~lib/typedarray/Int16Array#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 $7 i32) - (local $8 i32) - (local $9 i32) + (func $~lib/typedarray/Int16Array#lastIndexOf (param $this i32) (param $searchElement i32) (param $fromIndex i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 (result i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $3 - local.set $6 - local.get $5 + local.get $this + local.set $var$5 + local.get $searchElement + local.set $var$4 + local.get $fromIndex + local.set $var$3 + local.get $var$3 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Int16Array#get:length - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 i32.const 0 i32.eq if i32.const -1 br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 0 i32.lt_s if - local.get $7 - local.get $6 + local.get $var$7 + local.get $var$6 i32.add - local.set $6 + local.set $var$6 else - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.ge_s if - local.get $7 + local.get $var$7 i32.const 1 i32.sub - local.set $6 + local.set $var$6 end end - local.get $5 + local.get $var$5 i32.load offset=4 - local.set $8 + local.set $var$8 loop $while-continue|0 - local.get $6 + local.get $var$6 i32.const 0 i32.ge_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $8 - local.get $6 + local.get $var$8 + local.get $var$6 i32.const 1 i32.shl i32.add i32.load16_s - local.get $4 + local.get $var$4 i32.extend16_s i32.eq if - local.get $6 + local.get $var$6 br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 1 i32.sub - local.set $6 + local.set $var$6 br $while-continue|0 end end i32.const -1 end ) - (func $~lib/typedarray/Int16Array#lastIndexOf@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#lastIndexOf@varargs (param $this i32) (param $searchElement i32) (param $fromIndex i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -14621,22 +14621,22 @@ end unreachable end - local.get $0 + local.get $this call $~lib/typedarray/Int16Array#get:length - local.set $2 + local.set $fromIndex end - local.get $0 - local.get $1 - local.get $2 + local.get $this + local.get $searchElement + local.get $fromIndex call $~lib/typedarray/Int16Array#lastIndexOf ) (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int16Array,i16> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (local $values i32) + (local $length i32) + (local $array i32) + (local $var$3 i32) + (local $var$4 i32) + (local $sliced i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -14650,41 +14650,41 @@ i32.store offset=8 global.get $~lib/memory/__stack_pointer global.get $std/typedarray/testArrayIndexOfAndLastIndexOfValues - local.tee $0 + local.tee $values i32.store - local.get $0 + local.get $values call $~lib/array/Array#get:length - local.set $1 + local.set $length global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $1 + local.get $length call $~lib/typedarray/Int16Array#constructor - local.tee $2 + local.tee $array i32.store offset=4 i32.const 0 - local.set $3 + local.set $var$3 loop $for-loop|0 - local.get $3 - local.get $1 + local.get $var$3 + local.get $length i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 - local.get $3 - local.get $0 - local.get $3 + local.get $array + local.get $var$3 + local.get $values + local.get $var$3 call $~lib/array/Array#__get i32.extend16_s call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $var$3 i32.const 1 i32.add - local.set $3 + local.set $var$3 br $for-loop|0 end end - local.get $2 + local.get $array i32.const 0 i32.const 0 call $~lib/typedarray/Int16Array#indexOf @@ -14699,7 +14699,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 11 i32.const 0 call $~lib/typedarray/Int16Array#indexOf @@ -14714,7 +14714,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const -1 i32.const 0 call $~lib/typedarray/Int16Array#indexOf @@ -14729,7 +14729,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 0 call $~lib/typedarray/Int16Array#indexOf @@ -14744,7 +14744,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 2 call $~lib/typedarray/Int16Array#indexOf @@ -14759,7 +14759,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 3 call $~lib/typedarray/Int16Array#indexOf @@ -14774,7 +14774,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 4 call $~lib/typedarray/Int16Array#indexOf @@ -14789,7 +14789,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const 10 call $~lib/typedarray/Int16Array#indexOf @@ -14804,7 +14804,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const -100 call $~lib/typedarray/Int16Array#indexOf @@ -14819,7 +14819,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 0 i32.const 1 global.set $~argumentsLength @@ -14836,7 +14836,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 11 i32.const 1 global.set $~argumentsLength @@ -14853,7 +14853,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const -1 i32.const 1 global.set $~argumentsLength @@ -14870,7 +14870,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 1 global.set $~argumentsLength @@ -14887,7 +14887,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 4 call $~lib/typedarray/Int16Array#lastIndexOf @@ -14902,7 +14902,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 3 call $~lib/typedarray/Int16Array#lastIndexOf @@ -14917,7 +14917,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 2 call $~lib/typedarray/Int16Array#lastIndexOf @@ -14932,7 +14932,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const 100 call $~lib/typedarray/Int16Array#lastIndexOf @@ -14947,7 +14947,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const -10 call $~lib/typedarray/Int16Array#lastIndexOf @@ -14962,7 +14962,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const -11 call $~lib/typedarray/Int16Array#lastIndexOf @@ -14978,13 +14978,13 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $2 + local.get $array i32.const 4 i32.const 9 call $~lib/typedarray/Int16Array#subarray - local.tee $5 + local.tee $sliced i32.store offset=8 - local.get $5 + local.get $sliced i32.const 3 i32.const 0 call $~lib/typedarray/Int16Array#indexOf @@ -14999,7 +14999,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 4 i32.const 0 call $~lib/typedarray/Int16Array#indexOf @@ -15016,7 +15016,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 5 i32.const 0 call $~lib/typedarray/Int16Array#indexOf @@ -15033,7 +15033,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 9 i32.const 0 call $~lib/typedarray/Int16Array#indexOf @@ -15048,7 +15048,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 10 i32.const 0 call $~lib/typedarray/Int16Array#indexOf @@ -15063,7 +15063,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 11 i32.const 0 call $~lib/typedarray/Int16Array#indexOf @@ -15078,7 +15078,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 5 i32.const 1 call $~lib/typedarray/Int16Array#indexOf @@ -15095,7 +15095,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 5 i32.const 2 call $~lib/typedarray/Int16Array#indexOf @@ -15115,171 +15115,171 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/typedarray/Uint16Array#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 $7 i32) - (local $8 i32) - (local $9 i32) + (func $~lib/typedarray/Uint16Array#indexOf (param $this i32) (param $searchElement i32) (param $fromIndex i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.0 (result i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $3 - local.set $6 - local.get $5 + local.get $this + local.set $var$5 + local.get $searchElement + local.set $var$4 + local.get $fromIndex + local.set $var$3 + local.get $var$3 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Uint16Array#get:length - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.ge_s end if i32.const -1 br $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 0 i32.lt_s if - local.get $7 - local.get $6 + local.get $var$7 + local.get $var$6 i32.add - local.tee $8 + local.tee $var$8 i32.const 0 - local.tee $9 - local.get $8 - local.get $9 + local.tee $var$9 + local.get $var$8 + local.get $var$9 i32.gt_s select - local.set $6 + local.set $var$6 end - local.get $5 + local.get $var$5 i32.load offset=4 - local.set $8 + local.set $var$8 loop $while-continue|0 - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $8 - local.get $6 + local.get $var$8 + local.get $var$6 i32.const 1 i32.shl i32.add i32.load16_u - local.get $4 + local.get $var$4 i32.const 65535 i32.and i32.eq if - local.get $6 + local.get $var$6 br $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 1 i32.add - local.set $6 + local.set $var$6 br $while-continue|0 end end i32.const -1 end ) - (func $~lib/typedarray/Uint16Array#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 $7 i32) - (local $8 i32) - (local $9 i32) + (func $~lib/typedarray/Uint16Array#lastIndexOf (param $this i32) (param $searchElement i32) (param $fromIndex i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.0 (result i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $3 - local.set $6 - local.get $5 + local.get $this + local.set $var$5 + local.get $searchElement + local.set $var$4 + local.get $fromIndex + local.set $var$3 + local.get $var$3 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Uint16Array#get:length - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 i32.const 0 i32.eq if i32.const -1 br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 0 i32.lt_s if - local.get $7 - local.get $6 + local.get $var$7 + local.get $var$6 i32.add - local.set $6 + local.set $var$6 else - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.ge_s if - local.get $7 + local.get $var$7 i32.const 1 i32.sub - local.set $6 + local.set $var$6 end end - local.get $5 + local.get $var$5 i32.load offset=4 - local.set $8 + local.set $var$8 loop $while-continue|0 - local.get $6 + local.get $var$6 i32.const 0 i32.ge_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $8 - local.get $6 + local.get $var$8 + local.get $var$6 i32.const 1 i32.shl i32.add i32.load16_u - local.get $4 + local.get $var$4 i32.const 65535 i32.and i32.eq if - local.get $6 + local.get $var$6 br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint16Array,u16>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 1 i32.sub - local.set $6 + local.set $var$6 br $while-continue|0 end end i32.const -1 end ) - (func $~lib/typedarray/Uint16Array#lastIndexOf@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#lastIndexOf@varargs (param $this i32) (param $searchElement i32) (param $fromIndex i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -15290,22 +15290,22 @@ end unreachable end - local.get $0 + local.get $this call $~lib/typedarray/Uint16Array#get:length - local.set $2 + local.set $fromIndex end - local.get $0 - local.get $1 - local.get $2 + local.get $this + local.get $searchElement + local.get $fromIndex call $~lib/typedarray/Uint16Array#lastIndexOf ) (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (local $values i32) + (local $length i32) + (local $array i32) + (local $var$3 i32) + (local $var$4 i32) + (local $sliced i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -15319,42 +15319,42 @@ i32.store offset=8 global.get $~lib/memory/__stack_pointer global.get $std/typedarray/testArrayIndexOfAndLastIndexOfValues - local.tee $0 + local.tee $values i32.store - local.get $0 + local.get $values call $~lib/array/Array#get:length - local.set $1 + local.set $length global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $1 + local.get $length call $~lib/typedarray/Uint16Array#constructor - local.tee $2 + local.tee $array i32.store offset=4 i32.const 0 - local.set $3 + local.set $var$3 loop $for-loop|0 - local.get $3 - local.get $1 + local.get $var$3 + local.get $length i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 - local.get $3 - local.get $0 - local.get $3 + local.get $array + local.get $var$3 + local.get $values + local.get $var$3 call $~lib/array/Array#__get i32.const 65535 i32.and call $~lib/typedarray/Uint16Array#__set - local.get $3 + local.get $var$3 i32.const 1 i32.add - local.set $3 + local.set $var$3 br $for-loop|0 end end - local.get $2 + local.get $array i32.const 0 i32.const 0 call $~lib/typedarray/Uint16Array#indexOf @@ -15369,7 +15369,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 11 i32.const 0 call $~lib/typedarray/Uint16Array#indexOf @@ -15384,7 +15384,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const -1 i32.const 0 call $~lib/typedarray/Uint16Array#indexOf @@ -15399,7 +15399,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 0 call $~lib/typedarray/Uint16Array#indexOf @@ -15414,7 +15414,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 2 call $~lib/typedarray/Uint16Array#indexOf @@ -15429,7 +15429,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 3 call $~lib/typedarray/Uint16Array#indexOf @@ -15444,7 +15444,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 4 call $~lib/typedarray/Uint16Array#indexOf @@ -15459,7 +15459,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const 10 call $~lib/typedarray/Uint16Array#indexOf @@ -15474,7 +15474,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const -100 call $~lib/typedarray/Uint16Array#indexOf @@ -15489,7 +15489,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 0 i32.const 1 global.set $~argumentsLength @@ -15506,7 +15506,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 11 i32.const 1 global.set $~argumentsLength @@ -15523,7 +15523,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const -1 i32.const 1 global.set $~argumentsLength @@ -15540,7 +15540,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 1 global.set $~argumentsLength @@ -15557,7 +15557,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 4 call $~lib/typedarray/Uint16Array#lastIndexOf @@ -15572,7 +15572,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 3 call $~lib/typedarray/Uint16Array#lastIndexOf @@ -15587,7 +15587,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 2 call $~lib/typedarray/Uint16Array#lastIndexOf @@ -15602,7 +15602,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const 100 call $~lib/typedarray/Uint16Array#lastIndexOf @@ -15617,7 +15617,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const -10 call $~lib/typedarray/Uint16Array#lastIndexOf @@ -15632,7 +15632,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const -11 call $~lib/typedarray/Uint16Array#lastIndexOf @@ -15648,13 +15648,13 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $2 + local.get $array i32.const 4 i32.const 9 call $~lib/typedarray/Uint16Array#subarray - local.tee $5 + local.tee $sliced i32.store offset=8 - local.get $5 + local.get $sliced i32.const 3 i32.const 0 call $~lib/typedarray/Uint16Array#indexOf @@ -15669,7 +15669,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 4 i32.const 0 call $~lib/typedarray/Uint16Array#indexOf @@ -15686,7 +15686,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 5 i32.const 0 call $~lib/typedarray/Uint16Array#indexOf @@ -15703,7 +15703,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 9 i32.const 0 call $~lib/typedarray/Uint16Array#indexOf @@ -15718,7 +15718,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 10 i32.const 0 call $~lib/typedarray/Uint16Array#indexOf @@ -15733,7 +15733,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 11 i32.const 0 call $~lib/typedarray/Uint16Array#indexOf @@ -15748,7 +15748,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 5 i32.const 1 call $~lib/typedarray/Uint16Array#indexOf @@ -15765,7 +15765,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 5 i32.const 2 call $~lib/typedarray/Uint16Array#indexOf @@ -15785,167 +15785,167 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/typedarray/Int32Array#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 $7 i32) - (local $8 i32) - (local $9 i32) + (func $~lib/typedarray/Int32Array#indexOf (param $this i32) (param $searchElement i32) (param $fromIndex i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $3 - local.set $6 - local.get $5 + local.get $this + local.set $var$5 + local.get $searchElement + local.set $var$4 + local.get $fromIndex + local.set $var$3 + local.get $var$3 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Int32Array#get:length - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.ge_s end if i32.const -1 br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 0 i32.lt_s if - local.get $7 - local.get $6 + local.get $var$7 + local.get $var$6 i32.add - local.tee $8 + local.tee $var$8 i32.const 0 - local.tee $9 - local.get $8 - local.get $9 + local.tee $var$9 + local.get $var$8 + local.get $var$9 i32.gt_s select - local.set $6 + local.set $var$6 end - local.get $5 + local.get $var$5 i32.load offset=4 - local.set $8 + local.set $var$8 loop $while-continue|0 - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $8 - local.get $6 + local.get $var$8 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load - local.get $4 + local.get $var$4 i32.eq if - local.get $6 + local.get $var$6 br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 1 i32.add - local.set $6 + local.set $var$6 br $while-continue|0 end end i32.const -1 end ) - (func $~lib/typedarray/Int32Array#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 $7 i32) - (local $8 i32) - (local $9 i32) + (func $~lib/typedarray/Int32Array#lastIndexOf (param $this i32) (param $searchElement i32) (param $fromIndex i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $3 - local.set $6 - local.get $5 + local.get $this + local.set $var$5 + local.get $searchElement + local.set $var$4 + local.get $fromIndex + local.set $var$3 + local.get $var$3 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Int32Array#get:length - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 i32.const 0 i32.eq if i32.const -1 br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 0 i32.lt_s if - local.get $7 - local.get $6 + local.get $var$7 + local.get $var$6 i32.add - local.set $6 + local.set $var$6 else - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.ge_s if - local.get $7 + local.get $var$7 i32.const 1 i32.sub - local.set $6 + local.set $var$6 end end - local.get $5 + local.get $var$5 i32.load offset=4 - local.set $8 + local.set $var$8 loop $while-continue|0 - local.get $6 + local.get $var$6 i32.const 0 i32.ge_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $8 - local.get $6 + local.get $var$8 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load - local.get $4 + local.get $var$4 i32.eq if - local.get $6 + local.get $var$6 br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 1 i32.sub - local.set $6 + local.set $var$6 br $while-continue|0 end end i32.const -1 end ) - (func $~lib/typedarray/Int32Array#lastIndexOf@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#lastIndexOf@varargs (param $this i32) (param $searchElement i32) (param $fromIndex i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -15956,22 +15956,22 @@ end unreachable end - local.get $0 + local.get $this call $~lib/typedarray/Int32Array#get:length - local.set $2 + local.set $fromIndex end - local.get $0 - local.get $1 - local.get $2 + local.get $this + local.get $searchElement + local.get $fromIndex call $~lib/typedarray/Int32Array#lastIndexOf ) (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int32Array,i32> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (local $values i32) + (local $length i32) + (local $array i32) + (local $var$3 i32) + (local $var$4 i32) + (local $sliced i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -15985,40 +15985,40 @@ i32.store offset=8 global.get $~lib/memory/__stack_pointer global.get $std/typedarray/testArrayIndexOfAndLastIndexOfValues - local.tee $0 + local.tee $values i32.store - local.get $0 + local.get $values call $~lib/array/Array#get:length - local.set $1 + local.set $length global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $1 + local.get $length call $~lib/typedarray/Int32Array#constructor - local.tee $2 + local.tee $array i32.store offset=4 i32.const 0 - local.set $3 + local.set $var$3 loop $for-loop|0 - local.get $3 - local.get $1 + local.get $var$3 + local.get $length i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 - local.get $3 - local.get $0 - local.get $3 + local.get $array + local.get $var$3 + local.get $values + local.get $var$3 call $~lib/array/Array#__get call $~lib/typedarray/Int32Array#__set - local.get $3 + local.get $var$3 i32.const 1 i32.add - local.set $3 + local.set $var$3 br $for-loop|0 end end - local.get $2 + local.get $array i32.const 0 i32.const 0 call $~lib/typedarray/Int32Array#indexOf @@ -16033,7 +16033,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 11 i32.const 0 call $~lib/typedarray/Int32Array#indexOf @@ -16048,7 +16048,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const -1 i32.const 0 call $~lib/typedarray/Int32Array#indexOf @@ -16063,7 +16063,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 0 call $~lib/typedarray/Int32Array#indexOf @@ -16078,7 +16078,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 2 call $~lib/typedarray/Int32Array#indexOf @@ -16093,7 +16093,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 3 call $~lib/typedarray/Int32Array#indexOf @@ -16108,7 +16108,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 4 call $~lib/typedarray/Int32Array#indexOf @@ -16123,7 +16123,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const 10 call $~lib/typedarray/Int32Array#indexOf @@ -16138,7 +16138,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const -100 call $~lib/typedarray/Int32Array#indexOf @@ -16153,7 +16153,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 0 i32.const 1 global.set $~argumentsLength @@ -16170,7 +16170,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 11 i32.const 1 global.set $~argumentsLength @@ -16187,7 +16187,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const -1 i32.const 1 global.set $~argumentsLength @@ -16204,7 +16204,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 1 global.set $~argumentsLength @@ -16221,7 +16221,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 4 call $~lib/typedarray/Int32Array#lastIndexOf @@ -16236,7 +16236,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 3 call $~lib/typedarray/Int32Array#lastIndexOf @@ -16251,7 +16251,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 2 call $~lib/typedarray/Int32Array#lastIndexOf @@ -16266,7 +16266,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const 100 call $~lib/typedarray/Int32Array#lastIndexOf @@ -16281,7 +16281,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const -10 call $~lib/typedarray/Int32Array#lastIndexOf @@ -16296,7 +16296,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const -11 call $~lib/typedarray/Int32Array#lastIndexOf @@ -16312,13 +16312,13 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $2 + local.get $array i32.const 4 i32.const 9 call $~lib/typedarray/Int32Array#subarray - local.tee $5 + local.tee $sliced i32.store offset=8 - local.get $5 + local.get $sliced i32.const 3 i32.const 0 call $~lib/typedarray/Int32Array#indexOf @@ -16333,7 +16333,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 4 i32.const 0 call $~lib/typedarray/Int32Array#indexOf @@ -16350,7 +16350,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 5 i32.const 0 call $~lib/typedarray/Int32Array#indexOf @@ -16367,7 +16367,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 9 i32.const 0 call $~lib/typedarray/Int32Array#indexOf @@ -16382,7 +16382,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 10 i32.const 0 call $~lib/typedarray/Int32Array#indexOf @@ -16397,7 +16397,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 11 i32.const 0 call $~lib/typedarray/Int32Array#indexOf @@ -16412,7 +16412,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 5 i32.const 1 call $~lib/typedarray/Int32Array#indexOf @@ -16429,7 +16429,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 5 i32.const 2 call $~lib/typedarray/Int32Array#indexOf @@ -16449,167 +16449,167 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/typedarray/Uint32Array#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 $7 i32) - (local $8 i32) - (local $9 i32) + (func $~lib/typedarray/Uint32Array#indexOf (param $this i32) (param $searchElement i32) (param $fromIndex i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.0 (result i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $3 - local.set $6 - local.get $5 + local.get $this + local.set $var$5 + local.get $searchElement + local.set $var$4 + local.get $fromIndex + local.set $var$3 + local.get $var$3 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Uint32Array#get:length - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.ge_s end if i32.const -1 br $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 0 i32.lt_s if - local.get $7 - local.get $6 + local.get $var$7 + local.get $var$6 i32.add - local.tee $8 + local.tee $var$8 i32.const 0 - local.tee $9 - local.get $8 - local.get $9 + local.tee $var$9 + local.get $var$8 + local.get $var$9 i32.gt_s select - local.set $6 + local.set $var$6 end - local.get $5 + local.get $var$5 i32.load offset=4 - local.set $8 + local.set $var$8 loop $while-continue|0 - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $8 - local.get $6 + local.get $var$8 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load - local.get $4 + local.get $var$4 i32.eq if - local.get $6 + local.get $var$6 br $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 1 i32.add - local.set $6 + local.set $var$6 br $while-continue|0 end end i32.const -1 end ) - (func $~lib/typedarray/Uint32Array#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 $7 i32) - (local $8 i32) - (local $9 i32) + (func $~lib/typedarray/Uint32Array#lastIndexOf (param $this i32) (param $searchElement i32) (param $fromIndex i32) (result i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.0 (result i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $3 - local.set $6 - local.get $5 + local.get $this + local.set $var$5 + local.get $searchElement + local.set $var$4 + local.get $fromIndex + local.set $var$3 + local.get $var$3 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Uint32Array#get:length - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 i32.const 0 i32.eq if i32.const -1 br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 0 i32.lt_s if - local.get $7 - local.get $6 + local.get $var$7 + local.get $var$6 i32.add - local.set $6 + local.set $var$6 else - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.ge_s if - local.get $7 + local.get $var$7 i32.const 1 i32.sub - local.set $6 + local.set $var$6 end end - local.get $5 + local.get $var$5 i32.load offset=4 - local.set $8 + local.set $var$8 loop $while-continue|0 - local.get $6 + local.get $var$6 i32.const 0 i32.ge_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $8 - local.get $6 + local.get $var$8 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load - local.get $4 + local.get $var$4 i32.eq if - local.get $6 + local.get $var$6 br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint32Array,u32>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 1 i32.sub - local.set $6 + local.set $var$6 br $while-continue|0 end end i32.const -1 end ) - (func $~lib/typedarray/Uint32Array#lastIndexOf@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#lastIndexOf@varargs (param $this i32) (param $searchElement i32) (param $fromIndex i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -16620,22 +16620,22 @@ end unreachable end - local.get $0 + local.get $this call $~lib/typedarray/Uint32Array#get:length - local.set $2 + local.set $fromIndex end - local.get $0 - local.get $1 - local.get $2 + local.get $this + local.get $searchElement + local.get $fromIndex call $~lib/typedarray/Uint32Array#lastIndexOf ) (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint32Array,u32> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (local $values i32) + (local $length i32) + (local $array i32) + (local $var$3 i32) + (local $var$4 i32) + (local $sliced i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -16649,40 +16649,40 @@ i32.store offset=8 global.get $~lib/memory/__stack_pointer global.get $std/typedarray/testArrayIndexOfAndLastIndexOfValues - local.tee $0 + local.tee $values i32.store - local.get $0 + local.get $values call $~lib/array/Array#get:length - local.set $1 + local.set $length global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $1 + local.get $length call $~lib/typedarray/Uint32Array#constructor - local.tee $2 + local.tee $array i32.store offset=4 i32.const 0 - local.set $3 + local.set $var$3 loop $for-loop|0 - local.get $3 - local.get $1 + local.get $var$3 + local.get $length i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 - local.get $3 - local.get $0 - local.get $3 + local.get $array + local.get $var$3 + local.get $values + local.get $var$3 call $~lib/array/Array#__get call $~lib/typedarray/Uint32Array#__set - local.get $3 + local.get $var$3 i32.const 1 i32.add - local.set $3 + local.set $var$3 br $for-loop|0 end end - local.get $2 + local.get $array i32.const 0 i32.const 0 call $~lib/typedarray/Uint32Array#indexOf @@ -16697,7 +16697,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 11 i32.const 0 call $~lib/typedarray/Uint32Array#indexOf @@ -16712,7 +16712,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const -1 i32.const 0 call $~lib/typedarray/Uint32Array#indexOf @@ -16727,7 +16727,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 0 call $~lib/typedarray/Uint32Array#indexOf @@ -16742,7 +16742,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 2 call $~lib/typedarray/Uint32Array#indexOf @@ -16757,7 +16757,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 3 call $~lib/typedarray/Uint32Array#indexOf @@ -16772,7 +16772,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 4 call $~lib/typedarray/Uint32Array#indexOf @@ -16787,7 +16787,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const 10 call $~lib/typedarray/Uint32Array#indexOf @@ -16802,7 +16802,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const -100 call $~lib/typedarray/Uint32Array#indexOf @@ -16817,7 +16817,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 0 i32.const 1 global.set $~argumentsLength @@ -16834,7 +16834,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 11 i32.const 1 global.set $~argumentsLength @@ -16851,7 +16851,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const -1 i32.const 1 global.set $~argumentsLength @@ -16868,7 +16868,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 1 global.set $~argumentsLength @@ -16885,7 +16885,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 4 call $~lib/typedarray/Uint32Array#lastIndexOf @@ -16900,7 +16900,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 3 call $~lib/typedarray/Uint32Array#lastIndexOf @@ -16915,7 +16915,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 3 i32.const 2 call $~lib/typedarray/Uint32Array#lastIndexOf @@ -16930,7 +16930,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const 100 call $~lib/typedarray/Uint32Array#lastIndexOf @@ -16945,7 +16945,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const -10 call $~lib/typedarray/Uint32Array#lastIndexOf @@ -16960,7 +16960,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i32.const 1 i32.const -11 call $~lib/typedarray/Uint32Array#lastIndexOf @@ -16976,13 +16976,13 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $2 + local.get $array i32.const 4 i32.const 9 call $~lib/typedarray/Uint32Array#subarray - local.tee $5 + local.tee $sliced i32.store offset=8 - local.get $5 + local.get $sliced i32.const 3 i32.const 0 call $~lib/typedarray/Uint32Array#indexOf @@ -16997,7 +16997,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 4 i32.const 0 call $~lib/typedarray/Uint32Array#indexOf @@ -17014,7 +17014,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 5 i32.const 0 call $~lib/typedarray/Uint32Array#indexOf @@ -17031,7 +17031,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 9 i32.const 0 call $~lib/typedarray/Uint32Array#indexOf @@ -17046,7 +17046,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 10 i32.const 0 call $~lib/typedarray/Uint32Array#indexOf @@ -17061,7 +17061,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 11 i32.const 0 call $~lib/typedarray/Uint32Array#indexOf @@ -17076,7 +17076,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 5 i32.const 1 call $~lib/typedarray/Uint32Array#indexOf @@ -17093,7 +17093,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i32.const 5 i32.const 2 call $~lib/typedarray/Uint32Array#indexOf @@ -17113,167 +17113,167 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/typedarray/Int64Array#indexOf (param $0 i32) (param $1 i64) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i64) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) + (func $~lib/typedarray/Int64Array#indexOf (param $this i32) (param $searchElement i64) (param $fromIndex i32) (result i32) + (local $var$3 i32) + (local $var$4 i64) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $3 - local.set $6 - local.get $5 + local.get $this + local.set $var$5 + local.get $searchElement + local.set $var$4 + local.get $fromIndex + local.set $var$3 + local.get $var$3 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Int64Array#get:length - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.ge_s end if i32.const -1 br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 0 i32.lt_s if - local.get $7 - local.get $6 + local.get $var$7 + local.get $var$6 i32.add - local.tee $8 + local.tee $var$8 i32.const 0 - local.tee $9 - local.get $8 - local.get $9 + local.tee $var$9 + local.get $var$8 + local.get $var$9 i32.gt_s select - local.set $6 + local.set $var$6 end - local.get $5 + local.get $var$5 i32.load offset=4 - local.set $8 + local.set $var$8 loop $while-continue|0 - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $8 - local.get $6 + local.get $var$8 + local.get $var$6 i32.const 3 i32.shl i32.add i64.load - local.get $4 + local.get $var$4 i64.eq if - local.get $6 + local.get $var$6 br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 1 i32.add - local.set $6 + local.set $var$6 br $while-continue|0 end end i32.const -1 end ) - (func $~lib/typedarray/Int64Array#lastIndexOf (param $0 i32) (param $1 i64) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i64) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) + (func $~lib/typedarray/Int64Array#lastIndexOf (param $this i32) (param $searchElement i64) (param $fromIndex i32) (result i32) + (local $var$3 i32) + (local $var$4 i64) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $3 - local.set $6 - local.get $5 + local.get $this + local.set $var$5 + local.get $searchElement + local.set $var$4 + local.get $fromIndex + local.set $var$3 + local.get $var$3 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Int64Array#get:length - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 i32.const 0 i32.eq if i32.const -1 br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 0 i32.lt_s if - local.get $7 - local.get $6 + local.get $var$7 + local.get $var$6 i32.add - local.set $6 + local.set $var$6 else - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.ge_s if - local.get $7 + local.get $var$7 i32.const 1 i32.sub - local.set $6 + local.set $var$6 end end - local.get $5 + local.get $var$5 i32.load offset=4 - local.set $8 + local.set $var$8 loop $while-continue|0 - local.get $6 + local.get $var$6 i32.const 0 i32.ge_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $8 - local.get $6 + local.get $var$8 + local.get $var$6 i32.const 3 i32.shl i32.add i64.load - local.get $4 + local.get $var$4 i64.eq if - local.get $6 + local.get $var$6 br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 1 i32.sub - local.set $6 + local.set $var$6 br $while-continue|0 end end i32.const -1 end ) - (func $~lib/typedarray/Int64Array#lastIndexOf@varargs (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/typedarray/Int64Array#lastIndexOf@varargs (param $this i32) (param $searchElement i64) (param $fromIndex i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -17284,22 +17284,22 @@ end unreachable end - local.get $0 + local.get $this call $~lib/typedarray/Int64Array#get:length - local.set $2 + local.set $fromIndex end - local.get $0 - local.get $1 - local.get $2 + local.get $this + local.get $searchElement + local.get $fromIndex call $~lib/typedarray/Int64Array#lastIndexOf ) (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int64Array,i64> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (local $values i32) + (local $length i32) + (local $array i32) + (local $var$3 i32) + (local $var$4 i32) + (local $sliced i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -17313,41 +17313,41 @@ i32.store offset=8 global.get $~lib/memory/__stack_pointer global.get $std/typedarray/testArrayIndexOfAndLastIndexOfValues - local.tee $0 + local.tee $values i32.store - local.get $0 + local.get $values call $~lib/array/Array#get:length - local.set $1 + local.set $length global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $1 + local.get $length call $~lib/typedarray/Int64Array#constructor - local.tee $2 + local.tee $array i32.store offset=4 i32.const 0 - local.set $3 + local.set $var$3 loop $for-loop|0 - local.get $3 - local.get $1 + local.get $var$3 + local.get $length i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 - local.get $3 - local.get $0 - local.get $3 + local.get $array + local.get $var$3 + local.get $values + local.get $var$3 call $~lib/array/Array#__get i64.extend_i32_s call $~lib/typedarray/Int64Array#__set - local.get $3 + local.get $var$3 i32.const 1 i32.add - local.set $3 + local.set $var$3 br $for-loop|0 end end - local.get $2 + local.get $array i64.const 0 i32.const 0 call $~lib/typedarray/Int64Array#indexOf @@ -17362,7 +17362,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const 11 i32.const 0 call $~lib/typedarray/Int64Array#indexOf @@ -17377,7 +17377,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const -1 i32.const 0 call $~lib/typedarray/Int64Array#indexOf @@ -17392,7 +17392,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const 3 i32.const 0 call $~lib/typedarray/Int64Array#indexOf @@ -17407,7 +17407,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const 3 i32.const 2 call $~lib/typedarray/Int64Array#indexOf @@ -17422,7 +17422,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const 3 i32.const 3 call $~lib/typedarray/Int64Array#indexOf @@ -17437,7 +17437,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const 3 i32.const 4 call $~lib/typedarray/Int64Array#indexOf @@ -17452,7 +17452,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const 1 i32.const 10 call $~lib/typedarray/Int64Array#indexOf @@ -17467,7 +17467,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const 1 i32.const -100 call $~lib/typedarray/Int64Array#indexOf @@ -17482,7 +17482,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const 0 i32.const 1 global.set $~argumentsLength @@ -17499,7 +17499,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const 11 i32.const 1 global.set $~argumentsLength @@ -17516,7 +17516,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const -1 i32.const 1 global.set $~argumentsLength @@ -17533,7 +17533,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const 3 i32.const 1 global.set $~argumentsLength @@ -17550,7 +17550,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const 3 i32.const 4 call $~lib/typedarray/Int64Array#lastIndexOf @@ -17565,7 +17565,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const 3 i32.const 3 call $~lib/typedarray/Int64Array#lastIndexOf @@ -17580,7 +17580,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const 3 i32.const 2 call $~lib/typedarray/Int64Array#lastIndexOf @@ -17595,7 +17595,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const 1 i32.const 100 call $~lib/typedarray/Int64Array#lastIndexOf @@ -17610,7 +17610,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const 1 i32.const -10 call $~lib/typedarray/Int64Array#lastIndexOf @@ -17625,7 +17625,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const 1 i32.const -11 call $~lib/typedarray/Int64Array#lastIndexOf @@ -17641,13 +17641,13 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $2 + local.get $array i32.const 4 i32.const 9 call $~lib/typedarray/Int64Array#subarray - local.tee $5 + local.tee $sliced i32.store offset=8 - local.get $5 + local.get $sliced i64.const 3 i32.const 0 call $~lib/typedarray/Int64Array#indexOf @@ -17662,7 +17662,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i64.const 4 i32.const 0 call $~lib/typedarray/Int64Array#indexOf @@ -17679,7 +17679,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i64.const 5 i32.const 0 call $~lib/typedarray/Int64Array#indexOf @@ -17696,7 +17696,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i64.const 9 i32.const 0 call $~lib/typedarray/Int64Array#indexOf @@ -17711,7 +17711,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i64.const 10 i32.const 0 call $~lib/typedarray/Int64Array#indexOf @@ -17726,7 +17726,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i64.const 11 i32.const 0 call $~lib/typedarray/Int64Array#indexOf @@ -17741,7 +17741,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i64.const 5 i32.const 1 call $~lib/typedarray/Int64Array#indexOf @@ -17758,7 +17758,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i64.const 5 i32.const 2 call $~lib/typedarray/Int64Array#indexOf @@ -17778,167 +17778,167 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/typedarray/Uint64Array#indexOf (param $0 i32) (param $1 i64) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i64) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) + (func $~lib/typedarray/Uint64Array#indexOf (param $this i32) (param $searchElement i64) (param $fromIndex i32) (result i32) + (local $var$3 i32) + (local $var$4 i64) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint64Array,u64>|inlined.0 (result i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $3 - local.set $6 - local.get $5 + local.get $this + local.set $var$5 + local.get $searchElement + local.set $var$4 + local.get $fromIndex + local.set $var$3 + local.get $var$3 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Uint64Array#get:length - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.ge_s end if i32.const -1 br $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint64Array,u64>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 0 i32.lt_s if - local.get $7 - local.get $6 + local.get $var$7 + local.get $var$6 i32.add - local.tee $8 + local.tee $var$8 i32.const 0 - local.tee $9 - local.get $8 - local.get $9 + local.tee $var$9 + local.get $var$8 + local.get $var$9 i32.gt_s select - local.set $6 + local.set $var$6 end - local.get $5 + local.get $var$5 i32.load offset=4 - local.set $8 + local.set $var$8 loop $while-continue|0 - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $8 - local.get $6 + local.get $var$8 + local.get $var$6 i32.const 3 i32.shl i32.add i64.load - local.get $4 + local.get $var$4 i64.eq if - local.get $6 + local.get $var$6 br $~lib/typedarray/INDEX_OF<~lib/typedarray/Uint64Array,u64>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 1 i32.add - local.set $6 + local.set $var$6 br $while-continue|0 end end i32.const -1 end ) - (func $~lib/typedarray/Uint64Array#lastIndexOf (param $0 i32) (param $1 i64) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i64) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) + (func $~lib/typedarray/Uint64Array#lastIndexOf (param $this i32) (param $searchElement i64) (param $fromIndex i32) (result i32) + (local $var$3 i32) + (local $var$4 i64) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint64Array,u64>|inlined.0 (result i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $3 - local.set $6 - local.get $5 + local.get $this + local.set $var$5 + local.get $searchElement + local.set $var$4 + local.get $fromIndex + local.set $var$3 + local.get $var$3 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Uint64Array#get:length - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 i32.const 0 i32.eq if i32.const -1 br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint64Array,u64>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 0 i32.lt_s if - local.get $7 - local.get $6 + local.get $var$7 + local.get $var$6 i32.add - local.set $6 + local.set $var$6 else - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.ge_s if - local.get $7 + local.get $var$7 i32.const 1 i32.sub - local.set $6 + local.set $var$6 end end - local.get $5 + local.get $var$5 i32.load offset=4 - local.set $8 + local.set $var$8 loop $while-continue|0 - local.get $6 + local.get $var$6 i32.const 0 i32.ge_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $8 - local.get $6 + local.get $var$8 + local.get $var$6 i32.const 3 i32.shl i32.add i64.load - local.get $4 + local.get $var$4 i64.eq if - local.get $6 + local.get $var$6 br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Uint64Array,u64>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 1 i32.sub - local.set $6 + local.set $var$6 br $while-continue|0 end end i32.const -1 end ) - (func $~lib/typedarray/Uint64Array#lastIndexOf@varargs (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint64Array#lastIndexOf@varargs (param $this i32) (param $searchElement i64) (param $fromIndex i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -17949,22 +17949,22 @@ end unreachable end - local.get $0 + local.get $this call $~lib/typedarray/Uint64Array#get:length - local.set $2 + local.set $fromIndex end - local.get $0 - local.get $1 - local.get $2 + local.get $this + local.get $searchElement + local.get $fromIndex call $~lib/typedarray/Uint64Array#lastIndexOf ) (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint64Array,u64> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (local $values i32) + (local $length i32) + (local $array i32) + (local $var$3 i32) + (local $var$4 i32) + (local $sliced i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -17978,41 +17978,41 @@ i32.store offset=8 global.get $~lib/memory/__stack_pointer global.get $std/typedarray/testArrayIndexOfAndLastIndexOfValues - local.tee $0 + local.tee $values i32.store - local.get $0 + local.get $values call $~lib/array/Array#get:length - local.set $1 + local.set $length global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $1 + local.get $length call $~lib/typedarray/Uint64Array#constructor - local.tee $2 + local.tee $array i32.store offset=4 i32.const 0 - local.set $3 + local.set $var$3 loop $for-loop|0 - local.get $3 - local.get $1 + local.get $var$3 + local.get $length i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 - local.get $3 - local.get $0 - local.get $3 + local.get $array + local.get $var$3 + local.get $values + local.get $var$3 call $~lib/array/Array#__get i64.extend_i32_s call $~lib/typedarray/Uint64Array#__set - local.get $3 + local.get $var$3 i32.const 1 i32.add - local.set $3 + local.set $var$3 br $for-loop|0 end end - local.get $2 + local.get $array i64.const 0 i32.const 0 call $~lib/typedarray/Uint64Array#indexOf @@ -18027,7 +18027,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const 11 i32.const 0 call $~lib/typedarray/Uint64Array#indexOf @@ -18042,7 +18042,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const -1 i32.const 0 call $~lib/typedarray/Uint64Array#indexOf @@ -18057,7 +18057,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const 3 i32.const 0 call $~lib/typedarray/Uint64Array#indexOf @@ -18072,7 +18072,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const 3 i32.const 2 call $~lib/typedarray/Uint64Array#indexOf @@ -18087,7 +18087,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const 3 i32.const 3 call $~lib/typedarray/Uint64Array#indexOf @@ -18102,7 +18102,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const 3 i32.const 4 call $~lib/typedarray/Uint64Array#indexOf @@ -18117,7 +18117,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const 1 i32.const 10 call $~lib/typedarray/Uint64Array#indexOf @@ -18132,7 +18132,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const 1 i32.const -100 call $~lib/typedarray/Uint64Array#indexOf @@ -18147,7 +18147,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const 0 i32.const 1 global.set $~argumentsLength @@ -18164,7 +18164,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const 11 i32.const 1 global.set $~argumentsLength @@ -18181,7 +18181,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const -1 i32.const 1 global.set $~argumentsLength @@ -18198,7 +18198,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const 3 i32.const 1 global.set $~argumentsLength @@ -18215,7 +18215,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const 3 i32.const 4 call $~lib/typedarray/Uint64Array#lastIndexOf @@ -18230,7 +18230,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const 3 i32.const 3 call $~lib/typedarray/Uint64Array#lastIndexOf @@ -18245,7 +18245,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const 3 i32.const 2 call $~lib/typedarray/Uint64Array#lastIndexOf @@ -18260,7 +18260,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const 1 i32.const 100 call $~lib/typedarray/Uint64Array#lastIndexOf @@ -18275,7 +18275,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const 1 i32.const -10 call $~lib/typedarray/Uint64Array#lastIndexOf @@ -18290,7 +18290,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array i64.const 1 i32.const -11 call $~lib/typedarray/Uint64Array#lastIndexOf @@ -18306,13 +18306,13 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $2 + local.get $array i32.const 4 i32.const 9 call $~lib/typedarray/Uint64Array#subarray - local.tee $5 + local.tee $sliced i32.store offset=8 - local.get $5 + local.get $sliced i64.const 3 i32.const 0 call $~lib/typedarray/Uint64Array#indexOf @@ -18327,7 +18327,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i64.const 4 i32.const 0 call $~lib/typedarray/Uint64Array#indexOf @@ -18344,7 +18344,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i64.const 5 i32.const 0 call $~lib/typedarray/Uint64Array#indexOf @@ -18361,7 +18361,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i64.const 9 i32.const 0 call $~lib/typedarray/Uint64Array#indexOf @@ -18376,7 +18376,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i64.const 10 i32.const 0 call $~lib/typedarray/Uint64Array#indexOf @@ -18391,7 +18391,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i64.const 11 i32.const 0 call $~lib/typedarray/Uint64Array#indexOf @@ -18406,7 +18406,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i64.const 5 i32.const 1 call $~lib/typedarray/Uint64Array#indexOf @@ -18423,7 +18423,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced i64.const 5 i32.const 2 call $~lib/typedarray/Uint64Array#indexOf @@ -18443,167 +18443,167 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/typedarray/Float32Array#indexOf (param $0 i32) (param $1 f32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 f32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) + (func $~lib/typedarray/Float32Array#indexOf (param $this i32) (param $searchElement f32) (param $fromIndex i32) (result i32) + (local $var$3 i32) + (local $var$4 f32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $3 - local.set $6 - local.get $5 + local.get $this + local.set $var$5 + local.get $searchElement + local.set $var$4 + local.get $fromIndex + local.set $var$3 + local.get $var$3 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Float32Array#get:length - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.ge_s end if i32.const -1 br $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 0 i32.lt_s if - local.get $7 - local.get $6 + local.get $var$7 + local.get $var$6 i32.add - local.tee $8 + local.tee $var$8 i32.const 0 - local.tee $9 - local.get $8 - local.get $9 + local.tee $var$9 + local.get $var$8 + local.get $var$9 i32.gt_s select - local.set $6 + local.set $var$6 end - local.get $5 + local.get $var$5 i32.load offset=4 - local.set $8 + local.set $var$8 loop $while-continue|0 - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $8 - local.get $6 + local.get $var$8 + local.get $var$6 i32.const 2 i32.shl i32.add f32.load - local.get $4 + local.get $var$4 f32.eq if - local.get $6 + local.get $var$6 br $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 1 i32.add - local.set $6 + local.set $var$6 br $while-continue|0 end end i32.const -1 end ) - (func $~lib/typedarray/Float32Array#lastIndexOf (param $0 i32) (param $1 f32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 f32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) + (func $~lib/typedarray/Float32Array#lastIndexOf (param $this i32) (param $searchElement f32) (param $fromIndex i32) (result i32) + (local $var$3 i32) + (local $var$4 f32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $3 - local.set $6 - local.get $5 + local.get $this + local.set $var$5 + local.get $searchElement + local.set $var$4 + local.get $fromIndex + local.set $var$3 + local.get $var$3 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Float32Array#get:length - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 i32.const 0 i32.eq if i32.const -1 br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 0 i32.lt_s if - local.get $7 - local.get $6 + local.get $var$7 + local.get $var$6 i32.add - local.set $6 + local.set $var$6 else - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.ge_s if - local.get $7 + local.get $var$7 i32.const 1 i32.sub - local.set $6 + local.set $var$6 end end - local.get $5 + local.get $var$5 i32.load offset=4 - local.set $8 + local.set $var$8 loop $while-continue|0 - local.get $6 + local.get $var$6 i32.const 0 i32.ge_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $8 - local.get $6 + local.get $var$8 + local.get $var$6 i32.const 2 i32.shl i32.add f32.load - local.get $4 + local.get $var$4 f32.eq if - local.get $6 + local.get $var$6 br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 1 i32.sub - local.set $6 + local.set $var$6 br $while-continue|0 end end i32.const -1 end ) - (func $~lib/typedarray/Float32Array#lastIndexOf@varargs (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#lastIndexOf@varargs (param $this i32) (param $searchElement f32) (param $fromIndex i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -18614,22 +18614,22 @@ end unreachable end - local.get $0 + local.get $this call $~lib/typedarray/Float32Array#get:length - local.set $2 + local.set $fromIndex end - local.get $0 - local.get $1 - local.get $2 + local.get $this + local.get $searchElement + local.get $fromIndex call $~lib/typedarray/Float32Array#lastIndexOf ) (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float32Array,f32> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (local $values i32) + (local $length i32) + (local $array i32) + (local $var$3 i32) + (local $var$4 i32) + (local $sliced i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -18643,41 +18643,41 @@ i32.store offset=8 global.get $~lib/memory/__stack_pointer global.get $std/typedarray/testArrayIndexOfAndLastIndexOfValues - local.tee $0 + local.tee $values i32.store - local.get $0 + local.get $values call $~lib/array/Array#get:length - local.set $1 + local.set $length global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $1 + local.get $length call $~lib/typedarray/Float32Array#constructor - local.tee $2 + local.tee $array i32.store offset=4 i32.const 0 - local.set $3 + local.set $var$3 loop $for-loop|0 - local.get $3 - local.get $1 + local.get $var$3 + local.get $length i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 - local.get $3 - local.get $0 - local.get $3 + local.get $array + local.get $var$3 + local.get $values + local.get $var$3 call $~lib/array/Array#__get f32.convert_i32_s call $~lib/typedarray/Float32Array#__set - local.get $3 + local.get $var$3 i32.const 1 i32.add - local.set $3 + local.set $var$3 br $for-loop|0 end end - local.get $2 + local.get $array f32.const 0 i32.const 0 call $~lib/typedarray/Float32Array#indexOf @@ -18692,7 +18692,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f32.const 11 i32.const 0 call $~lib/typedarray/Float32Array#indexOf @@ -18707,7 +18707,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f32.const -1 i32.const 0 call $~lib/typedarray/Float32Array#indexOf @@ -18722,7 +18722,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f32.const 3 i32.const 0 call $~lib/typedarray/Float32Array#indexOf @@ -18737,7 +18737,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f32.const 3 i32.const 2 call $~lib/typedarray/Float32Array#indexOf @@ -18752,7 +18752,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f32.const 3 i32.const 3 call $~lib/typedarray/Float32Array#indexOf @@ -18767,7 +18767,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f32.const 3 i32.const 4 call $~lib/typedarray/Float32Array#indexOf @@ -18782,7 +18782,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f32.const 1 i32.const 10 call $~lib/typedarray/Float32Array#indexOf @@ -18797,7 +18797,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f32.const 1 i32.const -100 call $~lib/typedarray/Float32Array#indexOf @@ -18812,7 +18812,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f32.const 0 i32.const 1 global.set $~argumentsLength @@ -18829,7 +18829,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f32.const 11 i32.const 1 global.set $~argumentsLength @@ -18846,7 +18846,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f32.const -1 i32.const 1 global.set $~argumentsLength @@ -18863,7 +18863,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f32.const 3 i32.const 1 global.set $~argumentsLength @@ -18880,7 +18880,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f32.const 3 i32.const 4 call $~lib/typedarray/Float32Array#lastIndexOf @@ -18895,7 +18895,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f32.const 3 i32.const 3 call $~lib/typedarray/Float32Array#lastIndexOf @@ -18910,7 +18910,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f32.const 3 i32.const 2 call $~lib/typedarray/Float32Array#lastIndexOf @@ -18925,7 +18925,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f32.const 1 i32.const 100 call $~lib/typedarray/Float32Array#lastIndexOf @@ -18940,7 +18940,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f32.const 1 i32.const -10 call $~lib/typedarray/Float32Array#lastIndexOf @@ -18955,7 +18955,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f32.const 1 i32.const -11 call $~lib/typedarray/Float32Array#lastIndexOf @@ -18971,13 +18971,13 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $2 + local.get $array i32.const 4 i32.const 9 call $~lib/typedarray/Float32Array#subarray - local.tee $5 + local.tee $sliced i32.store offset=8 - local.get $5 + local.get $sliced f32.const 3 i32.const 0 call $~lib/typedarray/Float32Array#indexOf @@ -18992,7 +18992,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced f32.const 4 i32.const 0 call $~lib/typedarray/Float32Array#indexOf @@ -19009,7 +19009,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced f32.const 5 i32.const 0 call $~lib/typedarray/Float32Array#indexOf @@ -19026,7 +19026,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced f32.const 9 i32.const 0 call $~lib/typedarray/Float32Array#indexOf @@ -19041,7 +19041,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced f32.const 10 i32.const 0 call $~lib/typedarray/Float32Array#indexOf @@ -19056,7 +19056,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced f32.const 11 i32.const 0 call $~lib/typedarray/Float32Array#indexOf @@ -19071,7 +19071,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced f32.const 5 i32.const 1 call $~lib/typedarray/Float32Array#indexOf @@ -19088,7 +19088,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced f32.const 5 i32.const 2 call $~lib/typedarray/Float32Array#indexOf @@ -19108,167 +19108,167 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/typedarray/Float64Array#indexOf (param $0 i32) (param $1 f64) (param $2 i32) (result i32) - (local $3 i32) - (local $4 f64) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) + (func $~lib/typedarray/Float64Array#indexOf (param $this i32) (param $searchElement f64) (param $fromIndex i32) (result i32) + (local $var$3 i32) + (local $var$4 f64) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $3 - local.set $6 - local.get $5 + local.get $this + local.set $var$5 + local.get $searchElement + local.set $var$4 + local.get $fromIndex + local.set $var$3 + local.get $var$3 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Float64Array#get:length - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.ge_s end if i32.const -1 br $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 0 i32.lt_s if - local.get $7 - local.get $6 + local.get $var$7 + local.get $var$6 i32.add - local.tee $8 + local.tee $var$8 i32.const 0 - local.tee $9 - local.get $8 - local.get $9 + local.tee $var$9 + local.get $var$8 + local.get $var$9 i32.gt_s select - local.set $6 + local.set $var$6 end - local.get $5 + local.get $var$5 i32.load offset=4 - local.set $8 + local.set $var$8 loop $while-continue|0 - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $8 - local.get $6 + local.get $var$8 + local.get $var$6 i32.const 3 i32.shl i32.add f64.load - local.get $4 + local.get $var$4 f64.eq if - local.get $6 + local.get $var$6 br $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 1 i32.add - local.set $6 + local.set $var$6 br $while-continue|0 end end i32.const -1 end ) - (func $~lib/typedarray/Float64Array#lastIndexOf (param $0 i32) (param $1 f64) (param $2 i32) (result i32) - (local $3 i32) - (local $4 f64) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) + (func $~lib/typedarray/Float64Array#lastIndexOf (param $this i32) (param $searchElement f64) (param $fromIndex i32) (result i32) + (local $var$3 i32) + (local $var$4 f64) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 - local.get $3 - local.set $6 - local.get $5 + local.get $this + local.set $var$5 + local.get $searchElement + local.set $var$4 + local.get $fromIndex + local.set $var$3 + local.get $var$3 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Float64Array#get:length - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 i32.const 0 i32.eq if i32.const -1 br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 0 i32.lt_s if - local.get $7 - local.get $6 + local.get $var$7 + local.get $var$6 i32.add - local.set $6 + local.set $var$6 else - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.ge_s if - local.get $7 + local.get $var$7 i32.const 1 i32.sub - local.set $6 + local.set $var$6 end end - local.get $5 + local.get $var$5 i32.load offset=4 - local.set $8 + local.set $var$8 loop $while-continue|0 - local.get $6 + local.get $var$6 i32.const 0 i32.ge_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $8 - local.get $6 + local.get $var$8 + local.get $var$6 i32.const 3 i32.shl i32.add f64.load - local.get $4 + local.get $var$4 f64.eq if - local.get $6 + local.get $var$6 br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 1 i32.sub - local.set $6 + local.set $var$6 br $while-continue|0 end end i32.const -1 end ) - (func $~lib/typedarray/Float64Array#lastIndexOf@varargs (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#lastIndexOf@varargs (param $this i32) (param $searchElement f64) (param $fromIndex i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -19279,22 +19279,22 @@ end unreachable end - local.get $0 + local.get $this call $~lib/typedarray/Float64Array#get:length - local.set $2 + local.set $fromIndex end - local.get $0 - local.get $1 - local.get $2 + local.get $this + local.get $searchElement + local.get $fromIndex call $~lib/typedarray/Float64Array#lastIndexOf ) (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float64Array,f64> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (local $values i32) + (local $length i32) + (local $array i32) + (local $var$3 i32) + (local $var$4 i32) + (local $sliced i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -19308,41 +19308,41 @@ i32.store offset=8 global.get $~lib/memory/__stack_pointer global.get $std/typedarray/testArrayIndexOfAndLastIndexOfValues - local.tee $0 + local.tee $values i32.store - local.get $0 + local.get $values call $~lib/array/Array#get:length - local.set $1 + local.set $length global.get $~lib/memory/__stack_pointer i32.const 0 - local.get $1 + local.get $length call $~lib/typedarray/Float64Array#constructor - local.tee $2 + local.tee $array i32.store offset=4 i32.const 0 - local.set $3 + local.set $var$3 loop $for-loop|0 - local.get $3 - local.get $1 + local.get $var$3 + local.get $length i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 - local.get $3 - local.get $0 - local.get $3 + local.get $array + local.get $var$3 + local.get $values + local.get $var$3 call $~lib/array/Array#__get f64.convert_i32_s call $~lib/typedarray/Float64Array#__set - local.get $3 + local.get $var$3 i32.const 1 i32.add - local.set $3 + local.set $var$3 br $for-loop|0 end end - local.get $2 + local.get $array f64.const 0 i32.const 0 call $~lib/typedarray/Float64Array#indexOf @@ -19357,7 +19357,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f64.const 11 i32.const 0 call $~lib/typedarray/Float64Array#indexOf @@ -19372,7 +19372,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f64.const -1 i32.const 0 call $~lib/typedarray/Float64Array#indexOf @@ -19387,7 +19387,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f64.const 3 i32.const 0 call $~lib/typedarray/Float64Array#indexOf @@ -19402,7 +19402,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f64.const 3 i32.const 2 call $~lib/typedarray/Float64Array#indexOf @@ -19417,7 +19417,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f64.const 3 i32.const 3 call $~lib/typedarray/Float64Array#indexOf @@ -19432,7 +19432,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f64.const 3 i32.const 4 call $~lib/typedarray/Float64Array#indexOf @@ -19447,7 +19447,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f64.const 1 i32.const 10 call $~lib/typedarray/Float64Array#indexOf @@ -19462,7 +19462,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f64.const 1 i32.const -100 call $~lib/typedarray/Float64Array#indexOf @@ -19477,7 +19477,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f64.const 0 i32.const 1 global.set $~argumentsLength @@ -19494,7 +19494,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f64.const 11 i32.const 1 global.set $~argumentsLength @@ -19511,7 +19511,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f64.const -1 i32.const 1 global.set $~argumentsLength @@ -19528,7 +19528,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f64.const 3 i32.const 1 global.set $~argumentsLength @@ -19545,7 +19545,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f64.const 3 i32.const 4 call $~lib/typedarray/Float64Array#lastIndexOf @@ -19560,7 +19560,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f64.const 3 i32.const 3 call $~lib/typedarray/Float64Array#lastIndexOf @@ -19575,7 +19575,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f64.const 3 i32.const 2 call $~lib/typedarray/Float64Array#lastIndexOf @@ -19590,7 +19590,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f64.const 1 i32.const 100 call $~lib/typedarray/Float64Array#lastIndexOf @@ -19605,7 +19605,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f64.const 1 i32.const -10 call $~lib/typedarray/Float64Array#lastIndexOf @@ -19620,7 +19620,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $array f64.const 1 i32.const -11 call $~lib/typedarray/Float64Array#lastIndexOf @@ -19636,13 +19636,13 @@ unreachable end global.get $~lib/memory/__stack_pointer - local.get $2 + local.get $array i32.const 4 i32.const 9 call $~lib/typedarray/Float64Array#subarray - local.tee $5 + local.tee $sliced i32.store offset=8 - local.get $5 + local.get $sliced f64.const 3 i32.const 0 call $~lib/typedarray/Float64Array#indexOf @@ -19657,7 +19657,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced f64.const 4 i32.const 0 call $~lib/typedarray/Float64Array#indexOf @@ -19674,7 +19674,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced f64.const 5 i32.const 0 call $~lib/typedarray/Float64Array#indexOf @@ -19691,7 +19691,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced f64.const 9 i32.const 0 call $~lib/typedarray/Float64Array#indexOf @@ -19706,7 +19706,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced f64.const 10 i32.const 0 call $~lib/typedarray/Float64Array#indexOf @@ -19721,7 +19721,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced f64.const 11 i32.const 0 call $~lib/typedarray/Float64Array#indexOf @@ -19736,7 +19736,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced f64.const 5 i32.const 1 call $~lib/typedarray/Float64Array#indexOf @@ -19753,7 +19753,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $sliced f64.const 5 i32.const 2 call $~lib/typedarray/Float64Array#indexOf @@ -19773,87 +19773,87 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $~lib/typedarray/Float64Array#includes (param $0 i32) (param $1 f64) (param $2 i32) (result i32) - (local $3 i32) - (local $4 f64) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 f64) + (func $~lib/typedarray/Float64Array#includes (param $this i32) (param $searchElement f64) (param $fromIndex i32) (result i32) + (local $var$3 i32) + (local $var$4 f64) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $elem f64) block $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + local.get $this + local.set $var$5 + local.get $searchElement + local.set $var$4 + local.get $fromIndex + local.set $var$3 i32.const 1 drop - local.get $3 - local.set $6 - local.get $5 + local.get $var$3 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Float64Array#get:length - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.ge_s end if i32.const 0 br $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 0 i32.lt_s if - local.get $7 - local.get $6 + local.get $var$7 + local.get $var$6 i32.add - local.tee $8 + local.tee $var$8 i32.const 0 - local.tee $9 - local.get $8 - local.get $9 + local.tee $var$9 + local.get $var$8 + local.get $var$9 i32.gt_s select - local.set $6 + local.set $var$6 end - local.get $5 + local.get $var$5 i32.load offset=4 - local.set $8 + local.set $var$8 loop $while-continue|0 - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $8 - local.get $6 + local.get $var$8 + local.get $var$6 i32.const 3 i32.shl i32.add f64.load - local.set $10 - local.get $10 - local.get $4 + local.set $elem + local.get $elem + local.get $var$4 f64.eq if (result i32) i32.const 1 else - local.get $10 - local.get $10 + local.get $elem + local.get $elem f64.ne - local.get $4 - local.get $4 + local.get $var$4 + local.get $var$4 f64.ne i32.and end @@ -19861,10 +19861,10 @@ i32.const 1 br $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 1 i32.add - local.set $6 + local.set $var$6 br $while-continue|0 end end @@ -19872,87 +19872,87 @@ br $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 end ) - (func $~lib/typedarray/Float32Array#includes (param $0 i32) (param $1 f32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 f32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 f32) + (func $~lib/typedarray/Float32Array#includes (param $this i32) (param $searchElement f32) (param $fromIndex i32) (result i32) + (local $var$3 i32) + (local $var$4 f32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $elem f32) block $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + local.get $this + local.set $var$5 + local.get $searchElement + local.set $var$4 + local.get $fromIndex + local.set $var$3 i32.const 1 drop - local.get $3 - local.set $6 - local.get $5 + local.get $var$3 + local.set $var$6 + local.get $var$5 call $~lib/typedarray/Float32Array#get:length - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.ge_s end if i32.const 0 br $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 0 i32.lt_s if - local.get $7 - local.get $6 + local.get $var$7 + local.get $var$6 i32.add - local.tee $8 + local.tee $var$8 i32.const 0 - local.tee $9 - local.get $8 - local.get $9 + local.tee $var$9 + local.get $var$8 + local.get $var$9 i32.gt_s select - local.set $6 + local.set $var$6 end - local.get $5 + local.get $var$5 i32.load offset=4 - local.set $8 + local.set $var$8 loop $while-continue|0 - local.get $6 - local.get $7 + local.get $var$6 + local.get $var$7 i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $8 - local.get $6 + local.get $var$8 + local.get $var$6 i32.const 2 i32.shl i32.add f32.load - local.set $10 - local.get $10 - local.get $4 + local.set $elem + local.get $elem + local.get $var$4 f32.eq if (result i32) i32.const 1 else - local.get $10 - local.get $10 + local.get $elem + local.get $elem f32.ne - local.get $4 - local.get $4 + local.get $var$4 + local.get $var$4 f32.ne i32.and end @@ -19960,10 +19960,10 @@ i32.const 1 br $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 end - local.get $6 + local.get $var$6 i32.const 1 i32.add - local.set $6 + local.set $var$6 br $while-continue|0 end end @@ -19971,28 +19971,28 @@ br $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 end ) - (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) - local.get $0 + (func $~lib/util/number/decimalCount32 (param $value i32) (result i32) + local.get $value i32.const 100000 i32.lt_u if - local.get $0 + local.get $value i32.const 100 i32.lt_u if i32.const 1 - local.get $0 + local.get $value i32.const 10 i32.ge_u i32.add return else i32.const 3 - local.get $0 + local.get $value i32.const 10000 i32.ge_u i32.add - local.get $0 + local.get $value i32.const 1000 i32.ge_u i32.add @@ -20000,23 +20000,23 @@ end unreachable else - local.get $0 + local.get $value i32.const 10000000 i32.lt_u if i32.const 6 - local.get $0 + local.get $value i32.const 1000000 i32.ge_u i32.add return else i32.const 8 - local.get $0 + local.get $value i32.const 1000000000 i32.ge_u i32.add - local.get $0 + local.get $value i32.const 100000000 i32.ge_u i32.add @@ -20026,66 +20026,66 @@ end unreachable ) - (func $~lib/util/number/utoa32_dec_lut (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 i64) - (local $9 i64) - (local $10 i32) - (local $11 i32) + (func $~lib/util/number/utoa32_dec_lut (param $buffer i32) (param $num i32) (param $offset i32) + (local $var$3 i32) + (local $t i32) + (local $r i32) + (local $d1 i32) + (local $d2 i32) + (local $digits1 i64) + (local $digits2 i64) + (local $var$10 i32) + (local $var$11 i32) loop $while-continue|0 - local.get $1 + local.get $num i32.const 10000 i32.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $1 + local.get $num i32.const 10000 i32.div_u - local.set $4 - local.get $1 + local.set $t + local.get $num i32.const 10000 i32.rem_u - local.set $5 - local.get $4 - local.set $1 - local.get $5 + local.set $r + local.get $t + local.set $num + local.get $r i32.const 100 i32.div_u - local.set $6 - local.get $5 + local.set $d1 + local.get $r i32.const 100 i32.rem_u - local.set $7 + local.set $d2 i32.const 6988 - local.get $6 + local.get $d1 i32.const 2 i32.shl i32.add i64.load32_u - local.set $8 + local.set $digits1 i32.const 6988 - local.get $7 + local.get $d2 i32.const 2 i32.shl i32.add i64.load32_u - local.set $9 - local.get $2 + local.set $digits2 + local.get $offset i32.const 4 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $8 - local.get $9 + local.get $digits1 + local.get $digits2 i64.const 32 i64.shl i64.or @@ -20093,99 +20093,99 @@ br $while-continue|0 end end - local.get $1 + local.get $num i32.const 100 i32.ge_u if - local.get $1 + local.get $num i32.const 100 i32.div_u - local.set $3 - local.get $1 + local.set $var$3 + local.get $num i32.const 100 i32.rem_u - local.set $10 - local.get $3 - local.set $1 - local.get $2 + local.set $var$10 + local.get $var$3 + local.set $num + local.get $offset i32.const 2 i32.sub - local.set $2 + local.set $offset i32.const 6988 - local.get $10 + local.get $var$10 i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store end - local.get $1 + local.get $num i32.const 10 i32.ge_u if - local.get $2 + local.get $offset i32.const 2 i32.sub - local.set $2 + local.set $offset i32.const 6988 - local.get $1 + local.get $num i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store else - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 + local.set $offset i32.const 48 - local.get $1 + local.get $num i32.add - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store16 end ) - (func $~lib/util/number/utoa_hex_lut (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i32) + (func $~lib/util/number/utoa_hex_lut (param $buffer i32) (param $num i64) (param $offset i32) + (local $var$3 i32) loop $while-continue|0 - local.get $2 + local.get $offset i32.const 2 i32.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $2 + local.get $offset i32.const 2 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 7408 - local.get $1 + local.get $num i32.wrap_i64 i32.const 255 i32.and @@ -20194,20 +20194,20 @@ i32.add i32.load i32.store - local.get $1 + local.get $num i64.const 8 i64.shr_u - local.set $1 + local.set $num br $while-continue|0 end end - local.get $2 + local.get $offset i32.const 1 i32.and if - local.get $0 + local.get $buffer i32.const 7408 - local.get $1 + local.get $num i32.wrap_i64 i32.const 6 i32.shl @@ -20216,25 +20216,25 @@ i32.store16 end ) - (func $~lib/util/number/ulog_base (param $0 i64) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) - (local $4 i64) - (local $5 i32) - local.get $1 - local.set $2 - local.get $2 + (func $~lib/util/number/ulog_base (param $num i64) (param $base i32) (result i32) + (local $var$2 i32) + (local $b64 i64) + (local $b i64) + (local $e i32) + local.get $base + local.set $var$2 + local.get $var$2 i32.popcnt i32.const 1 i32.eq if i32.const 63 - local.get $0 + local.get $num i64.clz i32.wrap_i64 i32.sub i32.const 31 - local.get $1 + local.get $base i32.clz i32.sub i32.div_u @@ -20242,95 +20242,95 @@ i32.add return end - local.get $1 + local.get $base i64.extend_i32_s - local.set $3 - local.get $3 - local.set $4 + local.set $b64 + local.get $b64 + local.set $b i32.const 1 - local.set $5 + local.set $e loop $while-continue|0 - local.get $0 - local.get $4 + local.get $num + local.get $b i64.ge_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 - local.get $4 + local.get $num + local.get $b i64.div_u - local.set $0 - local.get $4 - local.get $4 + local.set $num + local.get $b + local.get $b i64.mul - local.set $4 - local.get $5 + local.set $b + local.get $e i32.const 1 i32.shl - local.set $5 + local.set $e br $while-continue|0 end end loop $while-continue|1 - local.get $0 + local.get $num i64.const 1 i64.ge_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 - local.get $3 + local.get $num + local.get $b64 i64.div_u - local.set $0 - local.get $5 + local.set $num + local.get $e i32.const 1 i32.add - local.set $5 + local.set $e br $while-continue|1 end end - local.get $5 + local.get $e i32.const 1 i32.sub ) - (func $~lib/util/number/utoa64_any_core (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i32) - (local $4 i64) - (local $5 i64) - (local $6 i64) - local.get $3 + (func $~lib/util/number/utoa64_any_core (param $buffer i32) (param $num i64) (param $offset i32) (param $radix i32) + (local $base i64) + (local $var$5 i64) + (local $q i64) + local.get $radix i64.extend_i32_s - local.set $4 - local.get $3 - local.get $3 + local.set $base + local.get $radix + local.get $radix i32.const 1 i32.sub i32.and i32.const 0 i32.eq if - local.get $3 + local.get $radix i32.ctz i32.const 7 i32.and i64.extend_i32_s - local.set $5 - local.get $4 + local.set $var$5 + local.get $base i64.const 1 i64.sub - local.set $6 + local.set $q loop $do-loop|0 - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 8464 - local.get $1 - local.get $6 + local.get $num + local.get $q i64.and i32.wrap_i64 i32.const 1 @@ -20338,34 +20338,34 @@ i32.add i32.load16_u i32.store16 - local.get $1 - local.get $5 + local.get $num + local.get $var$5 i64.shr_u - local.set $1 - local.get $1 + local.set $num + local.get $num i64.const 0 i64.ne br_if $do-loop|0 end else loop $do-loop|1 - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 - local.get $1 - local.get $4 + local.set $offset + local.get $num + local.get $base i64.div_u - local.set $6 - local.get $0 - local.get $2 + local.set $q + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 8464 - local.get $1 - local.get $6 - local.get $4 + local.get $num + local.get $q + local.get $base i64.mul i64.sub i32.wrap_i64 @@ -20374,52 +20374,52 @@ i32.add i32.load16_u i32.store16 - local.get $6 - local.set $1 - local.get $1 + local.get $q + local.set $num + local.get $num i64.const 0 i64.ne br_if $do-loop|1 end end ) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u ) - (func $~lib/util/number/itoa_buffered (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) + (func $~lib/util/number/itoa_buffered (param $buffer i32) (param $value i32) (result i32) + (local $sign i32) + (local $dest i32) + (local $decimals i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) i32.const 0 - local.set $2 + local.set $sign i32.const 1 drop - local.get $1 + local.get $value i32.extend8_s i32.const 0 i32.lt_s - local.set $2 - local.get $2 + local.set $sign + local.get $sign if i32.const 1 i32.const 1 i32.eq drop - local.get $1 + local.get $value i32.extend8_s i32.const -128 i32.eq if - local.get $0 + local.get $buffer i32.const 45 i64.extend_i32_s i32.const 48 @@ -20451,20 +20451,20 @@ i32.const 2 i32.eq drop - local.get $0 + local.get $buffer i32.const 45 i32.store16 i32.const 0 - local.get $1 + local.get $value i32.sub - local.set $1 + local.set $value end - local.get $0 - local.get $2 + local.get $buffer + local.get $sign i32.const 1 i32.shl i32.add - local.set $3 + local.set $dest i32.const 0 i32.const 1 i32.le_s @@ -20475,90 +20475,90 @@ i32.const 4 i32.le_u drop - local.get $1 + local.get $value i32.extend8_s i32.const 10 i32.lt_u if - local.get $3 - local.get $1 + local.get $dest + local.get $value i32.extend8_s i32.const 48 i32.or i32.store16 i32.const 1 - local.get $2 + local.get $sign i32.add return end i32.const 0 - local.set $4 + local.set $decimals i32.const 1 i32.const 4 i32.le_u drop - local.get $1 + local.get $value i32.extend8_s - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 call $~lib/util/number/decimalCount32 - local.set $4 - local.get $3 - local.set $8 - local.get $5 - local.set $7 - local.get $4 - local.set $6 + local.set $decimals + local.get $dest + local.set $var$8 + local.get $var$5 + local.set $var$7 + local.get $decimals + local.set $var$6 i32.const 0 i32.const 1 i32.ge_s drop - local.get $8 - local.get $7 - local.get $6 + local.get $var$8 + local.get $var$7 + local.get $var$6 call $~lib/util/number/utoa32_dec_lut - local.get $2 - local.get $4 + local.get $sign + local.get $decimals i32.add ) - (func $~lib/typedarray/Int8Array#join (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Int8Array#join (param $this i32) (param $separator i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Int8Array#get:length - local.get $1 + local.get $separator call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.get $1 + (func $~lib/util/string/compareImpl (param $str1 i32) (param $index1 i32) (param $str2 i32) (param $index2 i32) (param $len i32) (result i32) + (local $ptr1 i32) + (local $ptr2 i32) + (local $var$7 i32) + (local $a i32) + (local $b i32) + local.get $str1 + local.get $index1 i32.const 1 i32.shl i32.add - local.set $5 - local.get $2 - local.get $3 + local.set $ptr1 + local.get $str2 + local.get $index2 i32.const 1 i32.shl i32.add - local.set $6 + local.set $ptr2 i32.const 0 i32.const 2 i32.lt_s drop - local.get $4 + local.get $len i32.const 4 i32.ge_u if (result i32) - local.get $5 + local.get $ptr1 i32.const 7 i32.and - local.get $6 + local.get $ptr2 i32.const 7 i32.and i32.or @@ -20569,27 +20569,27 @@ if block $do-break|0 loop $do-loop|0 - local.get $5 + local.get $ptr1 i64.load - local.get $6 + local.get $ptr2 i64.load i64.ne if br $do-break|0 end - local.get $5 + local.get $ptr1 i32.const 8 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 8 i32.add - local.set $6 - local.get $4 + local.set $ptr2 + local.get $len i32.const 4 i32.sub - local.set $4 - local.get $4 + local.set $len + local.get $len i32.const 4 i32.ge_u br_if $do-loop|0 @@ -20597,59 +20597,59 @@ end end loop $while-continue|1 - local.get $4 - local.tee $7 + local.get $len + local.tee $var$7 i32.const 1 i32.sub - local.set $4 - local.get $7 - local.set $7 - local.get $7 + local.set $len + local.get $var$7 + local.set $var$7 + local.get $var$7 if - local.get $5 + local.get $ptr1 i32.load16_u - local.set $8 - local.get $6 + local.set $a + local.get $ptr2 i32.load16_u - local.set $9 - local.get $8 - local.get $9 + local.set $b + local.get $a + local.get $b i32.ne if - local.get $8 - local.get $9 + local.get $a + local.get $b i32.sub return end - local.get $5 + local.get $ptr1 i32.const 2 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 2 i32.add - local.set $6 + local.set $ptr2 br $while-continue|1 end end i32.const 0 ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__eq (param $left i32) (param $right i32) (result i32) + (local $leftLength i32) + local.get $left + local.get $right i32.eq if i32.const 1 return end - local.get $0 + local.get $left i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $1 + local.get $right i32.const 0 i32.eq end @@ -20657,57 +20657,57 @@ i32.const 0 return end - local.get $0 + local.get $left call $~lib/string/String#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $leftLength + local.get $leftLength + local.get $right call $~lib/string/String#get:length i32.ne if i32.const 0 return end - local.get $0 + local.get $left i32.const 0 - local.get $1 + local.get $right i32.const 0 - local.get $2 + local.get $leftLength call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/util/number/itoa_buffered (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) + (func $~lib/util/number/itoa_buffered (param $buffer i32) (param $value i32) (result i32) + (local $sign i32) + (local $dest i32) + (local $decimals i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) i32.const 0 - local.set $2 + local.set $sign i32.const 0 drop - local.get $0 - local.get $2 + local.get $buffer + local.get $sign i32.const 1 i32.shl i32.add - local.set $3 + local.set $dest i32.const 0 i32.const 1 i32.le_s drop i32.const 0 drop - local.get $1 + local.get $value i32.const 255 i32.and i32.const 10 i32.lt_u if - local.get $0 - local.get $1 + local.get $buffer + local.get $value i32.const 255 i32.and i32.const 48 @@ -20717,70 +20717,70 @@ return end i32.const 0 - local.set $4 + local.set $decimals i32.const 1 i32.const 4 i32.le_u drop - local.get $1 + local.get $value i32.const 255 i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 call $~lib/util/number/decimalCount32 - local.set $4 - local.get $3 - local.set $8 - local.get $5 - local.set $7 - local.get $4 - local.set $6 + local.set $decimals + local.get $dest + local.set $var$8 + local.get $var$5 + local.set $var$7 + local.get $decimals + local.set $var$6 i32.const 0 i32.const 1 i32.ge_s drop - local.get $8 - local.get $7 - local.get $6 + local.get $var$8 + local.get $var$7 + local.get $var$6 call $~lib/util/number/utoa32_dec_lut - local.get $2 - local.get $4 + local.get $sign + local.get $decimals i32.add ) - (func $~lib/typedarray/Uint8Array#join (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Uint8Array#join (param $this i32) (param $separator i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Uint8Array#get:length - local.get $1 + local.get $separator call $~lib/util/string/joinIntegerArray ) - (func $~lib/typedarray/Uint8ClampedArray#join (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Uint8ClampedArray#join (param $this i32) (param $separator i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Uint8ClampedArray#get:length - local.get $1 + local.get $separator call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/itoa_buffered (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) + (func $~lib/util/number/itoa_buffered (param $buffer i32) (param $value i32) (result i32) + (local $sign i32) + (local $dest i32) + (local $decimals i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) i32.const 0 - local.set $2 + local.set $sign i32.const 1 drop - local.get $1 + local.get $value i32.extend16_s i32.const 0 i32.lt_s - local.set $2 - local.get $2 + local.set $sign + local.get $sign if i32.const 2 i32.const 1 @@ -20790,12 +20790,12 @@ i32.const 2 i32.eq drop - local.get $1 + local.get $value i32.extend16_s i32.const -32768 i32.eq if - local.get $0 + local.get $buffer i32.const 45 i64.extend_i32_s i32.const 48 @@ -20820,7 +20820,7 @@ i64.shl i64.or i64.store - local.get $0 + local.get $buffer i32.const 8 i32.add i32.const 48 @@ -20838,20 +20838,20 @@ i32.const 6 return end - local.get $0 + local.get $buffer i32.const 45 i32.store16 i32.const 0 - local.get $1 + local.get $value i32.sub - local.set $1 + local.set $value end - local.get $0 - local.get $2 + local.get $buffer + local.get $sign i32.const 1 i32.shl i32.add - local.set $3 + local.set $dest i32.const 0 i32.const 1 i32.le_s @@ -20862,92 +20862,92 @@ i32.const 4 i32.le_u drop - local.get $1 + local.get $value i32.extend16_s i32.const 10 i32.lt_u if - local.get $3 - local.get $1 + local.get $dest + local.get $value i32.extend16_s i32.const 48 i32.or i32.store16 i32.const 1 - local.get $2 + local.get $sign i32.add return end i32.const 0 - local.set $4 + local.set $decimals i32.const 2 i32.const 4 i32.le_u drop - local.get $1 + local.get $value i32.extend16_s - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 call $~lib/util/number/decimalCount32 - local.set $4 - local.get $3 - local.set $8 - local.get $5 - local.set $7 - local.get $4 - local.set $6 + local.set $decimals + local.get $dest + local.set $var$8 + local.get $var$5 + local.set $var$7 + local.get $decimals + local.set $var$6 i32.const 0 i32.const 1 i32.ge_s drop - local.get $8 - local.get $7 - local.get $6 + local.get $var$8 + local.get $var$7 + local.get $var$6 call $~lib/util/number/utoa32_dec_lut - local.get $2 - local.get $4 + local.get $sign + local.get $decimals i32.add ) - (func $~lib/typedarray/Int16Array#join (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Int16Array#join (param $this i32) (param $separator i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Int16Array#get:length - local.get $1 + local.get $separator call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/itoa_buffered (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) + (func $~lib/util/number/itoa_buffered (param $buffer i32) (param $value i32) (result i32) + (local $sign i32) + (local $dest i32) + (local $decimals i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) i32.const 0 - local.set $2 + local.set $sign i32.const 0 drop - local.get $0 - local.get $2 + local.get $buffer + local.get $sign i32.const 1 i32.shl i32.add - local.set $3 + local.set $dest i32.const 0 i32.const 1 i32.le_s drop i32.const 0 drop - local.get $1 + local.get $value i32.const 65535 i32.and i32.const 10 i32.lt_u if - local.get $0 - local.get $1 + local.get $buffer + local.get $value i32.const 65535 i32.and i32.const 48 @@ -20957,61 +20957,61 @@ return end i32.const 0 - local.set $4 + local.set $decimals i32.const 2 i32.const 4 i32.le_u drop - local.get $1 + local.get $value i32.const 65535 i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 call $~lib/util/number/decimalCount32 - local.set $4 - local.get $3 - local.set $8 - local.get $5 - local.set $7 - local.get $4 - local.set $6 + local.set $decimals + local.get $dest + local.set $var$8 + local.get $var$5 + local.set $var$7 + local.get $decimals + local.set $var$6 i32.const 0 i32.const 1 i32.ge_s drop - local.get $8 - local.get $7 - local.get $6 + local.get $var$8 + local.get $var$7 + local.get $var$6 call $~lib/util/number/utoa32_dec_lut - local.get $2 - local.get $4 + local.get $sign + local.get $decimals i32.add ) - (func $~lib/typedarray/Uint16Array#join (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Uint16Array#join (param $this i32) (param $separator i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Uint16Array#get:length - local.get $1 + local.get $separator call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/itoa_buffered (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) + (func $~lib/util/number/itoa_buffered (param $buffer i32) (param $value i32) (result i32) + (local $sign i32) + (local $dest i32) + (local $decimals i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) i32.const 0 - local.set $2 + local.set $sign i32.const 1 drop - local.get $1 + local.get $value i32.const 0 i32.lt_s - local.set $2 - local.get $2 + local.set $sign + local.get $sign if i32.const 4 i32.const 1 @@ -21021,20 +21021,20 @@ i32.const 2 i32.eq drop - local.get $0 + local.get $buffer i32.const 45 i32.store16 i32.const 0 - local.get $1 + local.get $value i32.sub - local.set $1 + local.set $value end - local.get $0 - local.get $2 + local.get $buffer + local.get $sign i32.const 1 i32.shl i32.add - local.set $3 + local.set $dest i32.const 0 i32.const 1 i32.le_s @@ -21045,87 +21045,87 @@ i32.const 4 i32.le_u drop - local.get $1 + local.get $value i32.const 10 i32.lt_u if - local.get $3 - local.get $1 + local.get $dest + local.get $value i32.const 48 i32.or i32.store16 i32.const 1 - local.get $2 + local.get $sign i32.add return end i32.const 0 - local.set $4 + local.set $decimals i32.const 4 i32.const 4 i32.le_u drop - local.get $1 - local.set $5 - local.get $5 + local.get $value + local.set $var$5 + local.get $var$5 call $~lib/util/number/decimalCount32 - local.set $4 - local.get $3 - local.set $8 - local.get $5 - local.set $7 - local.get $4 - local.set $6 + local.set $decimals + local.get $dest + local.set $var$8 + local.get $var$5 + local.set $var$7 + local.get $decimals + local.set $var$6 i32.const 0 i32.const 1 i32.ge_s drop - local.get $8 - local.get $7 - local.get $6 + local.get $var$8 + local.get $var$7 + local.get $var$6 call $~lib/util/number/utoa32_dec_lut - local.get $2 - local.get $4 + local.get $sign + local.get $decimals i32.add ) - (func $~lib/typedarray/Int32Array#join (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Int32Array#join (param $this i32) (param $separator i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Int32Array#get:length - local.get $1 + local.get $separator call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/itoa_buffered (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) + (func $~lib/util/number/itoa_buffered (param $buffer i32) (param $value i32) (result i32) + (local $sign i32) + (local $dest i32) + (local $decimals i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) i32.const 0 - local.set $2 + local.set $sign i32.const 0 drop - local.get $0 - local.get $2 + local.get $buffer + local.get $sign i32.const 1 i32.shl i32.add - local.set $3 + local.set $dest i32.const 0 i32.const 1 i32.le_s drop i32.const 0 drop - local.get $1 + local.get $value i32.const 10 i32.lt_u if - local.get $0 - local.get $1 + local.get $buffer + local.get $value i32.const 48 i32.or i32.store16 @@ -21133,68 +21133,68 @@ return end i32.const 0 - local.set $4 + local.set $decimals i32.const 4 i32.const 4 i32.le_u drop - local.get $1 - local.set $5 - local.get $5 + local.get $value + local.set $var$5 + local.get $var$5 call $~lib/util/number/decimalCount32 - local.set $4 - local.get $3 - local.set $8 - local.get $5 - local.set $7 - local.get $4 - local.set $6 + local.set $decimals + local.get $dest + local.set $var$8 + local.get $var$5 + local.set $var$7 + local.get $decimals + local.set $var$6 i32.const 0 i32.const 1 i32.ge_s drop - local.get $8 - local.get $7 - local.get $6 + local.get $var$8 + local.get $var$7 + local.get $var$6 call $~lib/util/number/utoa32_dec_lut - local.get $2 - local.get $4 + local.get $sign + local.get $decimals i32.add ) - (func $~lib/typedarray/Uint32Array#join (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Uint32Array#join (param $this i32) (param $separator i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Uint32Array#get:length - local.get $1 + local.get $separator call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/decimalCount64High (param $0 i64) (result i32) - local.get $0 + (func $~lib/util/number/decimalCount64High (param $value i64) (result i32) + local.get $value i64.const 1000000000000000 i64.lt_u if - local.get $0 + local.get $value i64.const 1000000000000 i64.lt_u if i32.const 10 - local.get $0 + local.get $value i64.const 100000000000 i64.ge_u i32.add - local.get $0 + local.get $value i64.const 10000000000 i64.ge_u i32.add return else i32.const 13 - local.get $0 + local.get $value i64.const 100000000000000 i64.ge_u i32.add - local.get $0 + local.get $value i64.const 10000000000000 i64.ge_u i32.add @@ -21202,23 +21202,23 @@ end unreachable else - local.get $0 + local.get $value i64.const 100000000000000000 i64.lt_u if i32.const 16 - local.get $0 + local.get $value i64.const 10000000000000000 i64.ge_u i32.add return else i32.const 18 - local.get $0 + local.get $value i64.const -8446744073709551616 i64.ge_u i32.add - local.get $0 + local.get $value i64.const 1000000000000000000 i64.ge_u i32.add @@ -21228,116 +21228,116 @@ end unreachable ) - (func $~lib/util/number/utoa64_dec_lut (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i32) - (local $4 i64) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i64) - (local $13 i64) + (func $~lib/util/number/utoa64_dec_lut (param $buffer i32) (param $num i64) (param $offset i32) + (local $var$3 i32) + (local $t i64) + (local $r i32) + (local $b i32) + (local $c i32) + (local $b1 i32) + (local $b2 i32) + (local $c1 i32) + (local $c2 i32) + (local $digits1 i64) + (local $digits2 i64) loop $while-continue|0 - local.get $1 + local.get $num i64.const 100000000 i64.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $1 + local.get $num i64.const 100000000 i64.div_u - local.set $4 - local.get $1 - local.get $4 + local.set $t + local.get $num + local.get $t i64.const 100000000 i64.mul i64.sub i32.wrap_i64 - local.set $5 - local.get $4 - local.set $1 - local.get $5 + local.set $r + local.get $t + local.set $num + local.get $r i32.const 10000 i32.div_u - local.set $6 - local.get $5 + local.set $b + local.get $r i32.const 10000 i32.rem_u - local.set $7 - local.get $6 + local.set $c + local.get $b i32.const 100 i32.div_u - local.set $8 - local.get $6 + local.set $b1 + local.get $b i32.const 100 - i32.rem_u - local.set $9 - local.get $7 + i32.rem_u + local.set $b2 + local.get $c i32.const 100 i32.div_u - local.set $10 - local.get $7 + local.set $c1 + local.get $c i32.const 100 i32.rem_u - local.set $11 + local.set $c2 i32.const 6988 - local.get $10 + local.get $c1 i32.const 2 i32.shl i32.add i64.load32_u - local.set $12 + local.set $digits1 i32.const 6988 - local.get $11 + local.get $c2 i32.const 2 i32.shl i32.add i64.load32_u - local.set $13 - local.get $2 + local.set $digits2 + local.get $offset i32.const 4 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $12 - local.get $13 + local.get $digits1 + local.get $digits2 i64.const 32 i64.shl i64.or i64.store i32.const 6988 - local.get $8 + local.get $b1 i32.const 2 i32.shl i32.add i64.load32_u - local.set $12 + local.set $digits1 i32.const 6988 - local.get $9 + local.get $b2 i32.const 2 i32.shl i32.add i64.load32_u - local.set $13 - local.get $2 + local.set $digits2 + local.get $offset i32.const 4 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $12 - local.get $13 + local.get $digits1 + local.get $digits2 i64.const 32 i64.shl i64.or @@ -21345,31 +21345,31 @@ br $while-continue|0 end end - local.get $0 - local.get $1 + local.get $buffer + local.get $num i32.wrap_i64 - local.get $2 + local.get $offset call $~lib/util/number/utoa32_dec_lut ) - (func $~lib/util/number/itoa_buffered (param $0 i32) (param $1 i64) (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 i64) - (local $10 i64) + (func $~lib/util/number/itoa_buffered (param $buffer i32) (param $value i64) (result i32) + (local $sign i32) + (local $dest i32) + (local $decimals i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i64) + (local $var$10 i64) i32.const 0 - local.set $2 + local.set $sign i32.const 1 drop - local.get $1 + local.get $value i64.const 0 i64.lt_s - local.set $2 - local.get $2 + local.set $sign + local.get $sign if i32.const 8 i32.const 1 @@ -21379,20 +21379,20 @@ i32.const 2 i32.eq drop - local.get $0 + local.get $buffer i32.const 45 i32.store16 i64.const 0 - local.get $1 + local.get $value i64.sub - local.set $1 + local.set $value end - local.get $0 - local.get $2 + local.get $buffer + local.get $sign i32.const 1 i32.shl i32.add - local.set $3 + local.set $dest i32.const 0 i32.const 1 i32.le_s @@ -21403,117 +21403,117 @@ i32.const 4 i32.le_u drop - local.get $1 + local.get $value i64.const 10 i64.lt_u if - local.get $3 - local.get $1 + local.get $dest + local.get $value i32.const 48 i64.extend_i32_s i64.or i64.store16 i32.const 1 - local.get $2 + local.get $sign i32.add return end i32.const 0 - local.set $4 + local.set $decimals i32.const 8 i32.const 4 i32.le_u drop - local.get $1 + local.get $value global.get $~lib/builtins/u32.MAX_VALUE i64.extend_i32_u i64.le_u if - local.get $1 + local.get $value i32.wrap_i64 - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 call $~lib/util/number/decimalCount32 - local.set $4 - local.get $3 - local.set $8 - local.get $5 - local.set $7 - local.get $4 - local.set $6 + local.set $decimals + local.get $dest + local.set $var$8 + local.get $var$5 + local.set $var$7 + local.get $decimals + local.set $var$6 i32.const 0 i32.const 1 i32.ge_s drop - local.get $8 - local.get $7 - local.get $6 + local.get $var$8 + local.get $var$7 + local.get $var$6 call $~lib/util/number/utoa32_dec_lut else - local.get $1 - local.set $9 - local.get $9 + local.get $value + local.set $var$9 + local.get $var$9 call $~lib/util/number/decimalCount64High - local.set $4 - local.get $3 - local.set $7 - local.get $9 - local.set $10 - local.get $4 - local.set $6 + local.set $decimals + local.get $dest + local.set $var$7 + local.get $var$9 + local.set $var$10 + local.get $decimals + local.set $var$6 i32.const 0 i32.const 1 i32.ge_s drop - local.get $7 - local.get $10 - local.get $6 + local.get $var$7 + local.get $var$10 + local.get $var$6 call $~lib/util/number/utoa64_dec_lut end - local.get $2 - local.get $4 + local.get $sign + local.get $decimals i32.add ) - (func $~lib/typedarray/Int64Array#join (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Int64Array#join (param $this i32) (param $separator i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Int64Array#get:length - local.get $1 + local.get $separator call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/itoa_buffered (param $0 i32) (param $1 i64) (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 i64) - (local $10 i64) + (func $~lib/util/number/itoa_buffered (param $buffer i32) (param $value i64) (result i32) + (local $sign i32) + (local $dest i32) + (local $decimals i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i64) + (local $var$10 i64) i32.const 0 - local.set $2 + local.set $sign i32.const 0 drop - local.get $0 - local.get $2 + local.get $buffer + local.get $sign i32.const 1 i32.shl i32.add - local.set $3 + local.set $dest i32.const 0 i32.const 1 i32.le_s drop i32.const 0 drop - local.get $1 + local.get $value i64.const 10 i64.lt_u if - local.get $0 - local.get $1 + local.get $buffer + local.get $value i32.const 48 i64.extend_i32_s i64.or @@ -21522,129 +21522,129 @@ return end i32.const 0 - local.set $4 + local.set $decimals i32.const 8 i32.const 4 i32.le_u drop - local.get $1 + local.get $value global.get $~lib/builtins/u32.MAX_VALUE i64.extend_i32_u i64.le_u if - local.get $1 + local.get $value i32.wrap_i64 - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 call $~lib/util/number/decimalCount32 - local.set $4 - local.get $3 - local.set $8 - local.get $5 - local.set $7 - local.get $4 - local.set $6 + local.set $decimals + local.get $dest + local.set $var$8 + local.get $var$5 + local.set $var$7 + local.get $decimals + local.set $var$6 i32.const 0 i32.const 1 i32.ge_s drop - local.get $8 - local.get $7 - local.get $6 + local.get $var$8 + local.get $var$7 + local.get $var$6 call $~lib/util/number/utoa32_dec_lut else - local.get $1 - local.set $9 - local.get $9 + local.get $value + local.set $var$9 + local.get $var$9 call $~lib/util/number/decimalCount64High - local.set $4 - local.get $3 - local.set $7 - local.get $9 - local.set $10 - local.get $4 - local.set $6 + local.set $decimals + local.get $dest + local.set $var$7 + local.get $var$9 + local.set $var$10 + local.get $decimals + local.set $var$6 i32.const 0 i32.const 1 i32.ge_s drop - local.get $7 - local.get $10 - local.get $6 + local.get $var$7 + local.get $var$10 + local.get $var$6 call $~lib/util/number/utoa64_dec_lut end - local.get $2 - local.get $4 + local.get $sign + local.get $decimals i32.add ) - (func $~lib/typedarray/Uint64Array#join (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Uint64Array#join (param $this i32) (param $separator i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Uint64Array#get:length - local.get $1 + local.get $separator call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i64) - (local $11 i32) - (local $12 i64) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i32) - (local $24 i32) - (local $25 i32) - (local $26 i32) - (local $27 i64) - i32.const 0 - local.get $4 + (func $~lib/util/number/genDigits (param $buffer i32) (param $w_frc i64) (param $w_exp i32) (param $mp_frc i64) (param $mp_exp i32) (param $delta i64) (param $sign i32) (result i32) + (local $one_exp i32) + (local $one_frc i64) + (local $mask i64) + (local $wp_w_frc i64) + (local $p1 i32) + (local $p2 i64) + (local $kappa i32) + (local $len i32) + (local $var$15 i32) + (local $d i32) + (local $var$17 i32) + (local $tmp i64) + (local $var$19 i64) + (local $var$20 i64) + (local $var$21 i64) + (local $d_0 i64) + (local $var$23 i32) + (local $var$24 i32) + (local $var$25 i32) + (local $var$26 i32) + (local $var$27 i64) + i32.const 0 + local.get $mp_exp i32.sub - local.set $7 + local.set $one_exp i64.const 1 - local.get $7 + local.get $one_exp i64.extend_i32_s i64.shl - local.set $8 - local.get $8 + local.set $one_frc + local.get $one_frc i64.const 1 i64.sub - local.set $9 - local.get $3 - local.get $1 + local.set $mask + local.get $mp_frc + local.get $w_frc i64.sub - local.set $10 - local.get $3 - local.get $7 + local.set $wp_w_frc + local.get $mp_frc + local.get $one_exp i64.extend_i32_s i64.shr_u i32.wrap_i64 - local.set $11 - local.get $3 - local.get $9 + local.set $p1 + local.get $mp_frc + local.get $mask i64.and - local.set $12 - local.get $11 + local.set $p2 + local.get $p1 call $~lib/util/number/decimalCount32 - local.set $13 - local.get $6 - local.set $14 + local.set $kappa + local.get $sign + local.set $len loop $while-continue|0 - local.get $13 + local.get $kappa i32.const 0 i32.gt_s - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 if block $break|1 block $case10|1 @@ -21658,275 +21658,275 @@ block $case2|1 block $case1|1 block $case0|1 - local.get $13 - local.set $17 - local.get $17 + local.get $kappa + local.set $var$17 + local.get $var$17 i32.const 10 i32.eq br_if $case0|1 - local.get $17 + local.get $var$17 i32.const 9 i32.eq br_if $case1|1 - local.get $17 + local.get $var$17 i32.const 8 i32.eq br_if $case2|1 - local.get $17 + local.get $var$17 i32.const 7 i32.eq br_if $case3|1 - local.get $17 + local.get $var$17 i32.const 6 i32.eq br_if $case4|1 - local.get $17 + local.get $var$17 i32.const 5 i32.eq br_if $case5|1 - local.get $17 + local.get $var$17 i32.const 4 i32.eq br_if $case6|1 - local.get $17 + local.get $var$17 i32.const 3 i32.eq br_if $case7|1 - local.get $17 + local.get $var$17 i32.const 2 i32.eq br_if $case8|1 - local.get $17 + local.get $var$17 i32.const 1 i32.eq br_if $case9|1 br $case10|1 end - local.get $11 + local.get $p1 i32.const 1000000000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 1000000000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 100000000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 100000000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 10000000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 10000000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 1000000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 1000000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 100000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 100000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 10000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 10000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 1000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 1000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 100 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 100 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 10 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 10 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 - local.set $16 + local.get $p1 + local.set $d i32.const 0 - local.set $11 + local.set $p1 br $break|1 end i32.const 0 - local.set $16 + local.set $d br $break|1 end - local.get $16 - local.get $14 + local.get $d + local.get $len i32.or if - local.get $0 - local.get $14 - local.tee $17 + local.get $buffer + local.get $len + local.tee $var$17 i32.const 1 i32.add - local.set $14 - local.get $17 + local.set $len + local.get $var$17 i32.const 1 i32.shl i32.add i32.const 48 - local.get $16 + local.get $d i32.const 65535 i32.and i32.add i32.store16 end - local.get $13 + local.get $kappa i32.const 1 i32.sub - local.set $13 - local.get $11 + local.set $kappa + local.get $p1 i64.extend_i32_u - local.get $7 + local.get $one_exp i64.extend_i32_s i64.shl - local.get $12 + local.get $p2 i64.add - local.set $18 - local.get $18 - local.get $5 + local.set $tmp + local.get $tmp + local.get $delta i64.le_u if global.get $~lib/util/number/_K - local.get $13 + local.get $kappa i32.add global.set $~lib/util/number/_K - local.get $0 - local.set $23 - local.get $14 - local.set $17 - local.get $5 - local.set $22 - local.get $18 - local.set $21 + local.get $buffer + local.set $var$23 + local.get $len + local.set $var$17 + local.get $delta + local.set $d_0 + local.get $tmp + local.set $var$21 i32.const 9712 - local.get $13 + local.get $kappa i32.const 2 i32.shl i32.add i64.load32_u - local.get $7 + local.get $one_exp i64.extend_i32_s i64.shl - local.set $20 - local.get $10 - local.set $19 - local.get $23 - local.get $17 + local.set $var$20 + local.get $wp_w_frc + local.set $var$19 + local.get $var$23 + local.get $var$17 i32.const 1 i32.sub i32.const 1 i32.shl i32.add - local.set $24 - local.get $24 + local.set $var$24 + local.get $var$24 i32.load16_u - local.set $25 + local.set $var$25 loop $while-continue|3 - local.get $21 - local.get $19 + local.get $var$21 + local.get $var$19 i64.lt_u if (result i32) - local.get $22 - local.get $21 + local.get $d_0 + local.get $var$21 i64.sub - local.get $20 + local.get $var$20 i64.ge_u else i32.const 0 end if (result i32) - local.get $21 - local.get $20 + local.get $var$21 + local.get $var$20 i64.add - local.get $19 + local.get $var$19 i64.lt_u if (result i32) i32.const 1 else - local.get $19 - local.get $21 + local.get $var$19 + local.get $var$21 i64.sub - local.get $21 - local.get $20 + local.get $var$21 + local.get $var$20 i64.add - local.get $19 + local.get $var$19 i64.sub i64.gt_u end else i32.const 0 end - local.set $26 - local.get $26 + local.set $var$26 + local.get $var$26 if - local.get $25 + local.get $var$25 i32.const 1 i32.sub - local.set $25 - local.get $21 - local.get $20 + local.set $var$25 + local.get $var$21 + local.get $var$20 i64.add - local.set $21 + local.set $var$21 br $while-continue|3 end end - local.get $24 - local.get $25 + local.get $var$24 + local.get $var$25 i32.store16 - local.get $14 + local.get $len return end br $while-continue|0 @@ -21934,150 +21934,150 @@ end loop $while-continue|4 i32.const 1 - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 if - local.get $12 + local.get $p2 i64.const 10 i64.mul - local.set $12 - local.get $5 + local.set $p2 + local.get $delta i64.const 10 i64.mul - local.set $5 - local.get $12 - local.get $7 + local.set $delta + local.get $p2 + local.get $one_exp i64.extend_i32_s i64.shr_u - local.set $22 - local.get $22 - local.get $14 + local.set $d_0 + local.get $d_0 + local.get $len i64.extend_i32_s i64.or i64.const 0 i64.ne if - local.get $0 - local.get $14 - local.tee $25 + local.get $buffer + local.get $len + local.tee $var$25 i32.const 1 i32.add - local.set $14 - local.get $25 + local.set $len + local.get $var$25 i32.const 1 i32.shl i32.add i32.const 48 - local.get $22 + local.get $d_0 i32.wrap_i64 i32.const 65535 i32.and i32.add i32.store16 end - local.get $12 - local.get $9 + local.get $p2 + local.get $mask i64.and - local.set $12 - local.get $13 + local.set $p2 + local.get $kappa i32.const 1 i32.sub - local.set $13 - local.get $12 - local.get $5 + local.set $kappa + local.get $p2 + local.get $delta i64.lt_u if global.get $~lib/util/number/_K - local.get $13 + local.get $kappa i32.add global.set $~lib/util/number/_K - local.get $10 + local.get $wp_w_frc i32.const 9712 i32.const 0 - local.get $13 + local.get $kappa i32.sub i32.const 2 i32.shl i32.add i64.load32_u i64.mul - local.set $10 - local.get $0 - local.set $17 - local.get $14 - local.set $26 - local.get $5 - local.set $27 - local.get $12 - local.set $21 - local.get $8 - local.set $20 - local.get $10 - local.set $19 - local.get $17 - local.get $26 + local.set $wp_w_frc + local.get $buffer + local.set $var$17 + local.get $len + local.set $var$26 + local.get $delta + local.set $var$27 + local.get $p2 + local.set $var$21 + local.get $one_frc + local.set $var$20 + local.get $wp_w_frc + local.set $var$19 + local.get $var$17 + local.get $var$26 i32.const 1 i32.sub i32.const 1 i32.shl i32.add - local.set $25 - local.get $25 + local.set $var$25 + local.get $var$25 i32.load16_u - local.set $24 + local.set $var$24 loop $while-continue|6 - local.get $21 - local.get $19 + local.get $var$21 + local.get $var$19 i64.lt_u if (result i32) - local.get $27 - local.get $21 + local.get $var$27 + local.get $var$21 i64.sub - local.get $20 + local.get $var$20 i64.ge_u else i32.const 0 end if (result i32) - local.get $21 - local.get $20 + local.get $var$21 + local.get $var$20 i64.add - local.get $19 + local.get $var$19 i64.lt_u if (result i32) i32.const 1 else - local.get $19 - local.get $21 + local.get $var$19 + local.get $var$21 i64.sub - local.get $21 - local.get $20 + local.get $var$21 + local.get $var$20 i64.add - local.get $19 + local.get $var$19 i64.sub i64.gt_u end else i32.const 0 end - local.set $23 - local.get $23 + local.set $var$23 + local.get $var$23 if - local.get $24 + local.get $var$24 i32.const 1 i32.sub - local.set $24 - local.get $21 - local.get $20 + local.set $var$24 + local.get $var$21 + local.get $var$20 i64.add - local.set $21 + local.set $var$21 br $while-continue|6 end end - local.get $25 - local.get $24 + local.get $var$25 + local.get $var$24 i32.store16 - local.get $14 + local.get $len return end br $while-continue|4 @@ -22085,21 +22085,21 @@ end unreachable ) - (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $2 - i32.eqz - if - local.get $0 - local.get $1 + (func $~lib/util/number/prettify (param $buffer i32) (param $length i32) (param $k i32) (result i32) + (local $kk i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $k + i32.eqz + if + local.get $buffer + local.get $length i32.const 1 i32.shl i32.add @@ -22109,51 +22109,51 @@ i32.shl i32.or i32.store - local.get $1 + local.get $length i32.const 2 i32.add return end - local.get $1 - local.get $2 + local.get $length + local.get $k i32.add - local.set $3 - local.get $1 - local.get $3 + local.set $kk + local.get $length + local.get $kk i32.le_s if (result i32) - local.get $3 + local.get $kk i32.const 21 i32.le_s else i32.const 0 end if - local.get $1 - local.set $4 + local.get $length + local.set $var$4 loop $for-loop|0 - local.get $4 - local.get $3 + local.get $var$4 + local.get $kk i32.lt_s - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $0 - local.get $4 + local.get $buffer + local.get $var$4 i32.const 1 i32.shl i32.add i32.const 48 i32.store16 - local.get $4 + local.get $var$4 i32.const 1 i32.add - local.set $4 + local.set $var$4 br $for-loop|0 end end - local.get $0 - local.get $3 + local.get $buffer + local.get $kk i32.const 1 i32.shl i32.add @@ -22163,55 +22163,55 @@ i32.shl i32.or i32.store - local.get $3 + local.get $kk i32.const 2 i32.add return else - local.get $3 + local.get $kk i32.const 0 i32.gt_s if (result i32) - local.get $3 + local.get $kk i32.const 21 i32.le_s else i32.const 0 end if - local.get $0 - local.get $3 + local.get $buffer + local.get $kk i32.const 1 i32.shl i32.add - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 i32.const 2 i32.add - local.get $4 + local.get $var$4 i32.const 0 - local.get $2 + local.get $k i32.sub i32.const 1 i32.shl memory.copy - local.get $0 - local.get $3 + local.get $buffer + local.get $kk i32.const 1 i32.shl i32.add i32.const 46 i32.store16 - local.get $1 + local.get $length i32.const 1 i32.add return else i32.const -6 - local.get $3 + local.get $kk i32.lt_s if (result i32) - local.get $3 + local.get $kk i32.const 0 i32.le_s else @@ -22219,20 +22219,20 @@ end if i32.const 2 - local.get $3 + local.get $kk i32.sub - local.set $4 - local.get $0 - local.get $4 + local.set $var$4 + local.get $buffer + local.get $var$4 i32.const 1 i32.shl i32.add - local.get $0 - local.get $1 + local.get $buffer + local.get $length i32.const 1 i32.shl memory.copy - local.get $0 + local.get $buffer i32.const 48 i32.const 46 i32.const 16 @@ -22240,164 +22240,164 @@ i32.or i32.store i32.const 2 - local.set $5 + local.set $var$5 loop $for-loop|1 - local.get $5 - local.get $4 + local.get $var$5 + local.get $var$4 i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $5 + local.get $buffer + local.get $var$5 i32.const 1 i32.shl i32.add i32.const 48 i32.store16 - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|1 end end - local.get $1 - local.get $4 + local.get $length + local.get $var$4 i32.add return else - local.get $1 + local.get $length i32.const 1 i32.eq if - local.get $0 + local.get $buffer i32.const 101 i32.store16 offset=2 - local.get $0 + local.get $buffer i32.const 4 i32.add - local.set $5 - local.get $3 + local.set $var$5 + local.get $kk i32.const 1 i32.sub - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 i32.const 0 i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if i32.const 0 - local.get $6 + local.get $var$6 i32.sub - local.set $6 + local.set $var$6 end - local.get $6 + local.get $var$6 call $~lib/util/number/decimalCount32 i32.const 1 i32.add - local.set $7 - local.get $5 - local.set $10 - local.get $6 - local.set $9 - local.get $7 - local.set $8 + local.set $var$7 + local.get $var$5 + local.set $var$10 + local.get $var$6 + local.set $var$9 + local.get $var$7 + local.set $var$8 i32.const 0 i32.const 1 i32.ge_s drop - local.get $10 - local.get $9 - local.get $8 + local.get $var$10 + local.get $var$9 + local.get $var$8 call $~lib/util/number/utoa32_dec_lut - local.get $5 + local.get $var$5 i32.const 45 i32.const 43 - local.get $4 + local.get $var$4 select i32.store16 - local.get $7 - local.set $1 - local.get $1 + local.get $var$7 + local.set $length + local.get $length i32.const 2 i32.add return else - local.get $1 + local.get $length i32.const 1 i32.shl - local.set $7 - local.get $0 + local.set $var$7 + local.get $buffer i32.const 4 i32.add - local.get $0 + local.get $buffer i32.const 2 i32.add - local.get $7 + local.get $var$7 i32.const 2 i32.sub memory.copy - local.get $0 + local.get $buffer i32.const 46 i32.store16 offset=2 - local.get $0 - local.get $7 + local.get $buffer + local.get $var$7 i32.add i32.const 101 i32.store16 offset=2 - local.get $1 - local.get $0 - local.get $7 + local.get $length + local.get $buffer + local.get $var$7 i32.add i32.const 4 i32.add - local.set $9 - local.get $3 + local.set $var$9 + local.get $kk i32.const 1 i32.sub - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 i32.const 0 i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if i32.const 0 - local.get $8 + local.get $var$8 i32.sub - local.set $8 + local.set $var$8 end - local.get $8 + local.get $var$8 call $~lib/util/number/decimalCount32 i32.const 1 i32.add - local.set $5 - local.get $9 - local.set $11 - local.get $8 - local.set $6 - local.get $5 - local.set $10 + local.set $var$5 + local.get $var$9 + local.set $var$11 + local.get $var$8 + local.set $var$6 + local.get $var$5 + local.set $var$10 i32.const 0 i32.const 1 i32.ge_s drop - local.get $11 - local.get $6 - local.get $10 + local.get $var$11 + local.get $var$6 + local.get $var$10 call $~lib/util/number/utoa32_dec_lut - local.get $9 + local.get $var$9 i32.const 45 i32.const 43 - local.get $4 + local.get $var$4 select i32.store16 - local.get $5 + local.get $var$5 i32.add - local.set $1 - local.get $1 + local.set $length + local.get $length i32.const 2 i32.add return @@ -22410,527 +22410,527 @@ end unreachable ) - (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f64) - (local $6 i64) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i32) - (local $11 i64) - (local $12 i64) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 f64) - (local $17 i64) - (local $18 i64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i64) - (local $24 i64) - (local $25 i64) - (local $26 i32) - (local $27 i64) - (local $28 i32) - local.get $1 + (func $~lib/util/number/dtoa_core (param $buffer i32) (param $value f64) (result i32) + (local $sign i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 f64) + (local $var$6 i64) + (local $var$7 i32) + (local $var$8 i64) + (local $var$9 i64) + (local $var$10 i32) + (local $var$11 i64) + (local $var$12 i64) + (local $var$13 i32) + (local $var$14 i32) + (local $var$15 i32) + (local $var$16 f64) + (local $var$17 i64) + (local $var$18 i64) + (local $var$19 i64) + (local $var$20 i64) + (local $var$21 i64) + (local $var$22 i64) + (local $var$23 i64) + (local $var$24 i64) + (local $var$25 i64) + (local $var$26 i32) + (local $var$27 i64) + (local $len i32) + local.get $value f64.const 0 - f64.lt - local.set $2 - local.get $2 - if - local.get $1 - f64.neg - local.set $1 - local.get $0 - i32.const 45 - i32.store16 - end - local.get $1 - local.set $5 - local.get $0 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + f64.lt + local.set $sign + local.get $sign + if + local.get $value + f64.neg + local.set $value + local.get $buffer + i32.const 45 + i32.store16 + end + local.get $value + local.set $var$5 + local.get $buffer + local.set $var$4 + local.get $sign + local.set $var$3 + local.get $var$5 i64.reinterpret_f64 - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 i64.const 9218868437227405312 i64.and i64.const 52 i64.shr_u i32.wrap_i64 - local.set $7 - local.get $6 + local.set $var$7 + local.get $var$6 i64.const 4503599627370495 i64.and - local.set $8 - local.get $7 + local.set $var$8 + local.get $var$7 i32.const 0 i32.ne i64.extend_i32_u i64.const 52 i64.shl - local.get $8 + local.get $var$8 i64.add - local.set $9 - local.get $7 + local.set $var$9 + local.get $var$7 i32.const 1 - local.get $7 + local.get $var$7 select i32.const 1023 i32.const 52 i32.add i32.sub - local.set $7 - local.get $9 - local.set $11 - local.get $7 - local.set $10 - local.get $11 + local.set $var$7 + local.get $var$9 + local.set $var$11 + local.get $var$7 + local.set $var$10 + local.get $var$11 i64.const 1 i64.shl i64.const 1 i64.add - local.set $12 - local.get $10 + local.set $var$12 + local.get $var$10 i32.const 1 i32.sub - local.set $13 - local.get $12 + local.set $var$13 + local.get $var$12 i64.clz i32.wrap_i64 - local.set $14 - local.get $12 - local.get $14 + local.set $var$14 + local.get $var$12 + local.get $var$14 i64.extend_i32_s i64.shl - local.set $12 - local.get $13 - local.get $14 + local.set $var$12 + local.get $var$13 + local.get $var$14 i32.sub - local.set $13 + local.set $var$13 i32.const 1 - local.get $11 + local.get $var$11 i64.const 4503599627370496 i64.eq i32.add - local.set $15 - local.get $12 + local.set $var$15 + local.get $var$12 global.set $~lib/util/number/_frc_plus - local.get $11 - local.get $15 + local.get $var$11 + local.get $var$15 i64.extend_i32_s i64.shl i64.const 1 i64.sub - local.get $10 - local.get $15 + local.get $var$10 + local.get $var$15 i32.sub - local.get $13 + local.get $var$13 i32.sub i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_minus - local.get $13 + local.get $var$13 global.set $~lib/util/number/_exp global.get $~lib/util/number/_exp - local.set $10 + local.set $var$10 i32.const -61 - local.get $10 + local.get $var$10 i32.sub f64.convert_i32_s f64.const 0.30102999566398114 f64.mul f64.const 347 f64.add - local.set $16 - local.get $16 + local.set $var$16 + local.get $var$16 i32.trunc_sat_f64_s - local.set $15 - local.get $15 - local.get $15 + local.set $var$15 + local.get $var$15 + local.get $var$15 f64.convert_i32_s - local.get $16 + local.get $var$16 f64.ne i32.add - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 i32.const 3 i32.shr_s i32.const 1 i32.add - local.set $14 + local.set $var$14 i32.const 348 - local.get $14 + local.get $var$14 i32.const 3 i32.shl i32.sub global.set $~lib/util/number/_K i32.const 8840 - local.get $14 + local.get $var$14 i32.const 3 i32.shl i32.add i64.load global.set $~lib/util/number/_frc_pow i32.const 9536 - local.get $14 + local.get $var$14 i32.const 1 i32.shl i32.add i32.load16_s global.set $~lib/util/number/_exp_pow - local.get $9 + local.get $var$9 i64.clz i32.wrap_i64 - local.set $14 - local.get $9 - local.get $14 + local.set $var$14 + local.get $var$9 + local.get $var$14 i64.extend_i32_s i64.shl - local.set $9 - local.get $7 - local.get $14 + local.set $var$9 + local.get $var$7 + local.get $var$14 i32.sub - local.set $7 + local.set $var$7 global.get $~lib/util/number/_frc_pow - local.set $12 + local.set $var$12 global.get $~lib/util/number/_exp_pow - local.set $15 - local.get $9 - local.set $17 - local.get $12 - local.set $11 - local.get $17 + local.set $var$15 + local.get $var$9 + local.set $var$17 + local.get $var$12 + local.set $var$11 + local.get $var$17 i64.const 4294967295 i64.and - local.set $18 - local.get $11 + local.set $var$18 + local.get $var$11 i64.const 4294967295 i64.and - local.set $19 - local.get $17 + local.set $var$19 + local.get $var$17 i64.const 32 i64.shr_u - local.set $20 - local.get $11 + local.set $var$20 + local.get $var$11 i64.const 32 i64.shr_u - local.set $21 - local.get $18 - local.get $19 + local.set $var$21 + local.get $var$18 + local.get $var$19 i64.mul - local.set $22 - local.get $20 - local.get $19 + local.set $var$22 + local.get $var$20 + local.get $var$19 i64.mul - local.get $22 + local.get $var$22 i64.const 32 i64.shr_u i64.add - local.set $23 - local.get $18 - local.get $21 + local.set $var$23 + local.get $var$18 + local.get $var$21 i64.mul - local.get $23 + local.get $var$23 i64.const 4294967295 i64.and i64.add - local.set $24 - local.get $24 + local.set $var$24 + local.get $var$24 i64.const 2147483647 i64.add - local.set $24 - local.get $23 + local.set $var$24 + local.get $var$23 i64.const 32 i64.shr_u - local.set $23 - local.get $24 + local.set $var$23 + local.get $var$24 i64.const 32 i64.shr_u - local.set $24 - local.get $20 - local.get $21 + local.set $var$24 + local.get $var$20 + local.get $var$21 i64.mul - local.get $23 + local.get $var$23 i64.add - local.get $24 + local.get $var$24 i64.add - local.set $24 - local.get $7 - local.set $10 - local.get $15 - local.set $13 - local.get $10 - local.get $13 + local.set $var$24 + local.get $var$7 + local.set $var$10 + local.get $var$15 + local.set $var$13 + local.get $var$10 + local.get $var$13 i32.add i32.const 64 i32.add - local.set $10 + local.set $var$10 global.get $~lib/util/number/_frc_plus - local.set $17 - local.get $12 - local.set $11 - local.get $17 + local.set $var$17 + local.get $var$12 + local.set $var$11 + local.get $var$17 i64.const 4294967295 i64.and - local.set $23 - local.get $11 + local.set $var$23 + local.get $var$11 i64.const 4294967295 i64.and - local.set $22 - local.get $17 + local.set $var$22 + local.get $var$17 i64.const 32 i64.shr_u - local.set $21 - local.get $11 + local.set $var$21 + local.get $var$11 i64.const 32 i64.shr_u - local.set $20 - local.get $23 - local.get $22 + local.set $var$20 + local.get $var$23 + local.get $var$22 i64.mul - local.set $19 - local.get $21 - local.get $22 + local.set $var$19 + local.get $var$21 + local.get $var$22 i64.mul - local.get $19 + local.get $var$19 i64.const 32 i64.shr_u i64.add - local.set $18 - local.get $23 - local.get $20 + local.set $var$18 + local.get $var$23 + local.get $var$20 i64.mul - local.get $18 + local.get $var$18 i64.const 4294967295 i64.and i64.add - local.set $25 - local.get $25 + local.set $var$25 + local.get $var$25 i64.const 2147483647 i64.add - local.set $25 - local.get $18 + local.set $var$25 + local.get $var$18 i64.const 32 i64.shr_u - local.set $18 - local.get $25 + local.set $var$18 + local.get $var$25 i64.const 32 i64.shr_u - local.set $25 - local.get $21 - local.get $20 + local.set $var$25 + local.get $var$21 + local.get $var$20 i64.mul - local.get $18 + local.get $var$18 i64.add - local.get $25 + local.get $var$25 i64.add i64.const 1 i64.sub - local.set $25 + local.set $var$25 global.get $~lib/util/number/_exp - local.set $26 - local.get $15 - local.set $13 - local.get $26 - local.get $13 + local.set $var$26 + local.get $var$15 + local.set $var$13 + local.get $var$26 + local.get $var$13 i32.add i32.const 64 i32.add - local.set $26 + local.set $var$26 global.get $~lib/util/number/_frc_minus - local.set $17 - local.get $12 - local.set $11 - local.get $17 + local.set $var$17 + local.get $var$12 + local.set $var$11 + local.get $var$17 i64.const 4294967295 i64.and - local.set $18 - local.get $11 + local.set $var$18 + local.get $var$11 i64.const 4294967295 i64.and - local.set $19 - local.get $17 + local.set $var$19 + local.get $var$17 i64.const 32 i64.shr_u - local.set $20 - local.get $11 + local.set $var$20 + local.get $var$11 i64.const 32 i64.shr_u - local.set $21 - local.get $18 - local.get $19 + local.set $var$21 + local.get $var$18 + local.get $var$19 i64.mul - local.set $22 - local.get $20 - local.get $19 + local.set $var$22 + local.get $var$20 + local.get $var$19 i64.mul - local.get $22 + local.get $var$22 i64.const 32 i64.shr_u i64.add - local.set $23 - local.get $18 - local.get $21 + local.set $var$23 + local.get $var$18 + local.get $var$21 i64.mul - local.get $23 + local.get $var$23 i64.const 4294967295 i64.and i64.add - local.set $27 - local.get $27 + local.set $var$27 + local.get $var$27 i64.const 2147483647 i64.add - local.set $27 - local.get $23 + local.set $var$27 + local.get $var$23 i64.const 32 i64.shr_u - local.set $23 - local.get $27 + local.set $var$23 + local.get $var$27 i64.const 32 i64.shr_u - local.set $27 - local.get $20 - local.get $21 + local.set $var$27 + local.get $var$20 + local.get $var$21 i64.mul - local.get $23 + local.get $var$23 i64.add - local.get $27 + local.get $var$27 i64.add i64.const 1 i64.add - local.set $27 - local.get $25 - local.get $27 + local.set $var$27 + local.get $var$25 + local.get $var$27 i64.sub - local.set $23 - local.get $4 - local.get $24 - local.get $10 - local.get $25 - local.get $26 - local.get $23 - local.get $3 + local.set $var$23 + local.get $var$4 + local.get $var$24 + local.get $var$10 + local.get $var$25 + local.get $var$26 + local.get $var$23 + local.get $var$3 call $~lib/util/number/genDigits - local.set $28 - local.get $0 - local.get $2 + local.set $len + local.get $buffer + local.get $sign i32.const 1 i32.shl i32.add - local.get $28 - local.get $2 + local.get $len + local.get $sign i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.set $28 - local.get $28 - local.get $2 + local.set $len + local.get $len + local.get $sign i32.add ) - (func $~lib/util/number/dtoa_buffered (param $0 i32) (param $1 f64) (result i32) - (local $2 i32) - local.get $1 + (func $~lib/util/number/dtoa_buffered (param $buffer i32) (param $value f64) (result i32) + (local $var$2 i32) + local.get $value f64.const 0 f64.eq if - local.get $0 + local.get $buffer i32.const 48 i32.store16 - local.get $0 + local.get $buffer i32.const 46 i32.store16 offset=2 - local.get $0 + local.get $buffer i32.const 48 i32.store16 offset=4 i32.const 3 return end - local.get $1 - local.get $1 + local.get $value + local.get $value f64.sub f64.const 0 f64.eq i32.eqz if - local.get $1 - local.get $1 + local.get $value + local.get $value f64.ne if - local.get $0 + local.get $buffer i32.const 78 i32.store16 - local.get $0 + local.get $buffer i32.const 97 i32.store16 offset=2 - local.get $0 + local.get $buffer i32.const 78 i32.store16 offset=4 i32.const 3 return else - local.get $1 + local.get $value f64.const 0 f64.lt - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $buffer i32.const 45 i32.store16 - local.get $0 + local.get $buffer i32.const 2 i32.add - local.set $0 + local.set $buffer end - local.get $0 + local.get $buffer i64.const 29555310648492105 i64.store - local.get $0 + local.get $buffer i64.const 34058970405077102 i64.store offset=8 i32.const 8 - local.get $2 + local.get $var$2 i32.add return end unreachable end - local.get $0 - local.get $1 + local.get $buffer + local.get $value call $~lib/util/number/dtoa_core ) - (func $~lib/typedarray/Float32Array#join (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Float32Array#join (param $this i32) (param $separator i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Float32Array#get:length - local.get $1 + local.get $separator call $~lib/util/string/joinFloatArray ) - (func $~lib/typedarray/Float64Array#join (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Float64Array#join (param $this i32) (param $separator i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Float64Array#get:length - local.get $1 + local.get $separator call $~lib/util/string/joinFloatArray ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (param $0 i32) (result i32) - local.get $0 + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 ) - (func $~lib/typedarray/Uint8Array.wrap@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array.wrap@varargs (param $buffer i32) (param $byteOffset i32) (param $length i32) (result i32) block $2of2 block $1of2 block $0of2 @@ -22943,17 +22943,17 @@ unreachable end i32.const 0 - local.set $1 + local.set $byteOffset end i32.const -1 - local.set $2 + local.set $length end - local.get $0 - local.get $1 - local.get $2 + local.get $buffer + local.get $byteOffset + local.get $length call $~lib/typedarray/Uint8Array.wrap ) - (func $~lib/typedarray/Int8Array.wrap@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array.wrap@varargs (param $buffer i32) (param $byteOffset i32) (param $length i32) (result i32) block $2of2 block $1of2 block $0of2 @@ -22966,17 +22966,17 @@ unreachable end i32.const 0 - local.set $1 + local.set $byteOffset end i32.const -1 - local.set $2 + local.set $length end - local.get $0 - local.get $1 - local.get $2 + local.get $buffer + local.get $byteOffset + local.get $length call $~lib/typedarray/Int8Array.wrap ) - (func $~lib/typedarray/Uint8ClampedArray.wrap@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray.wrap@varargs (param $buffer i32) (param $byteOffset i32) (param $length i32) (result i32) block $2of2 block $1of2 block $0of2 @@ -22989,17 +22989,17 @@ unreachable end i32.const 0 - local.set $1 + local.set $byteOffset end i32.const -1 - local.set $2 + local.set $length end - local.get $0 - local.get $1 - local.get $2 + local.get $buffer + local.get $byteOffset + local.get $length call $~lib/typedarray/Uint8ClampedArray.wrap ) - (func $~lib/typedarray/Int16Array.wrap@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array.wrap@varargs (param $buffer i32) (param $byteOffset i32) (param $length i32) (result i32) block $2of2 block $1of2 block $0of2 @@ -23012,17 +23012,17 @@ unreachable end i32.const 0 - local.set $1 + local.set $byteOffset end i32.const -1 - local.set $2 + local.set $length end - local.get $0 - local.get $1 - local.get $2 + local.get $buffer + local.get $byteOffset + local.get $length call $~lib/typedarray/Int16Array.wrap ) - (func $~lib/typedarray/Uint16Array.wrap@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array.wrap@varargs (param $buffer i32) (param $byteOffset i32) (param $length i32) (result i32) block $2of2 block $1of2 block $0of2 @@ -23035,17 +23035,17 @@ unreachable end i32.const 0 - local.set $1 + local.set $byteOffset end i32.const -1 - local.set $2 + local.set $length end - local.get $0 - local.get $1 - local.get $2 + local.get $buffer + local.get $byteOffset + local.get $length call $~lib/typedarray/Uint16Array.wrap ) - (func $~lib/typedarray/Int32Array.wrap@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array.wrap@varargs (param $buffer i32) (param $byteOffset i32) (param $length i32) (result i32) block $2of2 block $1of2 block $0of2 @@ -23058,17 +23058,17 @@ unreachable end i32.const 0 - local.set $1 + local.set $byteOffset end i32.const -1 - local.set $2 + local.set $length end - local.get $0 - local.get $1 - local.get $2 + local.get $buffer + local.get $byteOffset + local.get $length call $~lib/typedarray/Int32Array.wrap ) - (func $~lib/typedarray/Uint32Array.wrap@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array.wrap@varargs (param $buffer i32) (param $byteOffset i32) (param $length i32) (result i32) block $2of2 block $1of2 block $0of2 @@ -23081,17 +23081,17 @@ unreachable end i32.const 0 - local.set $1 + local.set $byteOffset end i32.const -1 - local.set $2 + local.set $length end - local.get $0 - local.get $1 - local.get $2 + local.get $buffer + local.get $byteOffset + local.get $length call $~lib/typedarray/Uint32Array.wrap ) - (func $~lib/typedarray/Int64Array.wrap@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int64Array.wrap@varargs (param $buffer i32) (param $byteOffset i32) (param $length i32) (result i32) block $2of2 block $1of2 block $0of2 @@ -23104,17 +23104,17 @@ unreachable end i32.const 0 - local.set $1 + local.set $byteOffset end i32.const -1 - local.set $2 + local.set $length end - local.get $0 - local.get $1 - local.get $2 + local.get $buffer + local.get $byteOffset + local.get $length call $~lib/typedarray/Int64Array.wrap ) - (func $~lib/typedarray/Uint64Array.wrap@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint64Array.wrap@varargs (param $buffer i32) (param $byteOffset i32) (param $length i32) (result i32) block $2of2 block $1of2 block $0of2 @@ -23127,17 +23127,17 @@ unreachable end i32.const 0 - local.set $1 + local.set $byteOffset end i32.const -1 - local.set $2 + local.set $length end - local.get $0 - local.get $1 - local.get $2 + local.get $buffer + local.get $byteOffset + local.get $length call $~lib/typedarray/Uint64Array.wrap ) - (func $~lib/typedarray/Float32Array.wrap@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array.wrap@varargs (param $buffer i32) (param $byteOffset i32) (param $length i32) (result i32) block $2of2 block $1of2 block $0of2 @@ -23150,17 +23150,17 @@ unreachable end i32.const 0 - local.set $1 + local.set $byteOffset end i32.const -1 - local.set $2 + local.set $length end - local.get $0 - local.get $1 - local.get $2 + local.get $buffer + local.get $byteOffset + local.get $length call $~lib/typedarray/Float32Array.wrap ) - (func $~lib/typedarray/Float64Array.wrap@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array.wrap@varargs (param $buffer i32) (param $byteOffset i32) (param $length i32) (result i32) block $2of2 block $1of2 block $0of2 @@ -23173,48 +23173,48 @@ unreachable end i32.const 0 - local.set $1 + local.set $byteOffset end i32.const -1 - local.set $2 + local.set $length end - local.get $0 - local.get $1 - local.get $2 + local.get $buffer + local.get $byteOffset + local.get $length call $~lib/typedarray/Float64Array.wrap ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Int8Array#get:length i32.gt_s end @@ -23226,109 +23226,109 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 0 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.const 2 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 0 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 i32.shl i32.add i32.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i32.store8 - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Int8Array#__uget (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Int8Array#__uget (param $this i32) (param $index i32) (result i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.add i32.load8_s ) - (func $~lib/array/Array#__uget (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/array/Array#__uget (param $this i32) (param $index i32) (result i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 0 i32.shl i32.add i32.load8_s ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (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 f32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 f32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Int8Array#get:length i32.gt_s end @@ -23340,100 +23340,100 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 0 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 1 i32.const 0 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 0 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 i32.shl i32.add f32.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 i32.eqz drop - local.get $11 - local.get $12 - local.get $12 + local.get $var$11 + local.get $var$12 + local.get $var$12 f32.sub f32.const 0 f32.eq if (result i32) - local.get $12 + local.get $var$12 i32.trunc_sat_f32_s else i32.const 0 end i32.store8 - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> (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 i64) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i64) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Int64Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Int8Array#get:length i32.gt_s end @@ -23445,94 +23445,94 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 0 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.const 3 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 0 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 3 i32.shl i32.add i64.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i32.wrap_i64 i32.store8 - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (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 f64) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 f64) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Int8Array#get:length i32.gt_s end @@ -23544,96 +23544,96 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 0 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 1 i32.const 0 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 0 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 3 i32.shl i32.add f64.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 i32.eqz drop - local.get $11 - local.get $12 - local.get $12 + local.get $var$11 + local.get $var$12 + local.get $var$12 f64.sub f64.const 0 f64.eq if (result i32) - local.get $12 + local.get $var$12 i32.trunc_sat_f64_s else i32.const 0 end i32.store8 - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Uint8Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Int8Array#get:length i32.gt_s end @@ -23645,58 +23645,58 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 0 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.eqz drop - local.get $7 - local.get $8 - local.get $6 + local.get $var$7 + local.get $var$8 + local.get $var$6 i32.const 0 i32.shl memory.copy ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Int16Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Int8Array#get:length i32.gt_s end @@ -23708,85 +23708,85 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 0 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.const 1 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 0 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 1 i32.shl i32.add i32.load16_s - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i32.store8 - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Int8Array#get:length i32.gt_s end @@ -23798,58 +23798,58 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 0 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.eqz drop - local.get $7 - local.get $8 - local.get $6 + local.get $var$7 + local.get $var$8 + local.get $var$6 i32.const 0 i32.shl memory.copy ) - (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint8Array#get:length i32.gt_s end @@ -23861,109 +23861,109 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 0 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.const 2 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 0 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 i32.shl i32.add i32.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i32.store8 - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/typedarray/Uint8Array#__uget (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Uint8Array#__uget (param $this i32) (param $index i32) (result i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.add i32.load8_u ) - (func $~lib/array/Array#__uget (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/array/Array#__uget (param $this i32) (param $index i32) (result i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 0 i32.shl i32.add i32.load8_u ) - (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (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 f32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 f32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint8Array#get:length i32.gt_s end @@ -23975,100 +23975,100 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 0 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 1 i32.const 0 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 0 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 i32.shl i32.add f32.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 i32.eqz drop - local.get $11 - local.get $12 - local.get $12 + local.get $var$11 + local.get $var$12 + local.get $var$12 f32.sub f32.const 0 f32.eq if (result i32) - local.get $12 + local.get $var$12 i32.trunc_sat_f32_u else i32.const 0 end i32.store8 - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint8Array#set<~lib/typedarray/Int64Array> (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 i64) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint8Array#set<~lib/typedarray/Int64Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i64) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Int64Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint8Array#get:length i32.gt_s end @@ -24080,90 +24080,90 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 0 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.const 3 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 0 i32.shl - i32.add - local.set $11 - local.get $8 - local.get $9 + i32.add + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 3 i32.shl i32.add i64.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i32.wrap_i64 i32.store8 - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (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 f64) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 f64) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint8Array#get:length i32.gt_s end @@ -24175,96 +24175,96 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 0 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 1 i32.const 0 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 0 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 3 i32.shl i32.add f64.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 i32.eqz drop - local.get $11 - local.get $12 - local.get $12 + local.get $var$11 + local.get $var$12 + local.get $var$12 f64.sub f64.const 0 f64.eq if (result i32) - local.get $12 + local.get $var$12 i32.trunc_sat_f64_u else i32.const 0 end i32.store8 - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint8Array#set<~lib/typedarray/Uint8Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint8Array#set<~lib/typedarray/Uint8Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Uint8Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint8Array#get:length i32.gt_s end @@ -24276,58 +24276,58 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 0 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.eqz drop - local.get $7 - local.get $8 - local.get $6 + local.get $var$7 + local.get $var$8 + local.get $var$6 i32.const 0 i32.shl memory.copy ) - (func $~lib/typedarray/Uint8Array#set<~lib/typedarray/Int16Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint8Array#set<~lib/typedarray/Int16Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Int16Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint8Array#get:length i32.gt_s end @@ -24339,85 +24339,85 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 0 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.const 1 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 0 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 1 i32.shl i32.add i32.load16_s - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i32.store8 - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint8Array#get:length i32.gt_s end @@ -24429,58 +24429,58 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 0 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.eqz drop - local.get $7 - local.get $8 - local.get $6 + local.get $var$7 + local.get $var$8 + local.get $var$6 i32.const 0 i32.shl memory.copy ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint8ClampedArray#get:length i32.gt_s end @@ -24492,42 +24492,42 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 0 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.const 2 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 0 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 i32.shl i32.add i32.load - local.set $12 + local.set $var$12 i32.const 1 drop i32.const 0 @@ -24539,68 +24539,68 @@ i32.const 4 i32.le_u drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i32.const 31 i32.shr_s i32.const -1 i32.xor i32.const 255 - local.get $12 + local.get $var$12 i32.sub i32.const 31 i32.shr_s - local.get $12 + local.get $var$12 i32.or i32.and i32.store8 - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint8ClampedArray#__uget (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Uint8ClampedArray#__uget (param $this i32) (param $index i32) (result i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.add i32.load8_u ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (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 f32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 f32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint8ClampedArray#get:length i32.gt_s end @@ -24612,56 +24612,56 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 0 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 1 i32.const 0 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 0 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 i32.shl i32.add f32.load - local.set $12 + local.set $var$12 i32.const 1 drop i32.const 1 drop - local.get $11 - local.get $12 - local.get $12 + local.get $var$11 + local.get $var$12 + local.get $var$12 f32.sub f32.const 0 f32.eq if (result i32) f32.const 0 f32.const 255 - local.get $12 + local.get $var$12 f32.min f32.max i32.trunc_sat_f32_u @@ -24669,46 +24669,46 @@ i32.const 0 end i32.store8 - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i64) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i64) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Int64Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint8ClampedArray#get:length i32.gt_s end @@ -24720,42 +24720,42 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 0 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.const 3 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 0 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 3 i32.shl i32.add i64.load - local.set $12 + local.set $var$12 i32.const 1 drop i32.const 0 @@ -24767,8 +24767,8 @@ i32.const 4 i32.le_u drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i32.wrap_i64 i32.const 31 i32.shr_s @@ -24776,56 +24776,56 @@ i32.xor i64.extend_i32_s i32.const 255 - local.get $12 + local.get $var$12 i32.wrap_i64 i32.sub i32.const 31 i32.shr_s i64.extend_i32_s - local.get $12 + local.get $var$12 i64.or i64.and i64.store8 - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (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 f64) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 f64) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint8ClampedArray#get:length i32.gt_s end @@ -24837,56 +24837,56 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 0 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 1 i32.const 0 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 0 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 3 i32.shl i32.add f64.load - local.set $12 + local.set $var$12 i32.const 1 drop i32.const 1 drop - local.get $11 - local.get $12 - local.get $12 + local.get $var$11 + local.get $var$12 + local.get $var$12 f64.sub f64.const 0 f64.eq if (result i32) f64.const 0 f64.const 255 - local.get $12 + local.get $var$12 f64.min f64.max i32.trunc_sat_f64_u @@ -24894,42 +24894,42 @@ i32.const 0 end i32.store8 - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Uint8Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Uint8Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Uint8Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint8ClampedArray#get:length i32.gt_s end @@ -24941,58 +24941,58 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 0 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.eqz drop - local.get $7 - local.get $8 - local.get $6 + local.get $var$7 + local.get $var$8 + local.get $var$6 i32.const 0 i32.shl memory.copy ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Int16Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint8ClampedArray#get:length i32.gt_s end @@ -25004,42 +25004,42 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 0 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.const 1 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 0 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 1 i32.shl i32.add i32.load16_s - local.set $12 + local.set $var$12 i32.const 1 drop i32.const 0 @@ -25051,61 +25051,61 @@ i32.const 4 i32.le_u drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i32.const 31 i32.shr_s i32.const -1 i32.xor i32.const 255 - local.get $12 + local.get $var$12 i32.sub i32.const 31 i32.shr_s - local.get $12 + local.get $var$12 i32.or i32.and i32.store8 - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint8ClampedArray#get:length i32.gt_s end @@ -25117,41 +25117,41 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 0 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 1 i32.eqz drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 0 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 0 i32.shl i32.add i32.load8_s - local.set $12 + local.set $var$12 i32.const 1 drop i32.const 0 @@ -25163,61 +25163,61 @@ i32.const 4 i32.le_u drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i32.const 31 i32.shr_s i32.const -1 i32.xor i32.const 255 - local.get $12 + local.get $var$12 i32.sub i32.const 31 i32.shr_s - local.get $12 + local.get $var$12 i32.or i32.and i32.store8 - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Int16Array#get:length i32.gt_s end @@ -25229,111 +25229,111 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 1 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 1 i32.const 2 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 1 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 i32.shl i32.add i32.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i32.store16 - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/typedarray/Int16Array#__uget (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Int16Array#__uget (param $this i32) (param $index i32) (result i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 1 i32.shl i32.add i32.load16_s ) - (func $~lib/array/Array#__uget (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/array/Array#__uget (param $this i32) (param $index i32) (result i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 1 i32.shl i32.add i32.load16_s ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (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 f32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 f32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Int16Array#get:length i32.gt_s end @@ -25345,100 +25345,100 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 1 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 1 i32.const 0 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 1 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 i32.shl i32.add f32.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 i32.eqz drop - local.get $11 - local.get $12 - local.get $12 + local.get $var$11 + local.get $var$12 + local.get $var$12 f32.sub f32.const 0 f32.eq if (result i32) - local.get $12 + local.get $var$12 i32.trunc_sat_f32_s else - i32.const 0 - end - i32.store16 - local.get $9 - i32.const 1 - i32.add - local.set $9 - br $for-loop|0 - end - end - ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> (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 i64) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + i32.const 0 + end + i32.store16 + local.get $var$9 + i32.const 1 + i32.add + local.set $var$9 + br $for-loop|0 + end + end + ) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i64) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Int64Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Int16Array#get:length i32.gt_s end @@ -25450,90 +25450,90 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 1 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 1 i32.const 3 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 1 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 3 i32.shl i32.add i64.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i32.wrap_i64 i32.store16 - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (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 f64) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 f64) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Int16Array#get:length i32.gt_s end @@ -25545,100 +25545,100 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 1 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 1 i32.const 0 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 1 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 3 i32.shl i32.add f64.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 i32.eqz drop - local.get $11 - local.get $12 - local.get $12 + local.get $var$11 + local.get $var$12 + local.get $var$12 f64.sub f64.const 0 f64.eq if (result i32) - local.get $12 + local.get $var$12 i32.trunc_sat_f64_s else i32.const 0 end i32.store16 - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Uint8Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Int16Array#get:length i32.gt_s end @@ -25650,85 +25650,85 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 1 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 1 i32.const 0 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 1 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 0 i32.shl i32.add i32.load8_u - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i32.store16 - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Int16Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Int16Array#get:length i32.gt_s end @@ -25740,58 +25740,58 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 1 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.eqz drop - local.get $7 - local.get $8 - local.get $6 + local.get $var$7 + local.get $var$8 + local.get $var$6 i32.const 1 i32.shl memory.copy ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Int16Array#get:length i32.gt_s end @@ -25803,89 +25803,89 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 1 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 1 i32.const 0 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 1 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 0 i32.shl i32.add i32.load8_s - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i32.store16 - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint16Array#get:length i32.gt_s end @@ -25897,111 +25897,111 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 1 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 1 i32.const 2 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 1 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 i32.shl i32.add i32.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i32.store16 - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/typedarray/Uint16Array#__uget (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Uint16Array#__uget (param $this i32) (param $index i32) (result i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 1 i32.shl i32.add i32.load16_u ) - (func $~lib/array/Array#__uget (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/array/Array#__uget (param $this i32) (param $index i32) (result i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 1 i32.shl i32.add i32.load16_u ) - (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (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 f32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 f32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint16Array#get:length i32.gt_s end @@ -26013,100 +26013,100 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 1 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 1 i32.const 0 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 - i32.lt_s - local.set $10 - local.get $10 + local.get $var$9 + local.get $var$6 + i32.lt_s + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 1 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 i32.shl i32.add f32.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 i32.eqz drop - local.get $11 - local.get $12 - local.get $12 + local.get $var$11 + local.get $var$12 + local.get $var$12 f32.sub f32.const 0 f32.eq if (result i32) - local.get $12 + local.get $var$12 i32.trunc_sat_f32_u else i32.const 0 end i32.store16 - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint16Array#set<~lib/typedarray/Int64Array> (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 i64) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint16Array#set<~lib/typedarray/Int64Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i64) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Int64Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint16Array#get:length i32.gt_s end @@ -26118,90 +26118,90 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 1 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 1 i32.const 3 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 1 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 3 i32.shl i32.add i64.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i32.wrap_i64 i32.store16 - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (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 f64) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 f64) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint16Array#get:length i32.gt_s end @@ -26213,100 +26213,100 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 1 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 1 i32.const 0 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 1 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 3 i32.shl i32.add f64.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 i32.eqz drop - local.get $11 - local.get $12 - local.get $12 + local.get $var$11 + local.get $var$12 + local.get $var$12 f64.sub f64.const 0 f64.eq if (result i32) - local.get $12 + local.get $var$12 i32.trunc_sat_f64_u else i32.const 0 end i32.store16 - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint16Array#set<~lib/typedarray/Uint8Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint16Array#set<~lib/typedarray/Uint8Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Uint8Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint16Array#get:length i32.gt_s end @@ -26318,85 +26318,85 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 1 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 1 i32.const 0 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 1 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 0 i32.shl i32.add i32.load8_u - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i32.store16 - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint16Array#set<~lib/typedarray/Int16Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint16Array#set<~lib/typedarray/Int16Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Int16Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint16Array#get:length i32.gt_s end @@ -26408,58 +26408,58 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 1 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.eqz drop - local.get $7 - local.get $8 - local.get $6 + local.get $var$7 + local.get $var$8 + local.get $var$6 i32.const 1 i32.shl memory.copy ) - (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint16Array#get:length i32.gt_s end @@ -26471,85 +26471,85 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 1 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 1 i32.const 0 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 1 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 0 i32.shl i32.add i32.load8_s - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i32.store16 - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Int32Array#get:length i32.gt_s end @@ -26561,76 +26561,76 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 2 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.eqz drop - local.get $7 - local.get $8 - local.get $6 + local.get $var$7 + local.get $var$8 + local.get $var$6 i32.const 2 i32.shl memory.copy ) - (func $~lib/typedarray/Int32Array#__uget (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Int32Array#__uget (param $this i32) (param $index i32) (result i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add i32.load ) - (func $~lib/array/Array#__uget (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/array/Array#__uget (param $this i32) (param $index i32) (result i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add i32.load ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (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 f32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 f32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Int32Array#get:length i32.gt_s end @@ -26642,100 +26642,100 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 2 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 1 i32.const 0 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 2 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 i32.shl i32.add f32.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 i32.eqz drop - local.get $11 - local.get $12 - local.get $12 + local.get $var$11 + local.get $var$12 + local.get $var$12 f32.sub f32.const 0 f32.eq if (result i32) - local.get $12 + local.get $var$12 i32.trunc_sat_f32_s else i32.const 0 end i32.store - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> (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 i64) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i64) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Int64Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Int32Array#get:length i32.gt_s end @@ -26747,90 +26747,90 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 2 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 2 i32.const 3 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 2 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 3 i32.shl i32.add i64.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i32.wrap_i64 i32.store - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (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 f64) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 f64) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Int32Array#get:length i32.gt_s end @@ -26842,100 +26842,100 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 2 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 1 i32.const 0 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 2 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 3 i32.shl i32.add f64.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 i32.eqz drop - local.get $11 - local.get $12 - local.get $12 + local.get $var$11 + local.get $var$12 + local.get $var$12 f64.sub f64.const 0 f64.eq if (result i32) - local.get $12 + local.get $var$12 i32.trunc_sat_f64_s else i32.const 0 end i32.store - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Uint8Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Int32Array#get:length i32.gt_s end @@ -26947,89 +26947,89 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 2 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 2 i32.const 0 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 2 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 0 i32.shl i32.add i32.load8_u - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i32.store - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Int16Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Int32Array#get:length i32.gt_s end @@ -27041,89 +27041,89 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 2 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 2 i32.const 1 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 2 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 1 i32.shl i32.add i32.load16_s - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i32.store - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Int32Array#get:length i32.gt_s end @@ -27135,85 +27135,85 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 2 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 2 i32.const 0 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 2 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 0 i32.shl i32.add i32.load8_s - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i32.store - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint32Array#get:length i32.gt_s end @@ -27225,80 +27225,80 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 2 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.eqz drop - local.get $7 - local.get $8 - local.get $6 + local.get $var$7 + local.get $var$8 + local.get $var$6 i32.const 2 i32.shl memory.copy ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/typedarray/Uint32Array#__uget (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Uint32Array#__uget (param $this i32) (param $index i32) (result i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add i32.load ) - (func $~lib/array/Array#__uget (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/array/Array#__uget (param $this i32) (param $index i32) (result i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add - i32.load - ) - (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (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 f32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + i32.load + ) + (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 f32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint32Array#get:length i32.gt_s end @@ -27310,100 +27310,100 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 2 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 1 i32.const 0 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 2 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 i32.shl i32.add f32.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 i32.eqz drop - local.get $11 - local.get $12 - local.get $12 + local.get $var$11 + local.get $var$12 + local.get $var$12 f32.sub f32.const 0 f32.eq if (result i32) - local.get $12 + local.get $var$12 i32.trunc_sat_f32_u else i32.const 0 end i32.store - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint32Array#set<~lib/typedarray/Int64Array> (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 i64) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint32Array#set<~lib/typedarray/Int64Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i64) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Int64Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint32Array#get:length i32.gt_s end @@ -27415,90 +27415,90 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 2 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 2 i32.const 3 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 2 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 3 i32.shl i32.add i64.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i32.wrap_i64 i32.store - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (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 f64) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 f64) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint32Array#get:length i32.gt_s end @@ -27510,100 +27510,100 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 2 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 1 i32.const 0 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 2 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 3 i32.shl i32.add f64.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 i32.eqz drop - local.get $11 - local.get $12 - local.get $12 + local.get $var$11 + local.get $var$12 + local.get $var$12 f64.sub f64.const 0 f64.eq if (result i32) - local.get $12 + local.get $var$12 i32.trunc_sat_f64_u else i32.const 0 end i32.store - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint32Array#set<~lib/typedarray/Uint8Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint32Array#set<~lib/typedarray/Uint8Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Uint8Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint32Array#get:length i32.gt_s end @@ -27615,89 +27615,89 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 2 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 2 i32.const 0 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 2 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 0 i32.shl i32.add i32.load8_u - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i32.store - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint32Array#set<~lib/typedarray/Int16Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint32Array#set<~lib/typedarray/Int16Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Int16Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint32Array#get:length i32.gt_s end @@ -27709,89 +27709,89 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 2 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 2 i32.const 1 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 2 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 1 i32.shl i32.add i32.load16_s - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i32.store - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint32Array#get:length i32.gt_s end @@ -27803,89 +27803,89 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 2 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 2 i32.const 0 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 2 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 - i32.const 0 - i32.shl - i32.add - i32.load8_s - local.set $12 - i32.const 0 - drop + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 0 - drop - local.get $11 - local.get $12 - i32.store - local.get $9 - i32.const 1 - i32.add - local.set $9 - br $for-loop|0 - end - end - ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + i32.shl + i32.add + i32.load8_s + local.set $var$12 + i32.const 0 + drop + i32.const 0 + drop + local.get $var$11 + local.get $var$12 + i32.store + local.get $var$9 + i32.const 1 + i32.add + local.set $var$9 + br $for-loop|0 + end + end + ) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Int64Array#get:length i32.gt_s end @@ -27897,112 +27897,112 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 3 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 3 i32.const 2 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 3 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 i32.shl i32.add i32.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i64.extend_i32_s i64.store - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/typedarray/Int64Array#__uget (param $0 i32) (param $1 i32) (result i64) - local.get $0 + (func $~lib/typedarray/Int64Array#__uget (param $this i32) (param $index i32) (result i64) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add i64.load ) - (func $~lib/array/Array#__uget (param $0 i32) (param $1 i32) (result i64) - local.get $0 + (func $~lib/array/Array#__uget (param $this i32) (param $index i32) (result i64) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add i64.load ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (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 f32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 f32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Int64Array#get:length i32.gt_s end @@ -28014,96 +28014,96 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 3 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 1 i32.const 0 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 3 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 i32.shl i32.add f32.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 i32.eqz drop - local.get $11 - local.get $12 - local.get $12 + local.get $var$11 + local.get $var$12 + local.get $var$12 f32.sub f32.const 0 f32.eq if (result i64) - local.get $12 + local.get $var$12 i64.trunc_sat_f32_s else i64.const 0 end i64.store - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Int64Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Int64Array#get:length i32.gt_s end @@ -28115,58 +28115,58 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 3 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.eqz drop - local.get $7 - local.get $8 - local.get $6 + local.get $var$7 + local.get $var$8 + local.get $var$6 i32.const 3 i32.shl memory.copy ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (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 f64) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 f64) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Int64Array#get:length i32.gt_s end @@ -28178,100 +28178,100 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 3 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 1 i32.const 0 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 3 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 3 i32.shl i32.add f64.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 i32.eqz drop - local.get $11 - local.get $12 - local.get $12 + local.get $var$11 + local.get $var$12 + local.get $var$12 f64.sub f64.const 0 f64.eq if (result i64) - local.get $12 + local.get $var$12 i64.trunc_sat_f64_s else i64.const 0 end i64.store - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Uint8Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Int64Array#get:length i32.gt_s end @@ -28283,90 +28283,90 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 3 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 3 i32.const 0 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 3 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 0 i32.shl i32.add i32.load8_u - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i64.extend_i32_u i64.store - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Int16Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Int64Array#get:length i32.gt_s end @@ -28378,90 +28378,90 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 3 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 3 i32.const 1 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 3 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 1 i32.shl i32.add i32.load16_s - local.set $12 - i32.const 0 - drop + local.set $var$12 i32.const 0 - drop - local.get $11 - local.get $12 - i64.extend_i32_s - i64.store - local.get $9 - i32.const 1 - i32.add - local.set $9 - br $for-loop|0 - end - end - ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + drop + i32.const 0 + drop + local.get $var$11 + local.get $var$12 + i64.extend_i32_s + i64.store + local.get $var$9 + i32.const 1 + i32.add + local.set $var$9 + br $for-loop|0 + end + end + ) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Int64Array#get:length i32.gt_s end @@ -28473,90 +28473,90 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 3 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 3 i32.const 0 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 3 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 0 i32.shl i32.add i32.load8_s - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i64.extend_i32_s i64.store - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint64Array#get:length i32.gt_s end @@ -28568,112 +28568,112 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 3 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 3 i32.const 2 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 3 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 i32.shl i32.add i32.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i64.extend_i32_s i64.store - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/array/Array#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/array/Array#get:length (param $this i32) (result i32) + local.get $this i32.load offset=12 ) - (func $~lib/typedarray/Uint64Array#__uget (param $0 i32) (param $1 i32) (result i64) - local.get $0 + (func $~lib/typedarray/Uint64Array#__uget (param $this i32) (param $index i32) (result i64) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add i64.load ) - (func $~lib/array/Array#__uget (param $0 i32) (param $1 i32) (result i64) - local.get $0 + (func $~lib/array/Array#__uget (param $this i32) (param $index i32) (result i64) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add i64.load ) - (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (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 f32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 f32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint64Array#get:length i32.gt_s end @@ -28685,96 +28685,96 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 3 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 1 i32.const 0 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 3 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 i32.shl i32.add f32.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 i32.eqz drop - local.get $11 - local.get $12 - local.get $12 + local.get $var$11 + local.get $var$12 + local.get $var$12 f32.sub f32.const 0 f32.eq if (result i64) - local.get $12 + local.get $var$12 i64.trunc_sat_f32_u else i64.const 0 end i64.store - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint64Array#set<~lib/typedarray/Int64Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint64Array#set<~lib/typedarray/Int64Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Int64Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint64Array#get:length i32.gt_s end @@ -28786,58 +28786,58 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 3 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.eqz drop - local.get $7 - local.get $8 - local.get $6 + local.get $var$7 + local.get $var$8 + local.get $var$6 i32.const 3 i32.shl memory.copy ) - (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (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 f64) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 f64) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint64Array#get:length i32.gt_s end @@ -28849,100 +28849,100 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 3 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 1 i32.const 0 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 3 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 3 i32.shl i32.add f64.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 i32.eqz drop - local.get $11 - local.get $12 - local.get $12 + local.get $var$11 + local.get $var$12 + local.get $var$12 f64.sub f64.const 0 f64.eq if (result i64) - local.get $12 + local.get $var$12 i64.trunc_sat_f64_u else i64.const 0 end i64.store - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint64Array#set<~lib/typedarray/Uint8Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint64Array#set<~lib/typedarray/Uint8Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Uint8Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint64Array#get:length i32.gt_s end @@ -28954,90 +28954,90 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 3 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 3 i32.const 0 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 3 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 0 i32.shl i32.add i32.load8_u - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i64.extend_i32_u i64.store - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint64Array#set<~lib/typedarray/Int16Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint64Array#set<~lib/typedarray/Int16Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Int16Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint64Array#get:length i32.gt_s end @@ -29049,90 +29049,90 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 3 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 3 i32.const 1 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 3 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 1 i32.shl i32.add i32.load16_s - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i64.extend_i32_s i64.store - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint64Array#get:length i32.gt_s end @@ -29144,90 +29144,90 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 3 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 3 i32.const 0 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 3 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 0 i32.shl i32.add i32.load8_s - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i64.extend_i32_s i64.store - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Float32Array#set<~lib/array/Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Float32Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Float32Array#get:length i32.gt_s end @@ -29239,104 +29239,104 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 2 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.const 1 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 2 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 i32.shl i32.add i32.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 f32.convert_i32_s f32.store - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Float32Array#__uget (param $0 i32) (param $1 i32) (result f32) - local.get $0 + (func $~lib/typedarray/Float32Array#__uget (param $this i32) (param $index i32) (result f32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add f32.load ) - (func $~lib/array/Array#__uget (param $0 i32) (param $1 i32) (result f32) - local.get $0 + (func $~lib/array/Array#__uget (param $this i32) (param $index i32) (result f32) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 2 i32.shl i32.add f32.load ) - (func $~lib/typedarray/Float32Array#set<~lib/array/Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Float32Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Float32Array#get:length i32.gt_s end @@ -29348,58 +29348,58 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 2 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.eqz drop - local.get $7 - local.get $8 - local.get $6 + local.get $var$7 + local.get $var$8 + local.get $var$6 i32.const 2 i32.shl memory.copy ) - (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int64Array> (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 i64) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int64Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i64) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Int64Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Float32Array#get:length i32.gt_s end @@ -29411,90 +29411,90 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 2 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.const 1 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 2 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 3 i32.shl i32.add i64.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 f32.convert_i64_s f32.store - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Uint8Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Uint8Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Uint8Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Float32Array#get:length i32.gt_s end @@ -29506,90 +29506,90 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 2 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.const 1 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 2 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 0 i32.shl i32.add i32.load8_u - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 f32.convert_i32_u f32.store - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int16Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int16Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Int16Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Float32Array#get:length i32.gt_s end @@ -29601,90 +29601,90 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 2 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.const 1 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 2 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 1 i32.shl i32.add i32.load16_s - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 f32.convert_i32_s f32.store - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Float32Array#set<~lib/array/Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Float32Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Float32Array#get:length i32.gt_s end @@ -29696,90 +29696,90 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 2 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.const 1 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 2 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 0 i32.shl i32.add i32.load8_s - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 f32.convert_i32_s f32.store - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Float64Array#get:length i32.gt_s end @@ -29791,108 +29791,108 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 3 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.const 1 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 3 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 i32.shl i32.add i32.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 f64.convert_i32_s f64.store - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Float64Array#__uget (param $0 i32) (param $1 i32) (result f64) - local.get $0 + (func $~lib/typedarray/Float64Array#__uget (param $this i32) (param $index i32) (result f64) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add f64.load ) - (func $~lib/array/Array#__uget (param $0 i32) (param $1 i32) (result f64) - local.get $0 + (func $~lib/array/Array#__uget (param $this i32) (param $index i32) (result f64) + local.get $this i32.load offset=4 - local.get $1 + local.get $index i32.const 3 i32.shl i32.add f64.load ) - (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (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 f32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 f32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Float64Array#get:length i32.gt_s end @@ -29904,91 +29904,91 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 3 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 3 i32.const 2 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 3 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 i32.shl i32.add f32.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 1 i32.eqz drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 f64.promote_f32 f64.store - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int64Array> (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 i64) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int64Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i64) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Int64Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Float64Array#get:length i32.gt_s end @@ -30000,90 +30000,90 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 3 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.const 1 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 3 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 3 i32.shl i32.add i64.load - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 f64.convert_i64_s f64.store - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Uint8Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Uint8Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Uint8Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Float64Array#get:length i32.gt_s end @@ -30095,90 +30095,90 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 3 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.const 1 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 3 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 0 i32.shl i32.add i32.load8_u - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 f64.convert_i32_u f64.store - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int16Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int16Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Int16Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Float64Array#get:length i32.gt_s end @@ -30190,90 +30190,90 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 3 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.const 1 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 3 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 - i32.const 1 - i32.shl - i32.add - i32.load16_s - local.set $12 - i32.const 0 - drop - i32.const 0 - drop - local.get $11 - local.get $12 - f64.convert_i32_s - f64.store - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 1 - i32.add - local.set $9 - br $for-loop|0 - end - end - ) - (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + i32.shl + i32.add + i32.load16_s + local.set $var$12 + i32.const 0 + drop + i32.const 0 + drop + local.get $var$11 + local.get $var$12 + f64.convert_i32_s + f64.store + local.get $var$9 + i32.const 1 + i32.add + local.set $var$9 + br $for-loop|0 + end + end + ) + (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/array/Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Float64Array#get:length i32.gt_s end @@ -30285,90 +30285,90 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 3 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.const 1 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 3 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 0 i32.shl i32.add i32.load8_s - local.set $12 + local.set $var$12 i32.const 0 drop i32.const 0 drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 f64.convert_i32_s f64.store - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Float32Array> (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 f32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Float32Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 f32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Float32Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint8ClampedArray#get:length i32.gt_s end @@ -30380,56 +30380,56 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 0 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 1 i32.const 0 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 0 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 i32.shl i32.add f32.load - local.set $12 + local.set $var$12 i32.const 1 drop i32.const 1 drop - local.get $11 - local.get $12 - local.get $12 + local.get $var$11 + local.get $var$12 + local.get $var$12 f32.sub f32.const 0 f32.eq if (result i32) f32.const 0 f32.const 255 - local.get $12 + local.get $var$12 f32.min f32.max i32.trunc_sat_f32_u @@ -30437,46 +30437,46 @@ i32.const 0 end i32.store8 - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int32Array> (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 $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int32Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Int32Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint8ClampedArray#get:length i32.gt_s end @@ -30488,42 +30488,42 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 0 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.const 2 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 0 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 i32.shl i32.add i32.load - local.set $12 + local.set $var$12 i32.const 1 drop i32.const 0 @@ -30535,63 +30535,63 @@ i32.const 4 i32.le_u drop - local.get $11 - local.get $12 + local.get $var$11 + local.get $var$12 i32.const 31 i32.shr_s i32.const -1 i32.xor i32.const 255 - local.get $12 + local.get $var$12 i32.sub i32.const 31 i32.shr_s - local.get $12 + local.get $var$12 i32.or i32.and i32.store8 - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Uint32Array> (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 $13 i32) - (local $14 i32) - local.get $0 - local.set $5 - local.get $1 - local.set $4 - local.get $2 - local.set $3 + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Uint32Array> (param $this i32) (param $source i32) (param $offset i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) + (local $var$14 i32) + local.get $this + local.set $var$5 + local.get $source + local.set $var$4 + local.get $offset + local.set $var$3 i32.const 0 drop - local.get $4 + local.get $var$4 call $~lib/typedarray/Uint32Array#get:length - local.set $6 - local.get $3 + local.set $var$6 + local.get $var$3 i32.const 0 i32.lt_s if (result i32) i32.const 1 else - local.get $6 - local.get $3 + local.get $var$6 + local.get $var$3 i32.add - local.get $5 + local.get $var$5 call $~lib/typedarray/Uint8ClampedArray#get:length i32.gt_s end @@ -30603,42 +30603,42 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $var$5 i32.load offset=4 - local.get $3 + local.get $var$3 i32.const 0 i32.shl i32.add - local.set $7 - local.get $4 + local.set $var$7 + local.get $var$4 i32.load offset=4 - local.set $8 + local.set $var$8 i32.const 0 i32.const 2 i32.eq drop i32.const 0 - local.set $9 + local.set $var$9 loop $for-loop|0 - local.get $9 - local.get $6 + local.get $var$9 + local.get $var$6 i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $7 - local.get $9 + local.get $var$7 + local.get $var$9 i32.const 0 i32.shl i32.add - local.set $11 - local.get $8 - local.get $9 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 i32.shl i32.add i32.load - local.set $12 + local.set $var$12 i32.const 1 drop i32.const 0 @@ -30646,141 +30646,141 @@ i32.const 0 i32.eqz drop - local.get $11 + local.get $var$11 i32.const 255 - local.tee $13 - local.get $12 - local.tee $14 - local.get $13 - local.get $14 + local.tee $var$13 + local.get $var$12 + local.tee $var$14 + local.get $var$13 + local.get $var$14 i32.lt_u select i32.store8 - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|0 end end ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $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) + (func $~lib/util/sort/insertionSort (param $ptr i32) (param $left i32) (param $right i32) (param $presorted i32) (param $comparator i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 0 i32.const 1 i32.ge_s drop - local.get $2 - local.get $1 + local.get $right + local.get $left i32.sub i32.const 1 i32.add - local.set $5 - local.get $1 - local.get $5 + local.set $var$5 + local.get $left + local.get $var$5 i32.const 1 i32.and - local.get $3 - local.get $5 - local.get $3 + local.get $presorted + local.get $var$5 + local.get $presorted i32.sub i32.const 1 i32.and i32.sub - local.get $3 + local.get $presorted i32.const 0 i32.eq select i32.add - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $6 - local.get $2 + local.get $var$6 + local.get $right i32.le_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $0 - local.get $6 + local.get $ptr + local.get $var$6 i32.const 0 i32.shl i32.add i32.load8_s - local.set $8 - local.get $0 - local.get $6 + local.set $var$8 + local.get $ptr + local.get $var$6 i32.const 0 i32.shl i32.add i32.load8_s offset=1 - local.set $9 - local.get $9 - local.set $10 - local.get $8 - local.set $11 - local.get $8 - local.get $9 + local.set $var$9 + local.get $var$9 + local.set $var$10 + local.get $var$8 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.le_s if - local.get $8 - local.set $10 - local.get $9 - local.set $11 + local.get $var$8 + local.set $var$10 + local.get $var$9 + local.set $var$11 end - local.get $6 + local.get $var$6 i32.const 1 i32.sub - local.set $12 + local.set $var$12 block $while-break|1 loop $while-continue|1 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 0 i32.shl i32.add i32.load8_s - local.set $8 - local.get $8 - local.get $11 + local.set $var$8 + local.get $var$8 + local.get $var$11 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 0 i32.shl i32.add - local.get $8 + local.get $var$8 i32.store8 offset=2 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|1 end @@ -30788,49 +30788,49 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 0 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store8 offset=2 block $while-break|2 loop $while-continue|2 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 0 i32.shl i32.add i32.load8_s - local.set $8 - local.get $8 - local.get $10 + local.set $var$8 + local.get $var$8 + local.get $var$10 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 0 i32.shl i32.add - local.get $8 + local.get $var$8 i32.store8 offset=1 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|2 end @@ -30838,78 +30838,78 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 0 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store8 offset=1 - local.get $6 + local.get $var$6 i32.const 2 i32.add - local.set $6 + local.set $var$6 br $for-loop|0 end end ) - (func $~lib/util/sort/extendRunRight (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 - local.get $2 + (func $~lib/util/sort/extendRunRight (param $ptr i32) (param $i i32) (param $right i32) (param $comparator i32) (result i32) + (local $j i32) + (local $var$5 i32) + (local $var$6 i32) + (local $tmp i32) + local.get $i + local.get $right i32.eq if - local.get $1 + local.get $i return end - local.get $1 - local.set $4 - local.get $0 - local.get $4 + local.get $i + local.set $j + local.get $ptr + local.get $j i32.const 0 i32.shl i32.add i32.load8_s - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 1 i32.add - local.tee $4 + local.tee $j i32.const 0 i32.shl i32.add i32.load8_s i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if loop $while-continue|0 - local.get $4 - local.get $2 + local.get $j + local.get $right i32.lt_s if (result i32) - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 0 i32.shl i32.add i32.load8_s offset=1 - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 0 i32.shl i32.add i32.load8_s i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 31 @@ -30917,83 +30917,83 @@ else i32.const 0 end - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 + local.get $j i32.const 1 i32.add - local.set $4 + local.set $j br $while-continue|0 end end - local.get $4 - local.set $5 + local.get $j + local.set $var$5 loop $while-continue|1 - local.get $1 - local.get $5 + local.get $i + local.get $var$5 i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $1 + local.get $ptr + local.get $i i32.const 0 i32.shl i32.add i32.load8_s - local.set $7 - local.get $0 - local.get $1 + local.set $tmp + local.get $ptr + local.get $i i32.const 0 i32.shl i32.add - local.get $0 - local.get $5 + local.get $ptr + local.get $var$5 i32.const 0 i32.shl i32.add i32.load8_s i32.store8 - local.get $1 + local.get $i i32.const 1 i32.add - local.set $1 - local.get $0 - local.get $5 + local.set $i + local.get $ptr + local.get $var$5 i32.const 0 i32.shl i32.add - local.get $7 + local.get $tmp i32.store8 - local.get $5 + local.get $var$5 i32.const 1 i32.sub - local.set $5 + local.set $var$5 br $while-continue|1 end end else - loop $while-continue|2 - local.get $4 - local.get $2 + loop $while-continue|2 + local.get $j + local.get $right i32.lt_s if (result i32) - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 0 i32.shl i32.add i32.load8_s offset=1 - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 0 i32.shl i32.add i32.load8_s i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 @@ -31001,55 +31001,55 @@ else i32.const 0 end - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 + local.get $j i32.const 1 i32.add - local.set $4 + local.set $j br $while-continue|2 end end end - local.get $4 + local.get $j ) - (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $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 $2 + (func $~lib/util/sort/mergeRuns (param $ptr i32) (param $l i32) (param $m i32) (param $r i32) (param $buffer i32) (param $comparator i32) + (local $i i32) + (local $j i32) + (local $t i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $m i32.const 1 i32.sub - local.set $2 - local.get $3 - local.get $2 + local.set $m + local.get $r + local.get $m i32.add - local.set $8 - local.get $2 + local.set $t + local.get $m i32.const 1 i32.add - local.set $6 + local.set $i loop $for-loop|0 - local.get $6 - local.get $1 + local.get $i + local.get $l i32.gt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $6 + local.get $buffer + local.get $i i32.const 1 i32.sub i32.const 0 i32.shl i32.add - local.get $0 - local.get $6 + local.get $ptr + local.get $i i32.const 1 i32.sub i32.const 0 @@ -31057,132 +31057,132 @@ i32.add i32.load8_s i32.store8 - local.get $6 + local.get $i i32.const 1 i32.sub - local.set $6 + local.set $i br $for-loop|0 end end - local.get $2 - local.set $7 + local.get $m + local.set $j loop $for-loop|1 - local.get $7 - local.get $3 + local.get $j + local.get $r i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $8 - local.get $7 + local.get $buffer + local.get $t + local.get $j i32.sub i32.const 0 i32.shl i32.add - local.get $0 - local.get $7 + local.get $ptr + local.get $j i32.const 0 i32.shl i32.add i32.load8_s offset=1 i32.store8 - local.get $7 + local.get $j i32.const 1 i32.add - local.set $7 + local.set $j br $for-loop|1 end end - local.get $1 - local.set $9 + local.get $l + local.set $var$9 loop $for-loop|2 - local.get $9 - local.get $3 + local.get $var$9 + local.get $r i32.le_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $4 - local.get $7 + local.get $buffer + local.get $j i32.const 0 i32.shl i32.add i32.load8_s - local.set $11 - local.get $4 - local.get $6 + local.set $var$11 + local.get $buffer + local.get $i i32.const 0 i32.shl i32.add i32.load8_s - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 i32.const 2 global.set $~argumentsLength - local.get $5 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 0 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store8 - local.get $7 + local.get $j i32.const 1 i32.sub - local.set $7 + local.set $j else - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 0 i32.shl i32.add - local.get $12 + local.get $var$12 i32.store8 - local.get $6 + local.get $i i32.const 1 i32.add - local.set $6 + local.set $i end - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|2 end end ) - (func $~lib/util/sort/SORT (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 $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) - local.get $1 + (func $~lib/util/sort/SORT (param $ptr i32) (param $len i32) (param $comparator i32) + (local $endB i32) + (local $var$4 i32) + (local $startB i32) + (local $lgPlus2 i32) + (local $lgPlus2Size i32) + (local $leftRunStartBuf i32) + (local $leftRunEndBuf i32) + (local $buffer i32) + (local $hi i32) + (local $endA i32) + (local $lenA i32) + (local $top i32) + (local $startA i32) + (local $lenB i32) + (local $k i32) + (local $var$18 i32) + (local $var$19 i32) + (local $var$20 i32) + local.get $len i32.const 48 i32.le_s if - local.get $1 + local.get $len i32.const 1 i32.le_s if @@ -31195,522 +31195,522 @@ block $break|0 block $case1|0 block $case0|0 - local.get $1 - local.set $3 - local.get $3 + local.get $len + local.set $endB + local.get $endB i32.const 3 i32.eq br_if $case0|0 - local.get $3 + local.get $endB i32.const 2 i32.eq br_if $case1|0 br $break|0 end - local.get $0 + local.get $ptr i32.load8_s - local.set $3 - local.get $0 + local.set $endB + local.get $ptr i32.load8_s offset=1 - local.set $4 - local.get $3 - local.get $4 + local.set $var$4 + local.get $endB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $5 - local.get $0 - local.get $4 - local.get $3 - local.get $5 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $endB + local.get $startB select i32.store8 - local.get $3 - local.get $4 - local.get $5 + local.get $endB + local.get $var$4 + local.get $startB select - local.set $3 - local.get $0 + local.set $endB + local.get $ptr i32.load8_s offset=2 - local.set $4 - local.get $3 - local.get $4 + local.set $var$4 + local.get $endB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $5 - local.get $0 - local.get $4 - local.get $3 - local.get $5 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $endB + local.get $startB select i32.store8 offset=1 - local.get $0 - local.get $3 - local.get $4 - local.get $5 + local.get $ptr + local.get $endB + local.get $var$4 + local.get $startB select i32.store8 offset=2 end - local.get $0 + local.get $ptr i32.load8_s - local.set $5 - local.get $0 + local.set $startB + local.get $ptr i32.load8_s offset=1 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $startB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $3 - local.get $0 - local.get $4 - local.get $5 - local.get $3 + local.set $endB + local.get $ptr + local.get $var$4 + local.get $startB + local.get $endB select i32.store8 - local.get $0 - local.get $5 - local.get $4 - local.get $3 + local.get $ptr + local.get $startB + local.get $var$4 + local.get $endB select i32.store8 offset=1 return end - local.get $0 + local.get $ptr i32.const 0 - local.get $1 + local.get $len i32.const 1 i32.sub i32.const 0 - local.get $2 + local.get $comparator call $~lib/util/sort/insertionSort return end - local.get $1 - local.set $5 + local.get $len + local.set $startB i32.const 31 - local.get $5 + local.get $startB i32.clz i32.sub i32.const 2 i32.add - local.set $6 - local.get $6 + local.set $lgPlus2 + local.get $lgPlus2 i32.const 2 i32.shl - local.set $7 - local.get $7 + local.set $lgPlus2Size + local.get $lgPlus2Size i32.const 1 i32.shl call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 - local.get $7 + local.set $leftRunStartBuf + local.get $leftRunStartBuf + local.get $lgPlus2Size i32.add - local.set $9 + local.set $leftRunEndBuf i32.const 0 - local.set $5 + local.set $startB loop $for-loop|1 - local.get $5 - local.get $6 + local.get $startB + local.get $lgPlus2 i32.lt_u - local.set $3 - local.get $3 + local.set $endB + local.get $endB if - local.get $8 - local.get $5 + local.get $leftRunStartBuf + local.get $startB i32.const 2 i32.shl i32.add i32.const -1 i32.store - local.get $5 + local.get $startB i32.const 1 i32.add - local.set $5 + local.set $startB br $for-loop|1 end end - local.get $1 + local.get $len i32.const 0 i32.shl call $~lib/rt/tlsf/__alloc - local.set $10 - local.get $1 + local.set $buffer + local.get $len i32.const 1 i32.sub - local.set $11 - local.get $0 + local.set $hi + local.get $ptr i32.const 0 - local.get $11 - local.get $2 + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight - local.set $12 - local.get $12 + local.set $endA + local.get $endA i32.const 1 i32.add - local.set $13 - local.get $13 + local.set $lenA + local.get $lenA i32.const 32 i32.lt_s if - local.get $11 - local.tee $4 + local.get $hi + local.tee $var$4 i32.const 32 i32.const 1 i32.sub - local.tee $5 - local.get $4 - local.get $5 + local.tee $startB + local.get $var$4 + local.get $startB i32.lt_s select - local.set $12 - local.get $0 + local.set $endA + local.get $ptr i32.const 0 - local.get $12 - local.get $13 - local.get $2 + local.get $endA + local.get $lenA + local.get $comparator call $~lib/util/sort/insertionSort end i32.const 0 - local.set $14 + local.set $top i32.const 0 - local.set $15 + local.set $startA loop $while-continue|2 - local.get $12 - local.get $11 + local.get $endA + local.get $hi i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $12 + local.get $endA i32.const 1 i32.add - local.set $5 - local.get $0 - local.get $5 - local.get $11 - local.get $2 + local.set $startB + local.get $ptr + local.get $startB + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight - local.set $3 - local.get $3 - local.get $5 + local.set $endB + local.get $endB + local.get $startB i32.sub i32.const 1 i32.add - local.set $16 - local.get $16 + local.set $lenB + local.get $lenB i32.const 32 i32.lt_s if - local.get $11 - local.tee $17 - local.get $5 + local.get $hi + local.tee $k + local.get $startB i32.const 32 i32.add i32.const 1 i32.sub - local.tee $18 - local.get $17 - local.get $18 + local.tee $var$18 + local.get $k + local.get $var$18 i32.lt_s select - local.set $3 - local.get $0 - local.get $5 - local.get $3 - local.get $16 - local.get $2 + local.set $endB + local.get $ptr + local.get $startB + local.get $endB + local.get $lenB + local.get $comparator call $~lib/util/sort/insertionSort end i32.const 0 - local.get $11 - local.get $15 - local.get $5 - local.get $3 + local.get $hi + local.get $startA + local.get $startB + local.get $endB call $~lib/util/sort/nodePower - local.set $17 - local.get $14 - local.set $18 + local.set $k + local.get $top + local.set $var$18 loop $for-loop|3 - local.get $18 - local.get $17 + local.get $var$18 + local.get $k i32.gt_u - local.set $19 - local.get $19 + local.set $var$19 + local.get $var$19 if - local.get $8 - local.get $18 + local.get $leftRunStartBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.load - local.set $20 - local.get $20 + local.set $var$20 + local.get $var$20 i32.const -1 i32.ne if - local.get $0 - local.get $20 - local.get $9 - local.get $18 + local.get $ptr + local.get $var$20 + local.get $leftRunEndBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $12 - local.get $10 - local.get $2 + local.get $endA + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns - local.get $20 - local.set $15 - local.get $8 - local.get $18 + local.get $var$20 + local.set $startA + local.get $leftRunStartBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.const -1 i32.store end - local.get $18 + local.get $var$18 i32.const 1 i32.sub - local.set $18 + local.set $var$18 br $for-loop|3 end end - local.get $8 - local.get $17 + local.get $leftRunStartBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $15 + local.get $startA i32.store - local.get $9 - local.get $17 + local.get $leftRunEndBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $12 + local.get $endA i32.store - local.get $5 - local.set $15 - local.get $3 - local.set $12 - local.get $17 - local.set $14 + local.get $startB + local.set $startA + local.get $endB + local.set $endA + local.get $k + local.set $top br $while-continue|2 end end - local.get $14 - local.set $4 + local.get $top + local.set $var$4 loop $for-loop|4 - local.get $4 + local.get $var$4 i32.const 0 i32.ne - local.set $18 - local.get $18 + local.set $var$18 + local.get $var$18 if - local.get $8 - local.get $4 + local.get $leftRunStartBuf + local.get $var$4 i32.const 2 i32.shl i32.add i32.load - local.set $19 - local.get $19 + local.set $var$19 + local.get $var$19 i32.const -1 i32.ne if - local.get $0 - local.get $19 - local.get $9 - local.get $4 + local.get $ptr + local.get $var$19 + local.get $leftRunEndBuf + local.get $var$4 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $11 - local.get $10 - local.get $2 + local.get $hi + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns end - local.get $4 + local.get $var$4 i32.const 1 i32.sub - local.set $4 + local.set $var$4 br $for-loop|4 end end - local.get $10 + local.get $buffer call $~lib/rt/tlsf/__free - local.get $8 + local.get $leftRunStartBuf call $~lib/rt/tlsf/__free ) - (func $~lib/typedarray/Int8Array#sort (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Int8Array#sort (param $this i32) (param $comparator i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Int8Array#get:length - local.get $1 + local.get $comparator call $~lib/util/sort/SORT - local.get $0 + local.get $this ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $a i32) (param $b i32) (result i32) + local.get $a i32.extend8_s - local.get $1 + local.get $b i32.extend8_s i32.sub ) - (func $std/typedarray/testArraySort<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (result i32) - local.get $1 + (func $std/typedarray/testArraySort<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $a i32) (param $b i32) (result i32) + local.get $b i32.extend8_s - local.get $0 + local.get $a i32.extend8_s i32.gt_s - local.get $1 + local.get $b i32.extend8_s - local.get $0 + local.get $a i32.extend8_s i32.lt_s i32.sub ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $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) + (func $~lib/util/sort/insertionSort (param $ptr i32) (param $left i32) (param $right i32) (param $presorted i32) (param $comparator i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 0 i32.const 1 i32.ge_s drop - local.get $2 - local.get $1 + local.get $right + local.get $left i32.sub i32.const 1 i32.add - local.set $5 - local.get $1 - local.get $5 + local.set $var$5 + local.get $left + local.get $var$5 i32.const 1 i32.and - local.get $3 - local.get $5 - local.get $3 + local.get $presorted + local.get $var$5 + local.get $presorted i32.sub i32.const 1 i32.and i32.sub - local.get $3 + local.get $presorted i32.const 0 i32.eq select i32.add - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $6 - local.get $2 + local.get $var$6 + local.get $right i32.le_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $0 - local.get $6 + local.get $ptr + local.get $var$6 i32.const 0 i32.shl i32.add i32.load8_u - local.set $8 - local.get $0 - local.get $6 + local.set $var$8 + local.get $ptr + local.get $var$6 i32.const 0 i32.shl i32.add i32.load8_u offset=1 - local.set $9 - local.get $9 - local.set $10 - local.get $8 - local.set $11 - local.get $8 - local.get $9 + local.set $var$9 + local.get $var$9 + local.set $var$10 + local.get $var$8 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.le_s if - local.get $8 - local.set $10 - local.get $9 - local.set $11 + local.get $var$8 + local.set $var$10 + local.get $var$9 + local.set $var$11 end - local.get $6 + local.get $var$6 i32.const 1 i32.sub - local.set $12 + local.set $var$12 block $while-break|1 loop $while-continue|1 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 0 i32.shl i32.add i32.load8_u - local.set $8 - local.get $8 - local.get $11 + local.set $var$8 + local.get $var$8 + local.get $var$11 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 0 i32.shl i32.add - local.get $8 + local.get $var$8 i32.store8 offset=2 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|1 end @@ -31718,49 +31718,49 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 0 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store8 offset=2 block $while-break|2 loop $while-continue|2 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 0 i32.shl i32.add i32.load8_u - local.set $8 - local.get $8 - local.get $10 + local.set $var$8 + local.get $var$8 + local.get $var$10 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 0 i32.shl i32.add - local.get $8 + local.get $var$8 i32.store8 offset=1 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|2 end @@ -31768,78 +31768,78 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 0 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store8 offset=1 - local.get $6 + local.get $var$6 i32.const 2 i32.add - local.set $6 + local.set $var$6 br $for-loop|0 end end ) - (func $~lib/util/sort/extendRunRight (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 - local.get $2 + (func $~lib/util/sort/extendRunRight (param $ptr i32) (param $i i32) (param $right i32) (param $comparator i32) (result i32) + (local $j i32) + (local $var$5 i32) + (local $var$6 i32) + (local $tmp i32) + local.get $i + local.get $right i32.eq if - local.get $1 + local.get $i return end - local.get $1 - local.set $4 - local.get $0 - local.get $4 + local.get $i + local.set $j + local.get $ptr + local.get $j i32.const 0 i32.shl i32.add i32.load8_u - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 1 i32.add - local.tee $4 + local.tee $j i32.const 0 i32.shl i32.add i32.load8_u i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if loop $while-continue|0 - local.get $4 - local.get $2 + local.get $j + local.get $right i32.lt_s if (result i32) - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 0 i32.shl i32.add i32.load8_u offset=1 - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 0 i32.shl i32.add i32.load8_u i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 31 @@ -31847,83 +31847,83 @@ else i32.const 0 end - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 + local.get $j i32.const 1 i32.add - local.set $4 + local.set $j br $while-continue|0 end end - local.get $4 - local.set $5 + local.get $j + local.set $var$5 loop $while-continue|1 - local.get $1 - local.get $5 + local.get $i + local.get $var$5 i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $1 + local.get $ptr + local.get $i i32.const 0 i32.shl i32.add i32.load8_u - local.set $7 - local.get $0 - local.get $1 + local.set $tmp + local.get $ptr + local.get $i i32.const 0 i32.shl i32.add - local.get $0 - local.get $5 + local.get $ptr + local.get $var$5 i32.const 0 i32.shl i32.add i32.load8_u i32.store8 - local.get $1 + local.get $i i32.const 1 i32.add - local.set $1 - local.get $0 - local.get $5 + local.set $i + local.get $ptr + local.get $var$5 i32.const 0 i32.shl i32.add - local.get $7 + local.get $tmp i32.store8 - local.get $5 + local.get $var$5 i32.const 1 i32.sub - local.set $5 + local.set $var$5 br $while-continue|1 end end else loop $while-continue|2 - local.get $4 - local.get $2 + local.get $j + local.get $right i32.lt_s if (result i32) - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 0 i32.shl i32.add i32.load8_u offset=1 - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 0 i32.shl i32.add i32.load8_u i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 @@ -31931,55 +31931,55 @@ else i32.const 0 end - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 + local.get $j i32.const 1 i32.add - local.set $4 + local.set $j br $while-continue|2 end end end - local.get $4 + local.get $j ) - (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $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 $2 + (func $~lib/util/sort/mergeRuns (param $ptr i32) (param $l i32) (param $m i32) (param $r i32) (param $buffer i32) (param $comparator i32) + (local $i i32) + (local $j i32) + (local $t i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $m i32.const 1 i32.sub - local.set $2 - local.get $3 - local.get $2 + local.set $m + local.get $r + local.get $m i32.add - local.set $8 - local.get $2 + local.set $t + local.get $m i32.const 1 i32.add - local.set $6 + local.set $i loop $for-loop|0 - local.get $6 - local.get $1 + local.get $i + local.get $l i32.gt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $6 + local.get $buffer + local.get $i i32.const 1 i32.sub i32.const 0 i32.shl i32.add - local.get $0 - local.get $6 + local.get $ptr + local.get $i i32.const 1 i32.sub i32.const 0 @@ -31987,132 +31987,132 @@ i32.add i32.load8_u i32.store8 - local.get $6 + local.get $i i32.const 1 i32.sub - local.set $6 + local.set $i br $for-loop|0 end end - local.get $2 - local.set $7 + local.get $m + local.set $j loop $for-loop|1 - local.get $7 - local.get $3 + local.get $j + local.get $r i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $8 - local.get $7 + local.get $buffer + local.get $t + local.get $j i32.sub i32.const 0 i32.shl i32.add - local.get $0 - local.get $7 + local.get $ptr + local.get $j i32.const 0 i32.shl i32.add i32.load8_u offset=1 i32.store8 - local.get $7 + local.get $j i32.const 1 i32.add - local.set $7 + local.set $j br $for-loop|1 end end - local.get $1 - local.set $9 + local.get $l + local.set $var$9 loop $for-loop|2 - local.get $9 - local.get $3 + local.get $var$9 + local.get $r i32.le_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $4 - local.get $7 + local.get $buffer + local.get $j i32.const 0 i32.shl i32.add i32.load8_u - local.set $11 - local.get $4 - local.get $6 + local.set $var$11 + local.get $buffer + local.get $i i32.const 0 i32.shl i32.add i32.load8_u - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 i32.const 2 global.set $~argumentsLength - local.get $5 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 0 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store8 - local.get $7 + local.get $j i32.const 1 i32.sub - local.set $7 + local.set $j else - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 0 i32.shl i32.add - local.get $12 + local.get $var$12 i32.store8 - local.get $6 + local.get $i i32.const 1 i32.add - local.set $6 + local.set $i end - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|2 end end ) - (func $~lib/util/sort/SORT (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 $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) - local.get $1 + (func $~lib/util/sort/SORT (param $ptr i32) (param $len i32) (param $comparator i32) + (local $endB i32) + (local $var$4 i32) + (local $startB i32) + (local $lgPlus2 i32) + (local $lgPlus2Size i32) + (local $leftRunStartBuf i32) + (local $leftRunEndBuf i32) + (local $buffer i32) + (local $hi i32) + (local $endA i32) + (local $lenA i32) + (local $top i32) + (local $startA i32) + (local $lenB i32) + (local $k i32) + (local $var$18 i32) + (local $var$19 i32) + (local $var$20 i32) + local.get $len i32.const 48 i32.le_s if - local.get $1 + local.get $len i32.const 1 i32.le_s if @@ -32125,579 +32125,579 @@ block $break|0 block $case1|0 block $case0|0 - local.get $1 - local.set $3 - local.get $3 + local.get $len + local.set $endB + local.get $endB i32.const 3 i32.eq br_if $case0|0 - local.get $3 + local.get $endB i32.const 2 i32.eq br_if $case1|0 br $break|0 end - local.get $0 + local.get $ptr i32.load8_u - local.set $3 - local.get $0 + local.set $endB + local.get $ptr i32.load8_u offset=1 - local.set $4 - local.get $3 - local.get $4 + local.set $var$4 + local.get $endB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $5 - local.get $0 - local.get $4 - local.get $3 - local.get $5 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $endB + local.get $startB select i32.store8 - local.get $3 - local.get $4 - local.get $5 + local.get $endB + local.get $var$4 + local.get $startB select - local.set $3 - local.get $0 + local.set $endB + local.get $ptr i32.load8_u offset=2 - local.set $4 - local.get $3 - local.get $4 + local.set $var$4 + local.get $endB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $5 - local.get $0 - local.get $4 - local.get $3 - local.get $5 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $endB + local.get $startB select i32.store8 offset=1 - local.get $0 - local.get $3 - local.get $4 - local.get $5 + local.get $ptr + local.get $endB + local.get $var$4 + local.get $startB select i32.store8 offset=2 end - local.get $0 + local.get $ptr i32.load8_u - local.set $5 - local.get $0 + local.set $startB + local.get $ptr i32.load8_u offset=1 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $startB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $3 - local.get $0 - local.get $4 - local.get $5 - local.get $3 + local.set $endB + local.get $ptr + local.get $var$4 + local.get $startB + local.get $endB select i32.store8 - local.get $0 - local.get $5 - local.get $4 - local.get $3 + local.get $ptr + local.get $startB + local.get $var$4 + local.get $endB select i32.store8 offset=1 return end - local.get $0 + local.get $ptr i32.const 0 - local.get $1 + local.get $len i32.const 1 i32.sub i32.const 0 - local.get $2 + local.get $comparator call $~lib/util/sort/insertionSort return end - local.get $1 - local.set $5 + local.get $len + local.set $startB i32.const 31 - local.get $5 + local.get $startB i32.clz i32.sub i32.const 2 i32.add - local.set $6 - local.get $6 + local.set $lgPlus2 + local.get $lgPlus2 i32.const 2 i32.shl - local.set $7 - local.get $7 + local.set $lgPlus2Size + local.get $lgPlus2Size i32.const 1 i32.shl call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 - local.get $7 + local.set $leftRunStartBuf + local.get $leftRunStartBuf + local.get $lgPlus2Size i32.add - local.set $9 + local.set $leftRunEndBuf i32.const 0 - local.set $5 + local.set $startB loop $for-loop|1 - local.get $5 - local.get $6 + local.get $startB + local.get $lgPlus2 i32.lt_u - local.set $3 - local.get $3 + local.set $endB + local.get $endB if - local.get $8 - local.get $5 + local.get $leftRunStartBuf + local.get $startB i32.const 2 i32.shl i32.add i32.const -1 i32.store - local.get $5 + local.get $startB i32.const 1 i32.add - local.set $5 + local.set $startB br $for-loop|1 end end - local.get $1 + local.get $len i32.const 0 i32.shl call $~lib/rt/tlsf/__alloc - local.set $10 - local.get $1 + local.set $buffer + local.get $len i32.const 1 i32.sub - local.set $11 - local.get $0 + local.set $hi + local.get $ptr i32.const 0 - local.get $11 - local.get $2 + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight - local.set $12 - local.get $12 + local.set $endA + local.get $endA i32.const 1 i32.add - local.set $13 - local.get $13 + local.set $lenA + local.get $lenA i32.const 32 i32.lt_s if - local.get $11 - local.tee $4 + local.get $hi + local.tee $var$4 i32.const 32 i32.const 1 i32.sub - local.tee $5 - local.get $4 - local.get $5 + local.tee $startB + local.get $var$4 + local.get $startB i32.lt_s select - local.set $12 - local.get $0 + local.set $endA + local.get $ptr i32.const 0 - local.get $12 - local.get $13 - local.get $2 + local.get $endA + local.get $lenA + local.get $comparator call $~lib/util/sort/insertionSort end i32.const 0 - local.set $14 + local.set $top i32.const 0 - local.set $15 + local.set $startA loop $while-continue|2 - local.get $12 - local.get $11 + local.get $endA + local.get $hi i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $12 + local.get $endA i32.const 1 i32.add - local.set $5 - local.get $0 - local.get $5 - local.get $11 - local.get $2 + local.set $startB + local.get $ptr + local.get $startB + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight - local.set $3 - local.get $3 - local.get $5 + local.set $endB + local.get $endB + local.get $startB i32.sub i32.const 1 i32.add - local.set $16 - local.get $16 + local.set $lenB + local.get $lenB i32.const 32 i32.lt_s if - local.get $11 - local.tee $17 - local.get $5 + local.get $hi + local.tee $k + local.get $startB i32.const 32 i32.add i32.const 1 i32.sub - local.tee $18 - local.get $17 - local.get $18 + local.tee $var$18 + local.get $k + local.get $var$18 i32.lt_s select - local.set $3 - local.get $0 - local.get $5 - local.get $3 - local.get $16 - local.get $2 + local.set $endB + local.get $ptr + local.get $startB + local.get $endB + local.get $lenB + local.get $comparator call $~lib/util/sort/insertionSort end i32.const 0 - local.get $11 - local.get $15 - local.get $5 - local.get $3 + local.get $hi + local.get $startA + local.get $startB + local.get $endB call $~lib/util/sort/nodePower - local.set $17 - local.get $14 - local.set $18 + local.set $k + local.get $top + local.set $var$18 loop $for-loop|3 - local.get $18 - local.get $17 + local.get $var$18 + local.get $k i32.gt_u - local.set $19 - local.get $19 + local.set $var$19 + local.get $var$19 if - local.get $8 - local.get $18 + local.get $leftRunStartBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.load - local.set $20 - local.get $20 + local.set $var$20 + local.get $var$20 i32.const -1 i32.ne if - local.get $0 - local.get $20 - local.get $9 - local.get $18 + local.get $ptr + local.get $var$20 + local.get $leftRunEndBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $12 - local.get $10 - local.get $2 + local.get $endA + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns - local.get $20 - local.set $15 - local.get $8 - local.get $18 + local.get $var$20 + local.set $startA + local.get $leftRunStartBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.const -1 i32.store end - local.get $18 + local.get $var$18 i32.const 1 i32.sub - local.set $18 + local.set $var$18 br $for-loop|3 end end - local.get $8 - local.get $17 + local.get $leftRunStartBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $15 + local.get $startA i32.store - local.get $9 - local.get $17 + local.get $leftRunEndBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $12 + local.get $endA i32.store - local.get $5 - local.set $15 - local.get $3 - local.set $12 - local.get $17 - local.set $14 + local.get $startB + local.set $startA + local.get $endB + local.set $endA + local.get $k + local.set $top br $while-continue|2 end end - local.get $14 - local.set $4 + local.get $top + local.set $var$4 loop $for-loop|4 - local.get $4 + local.get $var$4 i32.const 0 i32.ne - local.set $18 - local.get $18 + local.set $var$18 + local.get $var$18 if - local.get $8 - local.get $4 + local.get $leftRunStartBuf + local.get $var$4 i32.const 2 i32.shl i32.add i32.load - local.set $19 - local.get $19 + local.set $var$19 + local.get $var$19 i32.const -1 i32.ne if - local.get $0 - local.get $19 - local.get $9 - local.get $4 + local.get $ptr + local.get $var$19 + local.get $leftRunEndBuf + local.get $var$4 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $11 - local.get $10 - local.get $2 + local.get $hi + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns end - local.get $4 + local.get $var$4 i32.const 1 i32.sub - local.set $4 + local.set $var$4 br $for-loop|4 end end - local.get $10 + local.get $buffer call $~lib/rt/tlsf/__free - local.get $8 + local.get $leftRunStartBuf call $~lib/rt/tlsf/__free ) - (func $~lib/typedarray/Uint8Array#sort (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Uint8Array#sort (param $this i32) (param $comparator i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Uint8Array#get:length - local.get $1 + local.get $comparator call $~lib/util/sort/SORT - local.get $0 + local.get $this ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $a i32) (param $b i32) (result i32) + local.get $a i32.const 255 i32.and - local.get $1 + local.get $b i32.const 255 i32.and i32.gt_u - local.get $0 + local.get $a i32.const 255 i32.and - local.get $1 + local.get $b i32.const 255 i32.and i32.lt_u i32.sub ) - (func $std/typedarray/testArraySort<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $0 i32) (param $1 i32) (result i32) - local.get $1 + (func $std/typedarray/testArraySort<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $a i32) (param $b i32) (result i32) + local.get $b i32.const 255 i32.and - local.get $0 + local.get $a i32.const 255 i32.and i32.gt_u - local.get $1 + local.get $b i32.const 255 i32.and - local.get $0 + local.get $a i32.const 255 i32.and i32.lt_u i32.sub ) - (func $~lib/typedarray/Uint8ClampedArray#sort (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Uint8ClampedArray#sort (param $this i32) (param $comparator i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Uint8ClampedArray#get:length - local.get $1 + local.get $comparator call $~lib/util/sort/SORT - local.get $0 + local.get $this ) - (func $~lib/util/sort/COMPARATOR~anonymous|1 (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/util/sort/COMPARATOR~anonymous|1 (param $a i32) (param $b i32) (result i32) + local.get $a i32.const 255 i32.and - local.get $1 + local.get $b i32.const 255 i32.and i32.gt_u - local.get $0 + local.get $a i32.const 255 i32.and - local.get $1 + local.get $b i32.const 255 i32.and i32.lt_u i32.sub ) - (func $std/typedarray/testArraySort<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (param $0 i32) (param $1 i32) (result i32) - local.get $1 + (func $std/typedarray/testArraySort<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (param $a i32) (param $b i32) (result i32) + local.get $b i32.const 255 i32.and - local.get $0 + local.get $a i32.const 255 i32.and i32.gt_u - local.get $1 + local.get $b i32.const 255 i32.and - local.get $0 + local.get $a i32.const 255 i32.and i32.lt_u i32.sub ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $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) + (func $~lib/util/sort/insertionSort (param $ptr i32) (param $left i32) (param $right i32) (param $presorted i32) (param $comparator i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 0 i32.const 1 i32.ge_s drop - local.get $2 - local.get $1 + local.get $right + local.get $left i32.sub i32.const 1 i32.add - local.set $5 - local.get $1 - local.get $5 + local.set $var$5 + local.get $left + local.get $var$5 i32.const 1 i32.and - local.get $3 - local.get $5 - local.get $3 + local.get $presorted + local.get $var$5 + local.get $presorted i32.sub i32.const 1 i32.and i32.sub - local.get $3 + local.get $presorted i32.const 0 i32.eq select i32.add - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $6 - local.get $2 + local.get $var$6 + local.get $right i32.le_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $0 - local.get $6 + local.get $ptr + local.get $var$6 i32.const 1 i32.shl i32.add i32.load16_s - local.set $8 - local.get $0 - local.get $6 + local.set $var$8 + local.get $ptr + local.get $var$6 i32.const 1 i32.shl i32.add i32.load16_s offset=2 - local.set $9 - local.get $9 - local.set $10 - local.get $8 - local.set $11 - local.get $8 - local.get $9 + local.set $var$9 + local.get $var$9 + local.set $var$10 + local.get $var$8 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.le_s if - local.get $8 - local.set $10 - local.get $9 - local.set $11 + local.get $var$8 + local.set $var$10 + local.get $var$9 + local.set $var$11 end - local.get $6 + local.get $var$6 i32.const 1 i32.sub - local.set $12 + local.set $var$12 block $while-break|1 loop $while-continue|1 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 1 i32.shl i32.add i32.load16_s - local.set $8 - local.get $8 - local.get $11 + local.set $var$8 + local.get $var$8 + local.get $var$11 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 1 i32.shl i32.add - local.get $8 + local.get $var$8 i32.store16 offset=4 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|1 end @@ -32705,49 +32705,49 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store16 offset=4 block $while-break|2 loop $while-continue|2 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 1 i32.shl i32.add i32.load16_s - local.set $8 - local.get $8 - local.get $10 + local.set $var$8 + local.get $var$8 + local.get $var$10 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 1 i32.shl i32.add - local.get $8 + local.get $var$8 i32.store16 offset=2 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|2 end @@ -32755,78 +32755,78 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 1 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store16 offset=2 - local.get $6 + local.get $var$6 i32.const 2 i32.add - local.set $6 + local.set $var$6 br $for-loop|0 end end ) - (func $~lib/util/sort/extendRunRight (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 - local.get $2 + (func $~lib/util/sort/extendRunRight (param $ptr i32) (param $i i32) (param $right i32) (param $comparator i32) (result i32) + (local $j i32) + (local $var$5 i32) + (local $var$6 i32) + (local $tmp i32) + local.get $i + local.get $right i32.eq if - local.get $1 + local.get $i return end - local.get $1 - local.set $4 - local.get $0 - local.get $4 + local.get $i + local.set $j + local.get $ptr + local.get $j i32.const 1 i32.shl i32.add i32.load16_s - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 1 i32.add - local.tee $4 + local.tee $j i32.const 1 i32.shl i32.add i32.load16_s i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if loop $while-continue|0 - local.get $4 - local.get $2 + local.get $j + local.get $right i32.lt_s if (result i32) - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 1 i32.shl i32.add i32.load16_s offset=2 - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 1 i32.shl i32.add i32.load16_s i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 31 @@ -32834,83 +32834,83 @@ else i32.const 0 end - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 + local.get $j i32.const 1 i32.add - local.set $4 + local.set $j br $while-continue|0 end end - local.get $4 - local.set $5 + local.get $j + local.set $var$5 loop $while-continue|1 - local.get $1 - local.get $5 + local.get $i + local.get $var$5 i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $1 + local.get $ptr + local.get $i i32.const 1 i32.shl i32.add i32.load16_s - local.set $7 - local.get $0 - local.get $1 + local.set $tmp + local.get $ptr + local.get $i i32.const 1 i32.shl i32.add - local.get $0 - local.get $5 + local.get $ptr + local.get $var$5 i32.const 1 i32.shl i32.add i32.load16_s i32.store16 - local.get $1 + local.get $i i32.const 1 i32.add - local.set $1 - local.get $0 - local.get $5 + local.set $i + local.get $ptr + local.get $var$5 i32.const 1 i32.shl i32.add - local.get $7 + local.get $tmp i32.store16 - local.get $5 + local.get $var$5 i32.const 1 i32.sub - local.set $5 + local.set $var$5 br $while-continue|1 end end else loop $while-continue|2 - local.get $4 - local.get $2 + local.get $j + local.get $right i32.lt_s if (result i32) - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 1 i32.shl i32.add i32.load16_s offset=2 - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 1 i32.shl i32.add i32.load16_s i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 @@ -32918,55 +32918,55 @@ else i32.const 0 end - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 + local.get $j i32.const 1 i32.add - local.set $4 + local.set $j br $while-continue|2 end end end - local.get $4 + local.get $j ) - (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $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 $2 + (func $~lib/util/sort/mergeRuns (param $ptr i32) (param $l i32) (param $m i32) (param $r i32) (param $buffer i32) (param $comparator i32) + (local $i i32) + (local $j i32) + (local $t i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $m i32.const 1 i32.sub - local.set $2 - local.get $3 - local.get $2 + local.set $m + local.get $r + local.get $m i32.add - local.set $8 - local.get $2 + local.set $t + local.get $m i32.const 1 i32.add - local.set $6 + local.set $i loop $for-loop|0 - local.get $6 - local.get $1 + local.get $i + local.get $l i32.gt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $6 + local.get $buffer + local.get $i i32.const 1 i32.sub i32.const 1 i32.shl i32.add - local.get $0 - local.get $6 + local.get $ptr + local.get $i i32.const 1 i32.sub i32.const 1 @@ -32974,132 +32974,132 @@ i32.add i32.load16_s i32.store16 - local.get $6 + local.get $i i32.const 1 i32.sub - local.set $6 + local.set $i br $for-loop|0 end end - local.get $2 - local.set $7 + local.get $m + local.set $j loop $for-loop|1 - local.get $7 - local.get $3 + local.get $j + local.get $r i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $8 - local.get $7 + local.get $buffer + local.get $t + local.get $j i32.sub i32.const 1 i32.shl i32.add - local.get $0 - local.get $7 + local.get $ptr + local.get $j i32.const 1 i32.shl i32.add i32.load16_s offset=2 i32.store16 - local.get $7 + local.get $j i32.const 1 i32.add - local.set $7 + local.set $j br $for-loop|1 end end - local.get $1 - local.set $9 + local.get $l + local.set $var$9 loop $for-loop|2 - local.get $9 - local.get $3 + local.get $var$9 + local.get $r i32.le_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $4 - local.get $7 + local.get $buffer + local.get $j i32.const 1 i32.shl i32.add i32.load16_s - local.set $11 - local.get $4 - local.get $6 + local.set $var$11 + local.get $buffer + local.get $i i32.const 1 i32.shl i32.add i32.load16_s - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 i32.const 2 global.set $~argumentsLength - local.get $5 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store16 - local.get $7 + local.get $j i32.const 1 i32.sub - local.set $7 + local.set $j else - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 1 i32.shl i32.add - local.get $12 + local.get $var$12 i32.store16 - local.get $6 + local.get $i i32.const 1 i32.add - local.set $6 + local.set $i end - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|2 end end ) - (func $~lib/util/sort/SORT (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 $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) - local.get $1 + (func $~lib/util/sort/SORT (param $ptr i32) (param $len i32) (param $comparator i32) + (local $endB i32) + (local $var$4 i32) + (local $startB i32) + (local $lgPlus2 i32) + (local $lgPlus2Size i32) + (local $leftRunStartBuf i32) + (local $leftRunEndBuf i32) + (local $buffer i32) + (local $hi i32) + (local $endA i32) + (local $lenA i32) + (local $top i32) + (local $startA i32) + (local $lenB i32) + (local $k i32) + (local $var$18 i32) + (local $var$19 i32) + (local $var$20 i32) + local.get $len i32.const 48 i32.le_s if - local.get $1 + local.get $len i32.const 1 i32.le_s if @@ -33112,522 +33112,522 @@ block $break|0 block $case1|0 block $case0|0 - local.get $1 - local.set $3 - local.get $3 + local.get $len + local.set $endB + local.get $endB i32.const 3 i32.eq br_if $case0|0 - local.get $3 + local.get $endB i32.const 2 i32.eq br_if $case1|0 br $break|0 end - local.get $0 + local.get $ptr i32.load16_s - local.set $3 - local.get $0 + local.set $endB + local.get $ptr i32.load16_s offset=2 - local.set $4 - local.get $3 - local.get $4 + local.set $var$4 + local.get $endB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $5 - local.get $0 - local.get $4 - local.get $3 - local.get $5 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $endB + local.get $startB select i32.store16 - local.get $3 - local.get $4 - local.get $5 + local.get $endB + local.get $var$4 + local.get $startB select - local.set $3 - local.get $0 + local.set $endB + local.get $ptr i32.load16_s offset=4 - local.set $4 - local.get $3 - local.get $4 + local.set $var$4 + local.get $endB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $5 - local.get $0 - local.get $4 - local.get $3 - local.get $5 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $endB + local.get $startB select i32.store16 offset=2 - local.get $0 - local.get $3 - local.get $4 - local.get $5 + local.get $ptr + local.get $endB + local.get $var$4 + local.get $startB select i32.store16 offset=4 end - local.get $0 + local.get $ptr i32.load16_s - local.set $5 - local.get $0 + local.set $startB + local.get $ptr i32.load16_s offset=2 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $startB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $3 - local.get $0 - local.get $4 - local.get $5 - local.get $3 + local.set $endB + local.get $ptr + local.get $var$4 + local.get $startB + local.get $endB select i32.store16 - local.get $0 - local.get $5 - local.get $4 - local.get $3 + local.get $ptr + local.get $startB + local.get $var$4 + local.get $endB select i32.store16 offset=2 return end - local.get $0 + local.get $ptr i32.const 0 - local.get $1 + local.get $len i32.const 1 i32.sub i32.const 0 - local.get $2 + local.get $comparator call $~lib/util/sort/insertionSort return end - local.get $1 - local.set $5 + local.get $len + local.set $startB i32.const 31 - local.get $5 + local.get $startB i32.clz i32.sub i32.const 2 i32.add - local.set $6 - local.get $6 + local.set $lgPlus2 + local.get $lgPlus2 i32.const 2 i32.shl - local.set $7 - local.get $7 + local.set $lgPlus2Size + local.get $lgPlus2Size i32.const 1 - i32.shl - call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 - local.get $7 + i32.shl + call $~lib/rt/tlsf/__alloc + local.set $leftRunStartBuf + local.get $leftRunStartBuf + local.get $lgPlus2Size i32.add - local.set $9 + local.set $leftRunEndBuf i32.const 0 - local.set $5 + local.set $startB loop $for-loop|1 - local.get $5 - local.get $6 + local.get $startB + local.get $lgPlus2 i32.lt_u - local.set $3 - local.get $3 + local.set $endB + local.get $endB if - local.get $8 - local.get $5 + local.get $leftRunStartBuf + local.get $startB i32.const 2 i32.shl i32.add i32.const -1 i32.store - local.get $5 + local.get $startB i32.const 1 i32.add - local.set $5 + local.set $startB br $for-loop|1 end end - local.get $1 + local.get $len i32.const 1 i32.shl call $~lib/rt/tlsf/__alloc - local.set $10 - local.get $1 + local.set $buffer + local.get $len i32.const 1 i32.sub - local.set $11 - local.get $0 + local.set $hi + local.get $ptr i32.const 0 - local.get $11 - local.get $2 + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight - local.set $12 - local.get $12 + local.set $endA + local.get $endA i32.const 1 i32.add - local.set $13 - local.get $13 + local.set $lenA + local.get $lenA i32.const 32 i32.lt_s if - local.get $11 - local.tee $4 + local.get $hi + local.tee $var$4 i32.const 32 i32.const 1 i32.sub - local.tee $5 - local.get $4 - local.get $5 + local.tee $startB + local.get $var$4 + local.get $startB i32.lt_s select - local.set $12 - local.get $0 + local.set $endA + local.get $ptr i32.const 0 - local.get $12 - local.get $13 - local.get $2 + local.get $endA + local.get $lenA + local.get $comparator call $~lib/util/sort/insertionSort end i32.const 0 - local.set $14 + local.set $top i32.const 0 - local.set $15 + local.set $startA loop $while-continue|2 - local.get $12 - local.get $11 + local.get $endA + local.get $hi i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $12 + local.get $endA i32.const 1 i32.add - local.set $5 - local.get $0 - local.get $5 - local.get $11 - local.get $2 + local.set $startB + local.get $ptr + local.get $startB + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight - local.set $3 - local.get $3 - local.get $5 + local.set $endB + local.get $endB + local.get $startB i32.sub i32.const 1 i32.add - local.set $16 - local.get $16 + local.set $lenB + local.get $lenB i32.const 32 i32.lt_s if - local.get $11 - local.tee $17 - local.get $5 + local.get $hi + local.tee $k + local.get $startB i32.const 32 i32.add i32.const 1 i32.sub - local.tee $18 - local.get $17 - local.get $18 + local.tee $var$18 + local.get $k + local.get $var$18 i32.lt_s select - local.set $3 - local.get $0 - local.get $5 - local.get $3 - local.get $16 - local.get $2 + local.set $endB + local.get $ptr + local.get $startB + local.get $endB + local.get $lenB + local.get $comparator call $~lib/util/sort/insertionSort end i32.const 0 - local.get $11 - local.get $15 - local.get $5 - local.get $3 + local.get $hi + local.get $startA + local.get $startB + local.get $endB call $~lib/util/sort/nodePower - local.set $17 - local.get $14 - local.set $18 + local.set $k + local.get $top + local.set $var$18 loop $for-loop|3 - local.get $18 - local.get $17 + local.get $var$18 + local.get $k i32.gt_u - local.set $19 - local.get $19 + local.set $var$19 + local.get $var$19 if - local.get $8 - local.get $18 + local.get $leftRunStartBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.load - local.set $20 - local.get $20 + local.set $var$20 + local.get $var$20 i32.const -1 i32.ne if - local.get $0 - local.get $20 - local.get $9 - local.get $18 + local.get $ptr + local.get $var$20 + local.get $leftRunEndBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $12 - local.get $10 - local.get $2 + local.get $endA + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns - local.get $20 - local.set $15 - local.get $8 - local.get $18 + local.get $var$20 + local.set $startA + local.get $leftRunStartBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.const -1 i32.store end - local.get $18 + local.get $var$18 i32.const 1 i32.sub - local.set $18 + local.set $var$18 br $for-loop|3 end end - local.get $8 - local.get $17 + local.get $leftRunStartBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $15 + local.get $startA i32.store - local.get $9 - local.get $17 + local.get $leftRunEndBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $12 + local.get $endA i32.store - local.get $5 - local.set $15 - local.get $3 - local.set $12 - local.get $17 - local.set $14 + local.get $startB + local.set $startA + local.get $endB + local.set $endA + local.get $k + local.set $top br $while-continue|2 end end - local.get $14 - local.set $4 + local.get $top + local.set $var$4 loop $for-loop|4 - local.get $4 + local.get $var$4 i32.const 0 i32.ne - local.set $18 - local.get $18 + local.set $var$18 + local.get $var$18 if - local.get $8 - local.get $4 + local.get $leftRunStartBuf + local.get $var$4 i32.const 2 i32.shl i32.add i32.load - local.set $19 - local.get $19 + local.set $var$19 + local.get $var$19 i32.const -1 i32.ne if - local.get $0 - local.get $19 - local.get $9 - local.get $4 + local.get $ptr + local.get $var$19 + local.get $leftRunEndBuf + local.get $var$4 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $11 - local.get $10 - local.get $2 + local.get $hi + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns end - local.get $4 + local.get $var$4 i32.const 1 i32.sub - local.set $4 + local.set $var$4 br $for-loop|4 end end - local.get $10 + local.get $buffer call $~lib/rt/tlsf/__free - local.get $8 + local.get $leftRunStartBuf call $~lib/rt/tlsf/__free ) - (func $~lib/typedarray/Int16Array#sort (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Int16Array#sort (param $this i32) (param $comparator i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Int16Array#get:length - local.get $1 + local.get $comparator call $~lib/util/sort/SORT - local.get $0 + local.get $this ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $a i32) (param $b i32) (result i32) + local.get $a i32.extend16_s - local.get $1 + local.get $b i32.extend16_s i32.sub ) - (func $std/typedarray/testArraySort<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (result i32) - local.get $1 + (func $std/typedarray/testArraySort<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $a i32) (param $b i32) (result i32) + local.get $b i32.extend16_s - local.get $0 + local.get $a i32.extend16_s i32.gt_s - local.get $1 + local.get $b i32.extend16_s - local.get $0 + local.get $a i32.extend16_s i32.lt_s i32.sub ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $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) + (func $~lib/util/sort/insertionSort (param $ptr i32) (param $left i32) (param $right i32) (param $presorted i32) (param $comparator i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 0 i32.const 1 i32.ge_s drop - local.get $2 - local.get $1 + local.get $right + local.get $left i32.sub i32.const 1 i32.add - local.set $5 - local.get $1 - local.get $5 + local.set $var$5 + local.get $left + local.get $var$5 i32.const 1 i32.and - local.get $3 - local.get $5 - local.get $3 + local.get $presorted + local.get $var$5 + local.get $presorted i32.sub i32.const 1 i32.and i32.sub - local.get $3 + local.get $presorted i32.const 0 i32.eq select i32.add - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $6 - local.get $2 + local.get $var$6 + local.get $right i32.le_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $0 - local.get $6 + local.get $ptr + local.get $var$6 i32.const 1 i32.shl i32.add i32.load16_u - local.set $8 - local.get $0 - local.get $6 + local.set $var$8 + local.get $ptr + local.get $var$6 i32.const 1 i32.shl i32.add i32.load16_u offset=2 - local.set $9 - local.get $9 - local.set $10 - local.get $8 - local.set $11 - local.get $8 - local.get $9 + local.set $var$9 + local.get $var$9 + local.set $var$10 + local.get $var$8 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.le_s if - local.get $8 - local.set $10 - local.get $9 - local.set $11 + local.get $var$8 + local.set $var$10 + local.get $var$9 + local.set $var$11 end - local.get $6 + local.get $var$6 i32.const 1 i32.sub - local.set $12 + local.set $var$12 block $while-break|1 loop $while-continue|1 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 1 i32.shl i32.add i32.load16_u - local.set $8 - local.get $8 - local.get $11 + local.set $var$8 + local.get $var$8 + local.get $var$11 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 1 i32.shl i32.add - local.get $8 + local.get $var$8 i32.store16 offset=4 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|1 end @@ -33635,49 +33635,49 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store16 offset=4 block $while-break|2 loop $while-continue|2 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 1 i32.shl i32.add i32.load16_u - local.set $8 - local.get $8 - local.get $10 + local.set $var$8 + local.get $var$8 + local.get $var$10 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 1 i32.shl i32.add - local.get $8 + local.get $var$8 i32.store16 offset=2 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|2 end @@ -33685,78 +33685,78 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 1 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store16 offset=2 - local.get $6 + local.get $var$6 i32.const 2 i32.add - local.set $6 + local.set $var$6 br $for-loop|0 end end ) - (func $~lib/util/sort/extendRunRight (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 - local.get $2 + (func $~lib/util/sort/extendRunRight (param $ptr i32) (param $i i32) (param $right i32) (param $comparator i32) (result i32) + (local $j i32) + (local $var$5 i32) + (local $var$6 i32) + (local $tmp i32) + local.get $i + local.get $right i32.eq if - local.get $1 + local.get $i return end - local.get $1 - local.set $4 - local.get $0 - local.get $4 + local.get $i + local.set $j + local.get $ptr + local.get $j i32.const 1 i32.shl i32.add i32.load16_u - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 1 i32.add - local.tee $4 + local.tee $j i32.const 1 i32.shl i32.add i32.load16_u i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if loop $while-continue|0 - local.get $4 - local.get $2 + local.get $j + local.get $right i32.lt_s if (result i32) - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 1 i32.shl i32.add i32.load16_u offset=2 - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 1 i32.shl i32.add i32.load16_u i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 31 @@ -33764,83 +33764,83 @@ else i32.const 0 end - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 + local.get $j i32.const 1 i32.add - local.set $4 + local.set $j br $while-continue|0 end end - local.get $4 - local.set $5 + local.get $j + local.set $var$5 loop $while-continue|1 - local.get $1 - local.get $5 + local.get $i + local.get $var$5 i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $1 + local.get $ptr + local.get $i i32.const 1 i32.shl i32.add i32.load16_u - local.set $7 - local.get $0 - local.get $1 + local.set $tmp + local.get $ptr + local.get $i i32.const 1 i32.shl i32.add - local.get $0 - local.get $5 + local.get $ptr + local.get $var$5 i32.const 1 i32.shl i32.add i32.load16_u i32.store16 - local.get $1 + local.get $i i32.const 1 i32.add - local.set $1 - local.get $0 - local.get $5 + local.set $i + local.get $ptr + local.get $var$5 i32.const 1 i32.shl i32.add - local.get $7 + local.get $tmp i32.store16 - local.get $5 + local.get $var$5 i32.const 1 i32.sub - local.set $5 + local.set $var$5 br $while-continue|1 end end else loop $while-continue|2 - local.get $4 - local.get $2 + local.get $j + local.get $right i32.lt_s if (result i32) - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 1 i32.shl i32.add i32.load16_u offset=2 - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 1 i32.shl i32.add i32.load16_u i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 @@ -33848,55 +33848,55 @@ else i32.const 0 end - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 + local.get $j i32.const 1 i32.add - local.set $4 + local.set $j br $while-continue|2 end end end - local.get $4 + local.get $j ) - (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $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 $2 + (func $~lib/util/sort/mergeRuns (param $ptr i32) (param $l i32) (param $m i32) (param $r i32) (param $buffer i32) (param $comparator i32) + (local $i i32) + (local $j i32) + (local $t i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $m i32.const 1 i32.sub - local.set $2 - local.get $3 - local.get $2 + local.set $m + local.get $r + local.get $m i32.add - local.set $8 - local.get $2 + local.set $t + local.get $m i32.const 1 i32.add - local.set $6 + local.set $i loop $for-loop|0 - local.get $6 - local.get $1 + local.get $i + local.get $l i32.gt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $6 + local.get $buffer + local.get $i i32.const 1 i32.sub i32.const 1 i32.shl i32.add - local.get $0 - local.get $6 + local.get $ptr + local.get $i i32.const 1 i32.sub i32.const 1 @@ -33904,132 +33904,132 @@ i32.add i32.load16_u i32.store16 - local.get $6 + local.get $i i32.const 1 i32.sub - local.set $6 + local.set $i br $for-loop|0 end end - local.get $2 - local.set $7 + local.get $m + local.set $j loop $for-loop|1 - local.get $7 - local.get $3 + local.get $j + local.get $r i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $8 - local.get $7 + local.get $buffer + local.get $t + local.get $j i32.sub i32.const 1 i32.shl i32.add - local.get $0 - local.get $7 + local.get $ptr + local.get $j i32.const 1 i32.shl i32.add i32.load16_u offset=2 i32.store16 - local.get $7 + local.get $j i32.const 1 i32.add - local.set $7 + local.set $j br $for-loop|1 end end - local.get $1 - local.set $9 + local.get $l + local.set $var$9 loop $for-loop|2 - local.get $9 - local.get $3 + local.get $var$9 + local.get $r i32.le_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $4 - local.get $7 + local.get $buffer + local.get $j i32.const 1 i32.shl i32.add i32.load16_u - local.set $11 - local.get $4 - local.get $6 + local.set $var$11 + local.get $buffer + local.get $i i32.const 1 i32.shl i32.add i32.load16_u - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 i32.const 2 global.set $~argumentsLength - local.get $5 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store16 - local.get $7 + local.get $j i32.const 1 i32.sub - local.set $7 + local.set $j else - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 1 i32.shl i32.add - local.get $12 + local.get $var$12 i32.store16 - local.get $6 + local.get $i i32.const 1 i32.add - local.set $6 + local.set $i end - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|2 end end - ) - (func $~lib/util/sort/SORT (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 $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) - local.get $1 + ) + (func $~lib/util/sort/SORT (param $ptr i32) (param $len i32) (param $comparator i32) + (local $endB i32) + (local $var$4 i32) + (local $startB i32) + (local $lgPlus2 i32) + (local $lgPlus2Size i32) + (local $leftRunStartBuf i32) + (local $leftRunEndBuf i32) + (local $buffer i32) + (local $hi i32) + (local $endA i32) + (local $lenA i32) + (local $top i32) + (local $startA i32) + (local $lenB i32) + (local $k i32) + (local $var$18 i32) + (local $var$19 i32) + (local $var$20 i32) + local.get $len i32.const 48 i32.le_s if - local.get $1 + local.get $len i32.const 1 i32.le_s if @@ -34042,536 +34042,536 @@ block $break|0 block $case1|0 block $case0|0 - local.get $1 - local.set $3 - local.get $3 + local.get $len + local.set $endB + local.get $endB i32.const 3 i32.eq br_if $case0|0 - local.get $3 + local.get $endB i32.const 2 i32.eq br_if $case1|0 br $break|0 end - local.get $0 + local.get $ptr i32.load16_u - local.set $3 - local.get $0 + local.set $endB + local.get $ptr i32.load16_u offset=2 - local.set $4 - local.get $3 - local.get $4 + local.set $var$4 + local.get $endB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $5 - local.get $0 - local.get $4 - local.get $3 - local.get $5 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $endB + local.get $startB select i32.store16 - local.get $3 - local.get $4 - local.get $5 + local.get $endB + local.get $var$4 + local.get $startB select - local.set $3 - local.get $0 + local.set $endB + local.get $ptr i32.load16_u offset=4 - local.set $4 - local.get $3 - local.get $4 + local.set $var$4 + local.get $endB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $5 - local.get $0 - local.get $4 - local.get $3 - local.get $5 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $endB + local.get $startB select i32.store16 offset=2 - local.get $0 - local.get $3 - local.get $4 - local.get $5 + local.get $ptr + local.get $endB + local.get $var$4 + local.get $startB select i32.store16 offset=4 end - local.get $0 + local.get $ptr i32.load16_u - local.set $5 - local.get $0 + local.set $startB + local.get $ptr i32.load16_u offset=2 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $startB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $3 - local.get $0 - local.get $4 - local.get $5 - local.get $3 + local.set $endB + local.get $ptr + local.get $var$4 + local.get $startB + local.get $endB select i32.store16 - local.get $0 - local.get $5 - local.get $4 - local.get $3 + local.get $ptr + local.get $startB + local.get $var$4 + local.get $endB select i32.store16 offset=2 return end - local.get $0 + local.get $ptr i32.const 0 - local.get $1 + local.get $len i32.const 1 i32.sub i32.const 0 - local.get $2 + local.get $comparator call $~lib/util/sort/insertionSort return end - local.get $1 - local.set $5 + local.get $len + local.set $startB i32.const 31 - local.get $5 + local.get $startB i32.clz i32.sub i32.const 2 i32.add - local.set $6 - local.get $6 + local.set $lgPlus2 + local.get $lgPlus2 i32.const 2 i32.shl - local.set $7 - local.get $7 + local.set $lgPlus2Size + local.get $lgPlus2Size i32.const 1 i32.shl call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 - local.get $7 + local.set $leftRunStartBuf + local.get $leftRunStartBuf + local.get $lgPlus2Size i32.add - local.set $9 + local.set $leftRunEndBuf i32.const 0 - local.set $5 + local.set $startB loop $for-loop|1 - local.get $5 - local.get $6 + local.get $startB + local.get $lgPlus2 i32.lt_u - local.set $3 - local.get $3 + local.set $endB + local.get $endB if - local.get $8 - local.get $5 + local.get $leftRunStartBuf + local.get $startB i32.const 2 i32.shl i32.add i32.const -1 i32.store - local.get $5 + local.get $startB i32.const 1 i32.add - local.set $5 + local.set $startB br $for-loop|1 end end - local.get $1 + local.get $len i32.const 1 i32.shl call $~lib/rt/tlsf/__alloc - local.set $10 - local.get $1 + local.set $buffer + local.get $len i32.const 1 i32.sub - local.set $11 - local.get $0 + local.set $hi + local.get $ptr i32.const 0 - local.get $11 - local.get $2 + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight - local.set $12 - local.get $12 + local.set $endA + local.get $endA i32.const 1 i32.add - local.set $13 - local.get $13 + local.set $lenA + local.get $lenA i32.const 32 i32.lt_s if - local.get $11 - local.tee $4 + local.get $hi + local.tee $var$4 i32.const 32 i32.const 1 i32.sub - local.tee $5 - local.get $4 - local.get $5 + local.tee $startB + local.get $var$4 + local.get $startB i32.lt_s select - local.set $12 - local.get $0 + local.set $endA + local.get $ptr i32.const 0 - local.get $12 - local.get $13 - local.get $2 + local.get $endA + local.get $lenA + local.get $comparator call $~lib/util/sort/insertionSort end i32.const 0 - local.set $14 + local.set $top i32.const 0 - local.set $15 + local.set $startA loop $while-continue|2 - local.get $12 - local.get $11 + local.get $endA + local.get $hi i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $12 + local.get $endA i32.const 1 i32.add - local.set $5 - local.get $0 - local.get $5 - local.get $11 - local.get $2 + local.set $startB + local.get $ptr + local.get $startB + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight - local.set $3 - local.get $3 - local.get $5 + local.set $endB + local.get $endB + local.get $startB i32.sub i32.const 1 i32.add - local.set $16 - local.get $16 + local.set $lenB + local.get $lenB i32.const 32 i32.lt_s if - local.get $11 - local.tee $17 - local.get $5 + local.get $hi + local.tee $k + local.get $startB i32.const 32 i32.add i32.const 1 i32.sub - local.tee $18 - local.get $17 - local.get $18 + local.tee $var$18 + local.get $k + local.get $var$18 i32.lt_s select - local.set $3 - local.get $0 - local.get $5 - local.get $3 - local.get $16 - local.get $2 + local.set $endB + local.get $ptr + local.get $startB + local.get $endB + local.get $lenB + local.get $comparator call $~lib/util/sort/insertionSort end i32.const 0 - local.get $11 - local.get $15 - local.get $5 - local.get $3 + local.get $hi + local.get $startA + local.get $startB + local.get $endB call $~lib/util/sort/nodePower - local.set $17 - local.get $14 - local.set $18 + local.set $k + local.get $top + local.set $var$18 loop $for-loop|3 - local.get $18 - local.get $17 + local.get $var$18 + local.get $k i32.gt_u - local.set $19 - local.get $19 + local.set $var$19 + local.get $var$19 if - local.get $8 - local.get $18 + local.get $leftRunStartBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.load - local.set $20 - local.get $20 + local.set $var$20 + local.get $var$20 i32.const -1 i32.ne if - local.get $0 - local.get $20 - local.get $9 - local.get $18 + local.get $ptr + local.get $var$20 + local.get $leftRunEndBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $12 - local.get $10 - local.get $2 + local.get $endA + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns - local.get $20 - local.set $15 - local.get $8 - local.get $18 + local.get $var$20 + local.set $startA + local.get $leftRunStartBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.const -1 i32.store end - local.get $18 + local.get $var$18 i32.const 1 i32.sub - local.set $18 + local.set $var$18 br $for-loop|3 end end - local.get $8 - local.get $17 + local.get $leftRunStartBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $15 + local.get $startA i32.store - local.get $9 - local.get $17 + local.get $leftRunEndBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $12 + local.get $endA i32.store - local.get $5 - local.set $15 - local.get $3 - local.set $12 - local.get $17 - local.set $14 + local.get $startB + local.set $startA + local.get $endB + local.set $endA + local.get $k + local.set $top br $while-continue|2 end end - local.get $14 - local.set $4 + local.get $top + local.set $var$4 loop $for-loop|4 - local.get $4 + local.get $var$4 i32.const 0 i32.ne - local.set $18 - local.get $18 + local.set $var$18 + local.get $var$18 if - local.get $8 - local.get $4 + local.get $leftRunStartBuf + local.get $var$4 i32.const 2 i32.shl i32.add i32.load - local.set $19 - local.get $19 + local.set $var$19 + local.get $var$19 i32.const -1 i32.ne if - local.get $0 - local.get $19 - local.get $9 - local.get $4 + local.get $ptr + local.get $var$19 + local.get $leftRunEndBuf + local.get $var$4 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $11 - local.get $10 - local.get $2 + local.get $hi + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns end - local.get $4 + local.get $var$4 i32.const 1 i32.sub - local.set $4 + local.set $var$4 br $for-loop|4 end end - local.get $10 + local.get $buffer call $~lib/rt/tlsf/__free - local.get $8 + local.get $leftRunStartBuf call $~lib/rt/tlsf/__free ) - (func $~lib/typedarray/Uint16Array#sort (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Uint16Array#sort (param $this i32) (param $comparator i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Uint16Array#get:length - local.get $1 + local.get $comparator call $~lib/util/sort/SORT - local.get $0 + local.get $this ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $a i32) (param $b i32) (result i32) + local.get $a i32.const 65535 i32.and - local.get $1 + local.get $b i32.const 65535 i32.and i32.gt_u - local.get $0 + local.get $a i32.const 65535 i32.and - local.get $1 + local.get $b i32.const 65535 i32.and i32.lt_u i32.sub ) - (func $std/typedarray/testArraySort<~lib/typedarray/Uint16Array,u16>~anonymous|0 (param $0 i32) (param $1 i32) (result i32) - local.get $1 + (func $std/typedarray/testArraySort<~lib/typedarray/Uint16Array,u16>~anonymous|0 (param $a i32) (param $b i32) (result i32) + local.get $b i32.const 65535 i32.and - local.get $0 + local.get $a i32.const 65535 i32.and i32.gt_u - local.get $1 + local.get $b i32.const 65535 i32.and - local.get $0 + local.get $a i32.const 65535 i32.and i32.lt_u i32.sub ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $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) + (func $~lib/util/sort/insertionSort (param $ptr i32) (param $left i32) (param $right i32) (param $presorted i32) (param $comparator i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 0 i32.const 1 i32.ge_s drop - local.get $2 - local.get $1 + local.get $right + local.get $left i32.sub i32.const 1 i32.add - local.set $5 - local.get $1 - local.get $5 + local.set $var$5 + local.get $left + local.get $var$5 i32.const 1 i32.and - local.get $3 - local.get $5 - local.get $3 + local.get $presorted + local.get $var$5 + local.get $presorted i32.sub i32.const 1 i32.and i32.sub - local.get $3 + local.get $presorted i32.const 0 i32.eq select i32.add - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $6 - local.get $2 + local.get $var$6 + local.get $right i32.le_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $0 - local.get $6 + local.get $ptr + local.get $var$6 i32.const 2 i32.shl i32.add i32.load - local.set $8 - local.get $0 - local.get $6 + local.set $var$8 + local.get $ptr + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $9 - local.get $9 - local.set $10 - local.get $8 - local.set $11 - local.get $8 - local.get $9 + local.set $var$9 + local.get $var$9 + local.set $var$10 + local.get $var$8 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.le_s if - local.get $8 - local.set $10 - local.get $9 - local.set $11 + local.get $var$8 + local.set $var$10 + local.get $var$9 + local.set $var$11 end - local.get $6 + local.get $var$6 i32.const 1 i32.sub - local.set $12 + local.set $var$12 block $while-break|1 loop $while-continue|1 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add i32.load - local.set $8 - local.get $8 - local.get $11 + local.set $var$8 + local.get $var$8 + local.get $var$11 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $8 + local.get $var$8 i32.store offset=8 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|1 end @@ -34579,49 +34579,49 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store offset=8 block $while-break|2 loop $while-continue|2 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add i32.load - local.set $8 - local.get $8 - local.get $10 + local.set $var$8 + local.get $var$8 + local.get $var$10 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $8 + local.get $var$8 i32.store offset=4 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|2 end @@ -34629,78 +34629,78 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.const 2 i32.add - local.set $6 + local.set $var$6 br $for-loop|0 end end ) - (func $~lib/util/sort/extendRunRight (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 - local.get $2 + (func $~lib/util/sort/extendRunRight (param $ptr i32) (param $i i32) (param $right i32) (param $comparator i32) (result i32) + (local $j i32) + (local $var$5 i32) + (local $var$6 i32) + (local $tmp i32) + local.get $i + local.get $right i32.eq if - local.get $1 + local.get $i return end - local.get $1 - local.set $4 - local.get $0 - local.get $4 + local.get $i + local.set $j + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 1 i32.add - local.tee $4 + local.tee $j i32.const 2 i32.shl i32.add i32.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if loop $while-continue|0 - local.get $4 - local.get $2 + local.get $j + local.get $right i32.lt_s if (result i32) - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load offset=4 - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 31 @@ -34708,83 +34708,83 @@ else i32.const 0 end - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 + local.get $j i32.const 1 i32.add - local.set $4 + local.set $j br $while-continue|0 end end - local.get $4 - local.set $5 + local.get $j + local.set $var$5 loop $while-continue|1 - local.get $1 - local.get $5 + local.get $i + local.get $var$5 i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $1 + local.get $ptr + local.get $i i32.const 2 i32.shl i32.add i32.load - local.set $7 - local.get $0 - local.get $1 + local.set $tmp + local.get $ptr + local.get $i i32.const 2 i32.shl i32.add - local.get $0 - local.get $5 + local.get $ptr + local.get $var$5 i32.const 2 i32.shl i32.add i32.load i32.store - local.get $1 + local.get $i i32.const 1 i32.add - local.set $1 - local.get $0 - local.get $5 + local.set $i + local.get $ptr + local.get $var$5 i32.const 2 i32.shl i32.add - local.get $7 + local.get $tmp i32.store - local.get $5 + local.get $var$5 i32.const 1 i32.sub - local.set $5 + local.set $var$5 br $while-continue|1 end end else loop $while-continue|2 - local.get $4 - local.get $2 + local.get $j + local.get $right i32.lt_s if (result i32) - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load offset=4 - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 @@ -34792,55 +34792,55 @@ else i32.const 0 end - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 + local.get $j i32.const 1 i32.add - local.set $4 + local.set $j br $while-continue|2 end end end - local.get $4 + local.get $j ) - (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $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 $2 + (func $~lib/util/sort/mergeRuns (param $ptr i32) (param $l i32) (param $m i32) (param $r i32) (param $buffer i32) (param $comparator i32) + (local $i i32) + (local $j i32) + (local $t i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $m i32.const 1 i32.sub - local.set $2 - local.get $3 - local.get $2 + local.set $m + local.get $r + local.get $m i32.add - local.set $8 - local.get $2 + local.set $t + local.get $m i32.const 1 i32.add - local.set $6 + local.set $i loop $for-loop|0 - local.get $6 - local.get $1 + local.get $i + local.get $l i32.gt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $6 + local.get $buffer + local.get $i i32.const 1 i32.sub i32.const 2 i32.shl i32.add - local.get $0 - local.get $6 + local.get $ptr + local.get $i i32.const 1 i32.sub i32.const 2 @@ -34848,132 +34848,132 @@ i32.add i32.load i32.store - local.get $6 + local.get $i i32.const 1 i32.sub - local.set $6 + local.set $i br $for-loop|0 end end - local.get $2 - local.set $7 + local.get $m + local.set $j loop $for-loop|1 - local.get $7 - local.get $3 + local.get $j + local.get $r i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $8 - local.get $7 + local.get $buffer + local.get $t + local.get $j i32.sub i32.const 2 i32.shl i32.add - local.get $0 - local.get $7 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load offset=4 i32.store - local.get $7 + local.get $j i32.const 1 i32.add - local.set $7 + local.set $j br $for-loop|1 end end - local.get $1 - local.set $9 + local.get $l + local.set $var$9 loop $for-loop|2 - local.get $9 - local.get $3 + local.get $var$9 + local.get $r i32.le_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $4 - local.get $7 + local.get $buffer + local.get $j i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $4 - local.get $6 + local.set $var$11 + local.get $buffer + local.get $i i32.const 2 i32.shl i32.add i32.load - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 i32.const 2 global.set $~argumentsLength - local.get $5 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 2 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store - local.get $7 + local.get $j i32.const 1 i32.sub - local.set $7 + local.set $j else - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 2 i32.shl i32.add - local.get $12 + local.get $var$12 i32.store - local.get $6 + local.get $i i32.const 1 i32.add - local.set $6 + local.set $i end - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|2 end end ) - (func $~lib/util/sort/SORT (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 $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) - local.get $1 + (func $~lib/util/sort/SORT (param $ptr i32) (param $len i32) (param $comparator i32) + (local $endB i32) + (local $var$4 i32) + (local $startB i32) + (local $lgPlus2 i32) + (local $lgPlus2Size i32) + (local $leftRunStartBuf i32) + (local $leftRunEndBuf i32) + (local $buffer i32) + (local $hi i32) + (local $endA i32) + (local $lenA i32) + (local $top i32) + (local $startA i32) + (local $lenB i32) + (local $k i32) + (local $var$18 i32) + (local $var$19 i32) + (local $var$20 i32) + local.get $len i32.const 48 i32.le_s if - local.get $1 + local.get $len i32.const 1 i32.le_s if @@ -34986,516 +34986,516 @@ block $break|0 block $case1|0 block $case0|0 - local.get $1 - local.set $3 - local.get $3 + local.get $len + local.set $endB + local.get $endB i32.const 3 i32.eq br_if $case0|0 - local.get $3 + local.get $endB i32.const 2 i32.eq br_if $case1|0 br $break|0 end - local.get $0 + local.get $ptr i32.load - local.set $3 - local.get $0 + local.set $endB + local.get $ptr i32.load offset=4 - local.set $4 - local.get $3 - local.get $4 + local.set $var$4 + local.get $endB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $5 - local.get $0 - local.get $4 - local.get $3 - local.get $5 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $endB + local.get $startB select i32.store - local.get $3 - local.get $4 - local.get $5 + local.get $endB + local.get $var$4 + local.get $startB select - local.set $3 - local.get $0 + local.set $endB + local.get $ptr i32.load offset=8 - local.set $4 - local.get $3 - local.get $4 + local.set $var$4 + local.get $endB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $5 - local.get $0 - local.get $4 - local.get $3 - local.get $5 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $endB + local.get $startB select i32.store offset=4 - local.get $0 - local.get $3 - local.get $4 - local.get $5 + local.get $ptr + local.get $endB + local.get $var$4 + local.get $startB select i32.store offset=8 end - local.get $0 + local.get $ptr i32.load - local.set $5 - local.get $0 + local.set $startB + local.get $ptr i32.load offset=4 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $startB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $3 - local.get $0 - local.get $4 - local.get $5 - local.get $3 + local.set $endB + local.get $ptr + local.get $var$4 + local.get $startB + local.get $endB select i32.store - local.get $0 - local.get $5 - local.get $4 - local.get $3 + local.get $ptr + local.get $startB + local.get $var$4 + local.get $endB select i32.store offset=4 return end - local.get $0 + local.get $ptr i32.const 0 - local.get $1 + local.get $len i32.const 1 i32.sub i32.const 0 - local.get $2 + local.get $comparator call $~lib/util/sort/insertionSort return end - local.get $1 - local.set $5 + local.get $len + local.set $startB i32.const 31 - local.get $5 + local.get $startB i32.clz i32.sub i32.const 2 i32.add - local.set $6 - local.get $6 + local.set $lgPlus2 + local.get $lgPlus2 i32.const 2 i32.shl - local.set $7 - local.get $7 + local.set $lgPlus2Size + local.get $lgPlus2Size i32.const 1 i32.shl call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 - local.get $7 + local.set $leftRunStartBuf + local.get $leftRunStartBuf + local.get $lgPlus2Size i32.add - local.set $9 + local.set $leftRunEndBuf i32.const 0 - local.set $5 + local.set $startB loop $for-loop|1 - local.get $5 - local.get $6 + local.get $startB + local.get $lgPlus2 i32.lt_u - local.set $3 - local.get $3 + local.set $endB + local.get $endB if - local.get $8 - local.get $5 + local.get $leftRunStartBuf + local.get $startB i32.const 2 i32.shl i32.add i32.const -1 i32.store - local.get $5 + local.get $startB i32.const 1 i32.add - local.set $5 + local.set $startB br $for-loop|1 end end - local.get $1 + local.get $len i32.const 2 i32.shl call $~lib/rt/tlsf/__alloc - local.set $10 - local.get $1 + local.set $buffer + local.get $len i32.const 1 i32.sub - local.set $11 - local.get $0 + local.set $hi + local.get $ptr i32.const 0 - local.get $11 - local.get $2 + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight - local.set $12 - local.get $12 + local.set $endA + local.get $endA i32.const 1 i32.add - local.set $13 - local.get $13 + local.set $lenA + local.get $lenA i32.const 32 i32.lt_s if - local.get $11 - local.tee $4 + local.get $hi + local.tee $var$4 i32.const 32 i32.const 1 i32.sub - local.tee $5 - local.get $4 - local.get $5 + local.tee $startB + local.get $var$4 + local.get $startB i32.lt_s select - local.set $12 - local.get $0 + local.set $endA + local.get $ptr i32.const 0 - local.get $12 - local.get $13 - local.get $2 + local.get $endA + local.get $lenA + local.get $comparator call $~lib/util/sort/insertionSort end i32.const 0 - local.set $14 + local.set $top i32.const 0 - local.set $15 + local.set $startA loop $while-continue|2 - local.get $12 - local.get $11 + local.get $endA + local.get $hi i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $12 + local.get $endA i32.const 1 i32.add - local.set $5 - local.get $0 - local.get $5 - local.get $11 - local.get $2 + local.set $startB + local.get $ptr + local.get $startB + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight - local.set $3 - local.get $3 - local.get $5 + local.set $endB + local.get $endB + local.get $startB i32.sub i32.const 1 i32.add - local.set $16 - local.get $16 + local.set $lenB + local.get $lenB i32.const 32 i32.lt_s if - local.get $11 - local.tee $17 - local.get $5 + local.get $hi + local.tee $k + local.get $startB i32.const 32 i32.add i32.const 1 i32.sub - local.tee $18 - local.get $17 - local.get $18 + local.tee $var$18 + local.get $k + local.get $var$18 i32.lt_s select - local.set $3 - local.get $0 - local.get $5 - local.get $3 - local.get $16 - local.get $2 + local.set $endB + local.get $ptr + local.get $startB + local.get $endB + local.get $lenB + local.get $comparator call $~lib/util/sort/insertionSort end i32.const 0 - local.get $11 - local.get $15 - local.get $5 - local.get $3 + local.get $hi + local.get $startA + local.get $startB + local.get $endB call $~lib/util/sort/nodePower - local.set $17 - local.get $14 - local.set $18 + local.set $k + local.get $top + local.set $var$18 loop $for-loop|3 - local.get $18 - local.get $17 + local.get $var$18 + local.get $k i32.gt_u - local.set $19 - local.get $19 + local.set $var$19 + local.get $var$19 if - local.get $8 - local.get $18 + local.get $leftRunStartBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.load - local.set $20 - local.get $20 + local.set $var$20 + local.get $var$20 i32.const -1 i32.ne if - local.get $0 - local.get $20 - local.get $9 - local.get $18 + local.get $ptr + local.get $var$20 + local.get $leftRunEndBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $12 - local.get $10 - local.get $2 + local.get $endA + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns - local.get $20 - local.set $15 - local.get $8 - local.get $18 + local.get $var$20 + local.set $startA + local.get $leftRunStartBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.const -1 i32.store end - local.get $18 + local.get $var$18 i32.const 1 i32.sub - local.set $18 + local.set $var$18 br $for-loop|3 end end - local.get $8 - local.get $17 + local.get $leftRunStartBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $15 + local.get $startA i32.store - local.get $9 - local.get $17 + local.get $leftRunEndBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $12 + local.get $endA i32.store - local.get $5 - local.set $15 - local.get $3 - local.set $12 - local.get $17 - local.set $14 + local.get $startB + local.set $startA + local.get $endB + local.set $endA + local.get $k + local.set $top br $while-continue|2 end end - local.get $14 - local.set $4 + local.get $top + local.set $var$4 loop $for-loop|4 - local.get $4 + local.get $var$4 i32.const 0 i32.ne - local.set $18 - local.get $18 + local.set $var$18 + local.get $var$18 if - local.get $8 - local.get $4 + local.get $leftRunStartBuf + local.get $var$4 i32.const 2 i32.shl i32.add i32.load - local.set $19 - local.get $19 + local.set $var$19 + local.get $var$19 i32.const -1 i32.ne if - local.get $0 - local.get $19 - local.get $9 - local.get $4 + local.get $ptr + local.get $var$19 + local.get $leftRunEndBuf + local.get $var$4 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $11 - local.get $10 - local.get $2 + local.get $hi + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns end - local.get $4 + local.get $var$4 i32.const 1 i32.sub - local.set $4 + local.set $var$4 br $for-loop|4 end end - local.get $10 + local.get $buffer call $~lib/rt/tlsf/__free - local.get $8 + local.get $leftRunStartBuf call $~lib/rt/tlsf/__free ) - (func $~lib/typedarray/Int32Array#sort (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Int32Array#sort (param $this i32) (param $comparator i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Int32Array#get:length - local.get $1 + local.get $comparator call $~lib/util/sort/SORT - local.get $0 + local.get $this ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.sub ) - (func $std/typedarray/testArraySort<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 + (func $std/typedarray/testArraySort<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $a i32) (param $b i32) (result i32) + local.get $b + local.get $a i32.gt_s - local.get $1 - local.get $0 + local.get $b + local.get $a i32.lt_s i32.sub ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $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) + (func $~lib/util/sort/insertionSort (param $ptr i32) (param $left i32) (param $right i32) (param $presorted i32) (param $comparator i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 0 i32.const 1 i32.ge_s drop - local.get $2 - local.get $1 + local.get $right + local.get $left i32.sub i32.const 1 i32.add - local.set $5 - local.get $1 - local.get $5 + local.set $var$5 + local.get $left + local.get $var$5 i32.const 1 i32.and - local.get $3 - local.get $5 - local.get $3 + local.get $presorted + local.get $var$5 + local.get $presorted i32.sub i32.const 1 i32.and i32.sub - local.get $3 + local.get $presorted i32.const 0 i32.eq select i32.add - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $6 - local.get $2 + local.get $var$6 + local.get $right i32.le_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $0 - local.get $6 + local.get $ptr + local.get $var$6 i32.const 2 i32.shl i32.add i32.load - local.set $8 - local.get $0 - local.get $6 + local.set $var$8 + local.get $ptr + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $9 - local.get $9 - local.set $10 - local.get $8 - local.set $11 - local.get $8 - local.get $9 + local.set $var$9 + local.get $var$9 + local.set $var$10 + local.get $var$8 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.le_s if - local.get $8 - local.set $10 - local.get $9 - local.set $11 + local.get $var$8 + local.set $var$10 + local.get $var$9 + local.set $var$11 end - local.get $6 + local.get $var$6 i32.const 1 i32.sub - local.set $12 + local.set $var$12 block $while-break|1 loop $while-continue|1 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add i32.load - local.set $8 - local.get $8 - local.get $11 + local.set $var$8 + local.get $var$8 + local.get $var$11 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $8 + local.get $var$8 i32.store offset=8 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|1 end @@ -35503,49 +35503,49 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store offset=8 block $while-break|2 loop $while-continue|2 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add i32.load - local.set $8 - local.get $8 - local.get $10 + local.set $var$8 + local.get $var$8 + local.get $var$10 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $8 + local.get $var$8 i32.store offset=4 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|2 end @@ -35553,78 +35553,78 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.const 2 i32.add - local.set $6 + local.set $var$6 br $for-loop|0 end end ) - (func $~lib/util/sort/extendRunRight (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 - local.get $2 + (func $~lib/util/sort/extendRunRight (param $ptr i32) (param $i i32) (param $right i32) (param $comparator i32) (result i32) + (local $j i32) + (local $var$5 i32) + (local $var$6 i32) + (local $tmp i32) + local.get $i + local.get $right i32.eq if - local.get $1 + local.get $i return end - local.get $1 - local.set $4 - local.get $0 - local.get $4 + local.get $i + local.set $j + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 1 i32.add - local.tee $4 + local.tee $j i32.const 2 i32.shl i32.add i32.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - loop $while-continue|0 - local.get $4 - local.get $2 + loop $while-continue|0 + local.get $j + local.get $right i32.lt_s if (result i32) - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load offset=4 - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 31 @@ -35632,83 +35632,83 @@ else i32.const 0 end - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 + local.get $j i32.const 1 i32.add - local.set $4 + local.set $j br $while-continue|0 end end - local.get $4 - local.set $5 + local.get $j + local.set $var$5 loop $while-continue|1 - local.get $1 - local.get $5 + local.get $i + local.get $var$5 i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $1 + local.get $ptr + local.get $i i32.const 2 i32.shl i32.add i32.load - local.set $7 - local.get $0 - local.get $1 + local.set $tmp + local.get $ptr + local.get $i i32.const 2 i32.shl i32.add - local.get $0 - local.get $5 + local.get $ptr + local.get $var$5 i32.const 2 i32.shl i32.add i32.load i32.store - local.get $1 + local.get $i i32.const 1 i32.add - local.set $1 - local.get $0 - local.get $5 + local.set $i + local.get $ptr + local.get $var$5 i32.const 2 i32.shl i32.add - local.get $7 + local.get $tmp i32.store - local.get $5 + local.get $var$5 i32.const 1 i32.sub - local.set $5 + local.set $var$5 br $while-continue|1 end end else loop $while-continue|2 - local.get $4 - local.get $2 + local.get $j + local.get $right i32.lt_s if (result i32) - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load offset=4 - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 @@ -35716,55 +35716,55 @@ else i32.const 0 end - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 + local.get $j i32.const 1 i32.add - local.set $4 + local.set $j br $while-continue|2 end end end - local.get $4 + local.get $j ) - (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $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 $2 + (func $~lib/util/sort/mergeRuns (param $ptr i32) (param $l i32) (param $m i32) (param $r i32) (param $buffer i32) (param $comparator i32) + (local $i i32) + (local $j i32) + (local $t i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $var$12 i32) + local.get $m i32.const 1 i32.sub - local.set $2 - local.get $3 - local.get $2 + local.set $m + local.get $r + local.get $m i32.add - local.set $8 - local.get $2 + local.set $t + local.get $m i32.const 1 i32.add - local.set $6 + local.set $i loop $for-loop|0 - local.get $6 - local.get $1 + local.get $i + local.get $l i32.gt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $6 + local.get $buffer + local.get $i i32.const 1 i32.sub i32.const 2 i32.shl i32.add - local.get $0 - local.get $6 + local.get $ptr + local.get $i i32.const 1 i32.sub i32.const 2 @@ -35772,132 +35772,132 @@ i32.add i32.load i32.store - local.get $6 + local.get $i i32.const 1 i32.sub - local.set $6 + local.set $i br $for-loop|0 end end - local.get $2 - local.set $7 + local.get $m + local.set $j loop $for-loop|1 - local.get $7 - local.get $3 + local.get $j + local.get $r i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $8 - local.get $7 + local.get $buffer + local.get $t + local.get $j i32.sub i32.const 2 i32.shl i32.add - local.get $0 - local.get $7 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add i32.load offset=4 i32.store - local.get $7 + local.get $j i32.const 1 i32.add - local.set $7 + local.set $j br $for-loop|1 end end - local.get $1 - local.set $9 + local.get $l + local.set $var$9 loop $for-loop|2 - local.get $9 - local.get $3 + local.get $var$9 + local.get $r i32.le_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $4 - local.get $7 + local.get $buffer + local.get $j i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $4 - local.get $6 + local.set $var$11 + local.get $buffer + local.get $i i32.const 2 i32.shl i32.add i32.load - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 i32.const 2 global.set $~argumentsLength - local.get $5 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 2 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store - local.get $7 + local.get $j i32.const 1 i32.sub - local.set $7 + local.set $j else - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 2 i32.shl i32.add - local.get $12 + local.get $var$12 i32.store - local.get $6 + local.get $i i32.const 1 i32.add - local.set $6 + local.set $i end - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|2 end end ) - (func $~lib/util/sort/SORT (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 $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) - local.get $1 + (func $~lib/util/sort/SORT (param $ptr i32) (param $len i32) (param $comparator i32) + (local $endB i32) + (local $var$4 i32) + (local $startB i32) + (local $lgPlus2 i32) + (local $lgPlus2Size i32) + (local $leftRunStartBuf i32) + (local $leftRunEndBuf i32) + (local $buffer i32) + (local $hi i32) + (local $endA i32) + (local $lenA i32) + (local $top i32) + (local $startA i32) + (local $lenB i32) + (local $k i32) + (local $var$18 i32) + (local $var$19 i32) + (local $var$20 i32) + local.get $len i32.const 48 i32.le_s if - local.get $1 + local.get $len i32.const 1 i32.le_s if @@ -35910,520 +35910,520 @@ block $break|0 block $case1|0 block $case0|0 - local.get $1 - local.set $3 - local.get $3 + local.get $len + local.set $endB + local.get $endB i32.const 3 i32.eq br_if $case0|0 - local.get $3 + local.get $endB i32.const 2 i32.eq br_if $case1|0 br $break|0 end - local.get $0 + local.get $ptr i32.load - local.set $3 - local.get $0 + local.set $endB + local.get $ptr i32.load offset=4 - local.set $4 - local.get $3 - local.get $4 + local.set $var$4 + local.get $endB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $5 - local.get $0 - local.get $4 - local.get $3 - local.get $5 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $endB + local.get $startB select i32.store - local.get $3 - local.get $4 - local.get $5 + local.get $endB + local.get $var$4 + local.get $startB select - local.set $3 - local.get $0 + local.set $endB + local.get $ptr i32.load offset=8 - local.set $4 - local.get $3 - local.get $4 + local.set $var$4 + local.get $endB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $5 - local.get $0 - local.get $4 - local.get $3 - local.get $5 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $endB + local.get $startB select i32.store offset=4 - local.get $0 - local.get $3 - local.get $4 - local.get $5 + local.get $ptr + local.get $endB + local.get $var$4 + local.get $startB select i32.store offset=8 end - local.get $0 + local.get $ptr i32.load - local.set $5 - local.get $0 + local.set $startB + local.get $ptr i32.load offset=4 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $startB + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i32_i32_=>_i32) i32.const 0 i32.gt_s - local.set $3 - local.get $0 - local.get $4 - local.get $5 - local.get $3 + local.set $endB + local.get $ptr + local.get $var$4 + local.get $startB + local.get $endB select i32.store - local.get $0 - local.get $5 - local.get $4 - local.get $3 + local.get $ptr + local.get $startB + local.get $var$4 + local.get $endB select i32.store offset=4 return end - local.get $0 + local.get $ptr i32.const 0 - local.get $1 + local.get $len i32.const 1 i32.sub i32.const 0 - local.get $2 + local.get $comparator call $~lib/util/sort/insertionSort return end - local.get $1 - local.set $5 + local.get $len + local.set $startB i32.const 31 - local.get $5 + local.get $startB i32.clz i32.sub i32.const 2 i32.add - local.set $6 - local.get $6 + local.set $lgPlus2 + local.get $lgPlus2 i32.const 2 i32.shl - local.set $7 - local.get $7 + local.set $lgPlus2Size + local.get $lgPlus2Size i32.const 1 i32.shl call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 - local.get $7 + local.set $leftRunStartBuf + local.get $leftRunStartBuf + local.get $lgPlus2Size i32.add - local.set $9 + local.set $leftRunEndBuf i32.const 0 - local.set $5 + local.set $startB loop $for-loop|1 - local.get $5 - local.get $6 + local.get $startB + local.get $lgPlus2 i32.lt_u - local.set $3 - local.get $3 + local.set $endB + local.get $endB if - local.get $8 - local.get $5 + local.get $leftRunStartBuf + local.get $startB i32.const 2 i32.shl i32.add i32.const -1 i32.store - local.get $5 + local.get $startB i32.const 1 i32.add - local.set $5 + local.set $startB br $for-loop|1 end end - local.get $1 + local.get $len i32.const 2 i32.shl call $~lib/rt/tlsf/__alloc - local.set $10 - local.get $1 + local.set $buffer + local.get $len i32.const 1 i32.sub - local.set $11 - local.get $0 + local.set $hi + local.get $ptr i32.const 0 - local.get $11 - local.get $2 + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight - local.set $12 - local.get $12 + local.set $endA + local.get $endA i32.const 1 i32.add - local.set $13 - local.get $13 + local.set $lenA + local.get $lenA i32.const 32 i32.lt_s if - local.get $11 - local.tee $4 + local.get $hi + local.tee $var$4 i32.const 32 i32.const 1 i32.sub - local.tee $5 - local.get $4 - local.get $5 + local.tee $startB + local.get $var$4 + local.get $startB i32.lt_s select - local.set $12 - local.get $0 + local.set $endA + local.get $ptr i32.const 0 - local.get $12 - local.get $13 - local.get $2 + local.get $endA + local.get $lenA + local.get $comparator call $~lib/util/sort/insertionSort end i32.const 0 - local.set $14 + local.set $top i32.const 0 - local.set $15 + local.set $startA loop $while-continue|2 - local.get $12 - local.get $11 + local.get $endA + local.get $hi i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $12 + local.get $endA i32.const 1 i32.add - local.set $5 - local.get $0 - local.get $5 - local.get $11 - local.get $2 + local.set $startB + local.get $ptr + local.get $startB + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight - local.set $3 - local.get $3 - local.get $5 + local.set $endB + local.get $endB + local.get $startB i32.sub i32.const 1 i32.add - local.set $16 - local.get $16 + local.set $lenB + local.get $lenB i32.const 32 i32.lt_s if - local.get $11 - local.tee $17 - local.get $5 + local.get $hi + local.tee $k + local.get $startB i32.const 32 i32.add i32.const 1 i32.sub - local.tee $18 - local.get $17 - local.get $18 + local.tee $var$18 + local.get $k + local.get $var$18 i32.lt_s select - local.set $3 - local.get $0 - local.get $5 - local.get $3 - local.get $16 - local.get $2 + local.set $endB + local.get $ptr + local.get $startB + local.get $endB + local.get $lenB + local.get $comparator call $~lib/util/sort/insertionSort end i32.const 0 - local.get $11 - local.get $15 - local.get $5 - local.get $3 + local.get $hi + local.get $startA + local.get $startB + local.get $endB call $~lib/util/sort/nodePower - local.set $17 - local.get $14 - local.set $18 + local.set $k + local.get $top + local.set $var$18 loop $for-loop|3 - local.get $18 - local.get $17 + local.get $var$18 + local.get $k i32.gt_u - local.set $19 - local.get $19 + local.set $var$19 + local.get $var$19 if - local.get $8 - local.get $18 + local.get $leftRunStartBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.load - local.set $20 - local.get $20 + local.set $var$20 + local.get $var$20 i32.const -1 i32.ne if - local.get $0 - local.get $20 - local.get $9 - local.get $18 + local.get $ptr + local.get $var$20 + local.get $leftRunEndBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $12 - local.get $10 - local.get $2 + local.get $endA + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns - local.get $20 - local.set $15 - local.get $8 - local.get $18 + local.get $var$20 + local.set $startA + local.get $leftRunStartBuf + local.get $var$18 i32.const 2 i32.shl i32.add i32.const -1 i32.store end - local.get $18 + local.get $var$18 i32.const 1 i32.sub - local.set $18 + local.set $var$18 br $for-loop|3 end end - local.get $8 - local.get $17 + local.get $leftRunStartBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $15 + local.get $startA i32.store - local.get $9 - local.get $17 + local.get $leftRunEndBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $12 + local.get $endA i32.store - local.get $5 - local.set $15 - local.get $3 - local.set $12 - local.get $17 - local.set $14 + local.get $startB + local.set $startA + local.get $endB + local.set $endA + local.get $k + local.set $top br $while-continue|2 end end - local.get $14 - local.set $4 + local.get $top + local.set $var$4 loop $for-loop|4 - local.get $4 + local.get $var$4 i32.const 0 i32.ne - local.set $18 - local.get $18 + local.set $var$18 + local.get $var$18 if - local.get $8 - local.get $4 + local.get $leftRunStartBuf + local.get $var$4 i32.const 2 i32.shl i32.add i32.load - local.set $19 - local.get $19 + local.set $var$19 + local.get $var$19 i32.const -1 i32.ne if - local.get $0 - local.get $19 - local.get $9 - local.get $4 + local.get $ptr + local.get $var$19 + local.get $leftRunEndBuf + local.get $var$4 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $11 - local.get $10 - local.get $2 + local.get $hi + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns end - local.get $4 + local.get $var$4 i32.const 1 i32.sub - local.set $4 + local.set $var$4 br $for-loop|4 end end - local.get $10 + local.get $buffer call $~lib/rt/tlsf/__free - local.get $8 + local.get $leftRunStartBuf call $~lib/rt/tlsf/__free ) - (func $~lib/typedarray/Uint32Array#sort (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Uint32Array#sort (param $this i32) (param $comparator i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Uint32Array#get:length - local.get $1 + local.get $comparator call $~lib/util/sort/SORT - local.get $0 - ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.gt_u - local.get $0 - local.get $1 - i32.lt_u - i32.sub + local.get $this ) - (func $std/typedarray/testArraySort<~lib/typedarray/Uint32Array,u32>~anonymous|0 (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 + (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $a i32) (param $b i32) (result i32) + local.get $a + local.get $b i32.gt_u - local.get $1 - local.get $0 + local.get $a + local.get $b i32.lt_u i32.sub ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i64) - (local $11 i64) - (local $12 i32) - (local $13 i32) + (func $std/typedarray/testArraySort<~lib/typedarray/Uint32Array,u32>~anonymous|0 (param $a i32) (param $b i32) (result i32) + local.get $b + local.get $a + i32.gt_u + local.get $b + local.get $a + i32.lt_u + i32.sub + ) + (func $~lib/util/sort/insertionSort (param $ptr i32) (param $left i32) (param $right i32) (param $presorted i32) (param $comparator i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i64) + (local $var$9 i64) + (local $var$10 i64) + (local $var$11 i64) + (local $var$12 i32) + (local $var$13 i32) i32.const 0 i32.const 1 i32.ge_s drop - local.get $2 - local.get $1 + local.get $right + local.get $left i32.sub i32.const 1 i32.add - local.set $5 - local.get $1 - local.get $5 + local.set $var$5 + local.get $left + local.get $var$5 i32.const 1 i32.and - local.get $3 - local.get $5 - local.get $3 + local.get $presorted + local.get $var$5 + local.get $presorted i32.sub i32.const 1 i32.and i32.sub - local.get $3 + local.get $presorted i32.const 0 i32.eq select i32.add - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $6 - local.get $2 + local.get $var$6 + local.get $right i32.le_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $0 - local.get $6 + local.get $ptr + local.get $var$6 i32.const 3 i32.shl i32.add i64.load - local.set $8 - local.get $0 - local.get $6 + local.set $var$8 + local.get $ptr + local.get $var$6 i32.const 3 i32.shl i32.add i64.load offset=8 - local.set $9 - local.get $9 - local.set $10 - local.get $8 - local.set $11 - local.get $8 - local.get $9 + local.set $var$9 + local.get $var$9 + local.set $var$10 + local.get $var$8 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i64_i64_=>_i32) i32.const 0 i32.le_s if - local.get $8 - local.set $10 - local.get $9 - local.set $11 + local.get $var$8 + local.set $var$10 + local.get $var$9 + local.set $var$11 end - local.get $6 + local.get $var$6 i32.const 1 i32.sub - local.set $12 + local.set $var$12 block $while-break|1 loop $while-continue|1 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 3 i32.shl i32.add i64.load - local.set $8 - local.get $8 - local.get $11 + local.set $var$8 + local.get $var$8 + local.get $var$11 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i64_i64_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 3 i32.shl i32.add - local.get $8 + local.get $var$8 i64.store offset=16 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|1 end @@ -36431,49 +36431,49 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 3 i32.shl i32.add - local.get $11 + local.get $var$11 i64.store offset=16 block $while-break|2 loop $while-continue|2 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 3 i32.shl i32.add i64.load - local.set $8 - local.get $8 - local.get $10 + local.set $var$8 + local.get $var$8 + local.get $var$10 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i64_i64_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 3 i32.shl i32.add - local.get $8 + local.get $var$8 i64.store offset=8 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|2 end @@ -36481,78 +36481,78 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 3 i32.shl i32.add - local.get $10 + local.get $var$10 i64.store offset=8 - local.get $6 + local.get $var$6 i32.const 2 i32.add - local.set $6 + local.set $var$6 br $for-loop|0 end end ) - (func $~lib/util/sort/extendRunRight (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 i64) - local.get $1 - local.get $2 + (func $~lib/util/sort/extendRunRight (param $ptr i32) (param $i i32) (param $right i32) (param $comparator i32) (result i32) + (local $j i32) + (local $var$5 i32) + (local $var$6 i32) + (local $tmp i64) + local.get $i + local.get $right i32.eq if - local.get $1 + local.get $i return end - local.get $1 - local.set $4 - local.get $0 - local.get $4 + local.get $i + local.set $j + local.get $ptr + local.get $j i32.const 3 i32.shl i32.add i64.load - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 1 i32.add - local.tee $4 + local.tee $j i32.const 3 i32.shl i32.add i64.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i64_i64_=>_i32) i32.const 0 i32.gt_s if loop $while-continue|0 - local.get $4 - local.get $2 + local.get $j + local.get $right i32.lt_s if (result i32) - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 3 i32.shl i32.add i64.load offset=8 - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 3 i32.shl i32.add i64.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i64_i64_=>_i32) i32.const 31 @@ -36560,83 +36560,83 @@ else i32.const 0 end - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 + local.get $j i32.const 1 i32.add - local.set $4 + local.set $j br $while-continue|0 end end - local.get $4 - local.set $5 + local.get $j + local.set $var$5 loop $while-continue|1 - local.get $1 - local.get $5 + local.get $i + local.get $var$5 i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $1 + local.get $ptr + local.get $i i32.const 3 i32.shl i32.add i64.load - local.set $7 - local.get $0 - local.get $1 + local.set $tmp + local.get $ptr + local.get $i i32.const 3 i32.shl i32.add - local.get $0 - local.get $5 + local.get $ptr + local.get $var$5 i32.const 3 i32.shl i32.add i64.load i64.store - local.get $1 + local.get $i i32.const 1 i32.add - local.set $1 - local.get $0 - local.get $5 + local.set $i + local.get $ptr + local.get $var$5 i32.const 3 i32.shl i32.add - local.get $7 + local.get $tmp i64.store - local.get $5 + local.get $var$5 i32.const 1 i32.sub - local.set $5 + local.set $var$5 br $while-continue|1 end end else loop $while-continue|2 - local.get $4 - local.get $2 + local.get $j + local.get $right i32.lt_s if (result i32) - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 3 i32.shl i32.add i64.load offset=8 - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 3 i32.shl i32.add i64.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i64_i64_=>_i32) i32.const 0 @@ -36644,55 +36644,55 @@ else i32.const 0 end - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 + local.get $j i32.const 1 i32.add - local.set $4 + local.set $j br $while-continue|2 end end end - local.get $4 + local.get $j ) - (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i64) - (local $12 i64) - local.get $2 + (func $~lib/util/sort/mergeRuns (param $ptr i32) (param $l i32) (param $m i32) (param $r i32) (param $buffer i32) (param $comparator i32) + (local $i i32) + (local $j i32) + (local $t i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i64) + (local $var$12 i64) + local.get $m i32.const 1 i32.sub - local.set $2 - local.get $3 - local.get $2 + local.set $m + local.get $r + local.get $m i32.add - local.set $8 - local.get $2 + local.set $t + local.get $m i32.const 1 i32.add - local.set $6 + local.set $i loop $for-loop|0 - local.get $6 - local.get $1 + local.get $i + local.get $l i32.gt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $6 + local.get $buffer + local.get $i i32.const 1 i32.sub i32.const 3 i32.shl i32.add - local.get $0 - local.get $6 + local.get $ptr + local.get $i i32.const 1 i32.sub i32.const 3 @@ -36700,134 +36700,134 @@ i32.add i64.load i64.store - local.get $6 + local.get $i i32.const 1 i32.sub - local.set $6 + local.set $i br $for-loop|0 end end - local.get $2 - local.set $7 + local.get $m + local.set $j loop $for-loop|1 - local.get $7 - local.get $3 + local.get $j + local.get $r i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $8 - local.get $7 + local.get $buffer + local.get $t + local.get $j i32.sub i32.const 3 i32.shl i32.add - local.get $0 - local.get $7 + local.get $ptr + local.get $j i32.const 3 i32.shl i32.add i64.load offset=8 i64.store - local.get $7 + local.get $j i32.const 1 i32.add - local.set $7 + local.set $j br $for-loop|1 end end - local.get $1 - local.set $9 + local.get $l + local.set $var$9 loop $for-loop|2 - local.get $9 - local.get $3 + local.get $var$9 + local.get $r i32.le_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $4 - local.get $7 + local.get $buffer + local.get $j i32.const 3 i32.shl i32.add i64.load - local.set $11 - local.get $4 - local.get $6 + local.set $var$11 + local.get $buffer + local.get $i i32.const 3 i32.shl i32.add i64.load - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 i32.const 2 global.set $~argumentsLength - local.get $5 + local.get $comparator i32.load call_indirect $0 (type $i64_i64_=>_i32) i32.const 0 i32.lt_s if - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 3 i32.shl i32.add - local.get $11 + local.get $var$11 i64.store - local.get $7 + local.get $j i32.const 1 i32.sub - local.set $7 + local.set $j else - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 3 i32.shl i32.add - local.get $12 + local.get $var$12 i64.store - local.get $6 + local.get $i i32.const 1 i32.add - local.set $6 + local.set $i end - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|2 end end ) - (func $~lib/util/sort/SORT (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i64) - (local $5 i64) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) - (local $21 i32) - (local $22 i32) - local.get $1 + (func $~lib/util/sort/SORT (param $ptr i32) (param $len i32) (param $comparator i32) + (local $startB i32) + (local $var$4 i64) + (local $var$5 i64) + (local $lgPlus2 i32) + (local $lgPlus2Size i32) + (local $leftRunStartBuf i32) + (local $leftRunEndBuf i32) + (local $var$10 i32) + (local $buffer i32) + (local $hi i32) + (local $endA i32) + (local $lenA i32) + (local $top i32) + (local $startA i32) + (local $endB i32) + (local $lenB i32) + (local $k i32) + (local $var$20 i32) + (local $var$21 i32) + (local $var$22 i32) + local.get $len i32.const 48 i32.le_s if - local.get $1 + local.get $len i32.const 1 i32.le_s if @@ -36840,520 +36840,520 @@ block $break|0 block $case1|0 block $case0|0 - local.get $1 - local.set $3 - local.get $3 + local.get $len + local.set $startB + local.get $startB i32.const 3 i32.eq br_if $case0|0 - local.get $3 + local.get $startB i32.const 2 i32.eq br_if $case1|0 br $break|0 end - local.get $0 + local.get $ptr i64.load - local.set $4 - local.get $0 + local.set $var$4 + local.get $ptr i64.load offset=8 - local.set $5 - local.get $4 - local.get $5 + local.set $var$5 + local.get $var$4 + local.get $var$5 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i64_i64_=>_i32) i32.const 0 i32.gt_s - local.set $3 - local.get $0 - local.get $5 - local.get $4 - local.get $3 + local.set $startB + local.get $ptr + local.get $var$5 + local.get $var$4 + local.get $startB select i64.store - local.get $4 - local.get $5 - local.get $3 + local.get $var$4 + local.get $var$5 + local.get $startB select - local.set $4 - local.get $0 + local.set $var$4 + local.get $ptr i64.load offset=16 - local.set $5 - local.get $4 - local.get $5 + local.set $var$5 + local.get $var$4 + local.get $var$5 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i64_i64_=>_i32) i32.const 0 i32.gt_s - local.set $3 - local.get $0 - local.get $5 - local.get $4 - local.get $3 + local.set $startB + local.get $ptr + local.get $var$5 + local.get $var$4 + local.get $startB select i64.store offset=8 - local.get $0 - local.get $4 - local.get $5 - local.get $3 + local.get $ptr + local.get $var$4 + local.get $var$5 + local.get $startB select i64.store offset=16 end - local.get $0 + local.get $ptr i64.load - local.set $5 - local.get $0 + local.set $var$5 + local.get $ptr i64.load offset=8 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i64_i64_=>_i32) i32.const 0 i32.gt_s - local.set $3 - local.get $0 - local.get $4 - local.get $5 - local.get $3 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $var$5 + local.get $startB select i64.store - local.get $0 - local.get $5 - local.get $4 - local.get $3 + local.get $ptr + local.get $var$5 + local.get $var$4 + local.get $startB select i64.store offset=8 return end - local.get $0 + local.get $ptr i32.const 0 - local.get $1 + local.get $len i32.const 1 i32.sub i32.const 0 - local.get $2 + local.get $comparator call $~lib/util/sort/insertionSort return end - local.get $1 - local.set $3 + local.get $len + local.set $startB i32.const 31 - local.get $3 + local.get $startB i32.clz i32.sub i32.const 2 i32.add - local.set $6 - local.get $6 + local.set $lgPlus2 + local.get $lgPlus2 i32.const 2 i32.shl - local.set $7 - local.get $7 + local.set $lgPlus2Size + local.get $lgPlus2Size i32.const 1 i32.shl call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 - local.get $7 + local.set $leftRunStartBuf + local.get $leftRunStartBuf + local.get $lgPlus2Size i32.add - local.set $9 + local.set $leftRunEndBuf i32.const 0 - local.set $3 + local.set $startB loop $for-loop|1 - local.get $3 - local.get $6 + local.get $startB + local.get $lgPlus2 i32.lt_u - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $8 - local.get $3 + local.get $leftRunStartBuf + local.get $startB i32.const 2 i32.shl i32.add i32.const -1 i32.store - local.get $3 + local.get $startB i32.const 1 i32.add - local.set $3 + local.set $startB br $for-loop|1 end end - local.get $1 + local.get $len i32.const 3 i32.shl call $~lib/rt/tlsf/__alloc - local.set $11 - local.get $1 + local.set $buffer + local.get $len i32.const 1 i32.sub - local.set $12 - local.get $0 + local.set $hi + local.get $ptr i32.const 0 - local.get $12 - local.get $2 + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight - local.set $13 - local.get $13 + local.set $endA + local.get $endA i32.const 1 i32.add - local.set $14 - local.get $14 + local.set $lenA + local.get $lenA i32.const 32 i32.lt_s if - local.get $12 - local.tee $10 + local.get $hi + local.tee $var$10 i32.const 32 i32.const 1 i32.sub - local.tee $3 - local.get $10 - local.get $3 + local.tee $startB + local.get $var$10 + local.get $startB i32.lt_s select - local.set $13 - local.get $0 + local.set $endA + local.get $ptr i32.const 0 - local.get $13 - local.get $14 - local.get $2 + local.get $endA + local.get $lenA + local.get $comparator call $~lib/util/sort/insertionSort end i32.const 0 - local.set $15 + local.set $top i32.const 0 - local.set $16 + local.set $startA loop $while-continue|2 - local.get $13 - local.get $12 + local.get $endA + local.get $hi i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $13 + local.get $endA i32.const 1 i32.add - local.set $3 - local.get $0 - local.get $3 - local.get $12 - local.get $2 + local.set $startB + local.get $ptr + local.get $startB + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight - local.set $17 - local.get $17 - local.get $3 + local.set $endB + local.get $endB + local.get $startB i32.sub i32.const 1 i32.add - local.set $18 - local.get $18 + local.set $lenB + local.get $lenB i32.const 32 i32.lt_s if - local.get $12 - local.tee $19 - local.get $3 + local.get $hi + local.tee $k + local.get $startB i32.const 32 i32.add i32.const 1 i32.sub - local.tee $20 - local.get $19 - local.get $20 + local.tee $var$20 + local.get $k + local.get $var$20 i32.lt_s select - local.set $17 - local.get $0 - local.get $3 - local.get $17 - local.get $18 - local.get $2 + local.set $endB + local.get $ptr + local.get $startB + local.get $endB + local.get $lenB + local.get $comparator call $~lib/util/sort/insertionSort end i32.const 0 - local.get $12 - local.get $16 - local.get $3 - local.get $17 + local.get $hi + local.get $startA + local.get $startB + local.get $endB call $~lib/util/sort/nodePower - local.set $19 - local.get $15 - local.set $20 + local.set $k + local.get $top + local.set $var$20 loop $for-loop|3 - local.get $20 - local.get $19 + local.get $var$20 + local.get $k i32.gt_u - local.set $21 - local.get $21 + local.set $var$21 + local.get $var$21 if - local.get $8 - local.get $20 + local.get $leftRunStartBuf + local.get $var$20 i32.const 2 i32.shl i32.add i32.load - local.set $22 - local.get $22 + local.set $var$22 + local.get $var$22 i32.const -1 i32.ne if - local.get $0 - local.get $22 - local.get $9 - local.get $20 + local.get $ptr + local.get $var$22 + local.get $leftRunEndBuf + local.get $var$20 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $13 - local.get $11 - local.get $2 + local.get $endA + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns - local.get $22 - local.set $16 - local.get $8 - local.get $20 + local.get $var$22 + local.set $startA + local.get $leftRunStartBuf + local.get $var$20 i32.const 2 i32.shl i32.add i32.const -1 i32.store end - local.get $20 + local.get $var$20 i32.const 1 i32.sub - local.set $20 + local.set $var$20 br $for-loop|3 end end - local.get $8 - local.get $19 + local.get $leftRunStartBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $16 + local.get $startA i32.store - local.get $9 - local.get $19 + local.get $leftRunEndBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $13 + local.get $endA i32.store - local.get $3 - local.set $16 - local.get $17 - local.set $13 - local.get $19 - local.set $15 + local.get $startB + local.set $startA + local.get $endB + local.set $endA + local.get $k + local.set $top br $while-continue|2 end end - local.get $15 - local.set $10 + local.get $top + local.set $var$10 loop $for-loop|4 - local.get $10 + local.get $var$10 i32.const 0 i32.ne - local.set $20 - local.get $20 + local.set $var$20 + local.get $var$20 if - local.get $8 - local.get $10 + local.get $leftRunStartBuf + local.get $var$10 i32.const 2 i32.shl i32.add i32.load - local.set $21 - local.get $21 + local.set $var$21 + local.get $var$21 i32.const -1 i32.ne if - local.get $0 - local.get $21 - local.get $9 - local.get $10 + local.get $ptr + local.get $var$21 + local.get $leftRunEndBuf + local.get $var$10 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $12 - local.get $11 - local.get $2 + local.get $hi + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns end - local.get $10 + local.get $var$10 i32.const 1 i32.sub - local.set $10 + local.set $var$10 br $for-loop|4 end end - local.get $11 + local.get $buffer call $~lib/rt/tlsf/__free - local.get $8 + local.get $leftRunStartBuf call $~lib/rt/tlsf/__free ) - (func $~lib/typedarray/Int64Array#sort (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Int64Array#sort (param $this i32) (param $comparator i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Int64Array#get:length - local.get $1 + local.get $comparator call $~lib/util/sort/SORT - local.get $0 + local.get $this ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i64) (param $1 i64) (result i32) - local.get $0 - local.get $1 + (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $a i64) (param $b i64) (result i32) + local.get $a + local.get $b i64.gt_s - local.get $0 - local.get $1 + local.get $a + local.get $b i64.lt_s i32.sub ) - (func $std/typedarray/testArraySort<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i64) (result i32) - local.get $1 - local.get $0 + (func $std/typedarray/testArraySort<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $a i64) (param $b i64) (result i32) + local.get $b + local.get $a i64.gt_s - local.get $1 - local.get $0 + local.get $b + local.get $a i64.lt_s i32.sub ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i64) - (local $11 i64) - (local $12 i32) - (local $13 i32) + (func $~lib/util/sort/insertionSort (param $ptr i32) (param $left i32) (param $right i32) (param $presorted i32) (param $comparator i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i64) + (local $var$9 i64) + (local $var$10 i64) + (local $var$11 i64) + (local $var$12 i32) + (local $var$13 i32) i32.const 0 i32.const 1 i32.ge_s drop - local.get $2 - local.get $1 + local.get $right + local.get $left i32.sub i32.const 1 i32.add - local.set $5 - local.get $1 - local.get $5 + local.set $var$5 + local.get $left + local.get $var$5 i32.const 1 i32.and - local.get $3 - local.get $5 - local.get $3 + local.get $presorted + local.get $var$5 + local.get $presorted i32.sub i32.const 1 i32.and i32.sub - local.get $3 + local.get $presorted i32.const 0 i32.eq select i32.add - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $6 - local.get $2 + local.get $var$6 + local.get $right i32.le_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $0 - local.get $6 + local.get $ptr + local.get $var$6 i32.const 3 i32.shl i32.add i64.load - local.set $8 - local.get $0 - local.get $6 + local.set $var$8 + local.get $ptr + local.get $var$6 i32.const 3 i32.shl i32.add i64.load offset=8 - local.set $9 - local.get $9 - local.set $10 - local.get $8 - local.set $11 - local.get $8 - local.get $9 + local.set $var$9 + local.get $var$9 + local.set $var$10 + local.get $var$8 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i64_i64_=>_i32) i32.const 0 i32.le_s if - local.get $8 - local.set $10 - local.get $9 - local.set $11 + local.get $var$8 + local.set $var$10 + local.get $var$9 + local.set $var$11 end - local.get $6 + local.get $var$6 i32.const 1 i32.sub - local.set $12 + local.set $var$12 block $while-break|1 loop $while-continue|1 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 3 i32.shl i32.add i64.load - local.set $8 - local.get $8 - local.get $11 + local.set $var$8 + local.get $var$8 + local.get $var$11 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i64_i64_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 3 i32.shl i32.add - local.get $8 + local.get $var$8 i64.store offset=16 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|1 end @@ -37361,49 +37361,49 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 3 i32.shl i32.add - local.get $11 + local.get $var$11 i64.store offset=16 block $while-break|2 loop $while-continue|2 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 3 i32.shl i32.add i64.load - local.set $8 - local.get $8 - local.get $10 + local.set $var$8 + local.get $var$8 + local.get $var$10 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $i64_i64_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 3 i32.shl i32.add - local.get $8 + local.get $var$8 i64.store offset=8 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|2 end @@ -37411,78 +37411,78 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 3 i32.shl i32.add - local.get $10 + local.get $var$10 i64.store offset=8 - local.get $6 + local.get $var$6 i32.const 2 i32.add - local.set $6 + local.set $var$6 br $for-loop|0 end end ) - (func $~lib/util/sort/extendRunRight (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 i64) - local.get $1 - local.get $2 + (func $~lib/util/sort/extendRunRight (param $ptr i32) (param $i i32) (param $right i32) (param $comparator i32) (result i32) + (local $j i32) + (local $var$5 i32) + (local $var$6 i32) + (local $tmp i64) + local.get $i + local.get $right i32.eq if - local.get $1 + local.get $i return end - local.get $1 - local.set $4 - local.get $0 - local.get $4 + local.get $i + local.set $j + local.get $ptr + local.get $j i32.const 3 i32.shl i32.add i64.load - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 1 i32.add - local.tee $4 + local.tee $j i32.const 3 i32.shl i32.add i64.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i64_i64_=>_i32) i32.const 0 i32.gt_s if loop $while-continue|0 - local.get $4 - local.get $2 + local.get $j + local.get $right i32.lt_s if (result i32) - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 3 i32.shl i32.add i64.load offset=8 - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 3 i32.shl i32.add i64.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i64_i64_=>_i32) i32.const 31 @@ -37490,83 +37490,83 @@ else i32.const 0 end - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 + local.get $j i32.const 1 i32.add - local.set $4 + local.set $j br $while-continue|0 end end - local.get $4 - local.set $5 + local.get $j + local.set $var$5 loop $while-continue|1 - local.get $1 - local.get $5 + local.get $i + local.get $var$5 i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $1 + local.get $ptr + local.get $i i32.const 3 i32.shl i32.add i64.load - local.set $7 - local.get $0 - local.get $1 + local.set $tmp + local.get $ptr + local.get $i i32.const 3 i32.shl i32.add - local.get $0 - local.get $5 + local.get $ptr + local.get $var$5 i32.const 3 i32.shl i32.add i64.load i64.store - local.get $1 + local.get $i i32.const 1 i32.add - local.set $1 - local.get $0 - local.get $5 + local.set $i + local.get $ptr + local.get $var$5 i32.const 3 i32.shl i32.add - local.get $7 + local.get $tmp i64.store - local.get $5 + local.get $var$5 i32.const 1 i32.sub - local.set $5 + local.set $var$5 br $while-continue|1 end end else loop $while-continue|2 - local.get $4 - local.get $2 + local.get $j + local.get $right i32.lt_s if (result i32) - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 3 i32.shl i32.add i64.load offset=8 - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 3 i32.shl i32.add i64.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $i64_i64_=>_i32) i32.const 0 @@ -37574,55 +37574,55 @@ else i32.const 0 end - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 + local.get $j i32.const 1 i32.add - local.set $4 + local.set $j br $while-continue|2 end end end - local.get $4 + local.get $j ) - (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i64) - (local $12 i64) - local.get $2 + (func $~lib/util/sort/mergeRuns (param $ptr i32) (param $l i32) (param $m i32) (param $r i32) (param $buffer i32) (param $comparator i32) + (local $i i32) + (local $j i32) + (local $t i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i64) + (local $var$12 i64) + local.get $m i32.const 1 i32.sub - local.set $2 - local.get $3 - local.get $2 + local.set $m + local.get $r + local.get $m i32.add - local.set $8 - local.get $2 + local.set $t + local.get $m i32.const 1 i32.add - local.set $6 + local.set $i loop $for-loop|0 - local.get $6 - local.get $1 + local.get $i + local.get $l i32.gt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $6 + local.get $buffer + local.get $i i32.const 1 i32.sub i32.const 3 i32.shl i32.add - local.get $0 - local.get $6 + local.get $ptr + local.get $i i32.const 1 i32.sub i32.const 3 @@ -37630,134 +37630,134 @@ i32.add i64.load i64.store - local.get $6 + local.get $i i32.const 1 i32.sub - local.set $6 + local.set $i br $for-loop|0 end end - local.get $2 - local.set $7 + local.get $m + local.set $j loop $for-loop|1 - local.get $7 - local.get $3 + local.get $j + local.get $r i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $8 - local.get $7 + local.get $buffer + local.get $t + local.get $j i32.sub i32.const 3 i32.shl i32.add - local.get $0 - local.get $7 + local.get $ptr + local.get $j i32.const 3 i32.shl i32.add i64.load offset=8 i64.store - local.get $7 + local.get $j i32.const 1 i32.add - local.set $7 + local.set $j br $for-loop|1 end end - local.get $1 - local.set $9 + local.get $l + local.set $var$9 loop $for-loop|2 - local.get $9 - local.get $3 + local.get $var$9 + local.get $r i32.le_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $4 - local.get $7 + local.get $buffer + local.get $j i32.const 3 i32.shl i32.add i64.load - local.set $11 - local.get $4 - local.get $6 + local.set $var$11 + local.get $buffer + local.get $i i32.const 3 i32.shl i32.add i64.load - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 i32.const 2 global.set $~argumentsLength - local.get $5 + local.get $comparator i32.load call_indirect $0 (type $i64_i64_=>_i32) i32.const 0 i32.lt_s if - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 3 i32.shl i32.add - local.get $11 + local.get $var$11 i64.store - local.get $7 + local.get $j i32.const 1 i32.sub - local.set $7 + local.set $j else - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 3 i32.shl i32.add - local.get $12 + local.get $var$12 i64.store - local.get $6 + local.get $i i32.const 1 i32.add - local.set $6 + local.set $i end - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|2 end end ) - (func $~lib/util/sort/SORT (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i64) - (local $5 i64) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) - (local $21 i32) - (local $22 i32) - local.get $1 + (func $~lib/util/sort/SORT (param $ptr i32) (param $len i32) (param $comparator i32) + (local $startB i32) + (local $var$4 i64) + (local $var$5 i64) + (local $lgPlus2 i32) + (local $lgPlus2Size i32) + (local $leftRunStartBuf i32) + (local $leftRunEndBuf i32) + (local $var$10 i32) + (local $buffer i32) + (local $hi i32) + (local $endA i32) + (local $lenA i32) + (local $top i32) + (local $startA i32) + (local $endB i32) + (local $lenB i32) + (local $k i32) + (local $var$20 i32) + (local $var$21 i32) + (local $var$22 i32) + local.get $len i32.const 48 i32.le_s if - local.get $1 + local.get $len i32.const 1 i32.le_s if @@ -37770,520 +37770,520 @@ block $break|0 block $case1|0 block $case0|0 - local.get $1 - local.set $3 - local.get $3 + local.get $len + local.set $startB + local.get $startB i32.const 3 i32.eq br_if $case0|0 - local.get $3 + local.get $startB i32.const 2 i32.eq br_if $case1|0 br $break|0 end - local.get $0 + local.get $ptr i64.load - local.set $4 - local.get $0 + local.set $var$4 + local.get $ptr i64.load offset=8 - local.set $5 - local.get $4 - local.get $5 + local.set $var$5 + local.get $var$4 + local.get $var$5 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i64_i64_=>_i32) i32.const 0 i32.gt_s - local.set $3 - local.get $0 - local.get $5 - local.get $4 - local.get $3 + local.set $startB + local.get $ptr + local.get $var$5 + local.get $var$4 + local.get $startB select i64.store - local.get $4 - local.get $5 - local.get $3 + local.get $var$4 + local.get $var$5 + local.get $startB select - local.set $4 - local.get $0 + local.set $var$4 + local.get $ptr i64.load offset=16 - local.set $5 - local.get $4 - local.get $5 + local.set $var$5 + local.get $var$4 + local.get $var$5 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i64_i64_=>_i32) i32.const 0 i32.gt_s - local.set $3 - local.get $0 - local.get $5 - local.get $4 - local.get $3 + local.set $startB + local.get $ptr + local.get $var$5 + local.get $var$4 + local.get $startB select i64.store offset=8 - local.get $0 - local.get $4 - local.get $5 - local.get $3 + local.get $ptr + local.get $var$4 + local.get $var$5 + local.get $startB select i64.store offset=16 end - local.get $0 + local.get $ptr i64.load - local.set $5 - local.get $0 + local.set $var$5 + local.get $ptr i64.load offset=8 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $i64_i64_=>_i32) i32.const 0 i32.gt_s - local.set $3 - local.get $0 - local.get $4 - local.get $5 - local.get $3 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $var$5 + local.get $startB select i64.store - local.get $0 - local.get $5 - local.get $4 - local.get $3 + local.get $ptr + local.get $var$5 + local.get $var$4 + local.get $startB select i64.store offset=8 return end - local.get $0 + local.get $ptr i32.const 0 - local.get $1 + local.get $len i32.const 1 i32.sub i32.const 0 - local.get $2 + local.get $comparator call $~lib/util/sort/insertionSort return end - local.get $1 - local.set $3 + local.get $len + local.set $startB i32.const 31 - local.get $3 + local.get $startB i32.clz i32.sub i32.const 2 i32.add - local.set $6 - local.get $6 + local.set $lgPlus2 + local.get $lgPlus2 i32.const 2 i32.shl - local.set $7 - local.get $7 + local.set $lgPlus2Size + local.get $lgPlus2Size i32.const 1 i32.shl call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 - local.get $7 + local.set $leftRunStartBuf + local.get $leftRunStartBuf + local.get $lgPlus2Size i32.add - local.set $9 + local.set $leftRunEndBuf i32.const 0 - local.set $3 + local.set $startB loop $for-loop|1 - local.get $3 - local.get $6 + local.get $startB + local.get $lgPlus2 i32.lt_u - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $8 - local.get $3 + local.get $leftRunStartBuf + local.get $startB i32.const 2 i32.shl i32.add i32.const -1 i32.store - local.get $3 + local.get $startB i32.const 1 i32.add - local.set $3 + local.set $startB br $for-loop|1 end end - local.get $1 + local.get $len i32.const 3 i32.shl call $~lib/rt/tlsf/__alloc - local.set $11 - local.get $1 + local.set $buffer + local.get $len i32.const 1 i32.sub - local.set $12 - local.get $0 + local.set $hi + local.get $ptr i32.const 0 - local.get $12 - local.get $2 + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight - local.set $13 - local.get $13 + local.set $endA + local.get $endA i32.const 1 i32.add - local.set $14 - local.get $14 + local.set $lenA + local.get $lenA i32.const 32 i32.lt_s if - local.get $12 - local.tee $10 + local.get $hi + local.tee $var$10 i32.const 32 i32.const 1 i32.sub - local.tee $3 - local.get $10 - local.get $3 + local.tee $startB + local.get $var$10 + local.get $startB i32.lt_s select - local.set $13 - local.get $0 + local.set $endA + local.get $ptr i32.const 0 - local.get $13 - local.get $14 - local.get $2 + local.get $endA + local.get $lenA + local.get $comparator call $~lib/util/sort/insertionSort end i32.const 0 - local.set $15 + local.set $top i32.const 0 - local.set $16 + local.set $startA loop $while-continue|2 - local.get $13 - local.get $12 + local.get $endA + local.get $hi i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $13 + local.get $endA i32.const 1 i32.add - local.set $3 - local.get $0 - local.get $3 - local.get $12 - local.get $2 + local.set $startB + local.get $ptr + local.get $startB + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight - local.set $17 - local.get $17 - local.get $3 + local.set $endB + local.get $endB + local.get $startB i32.sub i32.const 1 i32.add - local.set $18 - local.get $18 + local.set $lenB + local.get $lenB i32.const 32 i32.lt_s if - local.get $12 - local.tee $19 - local.get $3 + local.get $hi + local.tee $k + local.get $startB i32.const 32 i32.add i32.const 1 i32.sub - local.tee $20 - local.get $19 - local.get $20 + local.tee $var$20 + local.get $k + local.get $var$20 i32.lt_s select - local.set $17 - local.get $0 - local.get $3 - local.get $17 - local.get $18 - local.get $2 + local.set $endB + local.get $ptr + local.get $startB + local.get $endB + local.get $lenB + local.get $comparator call $~lib/util/sort/insertionSort end i32.const 0 - local.get $12 - local.get $16 - local.get $3 - local.get $17 + local.get $hi + local.get $startA + local.get $startB + local.get $endB call $~lib/util/sort/nodePower - local.set $19 - local.get $15 - local.set $20 + local.set $k + local.get $top + local.set $var$20 loop $for-loop|3 - local.get $20 - local.get $19 + local.get $var$20 + local.get $k i32.gt_u - local.set $21 - local.get $21 + local.set $var$21 + local.get $var$21 if - local.get $8 - local.get $20 + local.get $leftRunStartBuf + local.get $var$20 i32.const 2 i32.shl i32.add i32.load - local.set $22 - local.get $22 + local.set $var$22 + local.get $var$22 i32.const -1 i32.ne if - local.get $0 - local.get $22 - local.get $9 - local.get $20 + local.get $ptr + local.get $var$22 + local.get $leftRunEndBuf + local.get $var$20 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $13 - local.get $11 - local.get $2 + local.get $endA + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns - local.get $22 - local.set $16 - local.get $8 - local.get $20 + local.get $var$22 + local.set $startA + local.get $leftRunStartBuf + local.get $var$20 i32.const 2 i32.shl i32.add i32.const -1 i32.store end - local.get $20 + local.get $var$20 i32.const 1 i32.sub - local.set $20 + local.set $var$20 br $for-loop|3 end end - local.get $8 - local.get $19 + local.get $leftRunStartBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $16 + local.get $startA i32.store - local.get $9 - local.get $19 + local.get $leftRunEndBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $13 + local.get $endA i32.store - local.get $3 - local.set $16 - local.get $17 - local.set $13 - local.get $19 - local.set $15 + local.get $startB + local.set $startA + local.get $endB + local.set $endA + local.get $k + local.set $top br $while-continue|2 end end - local.get $15 - local.set $10 + local.get $top + local.set $var$10 loop $for-loop|4 - local.get $10 + local.get $var$10 i32.const 0 i32.ne - local.set $20 - local.get $20 + local.set $var$20 + local.get $var$20 if - local.get $8 - local.get $10 + local.get $leftRunStartBuf + local.get $var$10 i32.const 2 i32.shl i32.add i32.load - local.set $21 - local.get $21 + local.set $var$21 + local.get $var$21 i32.const -1 i32.ne if - local.get $0 - local.get $21 - local.get $9 - local.get $10 + local.get $ptr + local.get $var$21 + local.get $leftRunEndBuf + local.get $var$10 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $12 - local.get $11 - local.get $2 + local.get $hi + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns end - local.get $10 + local.get $var$10 i32.const 1 i32.sub - local.set $10 + local.set $var$10 br $for-loop|4 end end - local.get $11 + local.get $buffer call $~lib/rt/tlsf/__free - local.get $8 + local.get $leftRunStartBuf call $~lib/rt/tlsf/__free ) - (func $~lib/typedarray/Uint64Array#sort (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Uint64Array#sort (param $this i32) (param $comparator i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Uint64Array#get:length - local.get $1 + local.get $comparator call $~lib/util/sort/SORT - local.get $0 + local.get $this ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i64) (param $1 i64) (result i32) - local.get $0 - local.get $1 + (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $a i64) (param $b i64) (result i32) + local.get $a + local.get $b i64.gt_u - local.get $0 - local.get $1 + local.get $a + local.get $b i64.lt_u i32.sub ) - (func $std/typedarray/testArraySort<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $0 i64) (param $1 i64) (result i32) - local.get $1 - local.get $0 + (func $std/typedarray/testArraySort<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $a i64) (param $b i64) (result i32) + local.get $b + local.get $a i64.gt_u - local.get $1 - local.get $0 + local.get $b + local.get $a i64.lt_u i32.sub ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 f32) - (local $9 f32) - (local $10 f32) - (local $11 f32) - (local $12 i32) - (local $13 i32) + (func $~lib/util/sort/insertionSort (param $ptr i32) (param $left i32) (param $right i32) (param $presorted i32) (param $comparator i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 f32) + (local $var$9 f32) + (local $var$10 f32) + (local $var$11 f32) + (local $var$12 i32) + (local $var$13 i32) i32.const 0 i32.const 1 i32.ge_s drop - local.get $2 - local.get $1 + local.get $right + local.get $left i32.sub i32.const 1 i32.add - local.set $5 - local.get $1 - local.get $5 + local.set $var$5 + local.get $left + local.get $var$5 i32.const 1 i32.and - local.get $3 - local.get $5 - local.get $3 + local.get $presorted + local.get $var$5 + local.get $presorted i32.sub i32.const 1 i32.and i32.sub - local.get $3 + local.get $presorted i32.const 0 i32.eq select i32.add - local.set $6 + local.set $var$6 loop $for-loop|0 - local.get $6 - local.get $2 + local.get $var$6 + local.get $right i32.le_s - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $0 - local.get $6 + local.get $ptr + local.get $var$6 i32.const 2 i32.shl i32.add f32.load - local.set $8 - local.get $0 - local.get $6 + local.set $var$8 + local.get $ptr + local.get $var$6 i32.const 2 i32.shl i32.add f32.load offset=4 - local.set $9 - local.get $9 - local.set $10 - local.get $8 - local.set $11 - local.get $8 - local.get $9 + local.set $var$9 + local.get $var$9 + local.set $var$10 + local.get $var$8 + local.set $var$11 + local.get $var$8 + local.get $var$9 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $f32_f32_=>_i32) i32.const 0 i32.le_s if - local.get $8 - local.set $10 - local.get $9 - local.set $11 + local.get $var$8 + local.set $var$10 + local.get $var$9 + local.set $var$11 end - local.get $6 + local.get $var$6 i32.const 1 i32.sub - local.set $12 + local.set $var$12 block $while-break|1 loop $while-continue|1 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add f32.load - local.set $8 - local.get $8 - local.get $11 + local.set $var$8 + local.get $var$8 + local.get $var$11 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $f32_f32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $8 + local.get $var$8 f32.store offset=8 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|1 end @@ -38291,49 +38291,49 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $11 + local.get $var$11 f32.store offset=8 block $while-break|2 loop $while-continue|2 - local.get $12 - local.get $1 + local.get $var$12 + local.get $left i32.ge_s - local.set $13 - local.get $13 + local.set $var$13 + local.get $var$13 if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add f32.load - local.set $8 - local.get $8 - local.get $10 + local.set $var$8 + local.get $var$8 + local.get $var$10 i32.const 2 global.set $~argumentsLength - local.get $4 + local.get $comparator i32.load call_indirect $0 (type $f32_f32_=>_i32) i32.const 0 i32.gt_s if - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $8 + local.get $var$8 f32.store offset=4 - local.get $12 + local.get $var$12 i32.const 1 i32.sub - local.set $12 + local.set $var$12 else br $while-break|2 end @@ -38341,78 +38341,78 @@ end end end - local.get $0 - local.get $12 + local.get $ptr + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 f32.store offset=4 - local.get $6 + local.get $var$6 i32.const 2 i32.add - local.set $6 + local.set $var$6 br $for-loop|0 end end ) - (func $~lib/util/sort/extendRunRight (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 f32) - local.get $1 - local.get $2 + (func $~lib/util/sort/extendRunRight (param $ptr i32) (param $i i32) (param $right i32) (param $comparator i32) (result i32) + (local $j i32) + (local $var$5 i32) + (local $var$6 i32) + (local $tmp f32) + local.get $i + local.get $right i32.eq if - local.get $1 + local.get $i return end - local.get $1 - local.set $4 - local.get $0 - local.get $4 + local.get $i + local.set $j + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add f32.load - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 1 i32.add - local.tee $4 + local.tee $j i32.const 2 i32.shl i32.add f32.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $f32_f32_=>_i32) i32.const 0 i32.gt_s if loop $while-continue|0 - local.get $4 - local.get $2 + local.get $j + local.get $right i32.lt_s if (result i32) - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add f32.load offset=4 - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add f32.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $f32_f32_=>_i32) i32.const 31 @@ -38420,83 +38420,83 @@ else i32.const 0 end - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 + local.get $j i32.const 1 i32.add - local.set $4 + local.set $j br $while-continue|0 end end - local.get $4 - local.set $5 + local.get $j + local.set $var$5 loop $while-continue|1 - local.get $1 - local.get $5 + local.get $i + local.get $var$5 i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $1 + local.get $ptr + local.get $i i32.const 2 i32.shl i32.add f32.load - local.set $7 - local.get $0 - local.get $1 + local.set $tmp + local.get $ptr + local.get $i i32.const 2 i32.shl i32.add - local.get $0 - local.get $5 + local.get $ptr + local.get $var$5 i32.const 2 i32.shl i32.add f32.load f32.store - local.get $1 + local.get $i i32.const 1 i32.add - local.set $1 - local.get $0 - local.get $5 + local.set $i + local.get $ptr + local.get $var$5 i32.const 2 i32.shl i32.add - local.get $7 + local.get $tmp f32.store - local.get $5 + local.get $var$5 i32.const 1 i32.sub - local.set $5 + local.set $var$5 br $while-continue|1 end end else loop $while-continue|2 - local.get $4 - local.get $2 + local.get $j + local.get $right i32.lt_s if (result i32) - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add f32.load offset=4 - local.get $0 - local.get $4 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add f32.load i32.const 2 global.set $~argumentsLength - local.get $3 + local.get $comparator i32.load call_indirect $0 (type $f32_f32_=>_i32) i32.const 0 @@ -38504,55 +38504,55 @@ else i32.const 0 end - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $4 + local.get $j i32.const 1 i32.add - local.set $4 + local.set $j br $while-continue|2 end end end - local.get $4 + local.get $j ) - (func $~lib/util/sort/mergeRuns (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 f32) - (local $12 f32) - local.get $2 + (func $~lib/util/sort/mergeRuns (param $ptr i32) (param $l i32) (param $m i32) (param $r i32) (param $buffer i32) (param $comparator i32) + (local $i i32) + (local $j i32) + (local $t i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 f32) + (local $var$12 f32) + local.get $m i32.const 1 i32.sub - local.set $2 - local.get $3 - local.get $2 + local.set $m + local.get $r + local.get $m i32.add - local.set $8 - local.get $2 + local.set $t + local.get $m i32.const 1 i32.add - local.set $6 + local.set $i loop $for-loop|0 - local.get $6 - local.get $1 + local.get $i + local.get $l i32.gt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $6 + local.get $buffer + local.get $i i32.const 1 i32.sub i32.const 2 i32.shl i32.add - local.get $0 - local.get $6 + local.get $ptr + local.get $i i32.const 1 i32.sub i32.const 2 @@ -38560,134 +38560,134 @@ i32.add f32.load f32.store - local.get $6 + local.get $i i32.const 1 i32.sub - local.set $6 + local.set $i br $for-loop|0 end end - local.get $2 - local.set $7 + local.get $m + local.set $j loop $for-loop|1 - local.get $7 - local.get $3 + local.get $j + local.get $r i32.lt_s - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $4 - local.get $8 - local.get $7 + local.get $buffer + local.get $t + local.get $j i32.sub i32.const 2 i32.shl i32.add - local.get $0 - local.get $7 + local.get $ptr + local.get $j i32.const 2 i32.shl i32.add f32.load offset=4 f32.store - local.get $7 + local.get $j i32.const 1 i32.add - local.set $7 + local.set $j br $for-loop|1 end end - local.get $1 - local.set $9 + local.get $l + local.set $var$9 loop $for-loop|2 - local.get $9 - local.get $3 + local.get $var$9 + local.get $r i32.le_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $4 - local.get $7 + local.get $buffer + local.get $j i32.const 2 i32.shl i32.add f32.load - local.set $11 - local.get $4 - local.get $6 + local.set $var$11 + local.get $buffer + local.get $i i32.const 2 i32.shl i32.add f32.load - local.set $12 - local.get $11 - local.get $12 + local.set $var$12 + local.get $var$11 + local.get $var$12 i32.const 2 global.set $~argumentsLength - local.get $5 + local.get $comparator i32.load call_indirect $0 (type $f32_f32_=>_i32) i32.const 0 i32.lt_s if - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 2 i32.shl i32.add - local.get $11 + local.get $var$11 f32.store - local.get $7 + local.get $j i32.const 1 i32.sub - local.set $7 + local.set $j else - local.get $0 - local.get $9 + local.get $ptr + local.get $var$9 i32.const 2 i32.shl i32.add - local.get $12 + local.get $var$12 f32.store - local.get $6 + local.get $i i32.const 1 i32.add - local.set $6 + local.set $i end - local.get $9 + local.get $var$9 i32.const 1 i32.add - local.set $9 + local.set $var$9 br $for-loop|2 end end ) - (func $~lib/util/sort/SORT (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 f32) - (local $5 f32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) - (local $21 i32) - (local $22 i32) - local.get $1 + (func $~lib/util/sort/SORT (param $ptr i32) (param $len i32) (param $comparator i32) + (local $startB i32) + (local $var$4 f32) + (local $var$5 f32) + (local $lgPlus2 i32) + (local $lgPlus2Size i32) + (local $leftRunStartBuf i32) + (local $leftRunEndBuf i32) + (local $var$10 i32) + (local $buffer i32) + (local $hi i32) + (local $endA i32) + (local $lenA i32) + (local $top i32) + (local $startA i32) + (local $endB i32) + (local $lenB i32) + (local $k i32) + (local $var$20 i32) + (local $var$21 i32) + (local $var$22 i32) + local.get $len i32.const 48 i32.le_s if - local.get $1 + local.get $len i32.const 1 i32.le_s if @@ -38700,438 +38700,438 @@ block $break|0 block $case1|0 block $case0|0 - local.get $1 - local.set $3 - local.get $3 + local.get $len + local.set $startB + local.get $startB i32.const 3 i32.eq br_if $case0|0 - local.get $3 + local.get $startB i32.const 2 i32.eq br_if $case1|0 br $break|0 end - local.get $0 + local.get $ptr f32.load - local.set $4 - local.get $0 + local.set $var$4 + local.get $ptr f32.load offset=4 - local.set $5 - local.get $4 - local.get $5 + local.set $var$5 + local.get $var$4 + local.get $var$5 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $f32_f32_=>_i32) i32.const 0 i32.gt_s - local.set $3 - local.get $0 - local.get $5 - local.get $4 - local.get $3 + local.set $startB + local.get $ptr + local.get $var$5 + local.get $var$4 + local.get $startB select f32.store - local.get $4 - local.get $5 - local.get $3 + local.get $var$4 + local.get $var$5 + local.get $startB select - local.set $4 - local.get $0 + local.set $var$4 + local.get $ptr f32.load offset=8 - local.set $5 - local.get $4 - local.get $5 + local.set $var$5 + local.get $var$4 + local.get $var$5 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $f32_f32_=>_i32) i32.const 0 i32.gt_s - local.set $3 - local.get $0 - local.get $5 - local.get $4 - local.get $3 + local.set $startB + local.get $ptr + local.get $var$5 + local.get $var$4 + local.get $startB select f32.store offset=4 - local.get $0 - local.get $4 - local.get $5 - local.get $3 + local.get $ptr + local.get $var$4 + local.get $var$5 + local.get $startB select f32.store offset=8 end - local.get $0 + local.get $ptr f32.load - local.set $5 - local.get $0 + local.set $var$5 + local.get $ptr f32.load offset=4 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $comparator i32.load call_indirect $0 (type $f32_f32_=>_i32) i32.const 0 i32.gt_s - local.set $3 - local.get $0 - local.get $4 - local.get $5 - local.get $3 + local.set $startB + local.get $ptr + local.get $var$4 + local.get $var$5 + local.get $startB select f32.store - local.get $0 - local.get $5 - local.get $4 - local.get $3 + local.get $ptr + local.get $var$5 + local.get $var$4 + local.get $startB select f32.store offset=4 return end - local.get $0 + local.get $ptr i32.const 0 - local.get $1 + local.get $len i32.const 1 i32.sub i32.const 0 - local.get $2 + local.get $comparator call $~lib/util/sort/insertionSort return end - local.get $1 - local.set $3 + local.get $len + local.set $startB i32.const 31 - local.get $3 + local.get $startB i32.clz i32.sub i32.const 2 i32.add - local.set $6 - local.get $6 + local.set $lgPlus2 + local.get $lgPlus2 i32.const 2 i32.shl - local.set $7 - local.get $7 + local.set $lgPlus2Size + local.get $lgPlus2Size i32.const 1 i32.shl call $~lib/rt/tlsf/__alloc - local.set $8 - local.get $8 - local.get $7 + local.set $leftRunStartBuf + local.get $leftRunStartBuf + local.get $lgPlus2Size i32.add - local.set $9 + local.set $leftRunEndBuf i32.const 0 - local.set $3 + local.set $startB loop $for-loop|1 - local.get $3 - local.get $6 + local.get $startB + local.get $lgPlus2 i32.lt_u - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $8 - local.get $3 + local.get $leftRunStartBuf + local.get $startB i32.const 2 i32.shl i32.add i32.const -1 i32.store - local.get $3 + local.get $startB i32.const 1 i32.add - local.set $3 + local.set $startB br $for-loop|1 end end - local.get $1 + local.get $len i32.const 2 i32.shl call $~lib/rt/tlsf/__alloc - local.set $11 - local.get $1 + local.set $buffer + local.get $len i32.const 1 i32.sub - local.set $12 - local.get $0 + local.set $hi + local.get $ptr i32.const 0 - local.get $12 - local.get $2 + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight - local.set $13 - local.get $13 + local.set $endA + local.get $endA i32.const 1 i32.add - local.set $14 - local.get $14 + local.set $lenA + local.get $lenA i32.const 32 i32.lt_s if - local.get $12 - local.tee $10 + local.get $hi + local.tee $var$10 i32.const 32 i32.const 1 i32.sub - local.tee $3 - local.get $10 - local.get $3 + local.tee $startB + local.get $var$10 + local.get $startB i32.lt_s select - local.set $13 - local.get $0 + local.set $endA + local.get $ptr i32.const 0 - local.get $13 - local.get $14 - local.get $2 + local.get $endA + local.get $lenA + local.get $comparator call $~lib/util/sort/insertionSort end i32.const 0 - local.set $15 + local.set $top i32.const 0 - local.set $16 + local.set $startA loop $while-continue|2 - local.get $13 - local.get $12 + local.get $endA + local.get $hi i32.lt_s - local.set $10 - local.get $10 + local.set $var$10 + local.get $var$10 if - local.get $13 + local.get $endA i32.const 1 i32.add - local.set $3 - local.get $0 - local.get $3 - local.get $12 - local.get $2 + local.set $startB + local.get $ptr + local.get $startB + local.get $hi + local.get $comparator call $~lib/util/sort/extendRunRight - local.set $17 - local.get $17 - local.get $3 + local.set $endB + local.get $endB + local.get $startB i32.sub i32.const 1 i32.add - local.set $18 - local.get $18 + local.set $lenB + local.get $lenB i32.const 32 i32.lt_s if - local.get $12 - local.tee $19 - local.get $3 + local.get $hi + local.tee $k + local.get $startB i32.const 32 i32.add i32.const 1 i32.sub - local.tee $20 - local.get $19 - local.get $20 + local.tee $var$20 + local.get $k + local.get $var$20 i32.lt_s select - local.set $17 - local.get $0 - local.get $3 - local.get $17 - local.get $18 - local.get $2 + local.set $endB + local.get $ptr + local.get $startB + local.get $endB + local.get $lenB + local.get $comparator call $~lib/util/sort/insertionSort end i32.const 0 - local.get $12 - local.get $16 - local.get $3 - local.get $17 + local.get $hi + local.get $startA + local.get $startB + local.get $endB call $~lib/util/sort/nodePower - local.set $19 - local.get $15 - local.set $20 + local.set $k + local.get $top + local.set $var$20 loop $for-loop|3 - local.get $20 - local.get $19 + local.get $var$20 + local.get $k i32.gt_u - local.set $21 - local.get $21 + local.set $var$21 + local.get $var$21 if - local.get $8 - local.get $20 + local.get $leftRunStartBuf + local.get $var$20 i32.const 2 i32.shl i32.add i32.load - local.set $22 - local.get $22 + local.set $var$22 + local.get $var$22 i32.const -1 i32.ne if - local.get $0 - local.get $22 - local.get $9 - local.get $20 + local.get $ptr + local.get $var$22 + local.get $leftRunEndBuf + local.get $var$20 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $13 - local.get $11 - local.get $2 + local.get $endA + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns - local.get $22 - local.set $16 - local.get $8 - local.get $20 + local.get $var$22 + local.set $startA + local.get $leftRunStartBuf + local.get $var$20 i32.const 2 i32.shl i32.add i32.const -1 i32.store end - local.get $20 + local.get $var$20 i32.const 1 i32.sub - local.set $20 + local.set $var$20 br $for-loop|3 end end - local.get $8 - local.get $19 + local.get $leftRunStartBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $16 + local.get $startA i32.store - local.get $9 - local.get $19 + local.get $leftRunEndBuf + local.get $k i32.const 2 i32.shl i32.add - local.get $13 + local.get $endA i32.store - local.get $3 - local.set $16 - local.get $17 - local.set $13 - local.get $19 - local.set $15 + local.get $startB + local.set $startA + local.get $endB + local.set $endA + local.get $k + local.set $top br $while-continue|2 end end - local.get $15 - local.set $10 + local.get $top + local.set $var$10 loop $for-loop|4 - local.get $10 + local.get $var$10 i32.const 0 i32.ne - local.set $20 - local.get $20 + local.set $var$20 + local.get $var$20 if - local.get $8 - local.get $10 + local.get $leftRunStartBuf + local.get $var$10 i32.const 2 i32.shl i32.add i32.load - local.set $21 - local.get $21 + local.set $var$21 + local.get $var$21 i32.const -1 i32.ne if - local.get $0 - local.get $21 - local.get $9 - local.get $10 + local.get $ptr + local.get $var$21 + local.get $leftRunEndBuf + local.get $var$10 i32.const 2 i32.shl i32.add i32.load i32.const 1 i32.add - local.get $12 - local.get $11 - local.get $2 + local.get $hi + local.get $buffer + local.get $comparator call $~lib/util/sort/mergeRuns end - local.get $10 + local.get $var$10 i32.const 1 i32.sub - local.set $10 + local.set $var$10 br $for-loop|4 end end - local.get $11 + local.get $buffer call $~lib/rt/tlsf/__free - local.get $8 + local.get $leftRunStartBuf call $~lib/rt/tlsf/__free ) - (func $~lib/typedarray/Float32Array#sort (param $0 i32) (param $1 i32) (result i32) - local.get $0 + (func $~lib/typedarray/Float32Array#sort (param $this i32) (param $comparator i32) (result i32) + local.get $this i32.load offset=4 - local.get $0 + local.get $this call $~lib/typedarray/Float32Array#get:length - local.get $1 + local.get $comparator call $~lib/util/sort/SORT - local.get $0 + local.get $this ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 f32) (param $1 f32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $a f32) (param $b f32) (result i32) + (local $ia i32) + (local $ib i32) + local.get $a i32.reinterpret_f32 - local.set $2 - local.get $1 + local.set $ia + local.get $b i32.reinterpret_f32 - local.set $3 - local.get $2 - local.get $2 + local.set $ib + local.get $ia + local.get $ia i32.const 31 i32.shr_s i32.const 1 i32.shr_u i32.xor - local.set $2 - local.get $3 - local.get $3 + local.set $ia + local.get $ib + local.get $ib i32.const 31 i32.shr_s i32.const 1 i32.shr_u i32.xor - local.set $3 - local.get $2 - local.get $3 + local.set $ib + local.get $ia + local.get $ib i32.gt_s - local.get $2 - local.get $3 + local.get $ia + local.get $ib i32.lt_s i32.sub ) - (func $std/typedarray/testArraySort<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 f32) (result i32) - local.get $1 - local.get $0 + (func $std/typedarray/testArraySort<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $a f32) (param $b f32) (result i32) + local.get $b + local.get $a f32.gt - local.get $1 - local.get $0 + local.get $b + local.get $a f32.lt i32.sub ) - (func $std/typedarray/testArraySort<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 f64) (result i32) - local.get $1 - local.get $0 + (func $std/typedarray/testArraySort<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $a f64) (param $b f64) (result i32) + local.get $b + local.get $a f64.gt - local.get $1 - local.get $0 + local.get $b + local.get $a f64.lt i32.sub ) (func $~lib/rt/itcms/__collect - (local $0 i32) + (local $var$0 i32) i32.const 0 drop global.get $~lib/rt/itcms/state @@ -39142,8 +39142,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -39157,8 +39157,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -39321,10 +39321,10 @@ local.get $1 call $~lib/arraybuffer/ArrayBufferView~visit ) - (func $~lib/function/Function<%28f64%2Cf64%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28f64%2Cf64%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28f64%2Cf64%29=>i32>~visit (param $0 i32) (param $1 i32) @@ -39332,12 +39332,12 @@ local.get $1 call $~lib/function/Function<%28f64%2Cf64%29=>i32>#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -39345,12 +39345,12 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -39358,10 +39358,10 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/function/Function<%28i8%2Ci8%2Ci32%2C~lib/typedarray/Int8Array%29=>i8>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i8%2Ci8%2Ci32%2C~lib/typedarray/Int8Array%29=>i8>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i8%2Ci8%2Ci32%2C~lib/typedarray/Int8Array%29=>i8>~visit (param $0 i32) (param $1 i32) @@ -39369,10 +39369,10 @@ local.get $1 call $~lib/function/Function<%28i8%2Ci8%2Ci32%2C~lib/typedarray/Int8Array%29=>i8>#__visit ) - (func $~lib/function/Function<%28u8%2Cu8%2Ci32%2C~lib/typedarray/Uint8Array%29=>u8>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28u8%2Cu8%2Ci32%2C~lib/typedarray/Uint8Array%29=>u8>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28u8%2Cu8%2Ci32%2C~lib/typedarray/Uint8Array%29=>u8>~visit (param $0 i32) (param $1 i32) @@ -39380,10 +39380,10 @@ local.get $1 call $~lib/function/Function<%28u8%2Cu8%2Ci32%2C~lib/typedarray/Uint8Array%29=>u8>#__visit ) - (func $~lib/function/Function<%28u8%2Cu8%2Ci32%2C~lib/typedarray/Uint8ClampedArray%29=>u8>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28u8%2Cu8%2Ci32%2C~lib/typedarray/Uint8ClampedArray%29=>u8>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28u8%2Cu8%2Ci32%2C~lib/typedarray/Uint8ClampedArray%29=>u8>~visit (param $0 i32) (param $1 i32) @@ -39391,10 +39391,10 @@ local.get $1 call $~lib/function/Function<%28u8%2Cu8%2Ci32%2C~lib/typedarray/Uint8ClampedArray%29=>u8>#__visit ) - (func $~lib/function/Function<%28i16%2Ci16%2Ci32%2C~lib/typedarray/Int16Array%29=>i16>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i16%2Ci16%2Ci32%2C~lib/typedarray/Int16Array%29=>i16>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i16%2Ci16%2Ci32%2C~lib/typedarray/Int16Array%29=>i16>~visit (param $0 i32) (param $1 i32) @@ -39402,10 +39402,10 @@ local.get $1 call $~lib/function/Function<%28i16%2Ci16%2Ci32%2C~lib/typedarray/Int16Array%29=>i16>#__visit ) - (func $~lib/function/Function<%28u16%2Cu16%2Ci32%2C~lib/typedarray/Uint16Array%29=>u16>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28u16%2Cu16%2Ci32%2C~lib/typedarray/Uint16Array%29=>u16>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28u16%2Cu16%2Ci32%2C~lib/typedarray/Uint16Array%29=>u16>~visit (param $0 i32) (param $1 i32) @@ -39413,10 +39413,10 @@ local.get $1 call $~lib/function/Function<%28u16%2Cu16%2Ci32%2C~lib/typedarray/Uint16Array%29=>u16>#__visit ) - (func $~lib/function/Function<%28i32%2Ci32%2Ci32%2C~lib/typedarray/Int32Array%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i32%2Ci32%2Ci32%2C~lib/typedarray/Int32Array%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i32%2Ci32%2Ci32%2C~lib/typedarray/Int32Array%29=>i32>~visit (param $0 i32) (param $1 i32) @@ -39424,10 +39424,10 @@ local.get $1 call $~lib/function/Function<%28i32%2Ci32%2Ci32%2C~lib/typedarray/Int32Array%29=>i32>#__visit ) - (func $~lib/function/Function<%28u32%2Cu32%2Ci32%2C~lib/typedarray/Uint32Array%29=>u32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28u32%2Cu32%2Ci32%2C~lib/typedarray/Uint32Array%29=>u32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28u32%2Cu32%2Ci32%2C~lib/typedarray/Uint32Array%29=>u32>~visit (param $0 i32) (param $1 i32) @@ -39435,10 +39435,10 @@ local.get $1 call $~lib/function/Function<%28u32%2Cu32%2Ci32%2C~lib/typedarray/Uint32Array%29=>u32>#__visit ) - (func $~lib/function/Function<%28i64%2Ci64%2Ci32%2C~lib/typedarray/Int64Array%29=>i64>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i64%2Ci64%2Ci32%2C~lib/typedarray/Int64Array%29=>i64>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i64%2Ci64%2Ci32%2C~lib/typedarray/Int64Array%29=>i64>~visit (param $0 i32) (param $1 i32) @@ -39446,10 +39446,10 @@ local.get $1 call $~lib/function/Function<%28i64%2Ci64%2Ci32%2C~lib/typedarray/Int64Array%29=>i64>#__visit ) - (func $~lib/function/Function<%28u64%2Cu64%2Ci32%2C~lib/typedarray/Uint64Array%29=>u64>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28u64%2Cu64%2Ci32%2C~lib/typedarray/Uint64Array%29=>u64>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28u64%2Cu64%2Ci32%2C~lib/typedarray/Uint64Array%29=>u64>~visit (param $0 i32) (param $1 i32) @@ -39457,10 +39457,10 @@ local.get $1 call $~lib/function/Function<%28u64%2Cu64%2Ci32%2C~lib/typedarray/Uint64Array%29=>u64>#__visit ) - (func $~lib/function/Function<%28f32%2Cf32%2Ci32%2C~lib/typedarray/Float32Array%29=>f32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28f32%2Cf32%2Ci32%2C~lib/typedarray/Float32Array%29=>f32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28f32%2Cf32%2Ci32%2C~lib/typedarray/Float32Array%29=>f32>~visit (param $0 i32) (param $1 i32) @@ -39468,10 +39468,10 @@ local.get $1 call $~lib/function/Function<%28f32%2Cf32%2Ci32%2C~lib/typedarray/Float32Array%29=>f32>#__visit ) - (func $~lib/function/Function<%28f64%2Cf64%2Ci32%2C~lib/typedarray/Float64Array%29=>f64>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28f64%2Cf64%2Ci32%2C~lib/typedarray/Float64Array%29=>f64>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28f64%2Cf64%2Ci32%2C~lib/typedarray/Float64Array%29=>f64>~visit (param $0 i32) (param $1 i32) @@ -39479,10 +39479,10 @@ local.get $1 call $~lib/function/Function<%28f64%2Cf64%2Ci32%2C~lib/typedarray/Float64Array%29=>f64>#__visit ) - (func $~lib/function/Function<%28i8%2Ci32%2C~lib/typedarray/Int8Array%29=>i8>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i8%2Ci32%2C~lib/typedarray/Int8Array%29=>i8>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i8%2Ci32%2C~lib/typedarray/Int8Array%29=>i8>~visit (param $0 i32) (param $1 i32) @@ -39490,10 +39490,10 @@ local.get $1 call $~lib/function/Function<%28i8%2Ci32%2C~lib/typedarray/Int8Array%29=>i8>#__visit ) - (func $~lib/function/Function<%28u8%2Ci32%2C~lib/typedarray/Uint8Array%29=>u8>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28u8%2Ci32%2C~lib/typedarray/Uint8Array%29=>u8>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28u8%2Ci32%2C~lib/typedarray/Uint8Array%29=>u8>~visit (param $0 i32) (param $1 i32) @@ -39501,10 +39501,10 @@ local.get $1 call $~lib/function/Function<%28u8%2Ci32%2C~lib/typedarray/Uint8Array%29=>u8>#__visit ) - (func $~lib/function/Function<%28u8%2Ci32%2C~lib/typedarray/Uint8ClampedArray%29=>u8>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28u8%2Ci32%2C~lib/typedarray/Uint8ClampedArray%29=>u8>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28u8%2Ci32%2C~lib/typedarray/Uint8ClampedArray%29=>u8>~visit (param $0 i32) (param $1 i32) @@ -39512,10 +39512,10 @@ local.get $1 call $~lib/function/Function<%28u8%2Ci32%2C~lib/typedarray/Uint8ClampedArray%29=>u8>#__visit ) - (func $~lib/function/Function<%28i16%2Ci32%2C~lib/typedarray/Int16Array%29=>i16>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i16%2Ci32%2C~lib/typedarray/Int16Array%29=>i16>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i16%2Ci32%2C~lib/typedarray/Int16Array%29=>i16>~visit (param $0 i32) (param $1 i32) @@ -39523,10 +39523,10 @@ local.get $1 call $~lib/function/Function<%28i16%2Ci32%2C~lib/typedarray/Int16Array%29=>i16>#__visit ) - (func $~lib/function/Function<%28u16%2Ci32%2C~lib/typedarray/Uint16Array%29=>u16>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28u16%2Ci32%2C~lib/typedarray/Uint16Array%29=>u16>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28u16%2Ci32%2C~lib/typedarray/Uint16Array%29=>u16>~visit (param $0 i32) (param $1 i32) @@ -39534,10 +39534,10 @@ local.get $1 call $~lib/function/Function<%28u16%2Ci32%2C~lib/typedarray/Uint16Array%29=>u16>#__visit ) - (func $~lib/function/Function<%28i32%2Ci32%2C~lib/typedarray/Int32Array%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i32%2Ci32%2C~lib/typedarray/Int32Array%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i32%2Ci32%2C~lib/typedarray/Int32Array%29=>i32>~visit (param $0 i32) (param $1 i32) @@ -39545,10 +39545,10 @@ local.get $1 call $~lib/function/Function<%28i32%2Ci32%2C~lib/typedarray/Int32Array%29=>i32>#__visit ) - (func $~lib/function/Function<%28u32%2Ci32%2C~lib/typedarray/Uint32Array%29=>u32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28u32%2Ci32%2C~lib/typedarray/Uint32Array%29=>u32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28u32%2Ci32%2C~lib/typedarray/Uint32Array%29=>u32>~visit (param $0 i32) (param $1 i32) @@ -39556,10 +39556,10 @@ local.get $1 call $~lib/function/Function<%28u32%2Ci32%2C~lib/typedarray/Uint32Array%29=>u32>#__visit ) - (func $~lib/function/Function<%28i64%2Ci32%2C~lib/typedarray/Int64Array%29=>i64>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i64%2Ci32%2C~lib/typedarray/Int64Array%29=>i64>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i64%2Ci32%2C~lib/typedarray/Int64Array%29=>i64>~visit (param $0 i32) (param $1 i32) @@ -39567,10 +39567,10 @@ local.get $1 call $~lib/function/Function<%28i64%2Ci32%2C~lib/typedarray/Int64Array%29=>i64>#__visit ) - (func $~lib/function/Function<%28u64%2Ci32%2C~lib/typedarray/Uint64Array%29=>u64>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28u64%2Ci32%2C~lib/typedarray/Uint64Array%29=>u64>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28u64%2Ci32%2C~lib/typedarray/Uint64Array%29=>u64>~visit (param $0 i32) (param $1 i32) @@ -39578,10 +39578,10 @@ local.get $1 call $~lib/function/Function<%28u64%2Ci32%2C~lib/typedarray/Uint64Array%29=>u64>#__visit ) - (func $~lib/function/Function<%28f32%2Ci32%2C~lib/typedarray/Float32Array%29=>f32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28f32%2Ci32%2C~lib/typedarray/Float32Array%29=>f32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28f32%2Ci32%2C~lib/typedarray/Float32Array%29=>f32>~visit (param $0 i32) (param $1 i32) @@ -39589,10 +39589,10 @@ local.get $1 call $~lib/function/Function<%28f32%2Ci32%2C~lib/typedarray/Float32Array%29=>f32>#__visit ) - (func $~lib/function/Function<%28f64%2Ci32%2C~lib/typedarray/Float64Array%29=>f64>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28f64%2Ci32%2C~lib/typedarray/Float64Array%29=>f64>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28f64%2Ci32%2C~lib/typedarray/Float64Array%29=>f64>~visit (param $0 i32) (param $1 i32) @@ -39600,10 +39600,10 @@ local.get $1 call $~lib/function/Function<%28f64%2Ci32%2C~lib/typedarray/Float64Array%29=>f64>#__visit ) - (func $~lib/function/Function<%28i8%2Ci32%2C~lib/typedarray/Int8Array%29=>bool>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i8%2Ci32%2C~lib/typedarray/Int8Array%29=>bool>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i8%2Ci32%2C~lib/typedarray/Int8Array%29=>bool>~visit (param $0 i32) (param $1 i32) @@ -39611,10 +39611,10 @@ local.get $1 call $~lib/function/Function<%28i8%2Ci32%2C~lib/typedarray/Int8Array%29=>bool>#__visit ) - (func $~lib/function/Function<%28u8%2Ci32%2C~lib/typedarray/Uint8Array%29=>bool>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28u8%2Ci32%2C~lib/typedarray/Uint8Array%29=>bool>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28u8%2Ci32%2C~lib/typedarray/Uint8Array%29=>bool>~visit (param $0 i32) (param $1 i32) @@ -39622,10 +39622,10 @@ local.get $1 call $~lib/function/Function<%28u8%2Ci32%2C~lib/typedarray/Uint8Array%29=>bool>#__visit ) - (func $~lib/function/Function<%28u8%2Ci32%2C~lib/typedarray/Uint8ClampedArray%29=>bool>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28u8%2Ci32%2C~lib/typedarray/Uint8ClampedArray%29=>bool>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28u8%2Ci32%2C~lib/typedarray/Uint8ClampedArray%29=>bool>~visit (param $0 i32) (param $1 i32) @@ -39633,10 +39633,10 @@ local.get $1 call $~lib/function/Function<%28u8%2Ci32%2C~lib/typedarray/Uint8ClampedArray%29=>bool>#__visit ) - (func $~lib/function/Function<%28i16%2Ci32%2C~lib/typedarray/Int16Array%29=>bool>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i16%2Ci32%2C~lib/typedarray/Int16Array%29=>bool>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i16%2Ci32%2C~lib/typedarray/Int16Array%29=>bool>~visit (param $0 i32) (param $1 i32) @@ -39644,10 +39644,10 @@ local.get $1 call $~lib/function/Function<%28i16%2Ci32%2C~lib/typedarray/Int16Array%29=>bool>#__visit ) - (func $~lib/function/Function<%28u16%2Ci32%2C~lib/typedarray/Uint16Array%29=>bool>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28u16%2Ci32%2C~lib/typedarray/Uint16Array%29=>bool>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28u16%2Ci32%2C~lib/typedarray/Uint16Array%29=>bool>~visit (param $0 i32) (param $1 i32) @@ -39655,10 +39655,10 @@ local.get $1 call $~lib/function/Function<%28u16%2Ci32%2C~lib/typedarray/Uint16Array%29=>bool>#__visit ) - (func $~lib/function/Function<%28i32%2Ci32%2C~lib/typedarray/Int32Array%29=>bool>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i32%2Ci32%2C~lib/typedarray/Int32Array%29=>bool>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i32%2Ci32%2C~lib/typedarray/Int32Array%29=>bool>~visit (param $0 i32) (param $1 i32) @@ -39666,10 +39666,10 @@ local.get $1 call $~lib/function/Function<%28i32%2Ci32%2C~lib/typedarray/Int32Array%29=>bool>#__visit ) - (func $~lib/function/Function<%28u32%2Ci32%2C~lib/typedarray/Uint32Array%29=>bool>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28u32%2Ci32%2C~lib/typedarray/Uint32Array%29=>bool>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28u32%2Ci32%2C~lib/typedarray/Uint32Array%29=>bool>~visit (param $0 i32) (param $1 i32) @@ -39677,10 +39677,10 @@ local.get $1 call $~lib/function/Function<%28u32%2Ci32%2C~lib/typedarray/Uint32Array%29=>bool>#__visit ) - (func $~lib/function/Function<%28i64%2Ci32%2C~lib/typedarray/Int64Array%29=>bool>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i64%2Ci32%2C~lib/typedarray/Int64Array%29=>bool>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i64%2Ci32%2C~lib/typedarray/Int64Array%29=>bool>~visit (param $0 i32) (param $1 i32) @@ -39688,10 +39688,10 @@ local.get $1 call $~lib/function/Function<%28i64%2Ci32%2C~lib/typedarray/Int64Array%29=>bool>#__visit ) - (func $~lib/function/Function<%28u64%2Ci32%2C~lib/typedarray/Uint64Array%29=>bool>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28u64%2Ci32%2C~lib/typedarray/Uint64Array%29=>bool>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28u64%2Ci32%2C~lib/typedarray/Uint64Array%29=>bool>~visit (param $0 i32) (param $1 i32) @@ -39699,10 +39699,10 @@ local.get $1 call $~lib/function/Function<%28u64%2Ci32%2C~lib/typedarray/Uint64Array%29=>bool>#__visit ) - (func $~lib/function/Function<%28f32%2Ci32%2C~lib/typedarray/Float32Array%29=>bool>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28f32%2Ci32%2C~lib/typedarray/Float32Array%29=>bool>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28f32%2Ci32%2C~lib/typedarray/Float32Array%29=>bool>~visit (param $0 i32) (param $1 i32) @@ -39710,10 +39710,10 @@ local.get $1 call $~lib/function/Function<%28f32%2Ci32%2C~lib/typedarray/Float32Array%29=>bool>#__visit ) - (func $~lib/function/Function<%28f64%2Ci32%2C~lib/typedarray/Float64Array%29=>bool>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28f64%2Ci32%2C~lib/typedarray/Float64Array%29=>bool>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28f64%2Ci32%2C~lib/typedarray/Float64Array%29=>bool>~visit (param $0 i32) (param $1 i32) @@ -39721,10 +39721,10 @@ local.get $1 call $~lib/function/Function<%28f64%2Ci32%2C~lib/typedarray/Float64Array%29=>bool>#__visit ) - (func $~lib/function/Function<%28i8%2Ci32%2C~lib/typedarray/Int8Array%29=>void>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i8%2Ci32%2C~lib/typedarray/Int8Array%29=>void>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i8%2Ci32%2C~lib/typedarray/Int8Array%29=>void>~visit (param $0 i32) (param $1 i32) @@ -39732,10 +39732,10 @@ local.get $1 call $~lib/function/Function<%28i8%2Ci32%2C~lib/typedarray/Int8Array%29=>void>#__visit ) - (func $~lib/function/Function<%28u8%2Ci32%2C~lib/typedarray/Uint8Array%29=>void>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28u8%2Ci32%2C~lib/typedarray/Uint8Array%29=>void>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28u8%2Ci32%2C~lib/typedarray/Uint8Array%29=>void>~visit (param $0 i32) (param $1 i32) @@ -39743,10 +39743,10 @@ local.get $1 call $~lib/function/Function<%28u8%2Ci32%2C~lib/typedarray/Uint8Array%29=>void>#__visit ) - (func $~lib/function/Function<%28u8%2Ci32%2C~lib/typedarray/Uint8ClampedArray%29=>void>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28u8%2Ci32%2C~lib/typedarray/Uint8ClampedArray%29=>void>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28u8%2Ci32%2C~lib/typedarray/Uint8ClampedArray%29=>void>~visit (param $0 i32) (param $1 i32) @@ -39754,10 +39754,10 @@ local.get $1 call $~lib/function/Function<%28u8%2Ci32%2C~lib/typedarray/Uint8ClampedArray%29=>void>#__visit ) - (func $~lib/function/Function<%28i16%2Ci32%2C~lib/typedarray/Int16Array%29=>void>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i16%2Ci32%2C~lib/typedarray/Int16Array%29=>void>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i16%2Ci32%2C~lib/typedarray/Int16Array%29=>void>~visit (param $0 i32) (param $1 i32) @@ -39765,10 +39765,10 @@ local.get $1 call $~lib/function/Function<%28i16%2Ci32%2C~lib/typedarray/Int16Array%29=>void>#__visit ) - (func $~lib/function/Function<%28u16%2Ci32%2C~lib/typedarray/Uint16Array%29=>void>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28u16%2Ci32%2C~lib/typedarray/Uint16Array%29=>void>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28u16%2Ci32%2C~lib/typedarray/Uint16Array%29=>void>~visit (param $0 i32) (param $1 i32) @@ -39776,10 +39776,10 @@ local.get $1 call $~lib/function/Function<%28u16%2Ci32%2C~lib/typedarray/Uint16Array%29=>void>#__visit ) - (func $~lib/function/Function<%28i32%2Ci32%2C~lib/typedarray/Int32Array%29=>void>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i32%2Ci32%2C~lib/typedarray/Int32Array%29=>void>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i32%2Ci32%2C~lib/typedarray/Int32Array%29=>void>~visit (param $0 i32) (param $1 i32) @@ -39787,10 +39787,10 @@ local.get $1 call $~lib/function/Function<%28i32%2Ci32%2C~lib/typedarray/Int32Array%29=>void>#__visit ) - (func $~lib/function/Function<%28u32%2Ci32%2C~lib/typedarray/Uint32Array%29=>void>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28u32%2Ci32%2C~lib/typedarray/Uint32Array%29=>void>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28u32%2Ci32%2C~lib/typedarray/Uint32Array%29=>void>~visit (param $0 i32) (param $1 i32) @@ -39798,10 +39798,10 @@ local.get $1 call $~lib/function/Function<%28u32%2Ci32%2C~lib/typedarray/Uint32Array%29=>void>#__visit ) - (func $~lib/function/Function<%28i64%2Ci32%2C~lib/typedarray/Int64Array%29=>void>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i64%2Ci32%2C~lib/typedarray/Int64Array%29=>void>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i64%2Ci32%2C~lib/typedarray/Int64Array%29=>void>~visit (param $0 i32) (param $1 i32) @@ -39809,10 +39809,10 @@ local.get $1 call $~lib/function/Function<%28i64%2Ci32%2C~lib/typedarray/Int64Array%29=>void>#__visit ) - (func $~lib/function/Function<%28u64%2Ci32%2C~lib/typedarray/Uint64Array%29=>void>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28u64%2Ci32%2C~lib/typedarray/Uint64Array%29=>void>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28u64%2Ci32%2C~lib/typedarray/Uint64Array%29=>void>~visit (param $0 i32) (param $1 i32) @@ -39820,10 +39820,10 @@ local.get $1 call $~lib/function/Function<%28u64%2Ci32%2C~lib/typedarray/Uint64Array%29=>void>#__visit ) - (func $~lib/function/Function<%28f32%2Ci32%2C~lib/typedarray/Float32Array%29=>void>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28f32%2Ci32%2C~lib/typedarray/Float32Array%29=>void>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28f32%2Ci32%2C~lib/typedarray/Float32Array%29=>void>~visit (param $0 i32) (param $1 i32) @@ -39831,10 +39831,10 @@ local.get $1 call $~lib/function/Function<%28f32%2Ci32%2C~lib/typedarray/Float32Array%29=>void>#__visit ) - (func $~lib/function/Function<%28f64%2Ci32%2C~lib/typedarray/Float64Array%29=>void>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28f64%2Ci32%2C~lib/typedarray/Float64Array%29=>void>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28f64%2Ci32%2C~lib/typedarray/Float64Array%29=>void>~visit (param $0 i32) (param $1 i32) @@ -39842,12 +39842,12 @@ local.get $1 call $~lib/function/Function<%28f64%2Ci32%2C~lib/typedarray/Float64Array%29=>void>#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -39855,12 +39855,12 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -39868,12 +39868,12 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -39881,12 +39881,12 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -39894,12 +39894,12 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -39907,12 +39907,12 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -39920,12 +39920,12 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -39933,12 +39933,12 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/array/Array#__visit (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit (param $this i32) (param $cookie i32) i32.const 0 drop - local.get $0 + local.get $this i32.load - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/array/Array~visit (param $0 i32) (param $1 i32) @@ -39946,10 +39946,10 @@ local.get $1 call $~lib/array/Array#__visit ) - (func $~lib/function/Function<%28i8%2Ci8%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i8%2Ci8%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i8%2Ci8%29=>i32>~visit (param $0 i32) (param $1 i32) @@ -39957,10 +39957,10 @@ local.get $1 call $~lib/function/Function<%28i8%2Ci8%29=>i32>#__visit ) - (func $~lib/function/Function<%28u8%2Cu8%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28u8%2Cu8%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28u8%2Cu8%29=>i32>~visit (param $0 i32) (param $1 i32) @@ -39968,10 +39968,10 @@ local.get $1 call $~lib/function/Function<%28u8%2Cu8%29=>i32>#__visit ) - (func $~lib/function/Function<%28i16%2Ci16%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i16%2Ci16%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i16%2Ci16%29=>i32>~visit (param $0 i32) (param $1 i32) @@ -39979,10 +39979,10 @@ local.get $1 call $~lib/function/Function<%28i16%2Ci16%29=>i32>#__visit ) - (func $~lib/function/Function<%28u16%2Cu16%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28u16%2Cu16%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28u16%2Cu16%29=>i32>~visit (param $0 i32) (param $1 i32) @@ -39990,10 +39990,10 @@ local.get $1 call $~lib/function/Function<%28u16%2Cu16%29=>i32>#__visit ) - (func $~lib/function/Function<%28i32%2Ci32%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i32%2Ci32%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i32%2Ci32%29=>i32>~visit (param $0 i32) (param $1 i32) @@ -40001,10 +40001,10 @@ local.get $1 call $~lib/function/Function<%28i32%2Ci32%29=>i32>#__visit ) - (func $~lib/function/Function<%28u32%2Cu32%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28u32%2Cu32%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28u32%2Cu32%29=>i32>~visit (param $0 i32) (param $1 i32) @@ -40012,10 +40012,10 @@ local.get $1 call $~lib/function/Function<%28u32%2Cu32%29=>i32>#__visit ) - (func $~lib/function/Function<%28i64%2Ci64%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28i64%2Ci64%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28i64%2Ci64%29=>i32>~visit (param $0 i32) (param $1 i32) @@ -40023,10 +40023,10 @@ local.get $1 call $~lib/function/Function<%28i64%2Ci64%29=>i32>#__visit ) - (func $~lib/function/Function<%28u64%2Cu64%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28u64%2Cu64%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28u64%2Cu64%29=>i32>~visit (param $0 i32) (param $1 i32) @@ -40034,10 +40034,10 @@ local.get $1 call $~lib/function/Function<%28u64%2Cu64%29=>i32>#__visit ) - (func $~lib/function/Function<%28f32%2Cf32%29=>i32>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28f32%2Cf32%29=>i32>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28f32%2Cf32%29=>i32>~visit (param $0 i32) (param $1 i32) diff --git a/tests/compiler/std/uri.debug.wat b/tests/compiler/std/uri.debug.wat index e559a9cfeb..4e17971c9c 100644 --- a/tests/compiler/std/uri.debug.wat +++ b/tests/compiler/std/uri.debug.wat @@ -104,8 +104,8 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (start $~start) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 @@ -122,50 +122,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -178,58 +178,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -246,12 +246,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -261,19 +261,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -284,27 +284,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -312,35 +312,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -350,15 +350,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -368,25 +368,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -394,33 +394,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -448,23 +448,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -476,15 +476,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -496,33 +496,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -530,21 +530,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -559,36 +559,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -596,67 +596,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -666,22 +666,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -691,12 +691,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -708,75 +708,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -788,38 +788,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -833,12 +833,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -849,38 +849,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -888,21 +888,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -917,101 +917,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -1022,7 +1022,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1033,26 +1033,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1065,27 +1065,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1099,11 +1099,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1114,66 +1114,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1183,10 +1183,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1197,13 +1197,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1214,109 +1214,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1324,7 +1324,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1341,23 +1341,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1369,54 +1369,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1437,30 +1437,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1470,9 +1470,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1482,8 +1482,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1491,43 +1491,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1539,17 +1539,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1563,7 +1563,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1581,7 +1581,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1591,12 +1591,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1618,7 +1618,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1638,14 +1638,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1658,8 +1658,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1670,37 +1670,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1708,16 +1708,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1725,21 +1725,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1754,12 +1754,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1767,49 +1767,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1819,90 +1819,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1911,22 +1911,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1935,27 +1935,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1970,69 +1970,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2047,29 +2047,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2082,13 +2082,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2099,25 +2099,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2132,10 +2132,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2153,48 +2153,48 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/rt/itcms/__renew (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + (func $~lib/rt/itcms/__renew (param $oldPtr i32) (param $size i32) (result i32) + (local $oldObj i32) + (local $newPtr i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $oldPtr i32.const 20 i32.sub - local.set $2 - local.get $1 - local.get $2 + local.set $oldObj + local.get $size + local.get $oldObj i32.load i32.const 3 i32.const -1 @@ -2204,42 +2204,42 @@ i32.sub i32.le_u if - local.get $2 - local.get $1 + local.get $oldObj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $0 + local.get $oldPtr return end - local.get $1 - local.get $2 + local.get $size + local.get $oldObj i32.load offset=12 call $~lib/rt/itcms/__new - local.set $3 - local.get $3 - local.get $0 - local.get $1 - local.tee $4 - local.get $2 + local.set $newPtr + local.get $newPtr + local.get $oldPtr + local.get $size + local.tee $var$4 + local.get $oldObj i32.load offset=16 - local.tee $5 - local.get $4 - local.get $5 + local.tee $var$5 + local.get $var$4 + local.get $var$5 i32.lt_u select memory.copy - local.get $3 + local.get $newPtr ) - (func $~lib/util/uri/storeHex (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 + (func $~lib/util/uri/storeHex (param $dst i32) (param $offset i32) (param $ch i32) + local.get $dst + local.get $offset i32.add i32.const 37 i32.store16 - local.get $0 - local.get $1 + local.get $dst + local.get $offset i32.add i32.const 652 - local.get $2 + local.get $ch i32.const 4 i32.shr_u i32.const 15 @@ -2247,7 +2247,7 @@ i32.add i32.load8_u i32.const 652 - local.get $2 + local.get $ch i32.const 15 i32.and i32.add @@ -2257,61 +2257,61 @@ i32.or i32.store offset=2 ) - (func $~lib/util/uri/encode (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 $11 i32) - local.get $1 + (func $~lib/util/uri/encode (param $src i32) (param $len i32) (param $table i32) (result i32) + (local $i i32) + (local $offset i32) + (local $outSize i32) + (local $dst i32) + (local $var$7 i32) + (local $org i32) + (local $c i32) + (local $c1 i32) + (local $estSize i32) + local.get $len i32.eqz if - local.get $0 + local.get $src return end i32.const 0 - local.set $3 + local.set $i i32.const 0 - local.set $4 - local.get $1 + local.set $offset + local.get $len i32.const 1 i32.shl - local.set $5 - local.get $5 + local.set $outSize + local.get $outSize i32.const 1 call $~lib/rt/itcms/__new - local.set $6 + local.set $dst block $while-break|0 loop $while-continue|0 - local.get $3 - local.get $1 + local.get $i + local.get $len i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $8 + local.get $i + local.set $org block $do-break|1 loop $do-loop|1 - local.get $0 - local.get $3 + local.get $src + local.get $i i32.const 1 i32.shl i32.add i32.load16_u - local.set $9 - local.get $9 + local.set $c + local.get $c i32.const 33 i32.sub i32.const 94 i32.lt_u if - local.get $2 - local.get $9 + local.get $table + local.get $c i32.const 33 i32.sub i32.add @@ -2322,70 +2322,70 @@ else br $do-break|1 end - local.get $3 + local.get $i i32.const 1 i32.add - local.tee $3 - local.get $1 + local.tee $i + local.get $len i32.lt_u br_if $do-loop|1 end end - local.get $3 - local.get $8 + local.get $i + local.get $org i32.gt_u if - local.get $3 - local.get $8 + local.get $i + local.get $org i32.sub i32.const 1 i32.shl - local.set $11 - local.get $4 - local.get $11 + local.set $estSize + local.get $offset + local.get $estSize i32.add - local.get $5 + local.get $outSize i32.gt_u if - local.get $4 - local.get $11 + local.get $offset + local.get $estSize i32.add - local.set $5 - local.get $6 - local.get $5 + local.set $outSize + local.get $dst + local.get $outSize call $~lib/rt/itcms/__renew - local.set $6 + local.set $dst end - local.get $6 - local.get $4 + local.get $dst + local.get $offset i32.add - local.get $0 - local.get $8 + local.get $src + local.get $org i32.const 1 i32.shl i32.add - local.get $11 + local.get $estSize memory.copy - local.get $4 - local.get $11 + local.get $offset + local.get $estSize i32.add - local.set $4 - local.get $3 - local.get $1 + local.set $offset + local.get $i + local.get $len i32.ge_u if br $while-break|0 end end - local.get $9 + local.get $c i32.const 55296 i32.ge_u if - local.get $9 + local.get $c i32.const 56320 i32.ge_u if (result i32) - local.get $9 + local.get $c i32.const 57343 i32.le_u else @@ -2399,12 +2399,12 @@ call $~lib/builtins/abort unreachable end - local.get $9 + local.get $c i32.const 56319 i32.le_u if - local.get $3 - local.get $1 + local.get $i + local.get $len i32.ge_u if i32.const 560 @@ -2414,23 +2414,23 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $src + local.get $i i32.const 1 i32.add - local.tee $3 + local.tee $i i32.const 1 i32.shl i32.add i32.load16_u - local.set $10 - local.get $10 + local.set $c1 + local.get $c1 i32.const 56320 i32.lt_u if (result i32) i32.const 1 else - local.get $10 + local.get $c1 i32.const 57343 i32.gt_u end @@ -2442,22 +2442,22 @@ call $~lib/builtins/abort unreachable end - local.get $9 + local.get $c i32.const 1023 i32.and i32.const 10 i32.shl - local.get $10 + local.get $c1 i32.const 1023 i32.and i32.or i32.const 65536 i32.add - local.set $9 + local.set $c end end - local.get $4 - local.get $9 + local.get $offset + local.get $c i32.const 128 i32.lt_u if (result i32) @@ -2470,89 +2470,89 @@ i32.mul end i32.add - local.set $11 - local.get $11 - local.get $5 + local.set $estSize + local.get $estSize + local.get $outSize i32.gt_u if - local.get $1 + local.get $len i32.const 1 i32.gt_u if (result i32) - local.get $11 + local.get $estSize i32.const 1 i32.shl else - local.get $11 + local.get $estSize end - local.set $5 - local.get $6 - local.get $5 + local.set $outSize + local.get $dst + local.get $outSize call $~lib/rt/itcms/__renew - local.set $6 + local.set $dst end - local.get $9 + local.get $c i32.const 128 i32.lt_u if - local.get $6 - local.get $4 - local.get $9 + local.get $dst + local.get $offset + local.get $c call $~lib/util/uri/storeHex - local.get $4 + local.get $offset i32.const 6 i32.add - local.set $4 + local.set $offset else - local.get $9 + local.get $c i32.const 2048 i32.lt_u if - local.get $6 - local.get $4 - local.get $9 + local.get $dst + local.get $offset + local.get $c i32.const 6 i32.shr_u i32.const 192 i32.or call $~lib/util/uri/storeHex - local.get $4 + local.get $offset i32.const 6 i32.add - local.set $4 + local.set $offset else - local.get $9 + local.get $c i32.const 65536 i32.lt_u if - local.get $6 - local.get $4 - local.get $9 + local.get $dst + local.get $offset + local.get $c i32.const 12 i32.shr_u i32.const 224 i32.or call $~lib/util/uri/storeHex - local.get $4 + local.get $offset i32.const 6 i32.add - local.set $4 + local.set $offset else - local.get $6 - local.get $4 - local.get $9 + local.get $dst + local.get $offset + local.get $c i32.const 18 i32.shr_u i32.const 240 i32.or call $~lib/util/uri/storeHex - local.get $4 + local.get $offset i32.const 6 i32.add - local.set $4 - local.get $6 - local.get $4 - local.get $9 + local.set $offset + local.get $dst + local.get $offset + local.get $c i32.const 12 i32.shr_u i32.const 63 @@ -2560,14 +2560,14 @@ i32.const 128 i32.or call $~lib/util/uri/storeHex - local.get $4 + local.get $offset i32.const 6 i32.add - local.set $4 + local.set $offset end - local.get $6 - local.get $4 - local.get $9 + local.get $dst + local.get $offset + local.get $c i32.const 6 i32.shr_u i32.const 63 @@ -2575,80 +2575,80 @@ i32.const 128 i32.or call $~lib/util/uri/storeHex - local.get $4 + local.get $offset i32.const 6 i32.add - local.set $4 + local.set $offset end - local.get $6 - local.get $4 - local.get $9 + local.get $dst + local.get $offset + local.get $c i32.const 63 i32.and i32.const 128 i32.or call $~lib/util/uri/storeHex - local.get $4 + local.get $offset i32.const 6 i32.add - local.set $4 + local.set $offset end - local.get $3 + local.get $i i32.const 1 i32.add - local.set $3 + local.set $i br $while-continue|0 end end end - local.get $5 - local.get $4 + local.get $outSize + local.get $offset i32.gt_u if - local.get $6 - local.get $4 + local.get $dst + local.get $offset call $~lib/rt/itcms/__renew - local.set $6 + local.set $dst end - local.get $6 + local.get $dst ) - (func $~lib/uri/encodeURIComponent (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/uri/encodeURIComponent (param $str i32) (result i32) + local.get $str + local.get $str call $~lib/string/String#get:length global.get $~lib/util/uri/URL_UNSAFE call $~lib/util/uri/encode ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.get $1 + (func $~lib/util/string/compareImpl (param $str1 i32) (param $index1 i32) (param $str2 i32) (param $index2 i32) (param $len i32) (result i32) + (local $ptr1 i32) + (local $ptr2 i32) + (local $var$7 i32) + (local $a i32) + (local $b i32) + local.get $str1 + local.get $index1 i32.const 1 i32.shl i32.add - local.set $5 - local.get $2 - local.get $3 + local.set $ptr1 + local.get $str2 + local.get $index2 i32.const 1 i32.shl i32.add - local.set $6 + local.set $ptr2 i32.const 0 i32.const 2 i32.lt_s drop - local.get $4 + local.get $len i32.const 4 i32.ge_u if (result i32) - local.get $5 + local.get $ptr1 i32.const 7 i32.and - local.get $6 + local.get $ptr2 i32.const 7 i32.and i32.or @@ -2659,27 +2659,27 @@ if block $do-break|0 loop $do-loop|0 - local.get $5 + local.get $ptr1 i64.load - local.get $6 + local.get $ptr2 i64.load i64.ne if br $do-break|0 end - local.get $5 + local.get $ptr1 i32.const 8 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 8 i32.add - local.set $6 - local.get $4 + local.set $ptr2 + local.get $len i32.const 4 i32.sub - local.set $4 - local.get $4 + local.set $len + local.get $len i32.const 4 i32.ge_u br_if $do-loop|0 @@ -2687,59 +2687,59 @@ end end loop $while-continue|1 - local.get $4 - local.tee $7 + local.get $len + local.tee $var$7 i32.const 1 i32.sub - local.set $4 - local.get $7 - local.set $7 - local.get $7 + local.set $len + local.get $var$7 + local.set $var$7 + local.get $var$7 if - local.get $5 + local.get $ptr1 i32.load16_u - local.set $8 - local.get $6 + local.set $a + local.get $ptr2 i32.load16_u - local.set $9 - local.get $8 - local.get $9 + local.set $b + local.get $a + local.get $b i32.ne if - local.get $8 - local.get $9 + local.get $a + local.get $b i32.sub return end - local.get $5 + local.get $ptr1 i32.const 2 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 2 i32.add - local.set $6 + local.set $ptr2 br $while-continue|1 end end i32.const 0 ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__eq (param $left i32) (param $right i32) (result i32) + (local $leftLength i32) + local.get $left + local.get $right i32.eq if i32.const 1 return end - local.get $0 + local.get $left i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $1 + local.get $right i32.const 0 i32.eq end @@ -2747,49 +2747,49 @@ i32.const 0 return end - local.get $0 + local.get $left call $~lib/string/String#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $leftLength + local.get $leftLength + local.get $right call $~lib/string/String#get:length i32.ne if i32.const 0 return end - local.get $0 + local.get $left i32.const 0 - local.get $1 + local.get $right i32.const 0 - local.get $2 + local.get $leftLength call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/uri/encodeURI (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/uri/encodeURI (param $str i32) (result i32) + local.get $str + local.get $str call $~lib/string/String#get:length global.get $~lib/util/uri/URI_UNSAFE call $~lib/util/uri/encode ) - (func $~lib/util/uri/loadHex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - local.get $1 + (func $~lib/util/uri/loadHex (param $src i32) (param $offset i32) (result i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + local.get $src + local.get $offset i32.add i32.load16_u - local.set $2 - local.get $0 - local.get $1 + local.set $var$2 + local.get $src + local.get $offset i32.add i32.load16_u offset=2 - local.set $3 - local.get $2 - local.set $4 - local.get $4 + local.set $var$3 + local.get $var$2 + local.set $var$4 + local.get $var$4 i32.const 48 i32.sub i32.const 10 @@ -2797,7 +2797,7 @@ if (result i32) i32.const 1 else - local.get $4 + local.get $var$4 i32.const 32 i32.or i32.const 97 @@ -2806,9 +2806,9 @@ i32.lt_u end if (result i32) - local.get $3 - local.set $4 - local.get $4 + local.get $var$3 + local.set $var$4 + local.get $var$4 i32.const 48 i32.sub i32.const 10 @@ -2816,7 +2816,7 @@ if (result i32) i32.const 1 else - local.get $4 + local.get $var$4 i32.const 32 i32.or i32.const 97 @@ -2828,9 +2828,9 @@ i32.const 0 end if (result i32) - local.get $2 - local.set $4 - local.get $4 + local.get $var$2 + local.set $var$4 + local.get $var$4 i32.const 32 i32.or i32.const 39 @@ -2839,9 +2839,9 @@ i32.sub i32.const 4 i32.shl - local.get $3 - local.set $4 - local.get $4 + local.get $var$3 + local.set $var$4 + local.get $var$4 i32.const 32 i32.or i32.const 39 @@ -2853,127 +2853,127 @@ i32.const -1 end ) - (func $~lib/util/uri/decode (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 $11 i32) - (local $12 i32) - (local $13 i32) - local.get $1 + (func $~lib/util/uri/decode (param $src i32) (param $len i32) (param $component i32) (result i32) + (local $i i32) + (local $offset i32) + (local $ch i32) + (local $dst i32) + (local $var$7 i32) + (local $org i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $c1 i32) + (local $var$13 i32) + local.get $len i32.eqz if - local.get $0 + local.get $src return end i32.const 0 - local.set $3 + local.set $i i32.const 0 - local.set $4 + local.set $offset i32.const 0 - local.set $5 - local.get $1 + local.set $ch + local.get $len i32.const 1 i32.shl i32.const 1 call $~lib/rt/itcms/__new - local.set $6 + local.set $dst block $while-break|0 loop $while-continue|0 - local.get $3 - local.get $1 + local.get $i + local.get $len i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $8 + local.get $i + local.set $org loop $while-continue|1 - local.get $3 - local.get $1 + local.get $i + local.get $len i32.lt_u if (result i32) - local.get $0 - local.get $3 + local.get $src + local.get $i i32.const 1 i32.shl i32.add i32.load16_u - local.tee $5 + local.tee $ch i32.const 37 i32.ne else i32.const 0 end - local.set $9 - local.get $9 + local.set $var$9 + local.get $var$9 if - local.get $3 + local.get $i i32.const 1 i32.add - local.set $3 + local.set $i br $while-continue|1 end end - local.get $3 - local.get $8 + local.get $i + local.get $org i32.gt_u if - local.get $3 - local.get $8 + local.get $i + local.get $org i32.sub i32.const 1 i32.shl - local.set $9 - local.get $6 - local.get $4 + local.set $var$9 + local.get $dst + local.get $offset i32.add - local.get $0 - local.get $8 + local.get $src + local.get $org i32.const 1 i32.shl i32.add - local.get $9 + local.get $var$9 memory.copy - local.get $4 - local.get $9 + local.get $offset + local.get $var$9 i32.add - local.set $4 - local.get $3 - local.get $1 + local.set $offset + local.get $i + local.get $len i32.ge_u if br $while-break|0 end end - local.get $3 + local.get $i i32.const 2 i32.add - local.get $1 + local.get $len i32.ge_u if (result i32) i32.const 1 else - local.get $5 + local.get $ch i32.const 37 i32.ne end if (result i32) i32.const 1 else - local.get $0 - local.get $3 + local.get $src + local.get $i i32.const 1 i32.add i32.const 1 i32.shl call $~lib/util/uri/loadHex - local.tee $5 + local.tee $ch i32.const -1 i32.eq end @@ -2985,27 +2985,27 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $i i32.const 3 i32.add - local.set $3 - local.get $5 + local.set $i + local.get $ch i32.const 128 i32.lt_u if - local.get $2 + local.get $component i32.eqz if (result i32) - local.get $5 - local.set $9 - local.get $9 + local.get $ch + local.set $var$9 + local.get $var$9 i32.const 35 i32.sub i32.const 30 i32.lt_u if (result i32) global.get $~lib/util/uri/URI_RESERVED - local.get $9 + local.get $var$9 i32.const 35 i32.sub i32.add @@ -3018,22 +3018,22 @@ end if i32.const 37 - local.set $5 - local.get $3 + local.set $ch + local.get $i i32.const 2 i32.sub - local.set $3 + local.set $i end else - local.get $5 - local.set $9 - local.get $9 + local.get $ch + local.set $var$9 + local.get $var$9 i32.const 192 i32.sub i32.const 56 i32.lt_u if (result i32) - local.get $9 + local.get $var$9 i32.const 24 i32.shl i32.const -1 @@ -3042,22 +3042,22 @@ else i32.const 0 end - local.set $9 + local.set $var$9 i32.const 1 i32.const 17 - local.get $9 + local.get $var$9 i32.mul i32.const 2 i32.shr_u i32.const 1 i32.sub i32.shl - local.set $10 - local.get $5 - local.get $9 + local.set $var$10 + local.get $ch + local.get $var$9 if (result i32) i32.const 128 - local.get $9 + local.get $var$9 i32.shr_u i32.const 1 i32.sub @@ -3065,28 +3065,28 @@ i32.const 0 end i32.and - local.set $5 + local.set $ch block $while-break|2 loop $while-continue|2 - local.get $9 + local.get $var$9 i32.const 1 i32.sub - local.tee $9 + local.tee $var$9 i32.const 0 i32.ne - local.set $11 - local.get $11 + local.set $var$11 + local.get $var$11 if - local.get $3 + local.get $i i32.const 2 i32.add - local.get $1 + local.get $len i32.ge_u if (result i32) i32.const 1 else - local.get $0 - local.get $3 + local.get $src + local.get $i i32.const 1 i32.shl i32.add @@ -3097,14 +3097,14 @@ if (result i32) i32.const 1 else - local.get $0 - local.get $3 + local.get $src + local.get $i i32.const 1 i32.add i32.const 1 i32.shl call $~lib/util/uri/loadHex - local.tee $12 + local.tee $c1 i32.const -1 i32.eq end @@ -3116,57 +3116,57 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $i i32.const 3 i32.add - local.set $3 - local.get $12 + local.set $i + local.get $c1 i32.const 192 i32.and i32.const 128 i32.ne if i32.const 0 - local.set $5 + local.set $ch br $while-break|2 end - local.get $5 + local.get $ch i32.const 6 i32.shl - local.get $12 + local.get $c1 i32.const 63 i32.and i32.or - local.set $5 + local.set $ch br $while-continue|2 end end end - local.get $5 - local.get $10 + local.get $ch + local.get $var$10 i32.lt_u if (result i32) i32.const 1 else - local.get $10 + local.get $var$10 i32.const -1 i32.eq end if (result i32) i32.const 1 else - local.get $5 + local.get $ch i32.const 1114111 i32.gt_u end if (result i32) i32.const 1 else - local.get $5 + local.get $ch i32.const 55296 i32.ge_u if (result i32) - local.get $5 + local.get $ch i32.const 57344 i32.lt_u else @@ -3181,57 +3181,57 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $ch i32.const 65536 i32.ge_u if - local.get $5 + local.get $ch i32.const 65536 i32.sub - local.set $5 - local.get $5 + local.set $ch + local.get $ch i32.const 10 i32.shr_u i32.const 55296 i32.or - local.set $11 - local.get $5 + local.set $var$11 + local.get $ch i32.const 1023 i32.and i32.const 56320 i32.or - local.set $13 - local.get $6 - local.get $4 + local.set $var$13 + local.get $dst + local.get $offset i32.add - local.get $11 - local.get $13 + local.get $var$11 + local.get $var$13 i32.const 16 i32.shl i32.or i32.store - local.get $4 + local.get $offset i32.const 4 i32.add - local.set $4 + local.set $offset br $while-continue|0 end end - local.get $6 - local.get $4 + local.get $dst + local.get $offset i32.add - local.get $5 + local.get $ch i32.store16 - local.get $4 + local.get $offset i32.const 2 i32.add - local.set $4 + local.set $offset br $while-continue|0 end end end - local.get $4 - local.get $1 + local.get $offset + local.get $len i32.const 1 i32.shl i32.le_u @@ -3244,35 +3244,35 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $len i32.const 1 i32.shl - local.get $4 + local.get $offset i32.gt_u if - local.get $6 - local.get $4 + local.get $dst + local.get $offset call $~lib/rt/itcms/__renew - local.set $6 + local.set $dst end - local.get $6 + local.get $dst ) - (func $~lib/uri/decodeURIComponent (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/uri/decodeURIComponent (param $str i32) (result i32) + local.get $str + local.get $str call $~lib/string/String#get:length i32.const 1 call $~lib/util/uri/decode ) - (func $~lib/uri/decodeURI (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/uri/decodeURI (param $str i32) (result i32) + local.get $str + local.get $str call $~lib/string/String#get:length i32.const 0 call $~lib/util/uri/decode ) (func $~lib/rt/itcms/__collect - (local $0 i32) + (local $var$0 i32) i32.const 0 drop global.get $~lib/rt/itcms/state @@ -3283,8 +3283,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -3298,8 +3298,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop diff --git a/tests/compiler/super-inline.debug.wat b/tests/compiler/super-inline.debug.wat index 918b58d1ec..5e1d6800a6 100644 --- a/tests/compiler/super-inline.debug.wat +++ b/tests/compiler/super-inline.debug.wat @@ -53,50 +53,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -109,58 +109,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -177,12 +177,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -192,19 +192,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -215,27 +215,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -243,35 +243,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -281,15 +281,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -299,25 +299,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -325,33 +325,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -379,23 +379,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -407,15 +407,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -427,33 +427,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -461,21 +461,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -490,36 +490,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -527,67 +527,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -597,22 +597,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -622,12 +622,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -639,75 +639,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -719,38 +719,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -764,12 +764,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -780,38 +780,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -819,21 +819,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -848,101 +848,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -953,7 +953,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -964,26 +964,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -996,27 +996,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1030,11 +1030,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1045,66 +1045,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1114,10 +1114,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1128,13 +1128,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1145,109 +1145,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1255,7 +1255,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1272,23 +1272,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1300,54 +1300,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1368,30 +1368,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1401,9 +1401,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1413,8 +1413,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1422,43 +1422,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1470,17 +1470,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1494,7 +1494,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1512,7 +1512,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1522,12 +1522,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1549,7 +1549,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1569,14 +1569,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1589,8 +1589,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1601,37 +1601,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1639,16 +1639,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1656,21 +1656,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1685,12 +1685,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1698,49 +1698,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1750,90 +1750,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -1842,22 +1842,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -1866,27 +1866,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1901,69 +1901,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -1978,29 +1978,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2013,13 +2013,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2030,25 +2030,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2063,10 +2063,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2084,44 +2084,44 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $super-inline/Foo#a (param $0 i32) (result i32) + (func $super-inline/Foo#a (param $this i32) (result i32) i32.const 1 ) - (func $super-inline/Bar#a (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 + (func $super-inline/Bar#a (param $this i32) (result i32) + (local $var$1 i32) + local.get $this + local.set $var$1 i32.const 1 ) (func $super-inline/Foo#a@virtual (param $0 i32) (result i32) diff --git a/tests/compiler/switch.debug.wat b/tests/compiler/switch.debug.wat index 261cfff50d..acd89d07ec 100644 --- a/tests/compiler/switch.debug.wat +++ b/tests/compiler/switch.debug.wat @@ -12,28 +12,28 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (start $~start) - (func $switch/doSwitch (param $0 i32) (result i32) - (local $1 i32) + (func $switch/doSwitch (param $n i32) (result i32) + (local $var$1 i32) block $case4|0 block $case3|0 block $case2|0 block $case1|0 block $case0|0 - local.get $0 - local.set $1 - local.get $1 + local.get $n + local.set $var$1 + local.get $var$1 i32.const 1 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 0 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case3|0 - local.get $1 + local.get $var$1 i32.const 3 i32.eq br_if $case4|0 @@ -50,23 +50,23 @@ i32.const 23 return ) - (func $switch/doSwitchDefaultOmitted (param $0 i32) (result i32) - (local $1 i32) + (func $switch/doSwitchDefaultOmitted (param $n i32) (result i32) + (local $var$1 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 - local.get $0 - local.set $1 - local.get $1 + local.get $n + local.set $var$1 + local.get $var$1 i32.const 1 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 3 i32.eq br_if $case2|0 @@ -81,14 +81,14 @@ end i32.const 0 ) - (func $switch/doSwitchBreakCase (param $0 i32) (result i32) - (local $1 i32) + (func $switch/doSwitchBreakCase (param $n i32) (result i32) + (local $var$1 i32) block $break|0 block $case1|0 block $case0|0 - local.get $0 - local.set $1 - local.get $1 + local.get $n + local.set $var$1 + local.get $var$1 i32.const 1 i32.eq br_if $case0|0 @@ -101,14 +101,14 @@ end i32.const 1 ) - (func $switch/doSwitchBreakDefault (param $0 i32) (result i32) - (local $1 i32) + (func $switch/doSwitchBreakDefault (param $n i32) (result i32) + (local $var$1 i32) block $break|0 block $case1|0 block $case0|0 - local.get $0 - local.set $1 - local.get $1 + local.get $n + local.set $var$1 + local.get $var$1 i32.const 1 i32.eq br_if $case0|0 @@ -121,13 +121,13 @@ end i32.const 2 ) - (func $switch/doSwitchFallThroughCase (param $0 i32) (result i32) - (local $1 i32) + (func $switch/doSwitchFallThroughCase (param $n i32) (result i32) + (local $var$1 i32) block $case1|0 block $case0|0 - local.get $0 - local.set $1 - local.get $1 + local.get $n + local.set $var$1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 @@ -138,13 +138,13 @@ end i32.const 1 ) - (func $switch/doSwitchFallThroughDefault (param $0 i32) (result i32) - (local $1 i32) + (func $switch/doSwitchFallThroughDefault (param $n i32) (result i32) + (local $var$1 i32) block $case1|0 block $case0|0 - local.get $0 - local.set $1 - local.get $1 + local.get $n + local.set $var$1 + local.get $var$1 i32.const 1 i32.eq br_if $case0|0 @@ -155,8 +155,8 @@ end i32.const 2 ) - (func $switch/doSwitchEmpty (param $0 i32) (result i32) - local.get $0 + (func $switch/doSwitchEmpty (param $n i32) (result i32) + local.get $n drop i32.const 2 ) diff --git a/tests/compiler/tablebase.debug.wat b/tests/compiler/tablebase.debug.wat index 5760d1f550..d1e7c4d0b3 100644 --- a/tests/compiler/tablebase.debug.wat +++ b/tests/compiler/tablebase.debug.wat @@ -18,8 +18,8 @@ (func $tablebase/foo nop ) - (func $~lib/function/Function<%28%29=>void>#get:index (param $0 i32) (result i32) - local.get $0 + (func $~lib/function/Function<%28%29=>void>#get:index (param $this i32) (result i32) + local.get $this i32.load ) (func $~start diff --git a/tests/compiler/templateliteral.debug.wat b/tests/compiler/templateliteral.debug.wat index 9224b7fc23..974183c262 100644 --- a/tests/compiler/templateliteral.debug.wat +++ b/tests/compiler/templateliteral.debug.wat @@ -106,44 +106,44 @@ (elem $0 (i32.const 1)) (export "memory" (memory $0)) (export "_start" (func $~start)) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.get $1 + (func $~lib/util/string/compareImpl (param $str1 i32) (param $index1 i32) (param $str2 i32) (param $index2 i32) (param $len i32) (result i32) + (local $ptr1 i32) + (local $ptr2 i32) + (local $var$7 i32) + (local $a i32) + (local $b i32) + local.get $str1 + local.get $index1 i32.const 1 i32.shl i32.add - local.set $5 - local.get $2 - local.get $3 + local.set $ptr1 + local.get $str2 + local.get $index2 i32.const 1 i32.shl i32.add - local.set $6 + local.set $ptr2 i32.const 0 i32.const 2 i32.lt_s drop - local.get $4 + local.get $len i32.const 4 i32.ge_u if (result i32) - local.get $5 + local.get $ptr1 i32.const 7 i32.and - local.get $6 + local.get $ptr2 i32.const 7 i32.and i32.or @@ -154,27 +154,27 @@ if block $do-break|0 loop $do-loop|0 - local.get $5 + local.get $ptr1 i64.load - local.get $6 + local.get $ptr2 i64.load i64.ne if br $do-break|0 end - local.get $5 + local.get $ptr1 i32.const 8 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 8 i32.add - local.set $6 - local.get $4 + local.set $ptr2 + local.get $len i32.const 4 i32.sub - local.set $4 - local.get $4 + local.set $len + local.get $len i32.const 4 i32.ge_u br_if $do-loop|0 @@ -182,59 +182,59 @@ end end loop $while-continue|1 - local.get $4 - local.tee $7 + local.get $len + local.tee $var$7 i32.const 1 i32.sub - local.set $4 - local.get $7 - local.set $7 - local.get $7 + local.set $len + local.get $var$7 + local.set $var$7 + local.get $var$7 if - local.get $5 + local.get $ptr1 i32.load16_u - local.set $8 - local.get $6 + local.set $a + local.get $ptr2 i32.load16_u - local.set $9 - local.get $8 - local.get $9 + local.set $b + local.get $a + local.get $b i32.ne if - local.get $8 - local.get $9 + local.get $a + local.get $b i32.sub return end - local.get $5 + local.get $ptr1 i32.const 2 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 2 i32.add - local.set $6 + local.set $ptr2 br $while-continue|1 end end i32.const 0 ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__eq (param $left i32) (param $right i32) (result i32) + (local $leftLength i32) + local.get $left + local.get $right i32.eq if i32.const 1 return end - local.get $0 + local.get $left i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $1 + local.get $right i32.const 0 i32.eq end @@ -242,22 +242,22 @@ i32.const 0 return end - local.get $0 + local.get $left call $~lib/string/String#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $leftLength + local.get $leftLength + local.get $right call $~lib/string/String#get:length i32.ne if i32.const 0 return end - local.get $0 + local.get $left i32.const 0 - local.get $1 + local.get $right i32.const 0 - local.get $2 + local.get $leftLength call $~lib/util/string/compareImpl i32.eqz ) @@ -271,50 +271,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -327,58 +327,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -395,12 +395,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -410,19 +410,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -433,27 +433,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -461,35 +461,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -499,15 +499,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -517,25 +517,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -543,33 +543,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -597,23 +597,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -625,15 +625,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -645,33 +645,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -679,21 +679,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -708,36 +708,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -745,67 +745,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -815,22 +815,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -840,12 +840,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -857,75 +857,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -937,38 +937,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -982,12 +982,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -998,38 +998,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1037,21 +1037,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -1066,101 +1066,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -1171,7 +1171,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1182,26 +1182,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1214,27 +1214,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1248,11 +1248,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1263,66 +1263,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1332,10 +1332,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1346,13 +1346,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1363,109 +1363,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1473,7 +1473,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1490,23 +1490,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1518,54 +1518,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1586,30 +1586,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1619,9 +1619,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1631,8 +1631,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1640,43 +1640,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1688,17 +1688,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1712,7 +1712,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1730,7 +1730,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1740,12 +1740,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1767,7 +1767,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1787,14 +1787,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1807,8 +1807,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1819,37 +1819,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1857,16 +1857,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1874,21 +1874,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1903,12 +1903,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1916,49 +1916,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1968,90 +1968,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -2060,22 +2060,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -2084,27 +2084,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -2119,69 +2119,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2196,29 +2196,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2231,13 +2231,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2248,25 +2248,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2281,10 +2281,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2302,49 +2302,49 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) - (func $~lib/rt/itcms/__link (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/itcms/__link (param $parentPtr i32) (param $childPtr i32) (param $expectMultiple i32) + (local $child i32) + (local $var$4 i32) + (local $var$5 i32) + local.get $childPtr i32.eqz if return end i32.const 1 drop - local.get $0 + local.get $parentPtr i32.eqz if i32.const 0 @@ -2354,37 +2354,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $childPtr i32.const 20 i32.sub - local.set $3 - local.get $3 + local.set $child + local.get $child call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $0 + local.get $parentPtr i32.const 20 i32.sub - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 call $~lib/rt/itcms/Object#get:color - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 global.get $~lib/rt/itcms/white i32.eqz i32.eq if - local.get $2 + local.get $expectMultiple if - local.get $4 + local.get $var$4 call $~lib/rt/itcms/Object#makeGray else - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end else - local.get $5 + local.get $var$5 i32.const 3 i32.eq if (result i32) @@ -2395,36 +2395,36 @@ i32.const 0 end if - local.get $3 + local.get $child call $~lib/rt/itcms/Object#makeGray end end end ) - (func $~lib/staticarray/StaticArray<~lib/string/String>#__uset (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 + (func $~lib/staticarray/StaticArray<~lib/string/String>#__uset (param $this i32) (param $index i32) (param $value i32) + local.get $this + local.get $index i32.const 2 i32.shl i32.add - local.get $2 + local.get $value i32.store i32.const 1 drop - local.get $0 - local.get $2 + local.get $this + local.get $value i32.const 1 call $~lib/rt/itcms/__link ) - (func $~lib/staticarray/StaticArray<~lib/string/String>#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/staticarray/StaticArray<~lib/string/String>#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 2 i32.shr_u ) - (func $~lib/staticarray/StaticArray<~lib/string/String>#join (param $0 i32) (param $1 i32) (result i32) + (func $~lib/staticarray/StaticArray<~lib/string/String>#join (param $this i32) (param $separator i32) (result i32) i32.const 0 drop i32.const 0 @@ -2437,35 +2437,35 @@ drop i32.const 1 drop - local.get $0 - local.get $0 + local.get $this + local.get $this call $~lib/staticarray/StaticArray<~lib/string/String>#get:length - local.get $1 + local.get $separator call $~lib/util/string/joinStringArray return ) - (func $~lib/util/number/decimalCount32 (param $0 i32) (result i32) - local.get $0 + (func $~lib/util/number/decimalCount32 (param $value i32) (result i32) + local.get $value i32.const 100000 i32.lt_u if - local.get $0 + local.get $value i32.const 100 i32.lt_u if i32.const 1 - local.get $0 + local.get $value i32.const 10 i32.ge_u i32.add return else i32.const 3 - local.get $0 + local.get $value i32.const 10000 i32.ge_u i32.add - local.get $0 + local.get $value i32.const 1000 i32.ge_u i32.add @@ -2473,23 +2473,23 @@ end unreachable else - local.get $0 + local.get $value i32.const 10000000 i32.lt_u if i32.const 6 - local.get $0 + local.get $value i32.const 1000000 i32.ge_u i32.add return else i32.const 8 - local.get $0 + local.get $value i32.const 1000000000 i32.ge_u i32.add - local.get $0 + local.get $value i32.const 100000000 i32.ge_u i32.add @@ -2499,66 +2499,66 @@ end unreachable ) - (func $~lib/util/number/utoa32_dec_lut (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 i64) - (local $9 i64) - (local $10 i32) - (local $11 i32) + (func $~lib/util/number/utoa32_dec_lut (param $buffer i32) (param $num i32) (param $offset i32) + (local $var$3 i32) + (local $t i32) + (local $r i32) + (local $d1 i32) + (local $d2 i32) + (local $digits1 i64) + (local $digits2 i64) + (local $var$10 i32) + (local $var$11 i32) loop $while-continue|0 - local.get $1 + local.get $num i32.const 10000 i32.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $1 + local.get $num i32.const 10000 i32.div_u - local.set $4 - local.get $1 + local.set $t + local.get $num i32.const 10000 i32.rem_u - local.set $5 - local.get $4 - local.set $1 - local.get $5 + local.set $r + local.get $t + local.set $num + local.get $r i32.const 100 i32.div_u - local.set $6 - local.get $5 + local.set $d1 + local.get $r i32.const 100 i32.rem_u - local.set $7 + local.set $d2 i32.const 1020 - local.get $6 + local.get $d1 i32.const 2 i32.shl i32.add i64.load32_u - local.set $8 + local.set $digits1 i32.const 1020 - local.get $7 + local.get $d2 i32.const 2 i32.shl i32.add i64.load32_u - local.set $9 - local.get $2 + local.set $digits2 + local.get $offset i32.const 4 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $8 - local.get $9 + local.get $digits1 + local.get $digits2 i64.const 32 i64.shl i64.or @@ -2566,99 +2566,99 @@ br $while-continue|0 end end - local.get $1 + local.get $num i32.const 100 i32.ge_u if - local.get $1 + local.get $num i32.const 100 i32.div_u - local.set $3 - local.get $1 + local.set $var$3 + local.get $num i32.const 100 i32.rem_u - local.set $10 - local.get $3 - local.set $1 - local.get $2 + local.set $var$10 + local.get $var$3 + local.set $num + local.get $offset i32.const 2 i32.sub - local.set $2 + local.set $offset i32.const 1020 - local.get $10 + local.get $var$10 i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store end - local.get $1 + local.get $num i32.const 10 i32.ge_u if - local.get $2 + local.get $offset i32.const 2 i32.sub - local.set $2 + local.set $offset i32.const 1020 - local.get $1 + local.get $num i32.const 2 i32.shl i32.add i32.load - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store else - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 + local.set $offset i32.const 48 - local.get $1 + local.get $num i32.add - local.set $11 - local.get $0 - local.get $2 + local.set $var$11 + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add - local.get $11 + local.get $var$11 i32.store16 end ) - (func $~lib/util/number/utoa_hex_lut (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i32) + (func $~lib/util/number/utoa_hex_lut (param $buffer i32) (param $num i64) (param $offset i32) + (local $var$3 i32) loop $while-continue|0 - local.get $2 + local.get $offset i32.const 2 i32.ge_u - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if - local.get $2 + local.get $offset i32.const 2 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 1440 - local.get $1 + local.get $num i32.wrap_i64 i32.const 255 i32.and @@ -2667,20 +2667,20 @@ i32.add i32.load i32.store - local.get $1 + local.get $num i64.const 8 i64.shr_u - local.set $1 + local.set $num br $while-continue|0 end end - local.get $2 + local.get $offset i32.const 1 i32.and if - local.get $0 + local.get $buffer i32.const 1440 - local.get $1 + local.get $num i32.wrap_i64 i32.const 6 i32.shl @@ -2689,25 +2689,25 @@ i32.store16 end ) - (func $~lib/util/number/ulog_base (param $0 i64) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i64) - (local $4 i64) - (local $5 i32) - local.get $1 - local.set $2 - local.get $2 + (func $~lib/util/number/ulog_base (param $num i64) (param $base i32) (result i32) + (local $var$2 i32) + (local $b64 i64) + (local $b i64) + (local $e i32) + local.get $base + local.set $var$2 + local.get $var$2 i32.popcnt i32.const 1 i32.eq if i32.const 63 - local.get $0 + local.get $num i64.clz i32.wrap_i64 i32.sub i32.const 31 - local.get $1 + local.get $base i32.clz i32.sub i32.div_u @@ -2715,95 +2715,95 @@ i32.add return end - local.get $1 + local.get $base i64.extend_i32_s - local.set $3 - local.get $3 - local.set $4 + local.set $b64 + local.get $b64 + local.set $b i32.const 1 - local.set $5 + local.set $e loop $while-continue|0 - local.get $0 - local.get $4 + local.get $num + local.get $b i64.ge_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 - local.get $4 + local.get $num + local.get $b i64.div_u - local.set $0 - local.get $4 - local.get $4 + local.set $num + local.get $b + local.get $b i64.mul - local.set $4 - local.get $5 + local.set $b + local.get $e i32.const 1 i32.shl - local.set $5 + local.set $e br $while-continue|0 end end loop $while-continue|1 - local.get $0 + local.get $num i64.const 1 i64.ge_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 - local.get $3 + local.get $num + local.get $b64 i64.div_u - local.set $0 - local.get $5 + local.set $num + local.get $e i32.const 1 i32.add - local.set $5 + local.set $e br $while-continue|1 end end - local.get $5 + local.get $e i32.const 1 i32.sub ) - (func $~lib/util/number/utoa64_any_core (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i32) - (local $4 i64) - (local $5 i64) - (local $6 i64) - local.get $3 + (func $~lib/util/number/utoa64_any_core (param $buffer i32) (param $num i64) (param $offset i32) (param $radix i32) + (local $base i64) + (local $var$5 i64) + (local $q i64) + local.get $radix i64.extend_i32_s - local.set $4 - local.get $3 - local.get $3 + local.set $base + local.get $radix + local.get $radix i32.const 1 i32.sub i32.and i32.const 0 i32.eq if - local.get $3 + local.get $radix i32.ctz i32.const 7 i32.and i64.extend_i32_s - local.set $5 - local.get $4 + local.set $var$5 + local.get $base i64.const 1 i64.sub - local.set $6 + local.set $q loop $do-loop|0 - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 - local.get $0 - local.get $2 + local.set $offset + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 2496 - local.get $1 - local.get $6 + local.get $num + local.get $q i64.and i32.wrap_i64 i32.const 1 @@ -2811,34 +2811,34 @@ i32.add i32.load16_u i32.store16 - local.get $1 - local.get $5 + local.get $num + local.get $var$5 i64.shr_u - local.set $1 - local.get $1 + local.set $num + local.get $num i64.const 0 i64.ne br_if $do-loop|0 end else loop $do-loop|1 - local.get $2 + local.get $offset i32.const 1 i32.sub - local.set $2 - local.get $1 - local.get $4 + local.set $offset + local.get $num + local.get $base i64.div_u - local.set $6 - local.get $0 - local.get $2 + local.set $q + local.get $buffer + local.get $offset i32.const 1 i32.shl i32.add i32.const 2496 - local.get $1 - local.get $6 - local.get $4 + local.get $num + local.get $q + local.get $base i64.mul i64.sub i32.wrap_i64 @@ -2847,80 +2847,80 @@ i32.add i32.load16_u i32.store16 - local.get $6 - local.set $1 - local.get $1 + local.get $q + local.set $num + local.get $num i64.const 0 i64.ne br_if $do-loop|1 end end ) - (func $~lib/number/I32#toString (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/number/I32#toString (param $this i32) (param $radix i32) (result i32) + local.get $this + local.get $radix call $~lib/util/number/itoa32 ) - (func $~lib/util/number/genDigits (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i64) - (local $11 i32) - (local $12 i64) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i32) - (local $24 i32) - (local $25 i32) - (local $26 i32) - (local $27 i64) + (func $~lib/util/number/genDigits (param $buffer i32) (param $w_frc i64) (param $w_exp i32) (param $mp_frc i64) (param $mp_exp i32) (param $delta i64) (param $sign i32) (result i32) + (local $one_exp i32) + (local $one_frc i64) + (local $mask i64) + (local $wp_w_frc i64) + (local $p1 i32) + (local $p2 i64) + (local $kappa i32) + (local $len i32) + (local $var$15 i32) + (local $d i32) + (local $var$17 i32) + (local $tmp i64) + (local $var$19 i64) + (local $var$20 i64) + (local $var$21 i64) + (local $d_0 i64) + (local $var$23 i32) + (local $var$24 i32) + (local $var$25 i32) + (local $var$26 i32) + (local $var$27 i64) i32.const 0 - local.get $4 + local.get $mp_exp i32.sub - local.set $7 + local.set $one_exp i64.const 1 - local.get $7 + local.get $one_exp i64.extend_i32_s i64.shl - local.set $8 - local.get $8 + local.set $one_frc + local.get $one_frc i64.const 1 i64.sub - local.set $9 - local.get $3 - local.get $1 + local.set $mask + local.get $mp_frc + local.get $w_frc i64.sub - local.set $10 - local.get $3 - local.get $7 + local.set $wp_w_frc + local.get $mp_frc + local.get $one_exp i64.extend_i32_s i64.shr_u i32.wrap_i64 - local.set $11 - local.get $3 - local.get $9 + local.set $p1 + local.get $mp_frc + local.get $mask i64.and - local.set $12 - local.get $11 + local.set $p2 + local.get $p1 call $~lib/util/number/decimalCount32 - local.set $13 - local.get $6 - local.set $14 + local.set $kappa + local.get $sign + local.set $len loop $while-continue|0 - local.get $13 + local.get $kappa i32.const 0 i32.gt_s - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 if block $break|1 block $case10|1 @@ -2934,275 +2934,275 @@ block $case2|1 block $case1|1 block $case0|1 - local.get $13 - local.set $17 - local.get $17 + local.get $kappa + local.set $var$17 + local.get $var$17 i32.const 10 i32.eq br_if $case0|1 - local.get $17 + local.get $var$17 i32.const 9 i32.eq br_if $case1|1 - local.get $17 + local.get $var$17 i32.const 8 i32.eq br_if $case2|1 - local.get $17 + local.get $var$17 i32.const 7 i32.eq br_if $case3|1 - local.get $17 + local.get $var$17 i32.const 6 i32.eq br_if $case4|1 - local.get $17 + local.get $var$17 i32.const 5 i32.eq br_if $case5|1 - local.get $17 + local.get $var$17 i32.const 4 i32.eq br_if $case6|1 - local.get $17 + local.get $var$17 i32.const 3 i32.eq br_if $case7|1 - local.get $17 + local.get $var$17 i32.const 2 i32.eq br_if $case8|1 - local.get $17 + local.get $var$17 i32.const 1 i32.eq br_if $case9|1 br $case10|1 end - local.get $11 + local.get $p1 i32.const 1000000000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 1000000000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 100000000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 100000000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 10000000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 10000000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 1000000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 1000000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 100000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 100000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 10000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 10000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 1000 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 1000 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 100 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 100 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 + local.get $p1 i32.const 10 i32.div_u - local.set $16 - local.get $11 + local.set $d + local.get $p1 i32.const 10 i32.rem_u - local.set $11 + local.set $p1 br $break|1 end - local.get $11 - local.set $16 + local.get $p1 + local.set $d i32.const 0 - local.set $11 + local.set $p1 br $break|1 end i32.const 0 - local.set $16 + local.set $d br $break|1 end - local.get $16 - local.get $14 + local.get $d + local.get $len i32.or if - local.get $0 - local.get $14 - local.tee $17 + local.get $buffer + local.get $len + local.tee $var$17 i32.const 1 i32.add - local.set $14 - local.get $17 + local.set $len + local.get $var$17 i32.const 1 i32.shl i32.add i32.const 48 - local.get $16 + local.get $d i32.const 65535 i32.and i32.add i32.store16 end - local.get $13 + local.get $kappa i32.const 1 i32.sub - local.set $13 - local.get $11 + local.set $kappa + local.get $p1 i64.extend_i32_u - local.get $7 + local.get $one_exp i64.extend_i32_s i64.shl - local.get $12 + local.get $p2 i64.add - local.set $18 - local.get $18 - local.get $5 + local.set $tmp + local.get $tmp + local.get $delta i64.le_u if global.get $~lib/util/number/_K - local.get $13 + local.get $kappa i32.add global.set $~lib/util/number/_K - local.get $0 - local.set $23 - local.get $14 - local.set $17 - local.get $5 - local.set $22 - local.get $18 - local.set $21 + local.get $buffer + local.set $var$23 + local.get $len + local.set $var$17 + local.get $delta + local.set $d_0 + local.get $tmp + local.set $var$21 i32.const 3824 - local.get $13 + local.get $kappa i32.const 2 i32.shl i32.add i64.load32_u - local.get $7 + local.get $one_exp i64.extend_i32_s i64.shl - local.set $20 - local.get $10 - local.set $19 - local.get $23 - local.get $17 + local.set $var$20 + local.get $wp_w_frc + local.set $var$19 + local.get $var$23 + local.get $var$17 i32.const 1 i32.sub i32.const 1 i32.shl i32.add - local.set $24 - local.get $24 + local.set $var$24 + local.get $var$24 i32.load16_u - local.set $25 + local.set $var$25 loop $while-continue|3 - local.get $21 - local.get $19 + local.get $var$21 + local.get $var$19 i64.lt_u if (result i32) - local.get $22 - local.get $21 + local.get $d_0 + local.get $var$21 i64.sub - local.get $20 + local.get $var$20 i64.ge_u else i32.const 0 end if (result i32) - local.get $21 - local.get $20 + local.get $var$21 + local.get $var$20 i64.add - local.get $19 + local.get $var$19 i64.lt_u if (result i32) i32.const 1 else - local.get $19 - local.get $21 + local.get $var$19 + local.get $var$21 i64.sub - local.get $21 - local.get $20 + local.get $var$21 + local.get $var$20 i64.add - local.get $19 + local.get $var$19 i64.sub i64.gt_u end else i32.const 0 end - local.set $26 - local.get $26 + local.set $var$26 + local.get $var$26 if - local.get $25 + local.get $var$25 i32.const 1 i32.sub - local.set $25 - local.get $21 - local.get $20 + local.set $var$25 + local.get $var$21 + local.get $var$20 i64.add - local.set $21 + local.set $var$21 br $while-continue|3 end end - local.get $24 - local.get $25 + local.get $var$24 + local.get $var$25 i32.store16 - local.get $14 + local.get $len return end br $while-continue|0 @@ -3210,150 +3210,150 @@ end loop $while-continue|4 i32.const 1 - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 if - local.get $12 + local.get $p2 i64.const 10 i64.mul - local.set $12 - local.get $5 + local.set $p2 + local.get $delta i64.const 10 i64.mul - local.set $5 - local.get $12 - local.get $7 + local.set $delta + local.get $p2 + local.get $one_exp i64.extend_i32_s i64.shr_u - local.set $22 - local.get $22 - local.get $14 + local.set $d_0 + local.get $d_0 + local.get $len i64.extend_i32_s i64.or i64.const 0 i64.ne if - local.get $0 - local.get $14 - local.tee $25 + local.get $buffer + local.get $len + local.tee $var$25 i32.const 1 i32.add - local.set $14 - local.get $25 + local.set $len + local.get $var$25 i32.const 1 i32.shl i32.add i32.const 48 - local.get $22 + local.get $d_0 i32.wrap_i64 i32.const 65535 i32.and i32.add i32.store16 end - local.get $12 - local.get $9 + local.get $p2 + local.get $mask i64.and - local.set $12 - local.get $13 + local.set $p2 + local.get $kappa i32.const 1 i32.sub - local.set $13 - local.get $12 - local.get $5 + local.set $kappa + local.get $p2 + local.get $delta i64.lt_u if global.get $~lib/util/number/_K - local.get $13 + local.get $kappa i32.add global.set $~lib/util/number/_K - local.get $10 + local.get $wp_w_frc i32.const 3824 i32.const 0 - local.get $13 + local.get $kappa i32.sub i32.const 2 i32.shl i32.add i64.load32_u i64.mul - local.set $10 - local.get $0 - local.set $17 - local.get $14 - local.set $26 - local.get $5 - local.set $27 - local.get $12 - local.set $21 - local.get $8 - local.set $20 - local.get $10 - local.set $19 - local.get $17 - local.get $26 + local.set $wp_w_frc + local.get $buffer + local.set $var$17 + local.get $len + local.set $var$26 + local.get $delta + local.set $var$27 + local.get $p2 + local.set $var$21 + local.get $one_frc + local.set $var$20 + local.get $wp_w_frc + local.set $var$19 + local.get $var$17 + local.get $var$26 i32.const 1 i32.sub i32.const 1 i32.shl i32.add - local.set $25 - local.get $25 + local.set $var$25 + local.get $var$25 i32.load16_u - local.set $24 + local.set $var$24 loop $while-continue|6 - local.get $21 - local.get $19 + local.get $var$21 + local.get $var$19 i64.lt_u if (result i32) - local.get $27 - local.get $21 + local.get $var$27 + local.get $var$21 i64.sub - local.get $20 + local.get $var$20 i64.ge_u else i32.const 0 end if (result i32) - local.get $21 - local.get $20 + local.get $var$21 + local.get $var$20 i64.add - local.get $19 + local.get $var$19 i64.lt_u if (result i32) i32.const 1 else - local.get $19 - local.get $21 + local.get $var$19 + local.get $var$21 i64.sub - local.get $21 - local.get $20 + local.get $var$21 + local.get $var$20 i64.add - local.get $19 + local.get $var$19 i64.sub i64.gt_u end else i32.const 0 end - local.set $23 - local.get $23 + local.set $var$23 + local.get $var$23 if - local.get $24 + local.get $var$24 i32.const 1 i32.sub - local.set $24 - local.get $21 - local.get $20 + local.set $var$24 + local.get $var$21 + local.get $var$20 i64.add - local.set $21 + local.set $var$21 br $while-continue|6 end end - local.get $25 - local.get $24 + local.get $var$25 + local.get $var$24 i32.store16 - local.get $14 + local.get $len return end br $while-continue|4 @@ -3361,21 +3361,21 @@ end unreachable ) - (func $~lib/util/number/prettify (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $2 + (func $~lib/util/number/prettify (param $buffer i32) (param $length i32) (param $k i32) (result i32) + (local $kk i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $k i32.eqz if - local.get $0 - local.get $1 + local.get $buffer + local.get $length i32.const 1 i32.shl i32.add @@ -3385,51 +3385,51 @@ i32.shl i32.or i32.store - local.get $1 + local.get $length i32.const 2 i32.add return end - local.get $1 - local.get $2 + local.get $length + local.get $k i32.add - local.set $3 - local.get $1 - local.get $3 + local.set $kk + local.get $length + local.get $kk i32.le_s if (result i32) - local.get $3 + local.get $kk i32.const 21 i32.le_s else i32.const 0 end if - local.get $1 - local.set $4 + local.get $length + local.set $var$4 loop $for-loop|0 - local.get $4 - local.get $3 + local.get $var$4 + local.get $kk i32.lt_s - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 if - local.get $0 - local.get $4 + local.get $buffer + local.get $var$4 i32.const 1 i32.shl i32.add i32.const 48 i32.store16 - local.get $4 + local.get $var$4 i32.const 1 i32.add - local.set $4 + local.set $var$4 br $for-loop|0 end end - local.get $0 - local.get $3 + local.get $buffer + local.get $kk i32.const 1 i32.shl i32.add @@ -3439,55 +3439,55 @@ i32.shl i32.or i32.store - local.get $3 + local.get $kk i32.const 2 i32.add return else - local.get $3 + local.get $kk i32.const 0 i32.gt_s if (result i32) - local.get $3 + local.get $kk i32.const 21 i32.le_s else i32.const 0 end if - local.get $0 - local.get $3 + local.get $buffer + local.get $kk i32.const 1 i32.shl i32.add - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 i32.const 2 i32.add - local.get $4 + local.get $var$4 i32.const 0 - local.get $2 + local.get $k i32.sub i32.const 1 i32.shl memory.copy - local.get $0 - local.get $3 + local.get $buffer + local.get $kk i32.const 1 i32.shl i32.add i32.const 46 i32.store16 - local.get $1 + local.get $length i32.const 1 i32.add return else i32.const -6 - local.get $3 + local.get $kk i32.lt_s if (result i32) - local.get $3 + local.get $kk i32.const 0 i32.le_s else @@ -3495,20 +3495,20 @@ end if i32.const 2 - local.get $3 + local.get $kk i32.sub - local.set $4 - local.get $0 - local.get $4 + local.set $var$4 + local.get $buffer + local.get $var$4 i32.const 1 i32.shl i32.add - local.get $0 - local.get $1 + local.get $buffer + local.get $length i32.const 1 i32.shl memory.copy - local.get $0 + local.get $buffer i32.const 48 i32.const 46 i32.const 16 @@ -3516,164 +3516,164 @@ i32.or i32.store i32.const 2 - local.set $5 + local.set $var$5 loop $for-loop|1 - local.get $5 - local.get $4 + local.get $var$5 + local.get $var$4 i32.lt_s - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 if - local.get $0 - local.get $5 + local.get $buffer + local.get $var$5 i32.const 1 i32.shl i32.add i32.const 48 i32.store16 - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|1 end end - local.get $1 - local.get $4 + local.get $length + local.get $var$4 i32.add return else - local.get $1 + local.get $length i32.const 1 i32.eq if - local.get $0 + local.get $buffer i32.const 101 i32.store16 offset=2 - local.get $0 + local.get $buffer i32.const 4 i32.add - local.set $5 - local.get $3 + local.set $var$5 + local.get $kk i32.const 1 i32.sub - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 i32.const 0 i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if i32.const 0 - local.get $6 + local.get $var$6 i32.sub - local.set $6 + local.set $var$6 end - local.get $6 + local.get $var$6 call $~lib/util/number/decimalCount32 i32.const 1 i32.add - local.set $7 - local.get $5 - local.set $10 - local.get $6 - local.set $9 - local.get $7 - local.set $8 + local.set $var$7 + local.get $var$5 + local.set $var$10 + local.get $var$6 + local.set $var$9 + local.get $var$7 + local.set $var$8 i32.const 0 i32.const 1 i32.ge_s drop - local.get $10 - local.get $9 - local.get $8 + local.get $var$10 + local.get $var$9 + local.get $var$8 call $~lib/util/number/utoa32_dec_lut - local.get $5 + local.get $var$5 i32.const 45 i32.const 43 - local.get $4 + local.get $var$4 select i32.store16 - local.get $7 - local.set $1 - local.get $1 + local.get $var$7 + local.set $length + local.get $length i32.const 2 i32.add return else - local.get $1 + local.get $length i32.const 1 i32.shl - local.set $7 - local.get $0 + local.set $var$7 + local.get $buffer i32.const 4 i32.add - local.get $0 + local.get $buffer i32.const 2 i32.add - local.get $7 + local.get $var$7 i32.const 2 i32.sub memory.copy - local.get $0 + local.get $buffer i32.const 46 i32.store16 offset=2 - local.get $0 - local.get $7 + local.get $buffer + local.get $var$7 i32.add i32.const 101 i32.store16 offset=2 - local.get $1 - local.get $0 - local.get $7 + local.get $length + local.get $buffer + local.get $var$7 i32.add i32.const 4 i32.add - local.set $9 - local.get $3 + local.set $var$9 + local.get $kk i32.const 1 i32.sub - local.set $8 - local.get $8 + local.set $var$8 + local.get $var$8 i32.const 0 i32.lt_s - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if i32.const 0 - local.get $8 + local.get $var$8 i32.sub - local.set $8 + local.set $var$8 end - local.get $8 + local.get $var$8 call $~lib/util/number/decimalCount32 i32.const 1 i32.add - local.set $5 - local.get $9 - local.set $11 - local.get $8 - local.set $6 - local.get $5 - local.set $10 + local.set $var$5 + local.get $var$9 + local.set $var$11 + local.get $var$8 + local.set $var$6 + local.get $var$5 + local.set $var$10 i32.const 0 i32.const 1 i32.ge_s drop - local.get $11 - local.get $6 - local.get $10 + local.get $var$11 + local.get $var$6 + local.get $var$10 call $~lib/util/number/utoa32_dec_lut - local.get $9 + local.get $var$9 i32.const 45 i32.const 43 - local.get $4 + local.get $var$4 select i32.store16 - local.get $5 + local.get $var$5 i32.add - local.set $1 - local.get $1 + local.set $length + local.get $length i32.const 2 i32.add return @@ -3686,434 +3686,434 @@ end unreachable ) - (func $~lib/util/number/dtoa_core (param $0 i32) (param $1 f64) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f64) - (local $6 i64) - (local $7 i32) - (local $8 i64) - (local $9 i64) - (local $10 i32) - (local $11 i64) - (local $12 i64) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 f64) - (local $17 i64) - (local $18 i64) - (local $19 i64) - (local $20 i64) - (local $21 i64) - (local $22 i64) - (local $23 i64) - (local $24 i64) - (local $25 i64) - (local $26 i32) - (local $27 i64) - (local $28 i32) - local.get $1 + (func $~lib/util/number/dtoa_core (param $buffer i32) (param $value f64) (result i32) + (local $sign i32) + (local $var$3 i32) + (local $var$4 i32) + (local $var$5 f64) + (local $var$6 i64) + (local $var$7 i32) + (local $var$8 i64) + (local $var$9 i64) + (local $var$10 i32) + (local $var$11 i64) + (local $var$12 i64) + (local $var$13 i32) + (local $var$14 i32) + (local $var$15 i32) + (local $var$16 f64) + (local $var$17 i64) + (local $var$18 i64) + (local $var$19 i64) + (local $var$20 i64) + (local $var$21 i64) + (local $var$22 i64) + (local $var$23 i64) + (local $var$24 i64) + (local $var$25 i64) + (local $var$26 i32) + (local $var$27 i64) + (local $len i32) + local.get $value f64.const 0 f64.lt - local.set $2 - local.get $2 + local.set $sign + local.get $sign if - local.get $1 + local.get $value f64.neg - local.set $1 - local.get $0 + local.set $value + local.get $buffer i32.const 45 i32.store16 end - local.get $1 - local.set $5 - local.get $0 - local.set $4 - local.get $2 - local.set $3 - local.get $5 + local.get $value + local.set $var$5 + local.get $buffer + local.set $var$4 + local.get $sign + local.set $var$3 + local.get $var$5 i64.reinterpret_f64 - local.set $6 - local.get $6 + local.set $var$6 + local.get $var$6 i64.const 9218868437227405312 i64.and i64.const 52 i64.shr_u i32.wrap_i64 - local.set $7 - local.get $6 + local.set $var$7 + local.get $var$6 i64.const 4503599627370495 i64.and - local.set $8 - local.get $7 + local.set $var$8 + local.get $var$7 i32.const 0 i32.ne i64.extend_i32_u i64.const 52 i64.shl - local.get $8 + local.get $var$8 i64.add - local.set $9 - local.get $7 + local.set $var$9 + local.get $var$7 i32.const 1 - local.get $7 + local.get $var$7 select i32.const 1023 i32.const 52 i32.add i32.sub - local.set $7 - local.get $9 - local.set $11 - local.get $7 - local.set $10 - local.get $11 + local.set $var$7 + local.get $var$9 + local.set $var$11 + local.get $var$7 + local.set $var$10 + local.get $var$11 i64.const 1 i64.shl i64.const 1 i64.add - local.set $12 - local.get $10 + local.set $var$12 + local.get $var$10 i32.const 1 i32.sub - local.set $13 - local.get $12 + local.set $var$13 + local.get $var$12 i64.clz i32.wrap_i64 - local.set $14 - local.get $12 - local.get $14 + local.set $var$14 + local.get $var$12 + local.get $var$14 i64.extend_i32_s i64.shl - local.set $12 - local.get $13 - local.get $14 + local.set $var$12 + local.get $var$13 + local.get $var$14 i32.sub - local.set $13 + local.set $var$13 i32.const 1 - local.get $11 + local.get $var$11 i64.const 4503599627370496 i64.eq i32.add - local.set $15 - local.get $12 + local.set $var$15 + local.get $var$12 global.set $~lib/util/number/_frc_plus - local.get $11 - local.get $15 + local.get $var$11 + local.get $var$15 i64.extend_i32_s i64.shl i64.const 1 i64.sub - local.get $10 - local.get $15 + local.get $var$10 + local.get $var$15 i32.sub - local.get $13 + local.get $var$13 i32.sub i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_minus - local.get $13 + local.get $var$13 global.set $~lib/util/number/_exp global.get $~lib/util/number/_exp - local.set $10 + local.set $var$10 i32.const -61 - local.get $10 + local.get $var$10 i32.sub f64.convert_i32_s f64.const 0.30102999566398114 f64.mul f64.const 347 f64.add - local.set $16 - local.get $16 + local.set $var$16 + local.get $var$16 i32.trunc_sat_f64_s - local.set $15 - local.get $15 - local.get $15 + local.set $var$15 + local.get $var$15 + local.get $var$15 f64.convert_i32_s - local.get $16 + local.get $var$16 f64.ne i32.add - local.set $15 - local.get $15 + local.set $var$15 + local.get $var$15 i32.const 3 i32.shr_s i32.const 1 i32.add - local.set $14 + local.set $var$14 i32.const 348 - local.get $14 + local.get $var$14 i32.const 3 i32.shl i32.sub global.set $~lib/util/number/_K i32.const 2952 - local.get $14 + local.get $var$14 i32.const 3 i32.shl i32.add i64.load global.set $~lib/util/number/_frc_pow i32.const 3648 - local.get $14 + local.get $var$14 i32.const 1 i32.shl i32.add i32.load16_s global.set $~lib/util/number/_exp_pow - local.get $9 + local.get $var$9 i64.clz i32.wrap_i64 - local.set $14 - local.get $9 - local.get $14 + local.set $var$14 + local.get $var$9 + local.get $var$14 i64.extend_i32_s i64.shl - local.set $9 - local.get $7 - local.get $14 + local.set $var$9 + local.get $var$7 + local.get $var$14 i32.sub - local.set $7 + local.set $var$7 global.get $~lib/util/number/_frc_pow - local.set $12 + local.set $var$12 global.get $~lib/util/number/_exp_pow - local.set $15 - local.get $9 - local.set $17 - local.get $12 - local.set $11 - local.get $17 + local.set $var$15 + local.get $var$9 + local.set $var$17 + local.get $var$12 + local.set $var$11 + local.get $var$17 i64.const 4294967295 i64.and - local.set $18 - local.get $11 + local.set $var$18 + local.get $var$11 i64.const 4294967295 i64.and - local.set $19 - local.get $17 + local.set $var$19 + local.get $var$17 i64.const 32 i64.shr_u - local.set $20 - local.get $11 + local.set $var$20 + local.get $var$11 i64.const 32 i64.shr_u - local.set $21 - local.get $18 - local.get $19 + local.set $var$21 + local.get $var$18 + local.get $var$19 i64.mul - local.set $22 - local.get $20 - local.get $19 + local.set $var$22 + local.get $var$20 + local.get $var$19 i64.mul - local.get $22 + local.get $var$22 i64.const 32 i64.shr_u i64.add - local.set $23 - local.get $18 - local.get $21 + local.set $var$23 + local.get $var$18 + local.get $var$21 i64.mul - local.get $23 + local.get $var$23 i64.const 4294967295 i64.and i64.add - local.set $24 - local.get $24 + local.set $var$24 + local.get $var$24 i64.const 2147483647 i64.add - local.set $24 - local.get $23 + local.set $var$24 + local.get $var$23 i64.const 32 i64.shr_u - local.set $23 - local.get $24 + local.set $var$23 + local.get $var$24 i64.const 32 i64.shr_u - local.set $24 - local.get $20 - local.get $21 + local.set $var$24 + local.get $var$20 + local.get $var$21 i64.mul - local.get $23 + local.get $var$23 i64.add - local.get $24 + local.get $var$24 i64.add - local.set $24 - local.get $7 - local.set $10 - local.get $15 - local.set $13 - local.get $10 - local.get $13 + local.set $var$24 + local.get $var$7 + local.set $var$10 + local.get $var$15 + local.set $var$13 + local.get $var$10 + local.get $var$13 i32.add i32.const 64 i32.add - local.set $10 + local.set $var$10 global.get $~lib/util/number/_frc_plus - local.set $17 - local.get $12 - local.set $11 - local.get $17 + local.set $var$17 + local.get $var$12 + local.set $var$11 + local.get $var$17 i64.const 4294967295 i64.and - local.set $23 - local.get $11 + local.set $var$23 + local.get $var$11 i64.const 4294967295 i64.and - local.set $22 - local.get $17 + local.set $var$22 + local.get $var$17 i64.const 32 i64.shr_u - local.set $21 - local.get $11 + local.set $var$21 + local.get $var$11 i64.const 32 i64.shr_u - local.set $20 - local.get $23 - local.get $22 + local.set $var$20 + local.get $var$23 + local.get $var$22 i64.mul - local.set $19 - local.get $21 - local.get $22 + local.set $var$19 + local.get $var$21 + local.get $var$22 i64.mul - local.get $19 + local.get $var$19 i64.const 32 i64.shr_u i64.add - local.set $18 - local.get $23 - local.get $20 + local.set $var$18 + local.get $var$23 + local.get $var$20 i64.mul - local.get $18 + local.get $var$18 i64.const 4294967295 i64.and i64.add - local.set $25 - local.get $25 + local.set $var$25 + local.get $var$25 i64.const 2147483647 i64.add - local.set $25 - local.get $18 + local.set $var$25 + local.get $var$18 i64.const 32 i64.shr_u - local.set $18 - local.get $25 + local.set $var$18 + local.get $var$25 i64.const 32 i64.shr_u - local.set $25 - local.get $21 - local.get $20 + local.set $var$25 + local.get $var$21 + local.get $var$20 i64.mul - local.get $18 + local.get $var$18 i64.add - local.get $25 + local.get $var$25 i64.add i64.const 1 i64.sub - local.set $25 + local.set $var$25 global.get $~lib/util/number/_exp - local.set $26 - local.get $15 - local.set $13 - local.get $26 - local.get $13 + local.set $var$26 + local.get $var$15 + local.set $var$13 + local.get $var$26 + local.get $var$13 i32.add i32.const 64 i32.add - local.set $26 + local.set $var$26 global.get $~lib/util/number/_frc_minus - local.set $17 - local.get $12 - local.set $11 - local.get $17 + local.set $var$17 + local.get $var$12 + local.set $var$11 + local.get $var$17 i64.const 4294967295 i64.and - local.set $18 - local.get $11 + local.set $var$18 + local.get $var$11 i64.const 4294967295 i64.and - local.set $19 - local.get $17 + local.set $var$19 + local.get $var$17 i64.const 32 i64.shr_u - local.set $20 - local.get $11 + local.set $var$20 + local.get $var$11 i64.const 32 i64.shr_u - local.set $21 - local.get $18 - local.get $19 + local.set $var$21 + local.get $var$18 + local.get $var$19 i64.mul - local.set $22 - local.get $20 - local.get $19 + local.set $var$22 + local.get $var$20 + local.get $var$19 i64.mul - local.get $22 + local.get $var$22 i64.const 32 i64.shr_u i64.add - local.set $23 - local.get $18 - local.get $21 + local.set $var$23 + local.get $var$18 + local.get $var$21 i64.mul - local.get $23 + local.get $var$23 i64.const 4294967295 i64.and i64.add - local.set $27 - local.get $27 + local.set $var$27 + local.get $var$27 i64.const 2147483647 i64.add - local.set $27 - local.get $23 + local.set $var$27 + local.get $var$23 i64.const 32 i64.shr_u - local.set $23 - local.get $27 + local.set $var$23 + local.get $var$27 i64.const 32 i64.shr_u - local.set $27 - local.get $20 - local.get $21 + local.set $var$27 + local.get $var$20 + local.get $var$21 i64.mul - local.get $23 + local.get $var$23 i64.add - local.get $27 + local.get $var$27 i64.add i64.const 1 i64.add - local.set $27 - local.get $25 - local.get $27 + local.set $var$27 + local.get $var$25 + local.get $var$27 i64.sub - local.set $23 - local.get $4 - local.get $24 - local.get $10 - local.get $25 - local.get $26 - local.get $23 - local.get $3 + local.set $var$23 + local.get $var$4 + local.get $var$24 + local.get $var$10 + local.get $var$25 + local.get $var$26 + local.get $var$23 + local.get $var$3 call $~lib/util/number/genDigits - local.set $28 - local.get $0 - local.get $2 + local.set $len + local.get $buffer + local.get $sign i32.const 1 i32.shl i32.add - local.get $28 - local.get $2 + local.get $len + local.get $sign i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.set $28 - local.get $28 - local.get $2 + local.set $len + local.get $len + local.get $sign i32.add ) - (func $~lib/number/F64#toString (param $0 f64) (param $1 i32) (result i32) - local.get $0 + (func $~lib/number/F64#toString (param $this f64) (param $radix i32) (result i32) + local.get $this call $~lib/util/number/dtoa ) (func $templateliteral/Ref#set:value (param $0 i32) (param $1 i32) @@ -4121,9 +4121,9 @@ local.get $1 i32.store ) - (func $~lib/string/String.__concat (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__concat (param $left i32) (param $right i32) (result i32) + local.get $left + local.get $right call $~lib/string/String#concat ) (func $templateliteral/RecursiveObject#set:key (param $0 i32) (param $1 i32) @@ -4195,42 +4195,42 @@ call $~lib/rt/itcms/__visit end ) - (func $~lib/staticarray/StaticArray<~lib/string/String>#__visit (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/staticarray/StaticArray<~lib/string/String>#__visit (param $this i32) (param $cookie i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) + (local $val i32) i32.const 1 drop - local.get $0 - local.set $2 - local.get $2 - local.get $0 + local.get $this + local.set $var$2 + local.get $var$2 + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.add - local.set $3 + local.set $var$3 loop $while-continue|0 - local.get $2 - local.get $3 + local.get $var$2 + local.get $var$3 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $2 + local.get $var$2 i32.load - local.set $5 - local.get $5 + local.set $val + local.get $val if - local.get $5 - local.get $1 + local.get $val + local.get $cookie call $~lib/rt/itcms/__visit end - local.get $2 + local.get $var$2 i32.const 4 i32.add - local.set $2 + local.set $var$2 br $while-continue|0 end end diff --git a/tests/compiler/ternary.debug.wat b/tests/compiler/ternary.debug.wat index 1a9ed19f4b..fb94522c15 100644 --- a/tests/compiler/ternary.debug.wat +++ b/tests/compiler/ternary.debug.wat @@ -33,17 +33,17 @@ i32.const 1 global.set $ternary/a ) - (func $ternary/test (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (func $ternary/test (param $x i32) (param $y i32) (param $z i32) (result i32) + local.get $x if (result i32) - local.get $1 + local.get $y else - local.get $2 + local.get $z end ) - (func $ternary/testDropWithTypeMismatch (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $ternary/testDropWithTypeMismatch (param $cond i32) + (local $x i32) + (local $y i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -53,17 +53,17 @@ i32.const 0 i32.store i32.const 1 - local.set $1 + local.set $x global.get $~lib/memory/__stack_pointer i32.const 32 - local.tee $2 + local.tee $y i32.store - local.get $0 + local.get $cond if - local.get $1 + local.get $x drop else - local.get $2 + local.get $y drop end global.get $~lib/memory/__stack_pointer @@ -71,40 +71,40 @@ i32.add global.set $~lib/memory/__stack_pointer ) - (func $ternary/testVoidInclTypeMismatch (param $0 i32) (param $1 i32) - local.get $0 + (func $ternary/testVoidInclTypeMismatch (param $cond i32) (param $nop i32) + local.get $cond if i32.const 0 global.set $~argumentsLength - local.get $1 + local.get $nop i32.load call_indirect $0 (type $none_=>_none) else i32.const 0 global.set $~argumentsLength - local.get $1 + local.get $nop i32.load call_indirect $0 (type $none_=>_none) end - local.get $0 + local.get $cond if i32.const 0 global.set $~argumentsLength - local.get $1 + local.get $nop i32.load call_indirect $0 (type $none_=>_none) else i32.const 1 drop end - local.get $0 + local.get $cond if i32.const 1 drop else i32.const 0 global.set $~argumentsLength - local.get $1 + local.get $nop i32.load call_indirect $0 (type $none_=>_none) end diff --git a/tests/compiler/throw.debug.wat b/tests/compiler/throw.debug.wat index e246b28283..e5e5d0e36b 100644 --- a/tests/compiler/throw.debug.wat +++ b/tests/compiler/throw.debug.wat @@ -49,10 +49,10 @@ (export "doThrow" (func $throw/doThrow)) (export "memory" (memory $0)) (start $~start) - (func $throw/doThrowIf (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + (func $throw/doThrowIf (param $cond i32) + (local $a i32) + (local $var$2 i32) + (local $c i32) global.get $~lib/memory/__stack_pointer i32.const 12 i32.sub @@ -66,13 +66,13 @@ i32.store offset=8 global.get $~lib/memory/__stack_pointer i32.const 32 - local.tee $1 + local.tee $a i32.store - local.get $0 + local.get $cond if global.get $~lib/memory/__stack_pointer i32.const 64 - local.tee $2 + local.tee $var$2 i32.store offset=4 i32.const 96 i32.const 144 @@ -83,20 +83,20 @@ end global.get $~lib/memory/__stack_pointer i32.const 192 - local.tee $3 + local.tee $c i32.store offset=8 global.get $~lib/memory/__stack_pointer i32.const 12 i32.add global.set $~lib/memory/__stack_pointer ) - (func $throw/doThrowIfLoop (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + (func $throw/doThrowIfLoop (param $max i32) + (local $a i32) + (local $i i32) + (local $var$3 i32) + (local $b i32) + (local $d i32) + (local $e i32) global.get $~lib/memory/__stack_pointer i32.const 16 i32.sub @@ -110,31 +110,31 @@ i64.store offset=8 global.get $~lib/memory/__stack_pointer i32.const 32 - local.tee $1 + local.tee $a i32.store i32.const 0 - local.set $2 + local.set $i loop $while-continue|0 - local.get $2 + local.get $i i32.const 1 i32.add - local.tee $2 - local.get $0 + local.tee $i + local.get $max i32.lt_s - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if global.get $~lib/memory/__stack_pointer i32.const 64 - local.tee $4 + local.tee $b i32.store offset=4 - local.get $2 - local.get $0 + local.get $i + local.get $max i32.gt_s if global.get $~lib/memory/__stack_pointer i32.const 192 - local.tee $5 + local.tee $d i32.store offset=8 i32.const 224 i32.const 144 @@ -145,14 +145,14 @@ end global.get $~lib/memory/__stack_pointer i32.const 272 - local.tee $5 + local.tee $d i32.store offset=8 br $while-continue|0 end end global.get $~lib/memory/__stack_pointer i32.const 304 - local.tee $6 + local.tee $e i32.store offset=12 global.get $~lib/memory/__stack_pointer i32.const 16 @@ -169,50 +169,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -225,58 +225,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -293,12 +293,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -308,19 +308,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -331,27 +331,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -359,35 +359,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -397,15 +397,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -415,25 +415,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -441,33 +441,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -495,23 +495,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -523,15 +523,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -543,33 +543,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -577,21 +577,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -606,36 +606,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -643,67 +643,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -713,22 +713,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -738,12 +738,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -755,75 +755,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -835,38 +835,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -880,12 +880,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -896,38 +896,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -935,21 +935,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -964,101 +964,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -1069,7 +1069,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1080,26 +1080,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1112,27 +1112,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1146,11 +1146,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1161,66 +1161,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1230,10 +1230,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1244,13 +1244,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1261,109 +1261,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1371,7 +1371,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1388,23 +1388,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1416,54 +1416,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1484,30 +1484,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1517,9 +1517,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1529,8 +1529,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1538,43 +1538,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1586,17 +1586,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1610,7 +1610,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1628,7 +1628,7 @@ i32.const 0 ) (func $~lib/rt/itcms/__collect - (local $0 i32) + (local $var$0 i32) i32.const 0 drop global.get $~lib/rt/itcms/state @@ -1639,8 +1639,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -1654,8 +1654,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -1703,7 +1703,7 @@ call $~lib/rt/itcms/__collect ) (func $throw/doThrow - (local $0 i32) + (local $a i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -1714,7 +1714,7 @@ i32.store global.get $~lib/memory/__stack_pointer i32.const 32 - local.tee $0 + local.tee $a i32.store i32.const 672 i32.const 144 diff --git a/tests/compiler/typealias.debug.wat b/tests/compiler/typealias.debug.wat index ce790b6617..2f7f6f06a8 100644 --- a/tests/compiler/typealias.debug.wat +++ b/tests/compiler/typealias.debug.wat @@ -8,7 +8,7 @@ (elem $0 (i32.const 1)) (export "alias" (func $typealias/alias)) (export "memory" (memory $0)) - (func $typealias/alias (param $0 i32) (result i32) - local.get $0 + (func $typealias/alias (param $a i32) (result i32) + local.get $a ) ) diff --git a/tests/compiler/typeof.debug.wat b/tests/compiler/typeof.debug.wat index f99c26503a..9c2f46ff83 100644 --- a/tests/compiler/typeof.debug.wat +++ b/tests/compiler/typeof.debug.wat @@ -62,44 +62,44 @@ (elem $0 (i32.const 1) $start:typeof~anonymous|0) (export "memory" (memory $0)) (export "_start" (func $~start)) - (func $~lib/string/String#get:length (param $0 i32) (result i32) - local.get $0 + (func $~lib/string/String#get:length (param $this i32) (result i32) + local.get $this i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - local.get $0 - local.get $1 + (func $~lib/util/string/compareImpl (param $str1 i32) (param $index1 i32) (param $str2 i32) (param $index2 i32) (param $len i32) (result i32) + (local $ptr1 i32) + (local $ptr2 i32) + (local $var$7 i32) + (local $a i32) + (local $b i32) + local.get $str1 + local.get $index1 i32.const 1 i32.shl i32.add - local.set $5 - local.get $2 - local.get $3 + local.set $ptr1 + local.get $str2 + local.get $index2 i32.const 1 i32.shl i32.add - local.set $6 + local.set $ptr2 i32.const 0 i32.const 2 i32.lt_s drop - local.get $4 + local.get $len i32.const 4 i32.ge_u if (result i32) - local.get $5 + local.get $ptr1 i32.const 7 i32.and - local.get $6 + local.get $ptr2 i32.const 7 i32.and i32.or @@ -110,27 +110,27 @@ if block $do-break|0 loop $do-loop|0 - local.get $5 + local.get $ptr1 i64.load - local.get $6 + local.get $ptr2 i64.load i64.ne if br $do-break|0 end - local.get $5 + local.get $ptr1 i32.const 8 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 8 i32.add - local.set $6 - local.get $4 + local.set $ptr2 + local.get $len i32.const 4 i32.sub - local.set $4 - local.get $4 + local.set $len + local.get $len i32.const 4 i32.ge_u br_if $do-loop|0 @@ -138,59 +138,59 @@ end end loop $while-continue|1 - local.get $4 - local.tee $7 + local.get $len + local.tee $var$7 i32.const 1 i32.sub - local.set $4 - local.get $7 - local.set $7 - local.get $7 + local.set $len + local.get $var$7 + local.set $var$7 + local.get $var$7 if - local.get $5 + local.get $ptr1 i32.load16_u - local.set $8 - local.get $6 + local.set $a + local.get $ptr2 i32.load16_u - local.set $9 - local.get $8 - local.get $9 + local.set $b + local.get $a + local.get $b i32.ne if - local.get $8 - local.get $9 + local.get $a + local.get $b i32.sub return end - local.get $5 + local.get $ptr1 i32.const 2 i32.add - local.set $5 - local.get $6 + local.set $ptr1 + local.get $ptr2 i32.const 2 i32.add - local.set $6 + local.set $ptr2 br $while-continue|1 end end i32.const 0 ) - (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 + (func $~lib/string/String.__eq (param $left i32) (param $right i32) (result i32) + (local $leftLength i32) + local.get $left + local.get $right i32.eq if i32.const 1 return end - local.get $0 + local.get $left i32.const 0 i32.eq if (result i32) i32.const 1 else - local.get $1 + local.get $right i32.const 0 i32.eq end @@ -198,22 +198,22 @@ i32.const 0 return end - local.get $0 + local.get $left call $~lib/string/String#get:length - local.set $2 - local.get $2 - local.get $1 + local.set $leftLength + local.get $leftLength + local.get $right call $~lib/string/String#get:length i32.ne if i32.const 0 return end - local.get $0 + local.get $left i32.const 0 - local.get $1 + local.get $right i32.const 0 - local.get $2 + local.get $leftLength call $~lib/util/string/compareImpl i32.eqz ) @@ -230,50 +230,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -286,58 +286,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -354,12 +354,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -369,19 +369,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -392,27 +392,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -420,35 +420,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -458,15 +458,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -476,25 +476,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -502,33 +502,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -556,23 +556,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -584,15 +584,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -604,33 +604,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -638,21 +638,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -667,36 +667,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -704,67 +704,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -774,22 +774,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -799,12 +799,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -816,75 +816,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -896,38 +896,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -941,12 +941,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -957,38 +957,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -996,21 +996,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -1025,101 +1025,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -1130,7 +1130,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1141,26 +1141,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1173,27 +1173,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1207,11 +1207,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1222,66 +1222,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1291,10 +1291,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1305,13 +1305,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1322,109 +1322,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1432,7 +1432,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1449,23 +1449,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1477,54 +1477,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1545,30 +1545,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1578,9 +1578,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1590,8 +1590,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1599,43 +1599,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1647,17 +1647,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1671,7 +1671,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1689,7 +1689,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1699,12 +1699,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -1726,7 +1726,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -1746,14 +1746,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -1766,8 +1766,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -1778,37 +1778,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -1816,16 +1816,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1833,21 +1833,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -1862,12 +1862,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -1875,49 +1875,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -1927,90 +1927,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -2019,22 +2019,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -2043,27 +2043,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -2078,69 +2078,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2155,29 +2155,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2190,13 +2190,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2207,25 +2207,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2240,10 +2240,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2261,36 +2261,36 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) (func $~lib/rt/__visit_globals (param $0 i32) (local $1 i32) @@ -2326,10 +2326,10 @@ call $~lib/rt/itcms/__visit end ) - (func $~lib/function/Function<%28%29=>void>#__visit (param $0 i32) (param $1 i32) - local.get $0 + (func $~lib/function/Function<%28%29=>void>#__visit (param $this i32) (param $cookie i32) + local.get $this i32.load offset=4 - local.get $1 + local.get $cookie call $~lib/rt/itcms/__visit ) (func $~lib/function/Function<%28%29=>void>~visit (param $0 i32) (param $1 i32) diff --git a/tests/compiler/unary.debug.wat b/tests/compiler/unary.debug.wat index 4f5e359476..c59b8cf9cb 100644 --- a/tests/compiler/unary.debug.wat +++ b/tests/compiler/unary.debug.wat @@ -13,10 +13,10 @@ (export "memory" (memory $0)) (start $~start) (func $start:unary - (local $0 i32) - (local $1 i64) - (local $2 f32) - (local $3 f64) + (local $var$0 i32) + (local $var$1 i64) + (local $var$2 f32) + (local $var$3 f64) i32.const 1 drop i32.const -1 @@ -108,18 +108,18 @@ global.get $unary/i global.set $unary/i global.get $unary/i - local.tee $0 + local.tee $var$0 i32.const 1 i32.add global.set $unary/i - local.get $0 + local.get $var$0 global.set $unary/i global.get $unary/i - local.tee $0 + local.tee $var$0 i32.const 1 i32.sub global.set $unary/i - local.get $0 + local.get $var$0 global.set $unary/i global.get $unary/I drop @@ -195,18 +195,18 @@ global.get $unary/I global.set $unary/I global.get $unary/I - local.tee $1 + local.tee $var$1 i64.const 1 i64.add global.set $unary/I - local.get $1 + local.get $var$1 global.set $unary/I global.get $unary/I - local.tee $1 + local.tee $var$1 i64.const 1 i64.sub global.set $unary/I - local.get $1 + local.get $var$1 global.set $unary/I global.get $unary/f drop @@ -281,18 +281,18 @@ global.get $unary/f global.set $unary/f global.get $unary/f - local.tee $2 + local.tee $var$2 f32.const 1 f32.add global.set $unary/f - local.get $2 + local.get $var$2 global.set $unary/f global.get $unary/f - local.tee $2 + local.tee $var$2 f32.const 1 f32.sub global.set $unary/f - local.get $2 + local.get $var$2 global.set $unary/f global.get $unary/F drop @@ -369,18 +369,18 @@ global.get $unary/F global.set $unary/F global.get $unary/F - local.tee $3 + local.tee $var$3 f64.const 1 f64.add global.set $unary/F - local.get $3 + local.get $var$3 global.set $unary/F global.get $unary/F - local.tee $3 + local.tee $var$3 f64.const 1 f64.sub global.set $unary/F - local.get $3 + local.get $var$3 global.set $unary/F ) (func $~start diff --git a/tests/compiler/unify-local-flags.debug.wat b/tests/compiler/unify-local-flags.debug.wat index bcdb4e4027..b9db3054e4 100644 --- a/tests/compiler/unify-local-flags.debug.wat +++ b/tests/compiler/unify-local-flags.debug.wat @@ -11,75 +11,75 @@ (export "testDo" (func $unify-local-flags/testDo)) (export "memory" (memory $0)) (func $unify-local-flags/testFor - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (local $x i32) + (local $var$1 i32) + (local $var$2 i32) + (local $var$3 i32) + (local $var$4 i32) i32.const 0 - local.set $0 + local.set $x i32.const 0 - local.set $1 + local.set $var$1 loop $for-loop|2 - local.get $1 + local.get $var$1 i32.const 255 i32.and i32.const 255 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $1 - local.set $0 - local.get $1 + local.get $var$1 + local.set $x + local.get $var$1 i32.const 1 i32.add - local.set $1 + local.set $var$1 br $for-loop|2 end end ) (func $unify-local-flags/testWhile - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $x i32) + (local $i i32) + (local $var$2 i32) i32.const 0 - local.set $0 + local.set $x i32.const 0 - local.set $1 + local.set $i loop $while-continue|2 - local.get $1 + local.get $i i32.const 255 i32.and i32.const 255 i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 - local.set $0 - local.get $1 + local.get $i + local.set $x + local.get $i i32.const 1 i32.add - local.set $1 + local.set $i br $while-continue|2 end end ) (func $unify-local-flags/testDo - (local $0 i32) - (local $1 i32) + (local $x i32) + (local $i i32) i32.const 0 - local.set $0 + local.set $x i32.const 0 - local.set $1 + local.set $i loop $do-loop|1 - local.get $1 - local.set $0 - local.get $1 + local.get $i + local.set $x + local.get $i i32.const 1 i32.add - local.tee $1 + local.tee $i i32.const 255 i32.and i32.const 255 diff --git a/tests/compiler/while.debug.wat b/tests/compiler/while.debug.wat index 0123064c08..98d46c363c 100644 --- a/tests/compiler/while.debug.wat +++ b/tests/compiler/while.debug.wat @@ -44,30 +44,30 @@ (export "memory" (memory $0)) (start $~start) (func $while/testSimple - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $i i32) + (local $j i32) + (local $var$2 i32) i32.const 10 - local.set $0 + local.set $i i32.const 0 - local.set $1 + local.set $j loop $while-continue|0 - local.get $0 - local.set $2 - local.get $2 + local.get $i + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $i i32.const 1 i32.sub - local.set $0 - local.get $1 + local.set $i + local.get $j i32.const 1 i32.add - local.set $1 + local.set $j br $while-continue|0 end end - local.get $0 + local.get $i i32.const 0 i32.eq i32.eqz @@ -79,7 +79,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $j i32.const 10 i32.eq i32.eqz @@ -95,47 +95,47 @@ global.set $while/ran ) (func $while/testNested - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (local $i i32) + (local $j i32) + (local $k i32) + (local $var$3 i32) + (local $var$4 i32) i32.const 10 - local.set $0 + local.set $i i32.const 0 - local.set $1 + local.set $j i32.const 0 - local.set $2 + local.set $k loop $while-continue|0 - local.get $0 - local.set $3 - local.get $3 + local.get $i + local.set $var$3 + local.get $var$3 if - local.get $0 + local.get $i i32.const 1 i32.sub - local.set $0 - local.get $1 + local.set $i + local.get $j i32.const 1 i32.add - local.set $1 + local.set $j loop $while-continue|1 - local.get $0 - local.set $4 - local.get $4 + local.get $i + local.set $var$4 + local.get $var$4 if - local.get $0 + local.get $i i32.const 1 i32.sub - local.set $0 - local.get $2 + local.set $i + local.get $k i32.const 1 i32.add - local.set $2 + local.set $k br $while-continue|1 end end - local.get $0 + local.get $i i32.const 0 i32.eq i32.eqz @@ -147,7 +147,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $k i32.const 9 i32.eq i32.eqz @@ -162,7 +162,7 @@ br $while-continue|0 end end - local.get $0 + local.get $i i32.const 0 i32.eq i32.eqz @@ -174,7 +174,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $j i32.const 1 i32.eq i32.eqz @@ -186,7 +186,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $k i32.const 9 i32.eq i32.eqz @@ -202,36 +202,36 @@ global.set $while/ran ) (func $while/testEmpty - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $i i32) + (local $j i32) + (local $var$2 i32) i32.const 1 - local.set $0 + local.set $i i32.const 0 - local.set $1 + local.set $j loop $while-continue|0 - local.get $0 - local.tee $2 + local.get $i + local.tee $var$2 i32.const 1 i32.sub - local.set $0 - local.get $2 + local.set $i + local.get $var$2 if (result i32) - local.get $1 + local.get $j i32.const 1 i32.add - local.tee $1 + local.tee $j else i32.const 0 end - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if nop br $while-continue|0 end end - local.get $0 + local.get $i i32.const -1 i32.eq i32.eqz @@ -243,7 +243,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $j i32.const 1 i32.eq i32.eqz @@ -259,20 +259,20 @@ global.set $while/ran ) (func $while/testAlwaysTrue - (local $0 i32) - (local $1 i32) + (local $i i32) + (local $var$1 i32) i32.const 0 - local.set $0 + local.set $i block $while-break|0 loop $while-continue|0 i32.const 1 - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 if - local.get $0 + local.get $i i32.const 1 i32.add - local.tee $0 + local.tee $i i32.const 10 i32.eq if @@ -282,7 +282,7 @@ end end end - local.get $0 + local.get $i i32.const 10 i32.eq i32.eqz @@ -298,23 +298,23 @@ global.set $while/ran ) (func $while/testAlwaysTrueNeverBreaks (result i32) - (local $0 i32) - (local $1 i32) + (local $i i32) + (local $var$1 i32) i32.const 0 - local.set $0 + local.set $i loop $while-continue|0 i32.const 1 - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 if - local.get $0 + local.get $i i32.const 1 i32.add - local.tee $0 + local.tee $i i32.const 10 i32.eq if - local.get $0 + local.get $i return end br $while-continue|0 @@ -323,12 +323,12 @@ unreachable ) (func $while/testAlwaysFalse - (local $0 i32) + (local $i i32) i32.const 0 - local.set $0 + local.set $i i32.const 0 drop - local.get $0 + local.get $i i32.const 0 i32.eq i32.eqz @@ -344,24 +344,24 @@ global.set $while/ran ) (func $while/testAlwaysBreaks - (local $0 i32) - (local $1 i32) + (local $i i32) + (local $var$1 i32) i32.const 0 - local.set $0 + local.set $i block $while-break|0 loop $while-continue|0 - local.get $0 + local.get $i i32.const 1 i32.add - local.tee $0 - local.set $1 - local.get $1 + local.tee $i + local.set $var$1 + local.get $var$1 if br $while-break|0 end end end - local.get $0 + local.get $i i32.const 1 i32.eq i32.eqz @@ -377,17 +377,17 @@ global.set $while/ran ) (func $while/testAlwaysReturns - (local $0 i32) - (local $1 i32) + (local $i i32) + (local $var$1 i32) i32.const 0 - local.set $0 + local.set $i loop $while-continue|0 - local.get $0 + local.get $i i32.const 1 i32.add - local.tee $0 - local.set $1 - local.get $1 + local.tee $i + local.set $var$1 + local.get $var$1 if i32.const 1 global.set $while/ran @@ -406,23 +406,23 @@ end ) (func $while/testContinue - (local $0 i32) - (local $1 i32) + (local $i i32) + (local $var$1 i32) i32.const 10 - local.set $0 + local.set $i loop $while-continue|0 - local.get $0 - local.set $1 - local.get $1 + local.get $i + local.set $var$1 + local.get $var$1 if - local.get $0 + local.get $i i32.const 1 i32.sub - local.set $0 + local.set $i br $while-continue|0 end end - local.get $0 + local.get $i i32.const 0 i32.eq i32.eqz @@ -438,39 +438,39 @@ global.set $while/ran ) (func $while/testNestedContinue - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + (local $i i32) + (local $j i32) + (local $var$2 i32) + (local $var$3 i32) i32.const 10 - local.set $0 + local.set $i i32.const 10 - local.set $1 + local.set $j loop $while-continue|0 - local.get $0 - local.set $2 - local.get $2 + local.get $i + local.set $var$2 + local.get $var$2 if loop $while-continue|1 - local.get $1 - local.set $3 - local.get $3 + local.get $j + local.set $var$3 + local.get $var$3 if - local.get $1 + local.get $j i32.const 1 i32.sub - local.set $1 + local.set $j br $while-continue|1 end end - local.get $0 + local.get $i i32.const 1 i32.sub - local.set $0 + local.set $i br $while-continue|0 end end - local.get $0 + local.get $i i32.const 0 i32.eq i32.eqz @@ -482,7 +482,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $j i32.const 0 i32.eq i32.eqz @@ -507,50 +507,50 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/itcms/initLazy (param $0 i32) (result i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/initLazy (param $space i32) (result i32) + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $0 + local.get $space + local.get $space call $~lib/rt/itcms/Object#set:prev - local.get $0 + local.get $space ) - (func $~lib/rt/itcms/Object#get:next (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:next (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and ) - (func $~lib/rt/itcms/Object#get:color (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:color (param $this i32) (result i32) + local.get $this i32.load offset=4 i32.const 3 i32.and ) - (func $~lib/rt/itcms/visitRoots (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/visitRoots (param $cookie i32) + (local $pn i32) + (local $iter i32) + (local $var$3 i32) + local.get $cookie call $~lib/rt/__visit_globals global.get $~lib/rt/itcms/pinSpace - local.set $1 - local.get $1 + local.set $pn + local.get $pn call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter loop $while-continue|0 - local.get $2 - local.get $1 + local.get $iter + local.get $pn i32.ne - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 if i32.const 1 drop - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:color i32.const 3 i32.eq @@ -563,58 +563,58 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $iter i32.const 20 i32.add - local.get $0 + local.get $cookie call $~lib/rt/__visit_members - local.get $2 + local.get $iter call $~lib/rt/itcms/Object#get:next - local.set $2 + local.set $iter br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#set:color (param $0 i32) (param $1 i32) - local.get $0 - local.get $0 + (func $~lib/rt/itcms/Object#set:color (param $this i32) (param $color i32) + local.get $this + local.get $this i32.load offset=4 i32.const 3 i32.const -1 i32.xor i32.and - local.get $1 + local.get $color i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#set:next (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - local.get $0 + (func $~lib/rt/itcms/Object#set:next (param $this i32) (param $obj i32) + local.get $this + local.get $obj + local.get $this i32.load offset=4 i32.const 3 i32.and i32.or call $~lib/rt/itcms/Object#set:nextWithColor ) - (func $~lib/rt/itcms/Object#unlink (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/Object#unlink (param $this i32) + (local $next i32) + (local $prev i32) + local.get $this call $~lib/rt/itcms/Object#get:next - local.set $1 - local.get $1 + local.set $next + local.get $next i32.const 0 i32.eq if i32.const 1 drop - local.get $0 + local.get $this i32.load offset=8 i32.const 0 i32.eq if (result i32) - local.get $0 + local.get $this global.get $~lib/memory/__heap_base i32.lt_u else @@ -631,12 +631,12 @@ end return end - local.get $0 + local.get $this i32.load offset=8 - local.set $2 + local.set $prev i32.const 1 drop - local.get $2 + local.get $prev i32.eqz if i32.const 0 @@ -646,19 +646,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $next + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $2 - local.get $1 + local.get $prev + local.get $next call $~lib/rt/itcms/Object#set:next ) - (func $~lib/rt/__typeinfo (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/rt/__typeinfo (param $id i32) (result i32) + (local $ptr i32) global.get $~lib/rt/__rtti_base - local.set $1 - local.get $0 - local.get $1 + local.set $ptr + local.get $id + local.get $ptr i32.load i32.gt_u if @@ -669,27 +669,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ptr i32.const 4 i32.add - local.get $0 + local.get $id i32.const 8 i32.mul i32.add i32.load ) - (func $~lib/rt/itcms/Object#get:isPointerfree (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#get:isPointerfree (param $this i32) (result i32) + (local $rtId i32) + local.get $this i32.load offset=12 - local.set $1 - local.get $1 + local.set $rtId + local.get $rtId i32.const 1 i32.le_u if (result i32) i32.const 1 else - local.get $1 + local.get $rtId call $~lib/rt/__typeinfo i32.const 32 i32.and @@ -697,35 +697,35 @@ i32.ne end ) - (func $~lib/rt/itcms/Object#linkTo (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/itcms/Object#linkTo (param $this i32) (param $list i32) (param $withColor i32) + (local $prev i32) + local.get $list i32.load offset=8 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + local.set $prev + local.get $this + local.get $list + local.get $withColor i32.or call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 - local.get $3 + local.get $this + local.get $prev call $~lib/rt/itcms/Object#set:prev - local.get $3 - local.get $0 + local.get $prev + local.get $this call $~lib/rt/itcms/Object#set:next - local.get $1 - local.get $0 + local.get $list + local.get $this call $~lib/rt/itcms/Object#set:prev ) - (func $~lib/rt/itcms/Object#makeGray (param $0 i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/itcms/Object#makeGray (param $this i32) + (local $var$1 i32) + local.get $this global.get $~lib/rt/itcms/iter i32.eq if - local.get $0 + local.get $this i32.load offset=8 - local.tee $1 + local.tee $var$1 i32.eqz if (result i32) i32.const 0 @@ -735,15 +735,15 @@ call $~lib/builtins/abort unreachable else - local.get $1 + local.get $var$1 end global.set $~lib/rt/itcms/iter end - local.get $0 + local.get $this call $~lib/rt/itcms/Object#unlink - local.get $0 + local.get $this global.get $~lib/rt/itcms/toSpace - local.get $0 + local.get $this call $~lib/rt/itcms/Object#get:isPointerfree if (result i32) global.get $~lib/rt/itcms/white @@ -753,25 +753,25 @@ end call $~lib/rt/itcms/Object#linkTo ) - (func $~lib/rt/itcms/__visit (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $0 + (func $~lib/rt/itcms/__visit (param $ptr i32) (param $cookie i32) + (local $obj i32) + local.get $ptr i32.eqz if return end - local.get $0 + local.get $ptr i32.const 20 i32.sub - local.set $2 + local.set $obj i32.const 0 drop - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eq if - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#makeGray global.get $~lib/rt/itcms/visitCount i32.const 1 @@ -779,33 +779,33 @@ global.set $~lib/rt/itcms/visitCount end ) - (func $~lib/rt/itcms/visitStack (param $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/itcms/visitStack (param $cookie i32) + (local $ptr i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer - local.set $1 + local.set $ptr loop $while-continue|0 - local.get $1 + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $1 + local.get $ptr i32.load - local.get $0 + local.get $cookie call $~lib/rt/itcms/__visit - local.get $1 + local.get $ptr i32.const 4 i32.add - local.set $1 + local.set $ptr br $while-continue|0 end end ) - (func $~lib/rt/itcms/Object#get:size (param $0 i32) (result i32) + (func $~lib/rt/itcms/Object#get:size (param $this i32) (result i32) i32.const 4 - local.get $0 + local.get $this i32.load i32.const 3 i32.const -1 @@ -833,23 +833,23 @@ local.get $1 i32.store offset=8 ) - (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - local.get $1 + (func $~lib/rt/tlsf/removeBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$6 i32) + (local $var$7 i32) + (local $prev i32) + (local $next i32) + (local $var$10 i32) + (local $var$11 i32) + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -861,15 +861,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 + local.set $size i32.const 1 drop - local.get $3 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -881,33 +881,33 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $4 - local.get $3 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $5 + local.set $sl else - local.get $3 - local.tee $6 + local.get $size + local.tee $var$6 i32.const 1073741820 - local.tee $7 - local.get $6 - local.get $7 + local.tee $var$7 + local.get $var$6 + local.get $var$7 i32.lt_u select - local.set $6 + local.set $var$6 i32.const 31 - local.get $6 + local.get $var$6 i32.clz i32.sub - local.set $4 - local.get $6 - local.get $4 + local.set $fl + local.get $var$6 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -915,21 +915,21 @@ i32.const 4 i32.shl i32.xor - local.set $5 - local.get $4 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $4 + local.set $fl end i32.const 1 drop - local.get $4 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $5 + local.get $sl i32.const 16 i32.lt_u else @@ -944,36 +944,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load offset=4 - local.set $8 - local.get $1 + local.set $prev + local.get $block i32.load offset=8 - local.set $9 - local.get $8 + local.set $next + local.get $prev if - local.get $8 - local.get $9 + local.get $prev + local.get $next call $~lib/rt/tlsf/Block#set:next end - local.get $9 + local.get $next if - local.get $9 - local.get $8 + local.get $next + local.get $prev call $~lib/rt/tlsf/Block#set:prev end - local.get $1 - local.get $0 - local.set $10 - local.get $4 - local.set $6 - local.get $5 - local.set $7 - local.get $10 - local.get $6 + local.get $block + local.get $root + local.set $var$10 + local.get $fl + local.set $var$6 + local.get $sl + local.set $var$7 + local.get $var$10 + local.get $var$6 i32.const 4 i32.shl - local.get $7 + local.get $var$7 i32.add i32.const 2 i32.shl @@ -981,67 +981,67 @@ i32.load offset=96 i32.eq if - local.get $0 - local.set $11 - local.get $4 - local.set $10 - local.get $5 - local.set $6 - local.get $9 - local.set $7 - local.get $11 - local.get $10 + local.get $root + local.set $var$11 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$6 + local.get $next + local.set $var$7 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add - local.get $7 + local.get $var$7 i32.store offset=96 - local.get $9 + local.get $next i32.eqz if - local.get $0 - local.set $6 - local.get $4 - local.set $7 - local.get $6 - local.get $7 + local.get $root + local.set $var$6 + local.get $fl + local.set $var$7 + local.get $var$6 + local.get $var$7 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 - local.get $0 - local.set $7 - local.get $4 - local.set $11 - local.get $6 + local.set $var$6 + local.get $root + local.set $var$7 + local.get $fl + local.set $var$11 + local.get $var$6 i32.const 1 - local.get $5 + local.get $sl i32.shl i32.const -1 i32.xor i32.and - local.tee $6 - local.set $10 - local.get $7 - local.get $11 + local.tee $var$6 + local.set $var$10 + local.get $var$7 + local.get $var$11 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 - local.get $6 + local.get $var$6 i32.eqz if - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $4 + local.get $fl i32.shl i32.const -1 i32.xor @@ -1051,22 +1051,22 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) + (func $~lib/rt/tlsf/insertBlock (param $root i32) (param $block i32) + (local $blockInfo i32) + (local $var$3 i32) + (local $right i32) + (local $rightInfo i32) + (local $var$6 i32) + (local $size i32) + (local $fl i32) + (local $sl i32) + (local $var$10 i32) + (local $head i32) + (local $var$12 i32) + (local $var$13 i32) i32.const 1 drop - local.get $1 + local.get $block i32.eqz if i32.const 0 @@ -1076,12 +1076,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block i32.load - local.set $2 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $blockInfo i32.const 1 i32.and i32.eqz @@ -1093,75 +1093,75 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 - local.get $5 + local.set $rightInfo + local.get $rightInfo i32.const 1 i32.and if - local.get $0 - local.get $4 + local.get $root + local.get $right call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $2 + local.get $block + local.get $blockInfo i32.const 4 i32.add - local.get $5 + local.get $rightInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.add - local.get $3 + local.get $var$3 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.set $4 - local.get $4 + local.set $right + local.get $right i32.load - local.set $5 + local.set $rightInfo end - local.get $2 + local.get $blockInfo i32.const 2 i32.and if - local.get $1 - local.set $3 - local.get $3 + local.get $block + local.set $var$3 + local.get $var$3 i32.const 4 i32.sub i32.load - local.set $3 - local.get $3 + local.set $var$3 + local.get $var$3 i32.load - local.set $6 + local.set $var$6 i32.const 1 drop - local.get $6 + local.get $var$6 i32.const 1 i32.and i32.eqz @@ -1173,38 +1173,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $var$3 call $~lib/rt/tlsf/removeBlock - local.get $3 - local.set $1 - local.get $1 - local.get $6 + local.get $var$3 + local.set $block + local.get $block + local.get $var$6 i32.const 4 i32.add - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.tee $2 + local.tee $blockInfo call $~lib/rt/common/BLOCK#set:mmInfo end - local.get $4 - local.get $5 + local.get $right + local.get $rightInfo i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $2 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.set $7 + local.set $size i32.const 1 drop - local.get $7 + local.get $size i32.const 12 i32.ge_u i32.eqz @@ -1218,12 +1218,12 @@ end i32.const 1 drop - local.get $1 + local.get $block i32.const 4 i32.add - local.get $7 + local.get $size i32.add - local.get $4 + local.get $right i32.eq i32.eqz if @@ -1234,38 +1234,38 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $right i32.const 4 i32.sub - local.get $1 + local.get $block i32.store - local.get $7 + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $8 - local.get $7 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $9 + local.set $sl else - local.get $7 - local.tee $3 + local.get $size + local.tee $var$3 i32.const 1073741820 - local.tee $6 - local.get $3 - local.get $6 + local.tee $var$6 + local.get $var$3 + local.get $var$6 i32.lt_u select - local.set $3 + local.set $var$3 i32.const 31 - local.get $3 + local.get $var$3 i32.clz i32.sub - local.set $8 - local.get $3 - local.get $8 + local.set $fl + local.get $var$3 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -1273,21 +1273,21 @@ i32.const 4 i32.shl i32.xor - local.set $9 - local.get $8 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $8 + local.set $fl end i32.const 1 drop - local.get $8 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $9 + local.get $sl i32.const 16 i32.lt_u else @@ -1302,101 +1302,101 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $10 - local.get $8 - local.set $3 - local.get $9 - local.set $6 - local.get $10 - local.get $3 + local.get $root + local.set $var$10 + local.get $fl + local.set $var$3 + local.get $sl + local.set $var$6 + local.get $var$10 + local.get $var$3 i32.const 4 i32.shl - local.get $6 + local.get $var$6 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $11 - local.get $1 + local.set $head + local.get $block i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $1 - local.get $11 + local.get $block + local.get $head call $~lib/rt/tlsf/Block#set:next - local.get $11 + local.get $head if - local.get $11 - local.get $1 + local.get $head + local.get $block call $~lib/rt/tlsf/Block#set:prev end - local.get $0 - local.set $12 - local.get $8 - local.set $10 - local.get $9 - local.set $3 - local.get $1 - local.set $6 - local.get $12 - local.get $10 + local.get $root + local.set $var$12 + local.get $fl + local.set $var$10 + local.get $sl + local.set $var$3 + local.get $block + local.set $var$6 + local.get $var$12 + local.get $var$10 i32.const 4 i32.shl - local.get $3 + local.get $var$3 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $0 - local.get $0 + local.get $root + local.get $root i32.load i32.const 1 - local.get $8 + local.get $fl i32.shl i32.or call $~lib/rt/tlsf/Root#set:flMap - local.get $0 - local.set $13 - local.get $8 - local.set $12 - local.get $0 - local.set $3 - local.get $8 - local.set $6 - local.get $3 - local.get $6 + local.get $root + local.set $var$13 + local.get $fl + local.set $var$12 + local.get $root + local.set $var$3 + local.get $fl + local.set $var$6 + local.get $var$3 + local.get $var$6 i32.const 2 i32.shl i32.add i32.load offset=4 i32.const 1 - local.get $9 + local.get $sl i32.shl i32.or - local.set $10 - local.get $13 - local.get $12 + local.set $var$10 + local.get $var$13 + local.get $var$12 i32.const 2 i32.shl i32.add - local.get $10 + local.get $var$10 i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (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) + (func $~lib/rt/tlsf/addMemory (param $root i32) (param $start i32) (param $end i32) (result i32) + (local $var$3 i32) + (local $tail i32) + (local $tailInfo i32) + (local $size i32) + (local $leftSize i32) + (local $left i32) + (local $var$9 i32) i32.const 1 drop - local.get $1 - local.get $2 + local.get $start + local.get $end i32.le_u i32.eqz if @@ -1407,7 +1407,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 4 i32.add i32.const 15 @@ -1418,26 +1418,26 @@ i32.and i32.const 4 i32.sub - local.set $1 - local.get $2 + local.set $start + local.get $end i32.const 15 i32.const -1 i32.xor i32.and - local.set $2 - local.get $0 - local.set $3 - local.get $3 + local.set $end + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 - local.set $4 + local.set $tail i32.const 0 - local.set $5 - local.get $4 + local.set $tailInfo + local.get $tail if i32.const 1 drop - local.get $1 - local.get $4 + local.get $start + local.get $tail i32.const 4 i32.add i32.ge_u @@ -1450,27 +1450,27 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $start i32.const 16 i32.sub - local.get $4 + local.get $tail i32.eq if - local.get $1 + local.get $start i32.const 16 i32.sub - local.set $1 - local.get $4 + local.set $start + local.get $tail i32.load - local.set $5 + local.set $tailInfo else nop end else i32.const 1 drop - local.get $1 - local.get $0 + local.get $start + local.get $root i32.const 1572 i32.add i32.ge_u @@ -1484,11 +1484,11 @@ unreachable end end - local.get $2 - local.get $1 + local.get $end + local.get $start i32.sub - local.set $6 - local.get $6 + local.set $size + local.get $size i32.const 4 i32.const 12 i32.add @@ -1499,66 +1499,66 @@ i32.const 0 return end - local.get $6 + local.get $size i32.const 2 i32.const 4 i32.mul i32.sub - local.set $7 - local.get $1 - local.set $8 - local.get $8 - local.get $7 + local.set $leftSize + local.get $start + local.set $left + local.get $left + local.get $leftSize i32.const 1 i32.or - local.get $5 + local.get $tailInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:prev - local.get $8 + local.get $left i32.const 0 call $~lib/rt/tlsf/Block#set:next - local.get $1 + local.get $start i32.const 4 i32.add - local.get $7 + local.get $leftSize i32.add - local.set $4 - local.get $4 + local.set $tail + local.get $tail i32.const 0 i32.const 2 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.set $9 - local.get $4 - local.set $3 - local.get $9 - local.get $3 + local.get $root + local.set $var$9 + local.get $tail + local.set $var$3 + local.get $var$9 + local.get $var$3 i32.store offset=1568 - local.get $0 - local.get $8 + local.get $root + local.get $left call $~lib/rt/tlsf/insertBlock i32.const 1 ) (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) + (local $rootOffset i32) + (local $pagesBefore i32) + (local $pagesNeeded i32) + (local $root i32) + (local $var$4 i32) + (local $var$5 i32) + (local $var$6 i32) + (local $var$7 i32) + (local $var$8 i32) + (local $var$9 i32) + (local $var$10 i32) + (local $var$11 i32) + (local $memStart i32) i32.const 0 drop global.get $~lib/memory/__heap_base @@ -1568,10 +1568,10 @@ i32.const -1 i32.xor i32.and - local.set $0 + local.set $rootOffset memory.size - local.set $1 - local.get $0 + local.set $pagesBefore + local.get $rootOffset i32.const 1572 i32.add i32.const 65535 @@ -1582,13 +1582,13 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $2 - local.get $1 + local.set $pagesNeeded + local.get $pagesNeeded + local.get $pagesBefore i32.gt_s if (result i32) - local.get $2 - local.get $1 + local.get $pagesNeeded + local.get $pagesBefore i32.sub memory.grow i32.const 0 @@ -1599,109 +1599,109 @@ if unreachable end - local.get $0 - local.set $3 - local.get $3 + local.get $rootOffset + local.set $root + local.get $root i32.const 0 call $~lib/rt/tlsf/Root#set:flMap - local.get $3 - local.set $5 + local.get $root + local.set $var$5 i32.const 0 - local.set $4 - local.get $5 - local.get $4 + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.store offset=1568 i32.const 0 - local.set $5 + local.set $var$5 loop $for-loop|0 - local.get $5 + local.get $var$5 i32.const 23 i32.lt_u - local.set $4 - local.get $4 + local.set $var$4 + local.get $var$4 if - local.get $3 - local.set $8 - local.get $5 - local.set $7 + local.get $root + local.set $var$8 + local.get $var$5 + local.set $var$7 i32.const 0 - local.set $6 - local.get $8 - local.get $7 + local.set $var$6 + local.get $var$8 + local.get $var$7 i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=4 i32.const 0 - local.set $8 + local.set $var$8 loop $for-loop|1 - local.get $8 + local.get $var$8 i32.const 16 i32.lt_u - local.set $7 - local.get $7 + local.set $var$7 + local.get $var$7 if - local.get $3 - local.set $11 - local.get $5 - local.set $10 - local.get $8 - local.set $9 + local.get $root + local.set $var$11 + local.get $var$5 + local.set $var$10 + local.get $var$8 + local.set $var$9 i32.const 0 - local.set $6 - local.get $11 - local.get $10 + local.set $var$6 + local.get $var$11 + local.get $var$10 i32.const 4 i32.shl - local.get $9 + local.get $var$9 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $var$6 i32.store offset=96 - local.get $8 + local.get $var$8 i32.const 1 i32.add - local.set $8 + local.set $var$8 br $for-loop|1 end end - local.get $5 + local.get $var$5 i32.const 1 i32.add - local.set $5 + local.set $var$5 br $for-loop|0 end end - local.get $0 + local.get $rootOffset i32.const 1572 i32.add - local.set $12 + local.set $memStart i32.const 0 drop - local.get $3 - local.get $12 + local.get $root + local.get $memStart memory.size i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop - local.get $3 + local.get $root global.set $~lib/rt/tlsf/ROOT ) - (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) - (local $1 i32) - local.get $0 + (func $~lib/rt/tlsf/checkUsedBlock (param $ptr i32) (result i32) + (local $block i32) + local.get $ptr i32.const 4 i32.sub - local.set $1 - local.get $0 + local.set $block + local.get $ptr i32.const 0 i32.ne if (result i32) - local.get $0 + local.get $ptr i32.const 15 i32.and i32.eqz @@ -1709,7 +1709,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $block i32.load i32.const 1 i32.and @@ -1726,23 +1726,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $block ) - (func $~lib/rt/tlsf/freeBlock (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (param $root i32) (param $block i32) i32.const 0 drop - local.get $1 - local.get $1 + local.get $block + local.get $block i32.load i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $1 + local.get $root + local.get $block call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/__free (param $0 i32) - local.get $0 + (func $~lib/rt/tlsf/__free (param $ptr i32) + local.get $ptr global.get $~lib/memory/__heap_base i32.lt_u if @@ -1754,54 +1754,54 @@ call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $ptr call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/rt/itcms/free (param $0 i32) - local.get $0 + (func $~lib/rt/itcms/free (param $obj i32) + local.get $obj global.get $~lib/memory/__heap_base i32.lt_u if - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:nextWithColor - local.get $0 + local.get $obj i32.const 0 call $~lib/rt/itcms/Object#set:prev else global.get $~lib/rt/itcms/total - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.sub global.set $~lib/rt/itcms/total i32.const 0 drop - local.get $0 + local.get $obj i32.const 4 i32.add call $~lib/rt/tlsf/__free end ) (func $~lib/rt/itcms/step (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $obj i32) + (local $var$1 i32) + (local $var$2 i32) block $break|0 block $case2|0 block $case1|0 block $case0|0 global.get $~lib/rt/itcms/state - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 i32.const 0 i32.eq br_if $case0|0 - local.get $1 + local.get $var$1 i32.const 1 i32.eq br_if $case1|0 - local.get $1 + local.get $var$1 i32.const 2 i32.eq br_if $case2|0 @@ -1822,30 +1822,30 @@ end global.get $~lib/rt/itcms/white i32.eqz - local.set $1 + local.set $var$1 global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|1 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj global.set $~lib/rt/itcms/iter - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color i32.const 0 global.set $~lib/rt/itcms/visitCount - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 @@ -1855,9 +1855,9 @@ i32.mul return end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|1 end end @@ -1867,8 +1867,8 @@ call $~lib/rt/itcms/visitRoots global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.eq if @@ -1876,43 +1876,43 @@ call $~lib/rt/itcms/visitStack global.get $~lib/rt/itcms/iter call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj loop $while-continue|2 - local.get $0 + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color - local.get $1 + local.get $var$1 i32.ne if - local.get $0 - local.get $1 + local.get $obj + local.get $var$1 call $~lib/rt/itcms/Object#set:color - local.get $0 + local.get $obj i32.const 20 i32.add i32.const 0 call $~lib/rt/__visit_members end - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next - local.set $0 + local.set $obj br $while-continue|2 end end global.get $~lib/rt/itcms/fromSpace - local.set $2 + local.set $var$2 global.get $~lib/rt/itcms/toSpace global.set $~lib/rt/itcms/fromSpace - local.get $2 + local.get $var$2 global.set $~lib/rt/itcms/toSpace - local.get $1 + local.get $var$1 global.set $~lib/rt/itcms/white - local.get $2 + local.get $var$2 call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 2 @@ -1924,17 +1924,17 @@ return end global.get $~lib/rt/itcms/iter - local.set $0 - local.get $0 + local.set $obj + local.get $obj global.get $~lib/rt/itcms/toSpace i32.ne if - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:next global.set $~lib/rt/itcms/iter i32.const 1 drop - local.get $0 + local.get $obj call $~lib/rt/itcms/Object#get:color global.get $~lib/rt/itcms/white i32.eqz @@ -1948,7 +1948,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $obj call $~lib/rt/itcms/free i32.const 10 return @@ -1966,7 +1966,7 @@ i32.const 0 ) (func $~lib/rt/itcms/interrupt - (local $0 i32) + (local $budget i32) i32.const 0 drop i32.const 0 @@ -1976,12 +1976,12 @@ i32.mul i32.const 100 i32.div_u - local.set $0 + local.set $budget loop $do-loop|0 - local.get $0 + local.get $budget call $~lib/rt/itcms/step i32.sub - local.set $0 + local.set $budget global.get $~lib/rt/itcms/state i32.const 0 i32.eq @@ -2003,7 +2003,7 @@ drop return end - local.get $0 + local.get $budget i32.const 0 i32.gt_s br_if $do-loop|0 @@ -2023,14 +2023,14 @@ i32.const 0 drop ) - (func $~lib/rt/tlsf/computeSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/computeSize (param $size i32) (result i32) + local.get $size i32.const 12 i32.le_u if (result i32) i32.const 12 else - local.get $0 + local.get $size i32.const 4 i32.add i32.const 15 @@ -2043,8 +2043,8 @@ i32.sub end ) - (func $~lib/rt/tlsf/prepareSize (param $0 i32) (result i32) - local.get $0 + (func $~lib/rt/tlsf/prepareSize (param $size i32) (result i32) + local.get $size i32.const 1073741820 i32.gt_u if @@ -2055,37 +2055,37 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $size call $~lib/rt/tlsf/computeSize ) - (func $~lib/rt/tlsf/searchBlock (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.get $1 + (func $~lib/rt/tlsf/searchBlock (param $root i32) (param $size i32) (result i32) + (local $fl i32) + (local $sl i32) + (local $var$4 i32) + (local $var$5 i32) + (local $slMap i32) + (local $head i32) + (local $var$8 i32) + (local $var$9 i32) + local.get $size i32.const 256 i32.lt_u if i32.const 0 - local.set $2 - local.get $1 + local.set $fl + local.get $size i32.const 4 i32.shr_u - local.set $3 + local.set $sl else - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if (result i32) - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl @@ -2093,16 +2093,16 @@ i32.const 1 i32.sub else - local.get $1 + local.get $size end - local.set $4 + local.set $var$4 i32.const 31 - local.get $4 + local.get $var$4 i32.clz i32.sub - local.set $2 - local.get $4 - local.get $2 + local.set $fl + local.get $var$4 + local.get $fl i32.const 4 i32.sub i32.shr_u @@ -2110,21 +2110,21 @@ i32.const 4 i32.shl i32.xor - local.set $3 - local.get $2 + local.set $sl + local.get $fl i32.const 8 i32.const 1 i32.sub i32.sub - local.set $2 + local.set $fl end i32.const 1 drop - local.get $2 + local.get $fl i32.const 23 i32.lt_u if (result i32) - local.get $3 + local.get $sl i32.const 16 i32.lt_u else @@ -2139,12 +2139,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $5 - local.get $2 - local.set $4 - local.get $5 - local.get $4 + local.get $root + local.set $var$5 + local.get $fl + local.set $var$4 + local.get $var$5 + local.get $var$4 i32.const 2 i32.shl i32.add @@ -2152,49 +2152,49 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $sl i32.shl i32.and - local.set $6 + local.set $slMap i32.const 0 - local.set $7 - local.get $6 + local.set $head + local.get $slMap i32.eqz if - local.get $0 + local.get $root i32.load i32.const 0 i32.const -1 i32.xor - local.get $2 + local.get $fl i32.const 1 i32.add i32.shl i32.and - local.set $5 - local.get $5 + local.set $var$5 + local.get $var$5 i32.eqz if i32.const 0 - local.set $7 + local.set $head else - local.get $5 + local.get $var$5 i32.ctz - local.set $2 - local.get $0 - local.set $8 - local.get $2 - local.set $4 - local.get $8 - local.get $4 + local.set $fl + local.get $root + local.set $var$8 + local.get $fl + local.set $var$4 + local.get $var$8 + local.get $var$4 i32.const 2 i32.shl i32.add i32.load offset=4 - local.set $6 + local.set $slMap i32.const 1 drop - local.get $6 + local.get $slMap i32.eqz if i32.const 0 @@ -2204,90 +2204,90 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end else - local.get $0 - local.set $9 - local.get $2 - local.set $8 - local.get $6 + local.get $root + local.set $var$9 + local.get $fl + local.set $var$8 + local.get $slMap i32.ctz - local.set $4 - local.get $9 - local.get $8 + local.set $var$4 + local.get $var$9 + local.get $var$8 i32.const 4 i32.shl - local.get $4 + local.get $var$4 i32.add i32.const 2 i32.shl i32.add i32.load offset=96 - local.set $7 + local.set $head end - local.get $7 + local.get $head ) - (func $~lib/rt/tlsf/growMemory (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/rt/tlsf/growMemory (param $root i32) (param $size i32) + (local $pagesBefore i32) + (local $var$3 i32) + (local $pagesNeeded i32) + (local $var$5 i32) + (local $pagesWanted i32) + (local $pagesAfter i32) i32.const 0 drop - local.get $1 + local.get $size i32.const 536870910 i32.lt_u if - local.get $1 + local.get $size i32.const 1 i32.const 27 - local.get $1 + local.get $size i32.clz i32.sub i32.shl i32.const 1 i32.sub i32.add - local.set $1 + local.set $size end memory.size - local.set $2 - local.get $1 + local.set $pagesBefore + local.get $size i32.const 4 - local.get $2 + local.get $pagesBefore i32.const 16 i32.shl i32.const 4 i32.sub - local.get $0 - local.set $3 - local.get $3 + local.get $root + local.set $var$3 + local.get $var$3 i32.load offset=1568 i32.ne i32.shl i32.add - local.set $1 - local.get $1 + local.set $size + local.get $size i32.const 65535 i32.add i32.const 65535 @@ -2296,22 +2296,22 @@ i32.and i32.const 16 i32.shr_u - local.set $4 - local.get $2 - local.tee $3 - local.get $4 - local.tee $5 - local.get $3 - local.get $5 + local.set $pagesNeeded + local.get $pagesBefore + local.tee $var$3 + local.get $pagesNeeded + local.tee $var$5 + local.get $var$3 + local.get $var$5 i32.gt_s select - local.set $6 - local.get $6 + local.set $pagesWanted + local.get $pagesWanted memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $pagesNeeded memory.grow i32.const 0 i32.lt_s @@ -2320,27 +2320,27 @@ end end memory.size - local.set $7 - local.get $0 - local.get $2 + local.set $pagesAfter + local.get $root + local.get $pagesBefore i32.const 16 i32.shl - local.get $7 + local.get $pagesAfter i32.const 16 i32.shl call $~lib/rt/tlsf/addMemory drop ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $1 + (func $~lib/rt/tlsf/prepareBlock (param $root i32) (param $block i32) (param $size i32) + (local $blockInfo i32) + (local $remaining i32) + (local $var$5 i32) + local.get $block i32.load - local.set $3 + local.set $blockInfo i32.const 1 drop - local.get $2 + local.get $size i32.const 4 i32.add i32.const 15 @@ -2355,69 +2355,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $blockInfo i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $size i32.sub - local.set $4 - local.get $4 + local.set $remaining + local.get $remaining i32.const 4 i32.const 12 i32.add i32.ge_u if - local.get $1 - local.get $2 - local.get $3 + local.get $block + local.get $size + local.get $blockInfo i32.const 2 i32.and i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 + local.get $block i32.const 4 i32.add - local.get $2 + local.get $size i32.add - local.set $5 - local.get $5 - local.get $4 + local.set $var$5 + local.get $var$5 + local.get $remaining i32.const 4 i32.sub i32.const 1 i32.or call $~lib/rt/common/BLOCK#set:mmInfo - local.get $0 - local.get $5 + local.get $root + local.get $var$5 call $~lib/rt/tlsf/insertBlock else - local.get $1 - local.get $3 + local.get $block + local.get $blockInfo i32.const 1 i32.const -1 i32.xor i32.and call $~lib/rt/common/BLOCK#set:mmInfo - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 i32.xor i32.and i32.add - local.get $1 - local.set $5 - local.get $5 + local.get $block + local.set $var$5 + local.get $var$5 i32.const 4 i32.add - local.get $5 + local.get $var$5 i32.load i32.const 3 i32.const -1 @@ -2432,29 +2432,29 @@ call $~lib/rt/common/BLOCK#set:mmInfo end ) - (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $1 + (func $~lib/rt/tlsf/allocateBlock (param $root i32) (param $size i32) (result i32) + (local $payloadSize i32) + (local $block i32) + local.get $size call $~lib/rt/tlsf/prepareSize - local.set $2 - local.get $0 - local.get $2 + local.set $payloadSize + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 - local.get $3 + local.set $block + local.get $block i32.eqz if - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/growMemory - local.get $0 - local.get $2 + local.get $root + local.get $payloadSize call $~lib/rt/tlsf/searchBlock - local.set $3 + local.set $block i32.const 1 drop - local.get $3 + local.get $block i32.eqz if i32.const 0 @@ -2467,13 +2467,13 @@ end i32.const 1 drop - local.get $3 + local.get $block i32.load i32.const 3 i32.const -1 i32.xor i32.and - local.get $2 + local.get $payloadSize i32.ge_u i32.eqz if @@ -2484,25 +2484,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $3 + local.get $root + local.get $block call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $3 - local.get $2 + local.get $root + local.get $block + local.get $payloadSize call $~lib/rt/tlsf/prepareBlock i32.const 0 drop - local.get $3 + local.get $block ) - (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (param $size i32) (result i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if call $~lib/rt/tlsf/initialize end global.get $~lib/rt/tlsf/ROOT - local.get $0 + local.get $size call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -2517,10 +2517,10 @@ local.get $1 i32.store offset=16 ) - (func $~lib/rt/itcms/__new (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 + (func $~lib/rt/itcms/__new (param $size i32) (param $id i32) (result i32) + (local $obj i32) + (local $ptr i32) + local.get $size i32.const 1073741804 i32.ge_u if @@ -2538,41 +2538,41 @@ call $~lib/rt/itcms/interrupt end i32.const 16 - local.get $0 + local.get $size i32.add call $~lib/rt/tlsf/__alloc i32.const 4 i32.sub - local.set $2 - local.get $2 - local.get $1 + local.set $obj + local.get $obj + local.get $id call $~lib/rt/itcms/Object#set:rtId - local.get $2 - local.get $0 + local.get $obj + local.get $size call $~lib/rt/itcms/Object#set:rtSize - local.get $2 + local.get $obj global.get $~lib/rt/itcms/fromSpace global.get $~lib/rt/itcms/white call $~lib/rt/itcms/Object#linkTo global.get $~lib/rt/itcms/total - local.get $2 + local.get $obj call $~lib/rt/itcms/Object#get:size i32.add global.set $~lib/rt/itcms/total - local.get $2 + local.get $obj i32.const 20 i32.add - local.set $3 - local.get $3 + local.set $ptr + local.get $ptr i32.const 0 - local.get $0 + local.get $size memory.fill - local.get $3 + local.get $ptr ) (func $while/testRef - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $i i32) + (local $ref i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -2582,37 +2582,37 @@ i32.const 0 i32.store i32.const 0 - local.set $0 + local.set $i global.get $~lib/memory/__stack_pointer i32.const 0 call $while/Ref#constructor - local.tee $1 + local.tee $ref i32.store loop $while-continue|0 - local.get $1 - local.set $2 - local.get $2 + local.get $ref + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $i i32.const 1 i32.add - local.tee $0 + local.tee $i i32.const 10 i32.eq if i32.const 0 - local.set $1 + local.set $ref else global.get $~lib/memory/__stack_pointer i32.const 0 call $while/Ref#constructor - local.tee $1 + local.tee $ref i32.store end br $while-continue|0 end end - local.get $0 + local.get $i i32.const 10 i32.eq i32.eqz @@ -2624,7 +2624,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ref i32.eqz i32.eqz if @@ -2647,9 +2647,9 @@ call $while/Ref#constructor ) (func $while/testRefAutorelease - (local $0 i32) - (local $1 i32) - (local $2 i32) + (local $i i32) + (local $ref i32) + (local $var$2 i32) global.get $~lib/memory/__stack_pointer i32.const 4 i32.sub @@ -2659,34 +2659,34 @@ i32.const 0 i32.store i32.const 0 - local.set $0 + local.set $i global.get $~lib/memory/__stack_pointer i32.const 0 call $while/Ref#constructor - local.tee $1 + local.tee $ref i32.store block $while-break|0 loop $while-continue|0 call $while/getRef - local.set $2 - local.get $2 + local.set $var$2 + local.get $var$2 if - local.get $0 + local.get $i i32.const 1 i32.add - local.tee $0 + local.tee $i i32.const 10 i32.eq if i32.const 0 - local.set $1 + local.set $ref br $while-break|0 end br $while-continue|0 end end end - local.get $0 + local.get $i i32.const 10 i32.eq i32.eqz @@ -2698,7 +2698,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $ref i32.eqz i32.eqz if @@ -2717,21 +2717,21 @@ global.set $~lib/memory/__stack_pointer ) (func $while/testIfImplicitContinueThen - (local $0 i32) - (local $1 i32) + (local $i i32) + (local $var$1 i32) i32.const 0 - local.set $0 + local.set $i block $while-break|0 loop $while-continue|0 i32.const 1 - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 if - local.get $0 + local.get $i i32.const 1 i32.add - local.set $0 - local.get $0 + local.set $i + local.get $i i32.const 1 i32.lt_s if @@ -2747,21 +2747,21 @@ global.set $while/ran ) (func $while/testIfImplicitContinueElse - (local $0 i32) - (local $1 i32) + (local $i i32) + (local $var$1 i32) i32.const 0 - local.set $0 + local.set $i block $while-break|0 loop $while-continue|0 i32.const 1 - local.set $1 - local.get $1 + local.set $var$1 + local.get $var$1 if - local.get $0 + local.get $i i32.const 1 i32.add - local.set $0 - local.get $0 + local.set $i + local.get $i i32.const 1 i32.ge_s if @@ -2777,23 +2777,23 @@ global.set $while/ran ) (func $while/testConditionalContinue - (local $0 i32) + (local $i i32) i32.const 0 - local.set $0 + local.set $i loop $do-loop|0 block $do-continue|0 - local.get $0 + local.get $i i32.const 1 i32.add - local.set $0 + local.set $i br $do-continue|0 end - local.get $0 + local.get $i i32.const 3 i32.lt_s br_if $do-loop|0 end - local.get $0 + local.get $i i32.const 3 i32.eq i32.eqz @@ -2809,7 +2809,7 @@ global.set $while/ran ) (func $~lib/rt/itcms/__collect - (local $0 i32) + (local $var$0 i32) i32.const 0 drop global.get $~lib/rt/itcms/state @@ -2820,8 +2820,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop @@ -2835,8 +2835,8 @@ global.get $~lib/rt/itcms/state i32.const 0 i32.ne - local.set $0 - local.get $0 + local.set $var$0 + local.get $var$0 if call $~lib/rt/itcms/step drop