From edb2299f13b8deb0222811a6880894aff9d944f0 Mon Sep 17 00:00:00 2001 From: dcode Date: Sun, 17 Mar 2019 12:25:54 +0100 Subject: [PATCH] fixes --- src/builtins.ts | 27 +- src/compiler.ts | 64 +- src/program.ts | 31 + src/resolver.ts | 46 +- std/assembly/array.ts | 37 +- std/assembly/dataview.ts | 92 +- std/assembly/typedarray.ts | 4 + tests/compiler/call-super.optimized.wat | 4 +- tests/compiler/call-super.untouched.wat | 4 +- tests/compiler/constructor.optimized.wat | 4 +- tests/compiler/constructor.untouched.wat | 4 +- tests/compiler/exports.optimized.wat | 4 +- tests/compiler/exports.untouched.wat | 4 +- tests/compiler/getter-call.optimized.wat | 4 +- tests/compiler/getter-call.untouched.wat | 4 +- tests/compiler/inlining.optimized.wat | 4 +- tests/compiler/inlining.untouched.wat | 4 +- .../new-without-allocator.untouched.wat | 4 +- tests/compiler/nonNullAssertion.optimized.wat | 47 +- tests/compiler/nonNullAssertion.untouched.wat | 202 +- tests/compiler/number.optimized.wat | 12 +- tests/compiler/number.untouched.wat | 12 +- tests/compiler/object-literal.optimized.wat | 4 +- tests/compiler/object-literal.untouched.wat | 4 +- .../optional-typeparameters.optimized.wat | 4 +- .../optional-typeparameters.untouched.wat | 4 +- tests/compiler/std/array-access.optimized.wat | 190 +- tests/compiler/std/array-access.untouched.wat | 326 +- .../compiler/std/array-literal.optimized.wat | 229 +- .../compiler/std/array-literal.untouched.wat | 472 +- tests/compiler/std/array.optimized.wat | 9358 ++++----- tests/compiler/std/array.ts | 6 +- tests/compiler/std/array.untouched.wat | 16636 +++++++--------- tests/compiler/std/arraybuffer.optimized.wat | 1323 +- tests/compiler/std/arraybuffer.ts | 1 - tests/compiler/std/arraybuffer.untouched.wat | 1794 +- tests/compiler/std/dataview.optimized.wat | 1077 +- tests/compiler/std/dataview.untouched.wat | 2447 +-- tests/compiler/std/date.optimized.wat | 4 +- tests/compiler/std/date.untouched.wat | 4 +- tests/compiler/std/new.optimized.wat | 4 +- tests/compiler/std/new.untouched.wat | 4 +- .../std/operator-overloading.optimized.wat | 4 +- .../std/operator-overloading.untouched.wat | 4 +- tests/compiler/std/runtime.optimized.wat | 4 +- tests/compiler/std/runtime.untouched.wat | 4 +- tests/compiler/std/string-utf8.optimized.wat | 4 +- tests/compiler/std/string-utf8.untouched.wat | 4 +- tests/compiler/std/string.optimized.wat | 329 +- tests/compiler/std/string.untouched.wat | 522 +- tests/compiler/std/symbol.optimized.wat | 4 +- tests/compiler/std/symbol.untouched.wat | 4 +- 52 files changed, 16800 insertions(+), 18592 deletions(-) diff --git a/src/builtins.ts b/src/builtins.ts index ee94c16a..d3cfa407 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -4085,27 +4085,6 @@ export function compileIterateRoots(compiler: Compiler): void { ); } -function determineTypedArrayType(target: Class, program: Program): Type | null { - switch (target.internalName) { - case BuiltinSymbols.Int8Array: return Type.i8; - case BuiltinSymbols.Uint8ClampedArray: - case BuiltinSymbols.Uint8Array: return Type.u8; - case BuiltinSymbols.Int16Array: return Type.i16; - case BuiltinSymbols.Uint16Array: return Type.u16; - case BuiltinSymbols.Int32Array: return Type.i32; - case BuiltinSymbols.Uint32Array: return Type.u32; - case BuiltinSymbols.Int64Array: return Type.i64; - case BuiltinSymbols.Uint64Array: return Type.u64; - case BuiltinSymbols.Float32Array: return Type.f32; - case BuiltinSymbols.Float64Array: return Type.f64; - } - var typeArguments = target.typeArguments; - if (typeArguments && typeArguments.length == 1) { - return typeArguments[0]; // Array, TypedArray - } - return null; -} - export function compileBuiltinArrayGet( compiler: Compiler, target: Class, @@ -4113,7 +4092,7 @@ export function compileBuiltinArrayGet( elementExpression: Expression, contextualType: Type ): ExpressionRef { - var type = assert(determineTypedArrayType(target, compiler.program)); + var type = assert(compiler.program.determineBuiltinArrayType(target)); var module = compiler.module; var outType = ( type.is(TypeFlags.INTEGER) && @@ -4258,7 +4237,7 @@ export function compileBuiltinArraySet( valueExpression: Expression, contextualType: Type ): ExpressionRef { - var type = assert(determineTypedArrayType(target, compiler.program)); + var type = assert(compiler.program.determineBuiltinArrayType(target)); return compileBuiltinArraySetWithValue( compiler, target, @@ -4294,7 +4273,7 @@ export function compileBuiltinArraySetWithValue( // TODO: check offset var program = compiler.program; - var type = assert(determineTypedArrayType(target, compiler.program)); + var type = assert(compiler.program.determineBuiltinArrayType(target)); var module = compiler.module; var dataStart = assert(target.lookupInSelf("dataStart")); diff --git a/src/compiler.ts b/src/compiler.ts index 37f48f14..1de1b5f7 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -4704,18 +4704,16 @@ export class Compiler extends DiagnosticEmitter { case ElementKind.CLASS: { let elementExpression = resolver.currentElementExpression; if (elementExpression) { // indexed access - let arrayBufferView = this.program.arrayBufferViewInstance; - if (arrayBufferView) { - if ((target).prototype.extends(arrayBufferView.prototype)) { - return compileBuiltinArraySet( - this, - target, - assert(this.resolver.currentThisExpression), - elementExpression, - valueExpression, - contextualType - ); - } + let arrayType = this.program.determineBuiltinArrayType(target); + if (arrayType) { + return compileBuiltinArraySet( + this, + target, + assert(this.resolver.currentThisExpression), + elementExpression, + valueExpression, + contextualType + ); } let isUnchecked = flow.is(FlowFlags.UNCHECKED_CONTEXT); let indexedSet = (target).lookupOverload(OperatorKind.INDEXED_SET, isUnchecked); @@ -4940,18 +4938,16 @@ export class Compiler extends DiagnosticEmitter { case ElementKind.CLASS: { let elementExpression = this.resolver.currentElementExpression; if (elementExpression) { - let arrayBufferView = this.program.arrayBufferViewInstance; - if (arrayBufferView) { - if ((target).prototype.extends(arrayBufferView.prototype)) { - return compileBuiltinArraySetWithValue( - this, - target, - assert(this.resolver.currentThisExpression), - elementExpression, - valueWithCorrectType, - tee - ); - } + let arrayType = this.program.determineBuiltinArrayType(target); + if (arrayType) { + return compileBuiltinArraySetWithValue( + this, + target, + assert(this.resolver.currentThisExpression), + elementExpression, + valueWithCorrectType, + tee + ); } let isUnchecked = flow.is(FlowFlags.UNCHECKED_CONTEXT); let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET, isUnchecked); @@ -5960,17 +5956,15 @@ export class Compiler extends DiagnosticEmitter { if (!target) return this.module.createUnreachable(); switch (target.kind) { case ElementKind.CLASS: { - let arrayBufferView = this.program.arrayBufferViewInstance; - if (arrayBufferView) { - if ((target).prototype.extends(arrayBufferView.prototype)) { - return compileBuiltinArrayGet( - this, - target, - expression.expression, - expression.elementExpression, - contextualType - ); - } + let arrayType = this.program.determineBuiltinArrayType(target); + if (arrayType) { + return compileBuiltinArrayGet( + this, + target, + expression.expression, + expression.elementExpression, + contextualType + ); } let isUnchecked = this.currentFlow.is(FlowFlags.UNCHECKED_CONTEXT); let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET, isUnchecked); diff --git a/src/program.ts b/src/program.ts index c4cee904..a8deb0a9 100644 --- a/src/program.ts +++ b/src/program.ts @@ -100,6 +100,10 @@ import { Flow } from "./flow"; +import { + BuiltinSymbols +} from "./builtins"; + /** Represents a yet unresolved `import`. */ class QueuedImport { constructor( @@ -1702,6 +1706,33 @@ export class Program extends DiagnosticEmitter { if (!parent.add(name, element)) continue; // reports } } + + /** Determines the element type of a built-in array. */ + determineBuiltinArrayType(target: Class): Type | null { + switch (target.internalName) { + case BuiltinSymbols.Int8Array: return Type.i8; + case BuiltinSymbols.Uint8ClampedArray: + case BuiltinSymbols.Uint8Array: return Type.u8; + case BuiltinSymbols.Int16Array: return Type.i16; + case BuiltinSymbols.Uint16Array: return Type.u16; + case BuiltinSymbols.Int32Array: return Type.i32; + case BuiltinSymbols.Uint32Array: return Type.u32; + case BuiltinSymbols.Int64Array: return Type.i64; + case BuiltinSymbols.Uint64Array: return Type.u64; + case BuiltinSymbols.Float32Array: return Type.f32; + case BuiltinSymbols.Float64Array: return Type.f64; + } + var current: Class | null = target; + var arrayPrototype = this.arrayPrototype; + do { + if (current.prototype == arrayPrototype) { // Array + let typeArguments = assert(current.typeArguments); + assert(typeArguments.length == 1); + return typeArguments[0]; + } + } while (current = current.base); + return null; + } } /** Indicates the specific kind of an {@link Element}. */ diff --git a/src/resolver.ts b/src/resolver.ts index f32b8155..0c3fa35b 100644 --- a/src/resolver.ts +++ b/src/resolver.ts @@ -610,19 +610,22 @@ export class Resolver extends DiagnosticEmitter { case ElementKind.CLASS: { // property access on element access? let elementExpression = this.currentElementExpression; if (elementExpression) { - let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET); - if (!indexedGet) { - this.error( - DiagnosticCode.Index_signature_is_missing_in_type_0, - elementExpression.range, (target).internalName - ); - return null; + let arrayType = this.program.determineBuiltinArrayType(target); + if (!arrayType) { + let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET); + if (!indexedGet) { + this.error( + DiagnosticCode.Index_signature_is_missing_in_type_0, + elementExpression.range, (target).internalName + ); + return null; + } + arrayType = indexedGet.signature.returnType; } - let returnType = indexedGet.signature.returnType; - if (!(target = returnType.classReference)) { + if (!(target = arrayType.classReference)) { this.error( DiagnosticCode.Property_0_does_not_exist_on_type_1, - propertyAccess.property.range, propertyName, returnType.toString() + propertyAccess.property.range, propertyName, arrayType.toString() ); return null; } @@ -719,19 +722,22 @@ export class Resolver extends DiagnosticEmitter { break; } case ElementKind.CLASS: { - let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET); - if (!indexedGet) { - if (reportMode == ReportMode.REPORT) { - this.error( - DiagnosticCode.Index_signature_is_missing_in_type_0, - elementAccess.range, (target).internalName - ); + let arrayType = this.program.determineBuiltinArrayType(target); + if (!arrayType) { + let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET); + if (!indexedGet) { + if (reportMode == ReportMode.REPORT) { + this.error( + DiagnosticCode.Index_signature_is_missing_in_type_0, + elementAccess.range, (target).internalName + ); + } + return null; } - return null; + arrayType = indexedGet.signature.returnType; } if (targetExpression.kind == NodeKind.ELEMENTACCESS) { // nested element access - let returnType = indexedGet.signature.returnType; - if (target = returnType.classReference) { + if (target = arrayType.classReference) { this.currentThisExpression = targetExpression; this.currentElementExpression = elementAccess.elementExpression; return target; diff --git a/std/assembly/array.ts b/std/assembly/array.ts index f878692e..cbe441e7 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -15,8 +15,8 @@ function ensureLength(array: ArrayBufferView, length: i32, alignLog2: u32): void if (newData !== changetype(oldData)) { array.data = changetype(newData); // links array.dataStart = newData; - array.dataLength = newByteLength; } + array.dataLength = newByteLength; } } @@ -183,7 +183,7 @@ export class Array extends ArrayBufferView { pop(): T { var length = this.length_; if (length < 1) throw new RangeError("Array is empty"); - var element = load(this.dataStart + (--length << alignof())); + var element = load(this.dataStart + ((--length) << alignof())); this.length_ = length; return element; } @@ -265,7 +265,7 @@ export class Array extends ArrayBufferView { } unshift(element: T): i32 { - var newLength = this.length_; + var newLength = this.length_ + 1; ensureLength(changetype(this), newLength, alignof()); var base = this.dataStart; memory.copy( @@ -327,14 +327,17 @@ export class Array extends ArrayBufferView { } reverse(): Array { - var front = this.dataStart; - var back = this.dataStart + this.dataLength - sizeof(); - while (front < back) { - let temp = load(front); - store(front, load(back)); - store(back, temp); - front += sizeof(); - back -= sizeof(); + var length = this.length_; + if (length) { + let front = this.dataStart; + let back = this.dataStart + ((length - 1) << alignof()); + while (front < back) { + let temp = load(front); + store(front, load(back)); + store(back, temp); + front += sizeof(); + back -= sizeof(); + } } return this; } @@ -507,15 +510,16 @@ export class Array extends ArrayBufferView { var sepLen = separator.length; var estLen = 0; + var value: string | null; for (let i = 0, len = lastIndex + 1; i < len; ++i) { - estLen += load(dataStart + (i << alignof())).length; + value = load(dataStart + (i << alignof())); + if (value !== null) estLen += value.length; } var offset = 0; var result = ALLOCATE((estLen + sepLen * lastIndex) << 1); - var value: String; for (let i = 0; i < lastIndex; ++i) { value = load(dataStart + (i << alignof())); - if (value) { + if (value !== null) { let valueLen = changetype(value).length; memory.copy( result + (offset << 1), @@ -534,12 +538,11 @@ export class Array extends ArrayBufferView { } } value = load(dataStart + (lastIndex << alignof())); - if (value) { - let valueLen = changetype(value).length; + if (value !== null) { memory.copy( result + (offset << 1), changetype(value), - valueLen << 1 + changetype(value).length << 1 ); } return REGISTER(result); diff --git a/std/assembly/dataview.ts b/std/assembly/dataview.ts index 4c44e944..3c842854 100644 --- a/std/assembly/dataview.ts +++ b/std/assembly/dataview.ts @@ -1,11 +1,13 @@ import { MAX_BYTELENGTH } from "./runtime"; import { ArrayBuffer } from "./arraybuffer"; +// TODO: there is probably a smarter way to check byteOffset for accesses larger than 1 byte + export class DataView { private data: ArrayBuffer; private dataStart: usize; - private dataLength: u32; + private dataLength: i32; constructor( buffer: ArrayBuffer, @@ -34,7 +36,10 @@ export class DataView { } getFloat32(byteOffset: i32, littleEndian: boolean = false): f32 { - if (byteOffset + 4 > this.dataLength) throw new Error("Offset out of bounds"); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 4 > this.dataLength) + ) throw new Error("Offset out of bounds"); return littleEndian ? load(this.dataStart + byteOffset) : reinterpret( @@ -45,7 +50,10 @@ export class DataView { } getFloat64(byteOffset: i32, littleEndian: boolean = false): f64 { - if (byteOffset + 4 > this.dataLength) throw new Error("Offset out of bounds"); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 8 > this.dataLength) + ) throw new Error("Offset out of bounds"); return littleEndian ? load(this.dataStart + byteOffset) : reinterpret( @@ -56,102 +64,144 @@ export class DataView { } getInt8(byteOffset: i32): i8 { - if (byteOffset >= this.dataLength) throw new Error("Offset out of bounds"); + if (byteOffset >= this.dataLength) throw new Error("Offset out of bounds"); return load(this.dataStart + byteOffset); } getInt16(byteOffset: i32, littleEndian: boolean = false): i16 { - if (byteOffset + 2 > this.dataLength) throw new Error("Offset out of bounds"); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 2 > this.dataLength) + ) throw new Error("Offset out of bounds"); var result: i16 = load(this.dataStart + byteOffset); return littleEndian ? result : bswap(result); } getInt32(byteOffset: i32, littleEndian: boolean = false): i32 { - if (byteOffset + 4 > this.dataLength) throw new Error("Offset out of bounds"); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 4 > this.dataLength) + ) throw new Error("Offset out of bounds"); var result: i32 = load(this.dataStart + byteOffset); return littleEndian ? result : bswap(result); } getUint8(byteOffset: i32): u8 { - if (byteOffset >= this.dataLength) throw new Error("Offset out of bounds"); + if (byteOffset >= this.dataLength) throw new Error("Offset out of bounds"); return load(this.dataStart + byteOffset); } getUint16(byteOffset: i32, littleEndian: boolean = false): u16 { - if (byteOffset + 2 > this.dataLength) throw new Error("Offset out of bounds"); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 2 > this.dataLength) + ) throw new Error("Offset out of bounds"); var result: u16 = load(this.dataStart + byteOffset); return littleEndian ? result : bswap(result); } getUint32(byteOffset: i32, littleEndian: boolean = false): u32 { - if (byteOffset + 2 > this.dataLength) throw new Error("Offset out of bounds"); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 4 > this.dataLength) + ) throw new Error("Offset out of bounds"); var result: u32 = load(this.dataStart + byteOffset); return littleEndian ? result : bswap(result); } setFloat32(byteOffset: i32, value: f32, littleEndian: boolean = false): void { - if (byteOffset + 4 > this.dataLength) throw new Error("Offset out of bounds"); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 4 > this.dataLength) + ) throw new Error("Offset out of bounds"); if (littleEndian) store(this.dataStart + byteOffset, value); else store(this.dataStart + byteOffset, bswap(reinterpret(value))); } setFloat64(byteOffset: i32, value: f64, littleEndian: boolean = false): void { - if (byteOffset + 8 > this.dataLength) throw new Error("Offset out of bounds"); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 8 > this.dataLength) + ) throw new Error("Offset out of bounds"); if (littleEndian) store(this.dataStart + byteOffset, value); else store(this.dataStart + byteOffset, bswap(reinterpret(value))); } setInt8(byteOffset: i32, value: i8): void { - if (byteOffset >= this.dataLength) throw new Error("Offset out of bounds"); + if (byteOffset >= this.dataLength) throw new Error("Offset out of bounds"); store(this.dataStart + byteOffset, value); } setInt16(byteOffset: i32, value: i16, littleEndian: boolean = false): void { - if (byteOffset + 2 > this.dataLength) throw new Error("Offset out of bounds"); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 2 > this.dataLength) + ) throw new Error("Offset out of bounds"); store(this.dataStart + byteOffset, littleEndian ? value : bswap(value)); } setInt32(byteOffset: i32, value: i32, littleEndian: boolean = false): void { - if (byteOffset + 4 > this.dataLength) throw new Error("Offset out of bounds"); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 4 > this.dataLength) + ) throw new Error("Offset out of bounds"); store(this.dataStart + byteOffset, littleEndian ? value : bswap(value)); } setUint8(byteOffset: i32, value: u8): void { - if (byteOffset >= this.dataLength) throw new Error("Offset out of bounds"); + if (byteOffset >= this.dataLength) throw new Error("Offset out of bounds"); store(this.dataStart + byteOffset, value); } setUint16(byteOffset: i32, value: u16, littleEndian: boolean = false): void { - if (byteOffset + 2 > this.dataLength) throw new Error("Offset out of bounds"); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 2 > this.dataLength) + ) throw new Error("Offset out of bounds"); store(this.dataStart + byteOffset, littleEndian ? value : bswap(value)); } setUint32(byteOffset: i32, value: u32, littleEndian: boolean = false): void { - if (byteOffset + 4 > this.dataLength) throw new Error("Offset out of bounds"); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 4 > this.dataLength) + ) throw new Error("Offset out of bounds"); store(this.dataStart + byteOffset, littleEndian ? value : bswap(value)); } // Non-standard additions that make sense in WebAssembly, but won't work in JS: getInt64(byteOffset: i32, littleEndian: boolean = false): i64 { - if (byteOffset + 8 > this.dataLength) throw new Error("Offset out of bounds"); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 8 > this.dataLength) + ) throw new Error("Offset out of bounds"); var result: i64 = load(this.dataStart + byteOffset); return littleEndian ? result : bswap(result); } getUint64(byteOffset: i32, littleEndian: boolean = false): u64 { - if (byteOffset + 8 > this.dataLength) throw new Error("Offset out of bounds"); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 8 > this.dataLength) + ) throw new Error("Offset out of bounds"); var result = load(this.dataStart + byteOffset); return littleEndian ? result : bswap(result); } setInt64(byteOffset: i32, value: i64, littleEndian: boolean = false): void { - if (byteOffset + 8 > this.dataLength) throw new Error("Offset out of bounds"); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 8 > this.dataLength) + ) throw new Error("Offset out of bounds"); store(this.dataStart + byteOffset, littleEndian ? value : bswap(value)); } setUint64(byteOffset: i32, value: u64, littleEndian: boolean = false): void { - if (byteOffset + 8 > this.dataLength) throw new Error("Offset out of bounds"); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 8 > this.dataLength) + ) throw new Error("Offset out of bounds"); store(this.dataStart + byteOffset, littleEndian ? value : bswap(value)); } diff --git a/std/assembly/typedarray.ts b/std/assembly/typedarray.ts index 9eb2bead..53f56016 100644 --- a/std/assembly/typedarray.ts +++ b/std/assembly/typedarray.ts @@ -84,6 +84,10 @@ export class Uint8Array extends ArrayBufferView { super(length, alignof()); } + get buffer(): ArrayBuffer { + return this.data; + } + get length(): i32 { return this.byteLength; } diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index 11d347cd..0ad4a800 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -106,7 +106,7 @@ if i32.const 0 i32.const 16 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -120,7 +120,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/call-super.untouched.wat b/tests/compiler/call-super.untouched.wat index b52ec1a9..c9ce5337 100644 --- a/tests/compiler/call-super.untouched.wat +++ b/tests/compiler/call-super.untouched.wat @@ -145,7 +145,7 @@ if i32.const 0 i32.const 16 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -160,7 +160,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index 4570c4c7..98c0a13f 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -116,7 +116,7 @@ if i32.const 0 i32.const 16 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -130,7 +130,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/constructor.untouched.wat b/tests/compiler/constructor.untouched.wat index e05c77d4..000ac7d8 100644 --- a/tests/compiler/constructor.untouched.wat +++ b/tests/compiler/constructor.untouched.wat @@ -155,7 +155,7 @@ if i32.const 0 i32.const 16 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -170,7 +170,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index a183a11e..e4056d28 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -131,7 +131,7 @@ if i32.const 0 i32.const 16 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -145,7 +145,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index b1429741..5ebb60c9 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -197,7 +197,7 @@ if i32.const 0 i32.const 16 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -212,7 +212,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index 54ae787a..e35e6b1d 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -85,7 +85,7 @@ if i32.const 0 i32.const 16 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -99,7 +99,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/getter-call.untouched.wat b/tests/compiler/getter-call.untouched.wat index 08d8f1f6..f7e03052 100644 --- a/tests/compiler/getter-call.untouched.wat +++ b/tests/compiler/getter-call.untouched.wat @@ -147,7 +147,7 @@ if i32.const 0 i32.const 16 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -162,7 +162,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index cf913b0c..97b00f42 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -131,7 +131,7 @@ if i32.const 0 i32.const 48 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -145,7 +145,7 @@ if i32.const 0 i32.const 48 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index 91ac40c2..2a270c26 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -411,7 +411,7 @@ if i32.const 0 i32.const 48 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -426,7 +426,7 @@ if i32.const 0 i32.const 48 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/new-without-allocator.untouched.wat b/tests/compiler/new-without-allocator.untouched.wat index 5456e7f9..67b603f0 100644 --- a/tests/compiler/new-without-allocator.untouched.wat +++ b/tests/compiler/new-without-allocator.untouched.wat @@ -61,7 +61,7 @@ if i32.const 0 i32.const 16 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -76,7 +76,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/nonNullAssertion.optimized.wat b/tests/compiler/nonNullAssertion.optimized.wat index 4e6f8471..1d92c3f0 100644 --- a/tests/compiler/nonNullAssertion.optimized.wat +++ b/tests/compiler/nonNullAssertion.optimized.wat @@ -1,12 +1,10 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$i (func (result i32))) + (type $FUNCSIG$v (func)) (memory $0 0) (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "table" (table $0)) @@ -22,7 +20,6 @@ (export "testRet" (func $nonNullAssertion/testFn)) (export "testObjFn" (func $nonNullAssertion/testObjFn)) (export "testObjRet" (func $nonNullAssertion/testObjFn)) - (start $start) (func $nonNullAssertion/testVar (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 ) @@ -31,36 +28,26 @@ i32.load ) (func $nonNullAssertion/testArr (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + i32.const -1 i32.const 0 local.get $0 - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + select + i32.load ) (func $nonNullAssertion/testAll (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + i32.const -1 i32.const 0 local.get $0 - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + select + i32.load i32.load ) (func $nonNullAssertion/testFn (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -76,13 +63,7 @@ i32.load offset=4 call_indirect (type $FUNCSIG$i) ) - (func $start (; 6 ;) (type $FUNCSIG$v) - i32.const 8 - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - ) - (func $null (; 7 ;) (type $FUNCSIG$v) + (func $null (; 6 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/nonNullAssertion.untouched.wat b/tests/compiler/nonNullAssertion.untouched.wat index 338b3149..38bc6d36 100644 --- a/tests/compiler/nonNullAssertion.untouched.wat +++ b/tests/compiler/nonNullAssertion.untouched.wat @@ -1,13 +1,10 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$i (func (result i32))) + (type $FUNCSIG$v (func)) (memory $0 0) (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) @@ -24,128 +21,102 @@ (export "testRet" (func $nonNullAssertion/testRet)) (export "testObjFn" (func $nonNullAssertion/testObjFn)) (export "testObjRet" (func $nonNullAssertion/testObjRet)) - (start $start) - (func $start:~lib/allocator/arena (; 0 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 + (func $nonNullAssertion/testVar (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + ) + (func $nonNullAssertion/testObj (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load + ) + (func $nonNullAssertion/testProp (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load + ) + (func $nonNullAssertion/testArr (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + local.tee $1 + i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $2 i32.add - i32.const 7 i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - ) - (func $start:nonNullAssertion (; 1 ;) (type $FUNCSIG$v) - call $start:~lib/allocator/arena - ) - (func $nonNullAssertion/testVar (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - ) - (func $nonNullAssertion/testObj (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load - ) - (func $nonNullAssertion/testProp (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load - ) - (func $~lib/array/Array#__get (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.set $2 - local.get $1 local.get $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end - ) - (func $nonNullAssertion/testArr (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - call $~lib/array/Array#__get - ) - (func $~lib/array/Array#__get (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.set $2 local.get $1 - local.get $2 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=8 i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end - ) - (func $nonNullAssertion/testElem (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - call $~lib/array/Array#__get - ) - (func $nonNullAssertion/testAll (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - call $~lib/array/Array#__get + select i32.load ) - (func $nonNullAssertion/testAll2 (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testElem (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) local.get $0 + local.tee $1 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select i32.load ) - (func $nonNullAssertion/testFn (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testAll (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + local.tee $1 + i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load + i32.load + ) + (func $nonNullAssertion/testAll2 (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + local.tee $1 + i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load + i32.load + ) + (func $nonNullAssertion/testFn (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 global.set $~lib/argc local.get $0 call_indirect (type $FUNCSIG$i) ) - (func $nonNullAssertion/testFn2 (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testFn2 (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 local.set $1 @@ -154,29 +125,26 @@ local.get $1 call_indirect (type $FUNCSIG$i) ) - (func $nonNullAssertion/testRet (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testRet (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 global.set $~lib/argc local.get $0 call_indirect (type $FUNCSIG$i) ) - (func $nonNullAssertion/testObjFn (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testObjFn (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 global.set $~lib/argc local.get $0 i32.load offset=4 call_indirect (type $FUNCSIG$i) ) - (func $nonNullAssertion/testObjRet (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $nonNullAssertion/testObjRet (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 global.set $~lib/argc local.get $0 i32.load offset=4 call_indirect (type $FUNCSIG$i) ) - (func $start (; 16 ;) (type $FUNCSIG$v) - call $start:nonNullAssertion - ) - (func $null (; 17 ;) (type $FUNCSIG$v) + (func $null (; 12 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 1df7f3c7..2ea6fa0f 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -11,7 +11,7 @@ (memory $0 1) (data (i32.const 8) "\01\00\00\00\02\00\00\000") (data (i32.const 24) "\02\00\00\00\90\01\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 432) "\03\00\00\00\10\00\00\00 \00\00\00 \00\00\00\b0\01\00\00d") + (data (i32.const 432) "\03\00\00\00\10\00\00\00 \00\00\00 \00\00\00\90\01\00\00d") (data (i32.const 456) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (data (i32.const 496) "\01\00\00\00\02\00\00\001") (data (i32.const 512) "\01\00\00\00\12\00\00\00n\00u\00m\00b\00e\00r\00.\00t\00s") @@ -20,11 +20,11 @@ (data (i32.const 576) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") (data (i32.const 608) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") (data (i32.const 632) "\02\00\00\00\b8\02\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8>#__get (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array-access/i32ArrayArrayElementAccess (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end - ) - (func $~lib/array/Array#__get (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end - ) - (func $std/array-access/i32ArrayArrayElementAccess (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 + local.tee $1 + i32.load offset=4 i32.const 0 - call $~lib/array/Array>#__get + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load + local.tee $1 + i32.load offset=4 i32.const 1 - call $~lib/array/Array#__get - ) - (func $~lib/array/Array#__get (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load i32.const 2 - i32.shr_u + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end - ) - (func $std/array-access/stringArrayPropertyAccess (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - call $~lib/array/Array#__get + select i32.load ) - (func $~lib/internal/string/compareUnsafe (; 6 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (func $~lib/string/String#get:length (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + ) + (func $std/array-access/stringArrayPropertyAccess (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + local.tee $1 + i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load + call $~lib/string/String#get:length + ) + (func $~lib/util/string/compareImpl (; 4 ;) (type $FUNCSIG$iiiiii) (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) @@ -155,9 +106,9 @@ local.get $4 if (result i32) local.get $6 - i32.load16_u offset=4 + i32.load16_u local.get $7 - i32.load16_u offset=4 + i32.load16_u i32.sub local.tee $5 i32.eqz @@ -185,7 +136,7 @@ end local.get $5 ) - (func $~lib/string/String#startsWith (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#startsWith (; 5 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -198,8 +149,8 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 224 + i32.const 24 + i32.const 165 i32.const 4 call $~lib/env/abort unreachable @@ -208,13 +159,13 @@ i32.const 0 i32.eq if - i32.const 48 + i32.const 64 local.set $1 end local.get $2 local.set $3 local.get $0 - i32.load + call $~lib/string/String#get:length local.set $4 local.get $3 local.tee $5 @@ -233,7 +184,7 @@ select local.set $7 local.get $1 - i32.load + call $~lib/string/String#get:length local.set $8 local.get $8 local.get $7 @@ -249,68 +200,101 @@ local.get $1 i32.const 0 local.get $8 - call $~lib/internal/string/compareUnsafe + call $~lib/util/string/compareImpl i32.eqz ) - (func $std/array-access/stringArrayMethodCall (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - call $~lib/array/Array#__get - i32.const 8 - i32.const 0 - call $~lib/string/String#startsWith - ) - (func $~lib/array/Array>#__get (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array-access/stringArrayMethodCall (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load + local.tee $1 + i32.load offset=4 + i32.const 0 i32.const 2 - i32.shr_u + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end - ) - (func $std/array-access/stringArrayArrayPropertyAccess (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - call $~lib/array/Array>#__get - i32.const 1 - call $~lib/array/Array#__get + select i32.load - ) - (func $std/array-access/stringArrayArrayMethodCall (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - call $~lib/array/Array>#__get - i32.const 1 - call $~lib/array/Array#__get - i32.const 8 + i32.const 16 i32.const 0 call $~lib/string/String#startsWith ) - (func $null (; 12 ;) (type $FUNCSIG$v) + (func $std/array-access/stringArrayArrayPropertyAccess (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + local.tee $1 + i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load + local.tee $1 + i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load + call $~lib/string/String#get:length + ) + (func $std/array-access/stringArrayArrayMethodCall (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + local.tee $1 + i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load + local.tee $1 + i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load + i32.const 16 + i32.const 0 + call $~lib/string/String#startsWith + ) + (func $null (; 9 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 7e5b7339..df11fd73 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -4,18 +4,18 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$v (func)) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00\03\00\00\00\00\01\02") - (data (i32.const 24) "\02\00\00\00\10\00\00\00\10\00\00\00\10\00\00\00\13\00\00\00\03") + (data (i32.const 24) "\02\00\00\00\10\00\00\00\10\00\00\00\10\00\00\00\03\00\00\00\03") (data (i32.const 48) "\03\00\00\00(\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s") (data (i32.const 96) "\01\00\00\00\0c\00\00\00\00\00\00\00\01\00\00\00\02") - (data (i32.const 120) "\04\00\00\00\10\00\00\00h\00\00\00h\00\00\00t\00\00\00\03") + (data (i32.const 120) "\04\00\00\00\10\00\00\00h\00\00\00h\00\00\00\0c\00\00\00\03") (data (i32.const 144) "\01") - (data (i32.const 152) "\04\00\00\00\10\00\00\00\98\00\00\00\98\00\00\00\98") + (data (i32.const 152) "\04\00\00\00\10\00\00\00\98\00\00\00\98") (data (i32.const 176) "\03\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (data (i32.const 216) "\03\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") (data (i32.const 264) "\03\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") @@ -333,7 +333,7 @@ if i32.const 0 i32.const 184 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -347,7 +347,7 @@ if i32.const 0 i32.const 184 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -395,7 +395,7 @@ if i32.const 0 i32.const 184 - i32.const 223 + i32.const 226 i32.const 57 call $~lib/env/abort unreachable @@ -431,9 +431,7 @@ local.get $1 i32.store offset=4 local.get $0 - local.get $1 local.get $2 - i32.add i32.store offset=8 local.get $0 ) @@ -1622,49 +1620,52 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/Array#resize (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/array/ensureLength (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 i32.load - local.tee $2 + local.tee $3 i32.const 8 i32.sub i32.load offset=4 + local.get $2 + i32.shr_u i32.gt_u if local.get $1 i32.const 1073741816 + local.get $2 + i32.shr_u i32.gt_u if i32.const 0 i32.const 272 - i32.const 37 - i32.const 41 + i32.const 12 + i32.const 59 call $~lib/env/abort unreachable end - local.get $2 - local.tee $3 - local.get $1 - call $~lib/runtime/doReallocate - local.tee $2 local.get $3 + local.get $3 + local.get $1 + local.get $2 + i32.shl + local.tee $2 + call $~lib/runtime/doReallocate + local.tee $1 i32.ne if local.get $0 - local.get $2 + local.get $1 i32.store local.get $0 - local.get $2 - i32.store offset=4 - local.get $0 local.get $1 - local.get $2 - i32.add - i32.store offset=8 + i32.store offset=4 end + local.get $0 + local.get $2 + i32.store offset=8 end ) (func $~lib/array/Array#__set (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) @@ -1672,7 +1673,8 @@ local.get $1 i32.const 1 i32.add - call $~lib/array/Array#resize + i32.const 0 + call $~lib/array/ensureLength local.get $1 local.get $0 i32.load offset=4 @@ -1691,62 +1693,13 @@ i32.store offset=12 end ) - (func $~lib/array/Array#resize (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - local.get $0 - i32.load - local.tee $2 - i32.const 8 - i32.sub - i32.load offset=4 - i32.const 2 - i32.shr_u - i32.gt_u - if - local.get $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 272 - i32.const 37 - i32.const 41 - call $~lib/env/abort - unreachable - end - local.get $2 - local.tee $3 - local.get $1 - i32.const 2 - i32.shl - local.tee $2 - call $~lib/runtime/doReallocate - local.tee $1 - local.get $3 - i32.ne - if - local.get $0 - local.get $1 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - local.get $0 - local.get $1 - local.get $2 - i32.add - i32.store offset=8 - end - end - ) - (func $~lib/array/Array#__set (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 i32.const 1 i32.add - call $~lib/array/Array#resize + i32.const 2 + call $~lib/array/ensureLength local.get $0 i32.load offset=4 local.get $1 @@ -1767,19 +1720,19 @@ i32.store offset=12 end ) - (func $std/array-literal/Ref#constructor (; 15 ;) (type $FUNCSIG$i) (result i32) + (func $std/array-literal/Ref#constructor (; 14 ;) (type $FUNCSIG$i) (result i32) i32.const 0 call $~lib/runtime/doAllocate i32.const 6 call $~lib/runtime/doRegister ) - (func $std/array-literal/RefWithCtor#constructor (; 16 ;) (type $FUNCSIG$i) (result i32) + (func $std/array-literal/RefWithCtor#constructor (; 15 ;) (type $FUNCSIG$i) (result i32) i32.const 0 call $~lib/runtime/doAllocate i32.const 8 call $~lib/runtime/doRegister ) - (func $start:std/array-literal (; 17 ;) (type $FUNCSIG$v) + (func $start:std/array-literal (; 16 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 44 i32.load @@ -1795,6 +1748,12 @@ end i32.const 36 i32.load + i32.const -1 + i32.const 0 + i32.const 40 + i32.load + i32.lt_u + select i32.load8_s if i32.const 0 @@ -1806,7 +1765,15 @@ end i32.const 36 i32.load - i32.load8_s offset=1 + i32.const 1 + i32.add + i32.const -1 + i32.const 1 + i32.const 40 + i32.load + i32.lt_u + select + i32.load8_s i32.const 1 i32.ne if @@ -1819,7 +1786,15 @@ end i32.const 36 i32.load - i32.load8_s offset=2 + i32.const 2 + i32.add + i32.const -1 + i32.const 2 + i32.const 40 + i32.load + i32.lt_u + select + i32.load8_s i32.const 2 i32.ne if @@ -1844,6 +1819,12 @@ end i32.const 132 i32.load + i32.const -1 + i32.const 0 + i32.const 136 + i32.load + i32.lt_u + select i32.load if i32.const 0 @@ -1855,7 +1836,15 @@ end i32.const 132 i32.load - i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + i32.const 136 + i32.load + i32.lt_u + select + i32.load i32.const 1 i32.ne if @@ -1868,7 +1857,15 @@ end i32.const 132 i32.load - i32.load offset=8 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + i32.const 136 + i32.load + i32.lt_u + select + i32.load i32.const 2 i32.ne if @@ -1940,7 +1937,14 @@ unreachable end global.get $std/array-literal/dynamicArrayI8 + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load8_s if i32.const 0 @@ -1951,8 +1955,17 @@ unreachable end global.get $std/array-literal/dynamicArrayI8 + local.tee $0 i32.load offset=4 - i32.load8_s offset=1 + i32.const 1 + i32.add + i32.const -1 + i32.const 1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load8_s i32.const 1 i32.ne if @@ -1964,8 +1977,17 @@ unreachable end global.get $std/array-literal/dynamicArrayI8 + local.tee $0 i32.load offset=4 - i32.load8_s offset=2 + i32.const 2 + i32.add + i32.const -1 + i32.const 2 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load8_s i32.const 2 i32.ne if @@ -2025,7 +2047,14 @@ unreachable end global.get $std/array-literal/dynamicArrayI32 + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load if i32.const 0 @@ -2036,8 +2065,17 @@ unreachable end global.get $std/array-literal/dynamicArrayI32 + local.tee $0 i32.load offset=4 - i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1 i32.ne if @@ -2049,8 +2087,17 @@ unreachable end global.get $std/array-literal/dynamicArrayI32 + local.tee $0 i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 2 i32.ne if @@ -2138,10 +2185,10 @@ unreachable end ) - (func $start (; 18 ;) (type $FUNCSIG$v) + (func $start (; 17 ;) (type $FUNCSIG$v) call $start:std/array-literal ) - (func $null (; 19 ;) (type $FUNCSIG$v) + (func $null (; 18 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index 4a95220f..62d68daa 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -5,17 +5,16 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\01\00\00\00\03\00\00\00\00\01\02") - (data (i32.const 24) "\02\00\00\00\10\00\00\00\10\00\00\00\10\00\00\00\13\00\00\00\03\00\00\00") + (data (i32.const 24) "\02\00\00\00\10\00\00\00\10\00\00\00\10\00\00\00\03\00\00\00\03\00\00\00") (data (i32.const 48) "\03\00\00\00(\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s\00") (data (i32.const 96) "\01\00\00\00\0c\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 120) "\04\00\00\00\10\00\00\00h\00\00\00h\00\00\00t\00\00\00\03\00\00\00") + (data (i32.const 120) "\04\00\00\00\10\00\00\00h\00\00\00h\00\00\00\0c\00\00\00\03\00\00\00") (data (i32.const 144) "\01\00\00\00\00\00\00\00") - (data (i32.const 152) "\04\00\00\00\10\00\00\00\98\00\00\00\98\00\00\00\98\00\00\00\00\00\00\00") + (data (i32.const 152) "\04\00\00\00\10\00\00\00\98\00\00\00\98\00\00\00\00\00\00\00\00\00\00\00") (data (i32.const 176) "\03\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (data (i32.const 216) "\03\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") (data (i32.const 264) "\03\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") @@ -425,7 +424,7 @@ if i32.const 0 i32.const 184 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -440,7 +439,7 @@ if i32.const 0 i32.const 184 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable @@ -504,7 +503,7 @@ if i32.const 0 i32.const 184 - i32.const 223 + i32.const 226 i32.const 57 call $~lib/env/abort unreachable @@ -547,9 +546,7 @@ local.get $3 i32.store offset=4 local.get $0 - local.get $3 local.get $1 - i32.add i32.store offset=8 local.get $0 ) @@ -2116,65 +2113,65 @@ i32.store offset=4 local.get $0 ) - (func $~lib/array/Array#resize (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/array/ensureLength (; 18 ;) (type $FUNCSIG$viii) (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.get $0 i32.load - local.set $2 - local.get $2 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength - i32.const 0 - i32.shr_u local.set $3 - local.get $1 local.get $3 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.get $2 + i32.shr_u + local.set $4 + local.get $1 + local.get $4 i32.gt_u if local.get $1 - i32.const 1073741816 + global.get $~lib/runtime/MAX_BYTELENGTH + local.get $2 + i32.shr_u i32.gt_u if i32.const 0 i32.const 272 - i32.const 37 - i32.const 41 + i32.const 12 + i32.const 59 call $~lib/env/abort unreachable end local.get $1 - i32.const 0 + local.get $2 i32.shl - local.set $4 + local.set $5 block $~lib/runtime/REALLOCATE|inlined.0 (result i32) - local.get $2 - local.set $5 - local.get $4 + local.get $3 local.set $6 local.get $5 + local.set $7 local.get $6 + local.get $7 call $~lib/runtime/doReallocate end - local.set $6 - local.get $6 - local.get $2 + local.set $7 + local.get $7 + local.get $3 i32.ne if local.get $0 - local.get $6 + local.get $7 i32.store local.get $0 - local.get $6 + local.get $7 i32.store offset=4 - local.get $0 - local.get $6 - local.get $4 - i32.add - i32.store offset=8 end + local.get $0 + local.get $5 + i32.store offset=8 end ) (func $~lib/array/Array#__set (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) @@ -2182,7 +2179,8 @@ local.get $1 i32.const 1 i32.add - call $~lib/array/Array#resize + i32.const 0 + call $~lib/array/ensureLength local.get $0 i32.load offset=4 local.get $1 @@ -2228,73 +2226,13 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array#resize (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load - local.set $2 - local.get $2 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength - i32.const 2 - i32.shr_u - local.set $3 - local.get $1 - local.get $3 - i32.gt_u - if - local.get $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 272 - i32.const 37 - i32.const 41 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.set $4 - block $~lib/runtime/REALLOCATE|inlined.1 (result i32) - local.get $2 - local.set $5 - local.get $4 - local.set $6 - local.get $5 - local.get $6 - call $~lib/runtime/doReallocate - end - local.set $6 - local.get $6 - local.get $2 - i32.ne - if - local.get $0 - local.get $6 - i32.store - local.get $0 - local.get $6 - i32.store offset=4 - local.get $0 - local.get $6 - local.get $4 - i32.add - i32.store offset=8 - end - end - ) - (func $~lib/array/Array#__set (; 22 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 i32.const 1 i32.add - call $~lib/array/Array#resize + i32.const 2 + call $~lib/array/ensureLength local.get $0 i32.load offset=4 local.get $1 @@ -2315,7 +2253,7 @@ i32.store offset=12 end ) - (func $std/array-literal/Ref#constructor (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-literal/Ref#constructor (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz @@ -2332,7 +2270,7 @@ end local.get $0 ) - (func $~lib/array/Array#constructor (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -2357,73 +2295,13 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array#resize (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load - local.set $2 - local.get $2 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength - i32.const 2 - i32.shr_u - local.set $3 - local.get $1 - local.get $3 - i32.gt_u - if - local.get $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 272 - i32.const 37 - i32.const 41 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.set $4 - block $~lib/runtime/REALLOCATE|inlined.2 (result i32) - local.get $2 - local.set $5 - local.get $4 - local.set $6 - local.get $5 - local.get $6 - call $~lib/runtime/doReallocate - end - local.set $6 - local.get $6 - local.get $2 - i32.ne - if - local.get $0 - local.get $6 - i32.store - local.get $0 - local.get $6 - i32.store offset=4 - local.get $0 - local.get $6 - local.get $4 - i32.add - i32.store offset=8 - end - end - ) - (func $~lib/array/Array#__set (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 i32.const 1 i32.add - call $~lib/array/Array#resize + i32.const 2 + call $~lib/array/ensureLength local.get $0 i32.load offset=4 local.get $1 @@ -2444,11 +2322,11 @@ i32.store offset=12 end ) - (func $~lib/array/Array#get:length (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $std/array-literal/RefWithCtor#constructor (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-literal/RefWithCtor#constructor (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.eqz @@ -2465,7 +2343,7 @@ end local.get $0 ) - (func $~lib/array/Array#constructor (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 if (result i32) @@ -2490,73 +2368,13 @@ i32.store offset=12 local.get $0 ) - (func $~lib/array/Array#resize (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load - local.set $2 - local.get $2 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength - i32.const 2 - i32.shr_u - local.set $3 - local.get $1 - local.get $3 - i32.gt_u - if - local.get $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 272 - i32.const 37 - i32.const 41 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.set $4 - block $~lib/runtime/REALLOCATE|inlined.3 (result i32) - local.get $2 - local.set $5 - local.get $4 - local.set $6 - local.get $5 - local.get $6 - call $~lib/runtime/doReallocate - end - local.set $6 - local.get $6 - local.get $2 - i32.ne - if - local.get $0 - local.get $6 - i32.store - local.get $0 - local.get $6 - i32.store offset=4 - local.get $0 - local.get $6 - local.get $4 - i32.add - i32.store offset=8 - end - end - ) - (func $~lib/array/Array#__set (; 31 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 i32.const 1 i32.add - call $~lib/array/Array#resize + i32.const 2 + call $~lib/array/ensureLength local.get $0 i32.load offset=4 local.get $1 @@ -2577,15 +2395,17 @@ i32.store offset=12 end ) - (func $~lib/array/Array#get:length (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=12 ) - (func $start:std/array-literal (; 33 ;) (type $FUNCSIG$v) + (func $start:std/array-literal (; 30 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) global.get $std/array-literal/staticArrayI8 call $~lib/array/Array#get:length i32.const 3 @@ -2600,7 +2420,17 @@ unreachable end global.get $std/array-literal/staticArrayI8 + local.tee $0 i32.load offset=4 + i32.const 0 + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load8_s i32.const 0 i32.eq @@ -2614,8 +2444,18 @@ unreachable end global.get $std/array-literal/staticArrayI8 + local.tee $0 i32.load offset=4 - i32.load8_s offset=1 + i32.const 1 + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load8_s i32.const 1 i32.eq i32.eqz @@ -2628,8 +2468,18 @@ unreachable end global.get $std/array-literal/staticArrayI8 + local.tee $0 i32.load offset=4 - i32.load8_s offset=2 + i32.const 2 + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load8_s i32.const 2 i32.eq i32.eqz @@ -2655,7 +2505,19 @@ unreachable end global.get $std/array-literal/staticArrayI32 + local.tee $0 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 0 i32.eq @@ -2669,8 +2531,20 @@ unreachable end global.get $std/array-literal/staticArrayI32 + local.tee $0 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1 i32.eq i32.eqz @@ -2683,8 +2557,20 @@ unreachable end global.get $std/array-literal/staticArrayI32 + local.tee $0 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 2 i32.eq i32.eqz @@ -2723,12 +2609,12 @@ i32.const 0 i32.const 3 call $~lib/array/Array#constructor - local.set $0 - local.get $0 + local.set $2 + local.get $2 i32.const 0 global.get $std/array-literal/i call $~lib/array/Array#__set - local.get $0 + local.get $2 i32.const 1 block (result i32) global.get $std/array-literal/i @@ -2738,7 +2624,7 @@ global.get $std/array-literal/i end call $~lib/array/Array#__set - local.get $0 + local.get $2 i32.const 2 block (result i32) global.get $std/array-literal/i @@ -2748,7 +2634,7 @@ global.get $std/array-literal/i end call $~lib/array/Array#__set - local.get $0 + local.get $2 end global.set $std/array-literal/dynamicArrayI8 global.get $std/array-literal/dynamicArrayI8 @@ -2765,7 +2651,17 @@ unreachable end global.get $std/array-literal/dynamicArrayI8 + local.tee $2 i32.load offset=4 + i32.const 0 + local.tee $0 + i32.add + i32.const -1 + local.get $0 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load8_s i32.const 0 i32.eq @@ -2779,8 +2675,18 @@ unreachable end global.get $std/array-literal/dynamicArrayI8 + local.tee $2 i32.load offset=4 - i32.load8_s offset=1 + i32.const 1 + local.tee $0 + i32.add + i32.const -1 + local.get $0 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load8_s i32.const 1 i32.eq i32.eqz @@ -2793,8 +2699,18 @@ unreachable end global.get $std/array-literal/dynamicArrayI8 + local.tee $2 i32.load offset=4 - i32.load8_s offset=2 + i32.const 2 + local.tee $0 + i32.add + i32.const -1 + local.get $0 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load8_s i32.const 2 i32.eq i32.eqz @@ -2812,12 +2728,12 @@ i32.const 0 i32.const 3 call $~lib/array/Array#constructor - local.set $1 - local.get $1 + local.set $3 + local.get $3 i32.const 0 global.get $std/array-literal/i call $~lib/array/Array#__set - local.get $1 + local.get $3 i32.const 1 block (result i32) global.get $std/array-literal/i @@ -2827,7 +2743,7 @@ global.get $std/array-literal/i end call $~lib/array/Array#__set - local.get $1 + local.get $3 i32.const 2 block (result i32) global.get $std/array-literal/i @@ -2837,7 +2753,7 @@ global.get $std/array-literal/i end call $~lib/array/Array#__set - local.get $1 + local.get $3 end global.set $std/array-literal/dynamicArrayI32 global.get $std/array-literal/dynamicArrayI32 @@ -2854,7 +2770,19 @@ unreachable end global.get $std/array-literal/dynamicArrayI32 + local.tee $3 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $3 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 0 i32.eq @@ -2868,8 +2796,20 @@ unreachable end global.get $std/array-literal/dynamicArrayI32 + local.tee $3 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $3 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1 i32.eq i32.eqz @@ -2882,8 +2822,20 @@ unreachable end global.get $std/array-literal/dynamicArrayI32 + local.tee $3 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $2 + i32.add + i32.const -1 + local.get $2 + local.get $3 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 2 i32.eq i32.eqz @@ -2899,23 +2851,23 @@ i32.const 0 i32.const 3 call $~lib/array/Array#constructor - local.set $2 - local.get $2 + local.set $4 + local.get $4 i32.const 0 i32.const 0 call $std/array-literal/Ref#constructor call $~lib/array/Array#__set - local.get $2 + local.get $4 i32.const 1 i32.const 0 call $std/array-literal/Ref#constructor call $~lib/array/Array#__set - local.get $2 + local.get $4 i32.const 2 i32.const 0 call $std/array-literal/Ref#constructor call $~lib/array/Array#__set - local.get $2 + local.get $4 end global.set $std/array-literal/dynamicArrayRef global.get $std/array-literal/dynamicArrayRef @@ -2935,23 +2887,23 @@ i32.const 0 i32.const 3 call $~lib/array/Array#constructor - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 0 i32.const 0 call $std/array-literal/RefWithCtor#constructor call $~lib/array/Array#__set - local.get $3 + local.get $5 i32.const 1 i32.const 0 call $std/array-literal/RefWithCtor#constructor call $~lib/array/Array#__set - local.get $3 + local.get $5 i32.const 2 i32.const 0 call $std/array-literal/RefWithCtor#constructor call $~lib/array/Array#__set - local.get $3 + local.get $5 end global.set $std/array-literal/dynamicArrayRefWithCtor global.get $std/array-literal/dynamicArrayRefWithCtor @@ -2968,9 +2920,9 @@ unreachable end ) - (func $start (; 34 ;) (type $FUNCSIG$v) + (func $start (; 31 ;) (type $FUNCSIG$v) call $start:std/array-literal ) - (func $null (; 35 ;) (type $FUNCSIG$v) + (func $null (; 32 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index b75d1b90..423fa825 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -1,12 +1,11 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$fiii (func (param i32 i32 i32) (result f32))) (type $FUNCSIG$d (func (result f64))) @@ -14,339 +13,228 @@ (type $FUNCSIG$iff (func (param f32 f32) (result i32))) (type $FUNCSIG$idd (func (param f64 f64) (result i32))) (type $FUNCSIG$id (func (param f64) (result i32))) - (type $FUNCSIG$viiiii (func (param i32 i32 i32 i32 i32))) (type $FUNCSIG$iid (func (param i32 f64) (result i32))) (type $FUNCSIG$iijijiji (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) (type $FUNCSIG$iiid (func (param i32 i32 f64) (result i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$viji (func (param i32 i64 i32))) (type $FUNCSIG$iiij (func (param i32 i32 i64) (result i32))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "Math" "random" (func $~lib/bindings/Math/random (result f64))) (memory $0 1) - (data (i32.const 8) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 40) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 104) "\03\00\00\00a\00b\00c") - (data (i32.const 120) "\0c\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 152) "\1b\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 216) "\05\00\00\00\00\00\00\00\01\02\03\04\05") - (data (i32.const 232) "\d8\00\00\00\05") - (data (i32.const 240) "\05\00\00\00\00\00\00\00\01\01\01\04\05") - (data (i32.const 256) "\f0\00\00\00\05") - (data (i32.const 264) "\05") - (data (i32.const 280) "\08\01\00\00\05") - (data (i32.const 288) "\05\00\00\00\00\00\00\00\01\01") - (data (i32.const 304) " \01\00\00\05") - (data (i32.const 312) "\05\00\00\00\00\00\00\00\01\01\00\02\02") - (data (i32.const 328) "8\01\00\00\05") - (data (i32.const 336) "\05\00\00\00\00\00\00\00\01\01\00\02\02") - (data (i32.const 352) "P\01\00\00\05") - (data (i32.const 360) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 392) "h\01\00\00\05") - (data (i32.const 400) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05") - (data (i32.const 432) "\90\01\00\00\05") - (data (i32.const 440) "\14") - (data (i32.const 472) "\b8\01\00\00\05") - (data (i32.const 480) "\14\00\00\00\00\00\00\00\01\00\00\00\01") - (data (i32.const 512) "\e0\01\00\00\05") - (data (i32.const 520) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") - (data (i32.const 552) "\08\02\00\00\05") - (data (i32.const 560) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") - (data (i32.const 592) "0\02\00\00\05") - (data (i32.const 608) "X\02") - (data (i32.const 624) "h\02") - (data (i32.const 632) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 664) "x\02\00\00\05") - (data (i32.const 672) "\14\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 704) "\a0\02\00\00\05") - (data (i32.const 712) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 744) "\c8\02\00\00\05") - (data (i32.const 752) "\14\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00\04\00\00\00\05") - (data (i32.const 784) "\f0\02\00\00\05") - (data (i32.const 792) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 824) "\18\03\00\00\05") - (data (i32.const 832) "\14\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05") - (data (i32.const 864) "@\03\00\00\05") - (data (i32.const 872) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 904) "h\03\00\00\05") - (data (i32.const 912) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 944) "\90\03\00\00\05") - (data (i32.const 952) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 984) "\b8\03\00\00\05") - (data (i32.const 992) "\14\00\00\00\00\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1024) "\e0\03\00\00\05") - (data (i32.const 1032) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1064) "\08\04\00\00\05") - (data (i32.const 1072) "\14\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1104) "0\04\00\00\05") - (data (i32.const 1112) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1144) "X\04\00\00\05") - (data (i32.const 1152) "\14\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05") - (data (i32.const 1184) "\80\04\00\00\05") - (data (i32.const 1192) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1224) "\a8\04\00\00\05") - (data (i32.const 1232) "\14\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1264) "\d0\04\00\00\05") - (data (i32.const 1272) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1304) "\f8\04\00\00\05") - (data (i32.const 1312) "\14\00\00\00\00\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1344) " \05\00\00\05") - (data (i32.const 1352) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1384) "H\05\00\00\05") - (data (i32.const 1392) "\14\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1424) "p\05\00\00\05") - (data (i32.const 1432) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1464) "\98\05\00\00\05") - (data (i32.const 1472) "\14\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05") - (data (i32.const 1504) "\c0\05\00\00\05") - (data (i32.const 1512) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1544) "\e8\05\00\00\05") - (data (i32.const 1552) "\14\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05") - (data (i32.const 1584) "\10\06\00\00\05") - (data (i32.const 1592) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1624) "8\06\00\00\05") - (data (i32.const 1632) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1664) "`\06\00\00\05") - (data (i32.const 1680) "\88\06") - (data (i32.const 1688) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1720) "\98\06\00\00\05") - (data (i32.const 1728) "\0c\00\00\00\00\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1760) "\c0\06\00\00\03") - (data (i32.const 1768) "\08\00\00\00\00\00\00\00\01\00\00\00\02") - (data (i32.const 1784) "\e8\06\00\00\02") - (data (i32.const 1792) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1825) "\07\00\00\05") - (data (i32.const 1832) "\08\00\00\00\00\00\00\00\03\00\00\00\04") - (data (i32.const 1848) "(\07\00\00\02") - (data (i32.const 1856) "\0c\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\05") - (data (i32.const 1888) "@\07\00\00\03") - (data (i32.const 1896) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1928) "h\07\00\00\05") - (data (i32.const 1936) "\04\00\00\00\00\00\00\00\01") - (data (i32.const 1952) "\90\07\00\00\01") - (data (i32.const 1960) "\10\00\00\00\00\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1992) "\a8\07\00\00\04") - (data (i32.const 2000) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2032) "\d0\07\00\00\05") - (data (i32.const 2040) "\04\00\00\00\00\00\00\00\05") - (data (i32.const 2056) "\f8\07\00\00\01") - (data (i32.const 2064) "\10\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04") - (data (i32.const 2096) "\10\08\00\00\04") - (data (i32.const 2104) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2136) "8\08\00\00\05") - (data (i32.const 2144) "\08\00\00\00\00\00\00\00\04\00\00\00\05") - (data (i32.const 2160) "`\08\00\00\02") - (data (i32.const 2168) "\0c\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03") - (data (i32.const 2200) "x\08\00\00\03") - (data (i32.const 2208) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2240) "\a0\08\00\00\05") - (data (i32.const 2248) "\04\00\00\00\00\00\00\00\04") - (data (i32.const 2264) "\c8\08\00\00\01") - (data (i32.const 2272) "\10\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\05") - (data (i32.const 2304) "\e0\08\00\00\04") - (data (i32.const 2312) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2344) "\08\t\00\00\05") - (data (i32.const 2352) "\04\00\00\00\00\00\00\00\01") - (data (i32.const 2368) "0\t\00\00\01") - (data (i32.const 2376) "\10\00\00\00\00\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2408) "H\t\00\00\04") - (data (i32.const 2416) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2448) "p\t\00\00\05") - (data (i32.const 2464) "\98\t") - (data (i32.const 2472) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2504) "\a8\t\00\00\05") - (data (i32.const 2512) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2544) "\d0\t\00\00\05") - (data (i32.const 2560) "\f8\t") - (data (i32.const 2568) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2600) "\08\n\00\00\05") - (data (i32.const 2608) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2640) "0\n\00\00\05") - (data (i32.const 2656) "X\n") - (data (i32.const 2664) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2696) "h\n\00\00\05") - (data (i32.const 2704) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2736) "\90\n\00\00\05") - (data (i32.const 2752) "\b8\n") - (data (i32.const 2760) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2792) "\c8\n\00\00\05") - (data (i32.const 2800) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2832) "\f0\n\00\00\05") - (data (i32.const 2848) "\18\0b") - (data (i32.const 2856) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2888) "(\0b\00\00\05") - (data (i32.const 2896) "\0c\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s") - (data (i32.const 2928) "V\00\00\00A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\000\001\002\003\004\005\006\007\008\009\00_\00-\00,\00.\00+\00/\00\\\00[\00]\00{\00}\00(\00)\00<\00>\00*\00&\00$\00%\00^\00@\00#\00!\00?") - (data (i32.const 3104) " ") - (data (i32.const 3114) "\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f") - (data (i32.const 3168) " \0c\00\00\08") - (data (i32.const 3176) " ") - (data (i32.const 3186) "\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f") - (data (i32.const 3240) "h\0c\00\00\08") - (data (i32.const 3248) "@") - (data (i32.const 3262) "\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?") - (data (i32.const 3302) "\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f") - (data (i32.const 3376) "\b0\0c\00\00\08") - (data (i32.const 3384) "@") - (data (i32.const 3398) "\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf") - (data (i32.const 3430) "\f0?\05\00\00\00\00\00\f0?\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\f8\7f") - (data (i32.const 3512) "8\0d\00\00\08") - (data (i32.const 3520) "\14\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\02") - (data (i32.const 3552) "\c0\0d\00\00\05") - (data (i32.const 3560) "\14\00\00\00\00\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02") - (data (i32.const 3592) "\e8\0d\00\00\05") - (data (i32.const 3600) "\14\00\00\00\00\00\00\00\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02") - (data (i32.const 3632) "\10\0e\00\00\05") - (data (i32.const 3640) "\14") - (data (i32.const 3652) "\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff") - (data (i32.const 3672) "8\0e\00\00\05") - (data (i32.const 3688) "`\0e") - (data (i32.const 3696) "\04\00\00\00\00\00\00\00\01") - (data (i32.const 3712) "p\0e\00\00\01") - (data (i32.const 3720) "\08\00\00\00\00\00\00\00\02\00\00\00\01") - (data (i32.const 3736) "\88\0e\00\00\02") - (data (i32.const 3744) "\10\00\00\00\00\00\00\00\03\00\00\00\02\00\00\00\01") - (data (i32.const 3776) "\a0\0e\00\00\04") - (data (i32.const 3784) "\10") - (data (i32.const 3796) "\01\00\00\00\02\00\00\00\03") - (data (i32.const 3816) "\c8\0e\00\00\04") - (data (i32.const 3824) "\04\00\00\00\00\00\00\00\01") - (data (i32.const 3840) "\f0\0e\00\00\01") - (data (i32.const 3848) "\08\00\00\00\00\00\00\00\01\00\00\00\02") - (data (i32.const 3864) "\08\0f\00\00\02") - (data (i32.const 3872) "\01\00\00\00a") - (data (i32.const 3880) "\01\00\00\00b") - (data (i32.const 3888) "\02\00\00\00a\00b") - (data (i32.const 3896) "\02\00\00\00b\00a") - (data (i32.const 3912) "\1c\00\00\00\00\00\00\00 \0f\00\00(\0f\00\00 \0f\00\000\0f\00\008\0f\00\00@\0f") - (data (i32.const 3976) "H\0f\00\00\07") - (data (i32.const 3984) "\1c\00\00\00\00\00\00\00@\0f\00\00 \0f\00\00 \0f\00\000\0f\00\00(\0f\00\008\0f") - (data (i32.const 4048) "\90\0f\00\00\07") - (data (i32.const 4056) "\0e\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 4088) "\17\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 4144) "\04\00\00\00n\00u\00l\00l") - (data (i32.const 4160) "\02\00\00\00\00\00\00\00\01") - (data (i32.const 4176) "@\10\00\00\02") - (data (i32.const 4184) "\04\00\00\00t\00r\00u\00e") - (data (i32.const 4200) "\05\00\00\00f\00a\00l\00s\00e") - (data (i32.const 4216) "\01\00\00\00,") - (data (i32.const 4224) "\02\00\00\00\00\00\00\00\01") - (data (i32.const 4240) "\80\10\00\00\02") - (data (i32.const 4248) "\n\00\00\00t\00r\00u\00e\00,\00f\00a\00l\00s\00e") - (data (i32.const 4272) "\0c\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") - (data (i32.const 4304) "\b0\10\00\00\03") - (data (i32.const 4312) "\01\00\00\000") - (data (i32.const 4320) "\90\01\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 4832) "\e0\10\00\00d") - (data (i32.const 4840) "\0c\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") - (data (i32.const 4872) "\e8\12\00\00\03") - (data (i32.const 4880) "\05\00\00\001\00-\002\00-\003") - (data (i32.const 4896) "\0c\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03") - (data (i32.const 4928) " \13\00\00\03") - (data (i32.const 4936) "\01\00\00\00-") - (data (i32.const 4944) "\0c\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03") - (data (i32.const 4976) "P\13\00\00\03") - (data (i32.const 4984) "\08") - (data (i32.const 4995) "\80\00\00\00\80") - (data (i32.const 5000) "x\13\00\00\02") - (data (i32.const 5008) "\02\00\00\00_\00_") - (data (i32.const 5016) "\08") - (data (i32.const 5027) "\80\00\00\00\80") - (data (i32.const 5032) "\98\13\00\00\02") - (data (i32.const 5040) "\18\00\00\00-\002\001\004\007\004\008\003\006\004\008\00_\00_\00-\002\001\004\007\004\008\003\006\004\008") - (data (i32.const 5096) "0") - (data (i32.const 5118) "\f0?\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\f0\7f") - (data (i32.const 5160) "\e8\13\00\00\06") - (data (i32.const 5168) "\02\00\00\00,\00 ") - (data (i32.const 5176) "\03\00\00\000\00.\000") - (data (i32.const 5192) "\03\00\00\00N\00a\00N") - (data (i32.const 5208) "\t\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 5232) "\08\00\00\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 5256) "\b8\02\00\00\00\00\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\00*\00&\00$\00%\00^\00@\00#\00!\00?") + (data (i32.const 2504) "\02\00\00\00 \00\00\00\00\00\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f") + (data (i32.const 2544) "\t\00\00\00\10\00\00\00\d0\t\00\00\d0\t\00\00 \00\00\00\08") + (data (i32.const 2568) "\02\00\00\00 \00\00\00\00\00\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f") + (data (i32.const 2608) "\02\00\00\00@") + (data (i32.const 2622) "\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?") + (data (i32.const 2662) "\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f") + (data (i32.const 2680) "\n\00\00\00\10\00\00\008\n\00\008\n\00\00@\00\00\00\08") + (data (i32.const 2704) "\02\00\00\00@") + (data (i32.const 2718) "\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf") + (data (i32.const 2750) "\f0?\05\00\00\00\00\00\f0?\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\f8\7f") + (data (i32.const 2776) "\02\00\00\00\14\00\00\00\01\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\02") + (data (i32.const 2808) "\04\00\00\00\10\00\00\00\e0\n\00\00\e0\n\00\00\14\00\00\00\05") + (data (i32.const 2832) "\02\00\00\00\14\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02") + (data (i32.const 2864) "\02\00\00\00\14\00\00\00\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02") + (data (i32.const 2896) "\08\00\00\00\10\00\00\008\0b\00\008\0b\00\00\14\00\00\00\05") + (data (i32.const 2920) "\02\00\00\00\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff") + (data (i32.const 2952) "\02") + (data (i32.const 2960) "\04\00\00\00\10\00\00\00\90\0b\00\00\90\0b") + (data (i32.const 2984) "\02\00\00\00\04\00\00\00\01") + (data (i32.const 3000) "\04\00\00\00\10\00\00\00\b0\0b\00\00\b0\0b\00\00\04\00\00\00\01") + (data (i32.const 3024) "\02\00\00\00\08\00\00\00\02\00\00\00\01") + (data (i32.const 3040) "\04\00\00\00\10\00\00\00\d8\0b\00\00\d8\0b\00\00\08\00\00\00\02") + (data (i32.const 3064) "\02\00\00\00\10\00\00\00\03\00\00\00\02\00\00\00\01") + (data (i32.const 3088) "\04\00\00\00\10\00\00\00\00\0c\00\00\00\0c\00\00\10\00\00\00\04") + (data (i32.const 3112) "\02\00\00\00\10\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03") + (data (i32.const 3136) "\04\00\00\00\10\00\00\000\0c\00\000\0c\00\00\10\00\00\00\04") + (data (i32.const 3160) "\02\00\00\00\04\00\00\00\01") + (data (i32.const 3176) "\02\00\00\00\08\00\00\00\01\00\00\00\02") + (data (i32.const 3192) "\01\00\00\00\02\00\00\00a") + (data (i32.const 3208) "\01\00\00\00\02\00\00\00b") + (data (i32.const 3224) "\01\00\00\00\04\00\00\00a\00b") + (data (i32.const 3240) "\01\00\00\00\04\00\00\00b\00a") + (data (i32.const 3256) "\01") + (data (i32.const 3264) "\02\00\00\00\1c\00\00\00\80\0c\00\00\90\0c\00\00\80\0c\00\00\a0\0c\00\00\b0\0c\00\00\c0\0c") + (data (i32.const 3304) "\0e\00\00\00\10\00\00\00\c8\0c\00\00\c8\0c\00\00\1c\00\00\00\07") + (data (i32.const 3328) "\02\00\00\00\1c\00\00\00\c0\0c\00\00\80\0c\00\00\80\0c\00\00\a0\0c\00\00\90\0c\00\00\b0\0c") + (data (i32.const 3368) "\0e\00\00\00\10\00\00\00\08\0d\00\00\08\0d\00\00\1c\00\00\00\07") + (data (i32.const 3392) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") + (data (i32.const 3432) "\01\00\00\00\08\00\00\00n\00u\00l\00l") + (data (i32.const 3448) "\02\00\00\00\02\00\00\00\01") + (data (i32.const 3464) "\01\00\00\00\08\00\00\00t\00r\00u\00e") + (data (i32.const 3480) "\01\00\00\00\n\00\00\00f\00a\00l\00s\00e") + (data (i32.const 3504) "\01\00\00\00\02\00\00\00,") + (data (i32.const 3520) "\02\00\00\00\02\00\00\00\01") + (data (i32.const 3536) "\01\00\00\00\14\00\00\00t\00r\00u\00e\00,\00f\00a\00l\00s\00e") + (data (i32.const 3568) "\02\00\00\00\0c\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") + (data (i32.const 3592) "\01\00\00\00\02\00\00\000") + (data (i32.const 3608) "\02\00\00\00\90\01\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") + (data (i32.const 4016) "\08\00\00\00\10\00\00\00 \0e\00\00 \0e\00\00\90\01\00\00d") + (data (i32.const 4040) "\02\00\00\00\0c\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") + (data (i32.const 4064) "\01\00\00\00\n\00\00\001\00-\002\00-\003") + (data (i32.const 4088) "\02\00\00\00\0c\00\00\00\01\00\00\00\02\00\00\00\03") + (data (i32.const 4112) "\01\00\00\00\02\00\00\00-") + (data (i32.const 4128) "\02\00\00\00\0c\00\00\00\01\00\00\00\02\00\00\00\03") + (data (i32.const 4152) "\02\00\00\00\08\00\00\00\00\00\00\80\00\00\00\80") + (data (i32.const 4168) "\01\00\00\00\04\00\00\00_\00_") + (data (i32.const 4184) "\02\00\00\00\08\00\00\00\00\00\00\80\00\00\00\80") + (data (i32.const 4200) "\01\00\00\000\00\00\00-\002\001\004\007\004\008\003\006\004\008\00_\00_\00-\002\001\004\007\004\008\003\006\004\008") + (data (i32.const 4256) "\02\00\00\000") + (data (i32.const 4278) "\f0?\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\f0\7f") + (data (i32.const 4312) "\01\00\00\00\04\00\00\00,\00 ") + (data (i32.const 4328) "\01\00\00\00\06\00\00\000\00.\000") + (data (i32.const 4344) "\01\00\00\00\06\00\00\00N\00a\00N") + (data (i32.const 4360) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") + (data (i32.const 4392) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") + (data (i32.const 4416) "\02\00\00\00\b8\02\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8~anonymous|0 $~lib/internal/sort/COMPARATOR~anonymous|0 $~lib/internal/sort/COMPARATOR~anonymous|0 $~lib/internal/sort/COMPARATOR~anonymous|0 $~lib/internal/sort/COMPARATOR~anonymous|0 $~lib/internal/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/internal/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/internal/sort/COMPARATOR~anonymous|0) + (elem (i32.const 0) $null $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|2 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|16 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|29 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|29 $start:std/array~anonymous|35 $start:std/array~anonymous|29 $start:std/array~anonymous|29 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|29 $start:std/array~anonymous|35 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR~anonymous|0) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/array/arr (mut i32) (i32.const 0)) (global $std/array/Null (mut i32) (i32.const 0)) - (global $std/array/arr8 (mut i32) (i32.const 232)) - (global $~lib/argc (mut i32) (i32.const 0)) - (global $std/array/arr32 (mut i32) (i32.const 392)) + (global $std/array/arr8 (mut i32) (i32.const 168)) + (global $std/array/arr32 (mut i32) (i32.const 304)) (global $std/array/i (mut i32) (i32.const 0)) (global $std/array/other (mut i32) (i32.const 0)) (global $std/array/out (mut i32) (i32.const 0)) - (global $std/array/source (mut i32) (i32.const 624)) + (global $std/array/source (mut i32) (i32.const 544)) (global $std/array/cwArr (mut i32) (i32.const 0)) (global $std/array/includes (mut i32) (i32.const 0)) - (global $std/array/sarr (mut i32) (i32.const 1624)) + (global $std/array/sarr (mut i32) (i32.const 1368)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $std/array/every (mut i32) (i32.const 0)) (global $std/array/some (mut i32) (i32.const 0)) (global $std/array/newArr (mut i32) (i32.const 0)) @@ -357,15 +245,15 @@ (global $~lib/math/random_state1_64 (mut i64) (i64.const 0)) (global $~lib/math/random_state0_32 (mut i32) (i32.const 0)) (global $~lib/math/random_state1_32 (mut i32) (i32.const 0)) - (global $std/array/f32ArrayTyped (mut i32) (i32.const 3168)) - (global $std/array/f64ArrayTyped (mut i32) (i32.const 3376)) - (global $std/array/i32ArrayTyped (mut i32) (i32.const 3552)) - (global $std/array/u32ArrayTyped (mut i32) (i32.const 3632)) - (global $std/array/reversed0 (mut i32) (i32.const 3688)) - (global $std/array/reversed1 (mut i32) (i32.const 3712)) - (global $std/array/reversed2 (mut i32) (i32.const 3736)) - (global $std/array/reversed4 (mut i32) (i32.const 3776)) - (global $std/array/expected4 (mut i32) (i32.const 3816)) + (global $std/array/f32ArrayTyped (mut i32) (i32.const 2552)) + (global $std/array/f64ArrayTyped (mut i32) (i32.const 2688)) + (global $std/array/i32ArrayTyped (mut i32) (i32.const 2816)) + (global $std/array/u32ArrayTyped (mut i32) (i32.const 2904)) + (global $std/array/reversed0 (mut i32) (i32.const 2968)) + (global $std/array/reversed1 (mut i32) (i32.const 3008)) + (global $std/array/reversed2 (mut i32) (i32.const 3048)) + (global $std/array/reversed4 (mut i32) (i32.const 3096)) + (global $std/array/expected4 (mut i32) (i32.const 3144)) (global $std/array/reversed64 (mut i32) (i32.const 0)) (global $std/array/reversed128 (mut i32) (i32.const 0)) (global $std/array/reversed1024 (mut i32) (i32.const 0)) @@ -375,23 +263,23 @@ (global $std/array/randomized257 (mut i32) (i32.const 0)) (global $std/array/reversedNested512 (mut i32) (i32.const 0)) (global $std/array/reversedElements512 (mut i32) (i32.const 0)) - (global $std/array/randomStringsActual (mut i32) (i32.const 3976)) - (global $std/array/randomStringsExpected (mut i32) (i32.const 4048)) + (global $std/array/randomStringsActual (mut i32) (i32.const 3312)) + (global $std/array/randomStringsExpected (mut i32) (i32.const 3376)) (global $std/array/randomStrings400 (mut i32) (i32.const 0)) - (global $~lib/internal/number/_frc_plus (mut i64) (i64.const 0)) - (global $~lib/internal/number/_frc_minus (mut i64) (i64.const 0)) - (global $~lib/internal/number/_exp (mut i32) (i32.const 0)) - (global $~lib/internal/number/_K (mut i32) (i32.const 0)) - (global $~lib/internal/number/_frc_pow (mut i64) (i64.const 0)) - (global $~lib/internal/number/_exp_pow (mut i32) (i32.const 0)) + (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) + (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) + (global $~lib/util/number/_exp (mut i32) (i32.const 0)) + (global $~lib/util/number/_K (mut i32) (i32.const 0)) + (global $~lib/util/number/_frc_pow (mut i64) (i64.const 0)) + (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) (global $std/array/refArr (mut i32) (i32.const 0)) - (global $std/array/subarr32 (mut i32) (i32.const 7736)) - (global $std/array/subarr8 (mut i32) (i32.const 7832)) - (global $std/array/subarrU32 (mut i32) (i32.const 7904)) + (global $std/array/subarr32 (mut i32) (i32.const 0)) + (global $std/array/subarr8 (mut i32) (i32.const 0)) + (global $std/array/subarrU32 (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -414,15 +302,15 @@ i32.add i32.const -8 i32.and - local.tee $2 + local.tee $0 current_memory - local.tee $3 + local.tee $2 i32.const 16 i32.shl i32.gt_u if - local.get $3 local.get $2 + local.get $0 local.get $1 i32.sub i32.const 65535 @@ -431,16 +319,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $0 + local.tee $3 + local.get $2 local.get $3 - local.get $0 i32.gt_s select grow_memory i32.const 0 i32.lt_s if - local.get $0 + local.get $3 grow_memory i32.const 0 i32.lt_s @@ -449,23 +337,12 @@ end end end - local.get $2 + local.get $0 global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 40 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end i32.const 1 i32.const 32 local.get $0 @@ -474,305 +351,329 @@ i32.clz i32.sub i32.shl - call $~lib/allocator/arena/__memory_allocate + call $~lib/memory/memory.allocate local.tee $1 - local.get $0 + i32.const -1520547049 i32.store local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 8 + i32.add ) - (func $~lib/internal/memory/memset (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i64) - local.get $2 - i32.eqz - if - return - end - local.get $0 - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 1 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 2 - i32.le_u - if - return - end - local.get $0 - i32.const 1 - i32.add - local.get $1 - i32.store8 - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - local.tee $3 - i32.const 2 - i32.sub - local.get $1 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u - if - return - end - local.get $2 - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $3 - i32.sub - local.set $2 - local.get $0 - local.get $3 - i32.add - local.tee $0 - local.get $1 - i32.const 255 - i32.and - i32.const 16843009 - i32.mul - local.tee $1 - i32.store - local.get $2 - i32.const -4 - i32.and - local.tee $2 - local.get $0 - i32.add - i32.const 4 - i32.sub - local.get $1 - i32.store - local.get $2 - i32.const 8 - i32.le_u - if - return - end - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.store - local.get $0 - local.get $2 - i32.add - local.tee $3 - i32.const 12 - i32.sub - local.get $1 - i32.store - local.get $3 - i32.const 8 - i32.sub - local.get $1 - i32.store - local.get $2 - i32.const 24 - i32.le_u - if - return - end - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.store - local.get $0 - i32.const 16 - i32.add - local.get $1 - i32.store - local.get $0 - i32.const 20 - i32.add - local.get $1 - i32.store - local.get $0 - i32.const 24 - i32.add - local.get $1 - i32.store - local.get $0 - local.get $2 - i32.add - local.tee $3 - i32.const 28 - i32.sub - local.get $1 - i32.store - local.get $3 - i32.const 24 - i32.sub - local.get $1 - i32.store - local.get $3 - i32.const 20 - i32.sub - local.get $1 - i32.store - local.get $3 - i32.const 16 - i32.sub - local.get $1 - i32.store - local.get $0 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - local.get $0 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $1 - i64.extend_i32_u - local.tee $4 - local.get $4 - i64.const 32 - i64.shl - i64.or - local.set $4 - loop $continue|0 + block $~lib/util/memory/memset|inlined.0 local.get $2 - i32.const 32 - i32.ge_u - if - local.get $0 - local.get $4 - i64.store - local.get $0 - i32.const 8 - i32.add - local.get $4 - i64.store - local.get $0 - i32.const 16 - i32.add - local.get $4 - i64.store - local.get $0 - i32.const 24 - i32.add - local.get $4 - i64.store + i32.eqz + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 1 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 2 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 1 + i32.add + local.get $1 + i32.store8 + local.get $0 + i32.const 2 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + local.tee $3 + i32.const 2 + i32.sub + local.get $1 + i32.store8 + local.get $3 + i32.const 3 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 6 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 3 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $2 + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.tee $3 + i32.sub + local.set $2 + local.get $0 + local.get $3 + i32.add + local.tee $0 + local.get $1 + i32.const 255 + i32.and + i32.const 16843009 + i32.mul + local.tee $1 + i32.store + local.get $2 + i32.const -4 + i32.and + local.tee $2 + local.get $0 + i32.add + i32.const 4 + i32.sub + local.get $1 + i32.store + local.get $2 + i32.const 8 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.add + local.tee $3 + i32.const 12 + i32.sub + local.get $1 + i32.store + local.get $3 + i32.const 8 + i32.sub + local.get $1 + i32.store + local.get $2 + i32.const 24 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.store + local.get $0 + i32.const 16 + i32.add + local.get $1 + i32.store + local.get $0 + i32.const 20 + i32.add + local.get $1 + i32.store + local.get $0 + i32.const 24 + i32.add + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.add + local.tee $3 + i32.const 28 + i32.sub + local.get $1 + i32.store + local.get $3 + i32.const 24 + i32.sub + local.get $1 + i32.store + local.get $3 + i32.const 20 + i32.sub + local.get $1 + i32.store + local.get $3 + i32.const 16 + i32.sub + local.get $1 + i32.store + local.get $0 + i32.const 4 + i32.and + i32.const 24 + i32.add + local.tee $3 + local.get $0 + i32.add + local.set $0 + local.get $2 + local.get $3 + i32.sub + local.set $2 + local.get $1 + i64.extend_i32_u + local.tee $4 + local.get $4 + i64.const 32 + i64.shl + i64.or + local.set $4 + loop $continue|0 local.get $2 i32.const 32 - i32.sub - local.set $2 - local.get $0 - i32.const 32 - i32.add - local.set $0 - br $continue|0 + i32.ge_u + if + local.get $0 + local.get $4 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $4 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $4 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $4 + i64.store + local.get $2 + i32.const 32 + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $continue|0 + end end end ) - (func $~lib/array/Array#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - i32.const 268435454 - i32.gt_u + i32.const 6444 + i32.le_u if i32.const 0 - i32.const 8 - i32.const 45 - i32.const 39 + i32.const 16 + i32.const 191 + i32.const 2 call $~lib/env/abort unreachable end local.get $0 - i32.const 2 - i32.shl - local.tee $3 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $2 i32.const 8 - call $~lib/allocator/arena/__memory_allocate - local.tee $1 - i32.const 0 - i32.store - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - local.get $2 - i32.store - local.get $1 - local.get $0 - i32.store offset=4 - local.get $2 - i32.const 8 - i32.add - i32.const 0 - local.get $3 - call $~lib/internal/memory/memset - local.get $1 + i32.sub + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 16 + i32.const 192 + i32.const 2 + call $~lib/env/abort + unreachable + end ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - i32.const 1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.tee $1 + (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 i32.const 8 - i32.add + i32.sub + local.get $1 + i32.store + local.get $0 + ) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 1073741816 + i32.gt_u + if + i32.const 0 + i32.const 56 + i32.const 24 + i32.const 43 + call $~lib/env/abort + unreachable + end + local.get $0 + call $~lib/runtime/doAllocate + local.tee $1 i32.const 0 - i32.const 1 - call $~lib/internal/memory/memset + local.get $0 + call $~lib/memory/memory.fill + local.get $1 + i32.const 2 + call $~lib/runtime/doRegister + ) + (func $~lib/runtime/ArrayBufferView#constructor (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + i32.const 1073741816 + local.get $2 + i32.shr_u + i32.gt_u + if + i32.const 0 + i32.const 16 + i32.const 226 + i32.const 57 + call $~lib/env/abort + unreachable + end + local.get $1 + local.get $2 + i32.shl + local.tee $1 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $2 local.get $0 i32.eqz if i32.const 12 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/doAllocate + i32.const 3 + call $~lib/runtime/doRegister local.set $0 end local.get $0 @@ -785,24 +686,41 @@ i32.const 0 i32.store offset=8 local.get $0 - local.get $1 + local.get $2 i32.store local.get $0 - i32.const 0 + local.get $2 i32.store offset=4 local.get $0 - i32.const 1 + local.get $1 i32.store offset=8 local.get $0 ) - (func $~lib/array/Array#fill (; 7 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/array/Array#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 16 + call $~lib/runtime/doAllocate + i32.const 4 + call $~lib/runtime/doRegister + local.get $0 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.tee $1 + i32.const 0 + i32.store offset=12 + local.get $1 + local.get $0 + i32.store offset=12 + local.get $1 + ) + (func $~lib/array/Array#fill (; 10 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) local.get $0 - i32.load + i32.load offset=4 local.set $5 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $0 local.get $2 i32.const 0 @@ -853,294 +771,14 @@ local.get $2 local.get $5 i32.add - i32.const 8 - i32.add local.get $1 local.get $3 local.get $2 i32.sub - call $~lib/internal/memory/memset + call $~lib/memory/memory.fill end ) - (func $std/array/isArraysEqual (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.load offset=4 - local.tee $4 - local.get $1 - i32.load offset=4 - i32.ne - if - i32.const 0 - return - end - local.get $0 - local.get $1 - i32.eq - if - i32.const 1 - return - end - loop $repeat|0 - local.get $2 - local.get $4 - i32.lt_s - if - local.get $2 - local.get $0 - i32.load - local.tee $3 - i32.load - i32.lt_u - if (result i32) - local.get $2 - local.get $3 - i32.add - i32.load8_u offset=8 - else - unreachable - end - i32.const 255 - i32.and - local.get $2 - local.get $1 - i32.load - local.tee $3 - i32.load - i32.lt_u - if (result i32) - local.get $2 - local.get $3 - i32.add - i32.load8_u offset=8 - else - unreachable - end - i32.const 255 - i32.and - i32.ne - if - i32.const 0 - return - else - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $repeat|0 - end - unreachable - end - end - i32.const 1 - ) - (func $~lib/array/Array#fill|trampoline (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $2 - end - i32.const 2147483647 - local.set $3 - end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/array/Array#fill - ) - (func $~lib/array/Array#fill (; 10 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.set $5 - local.get $0 - i32.load offset=4 - local.set $0 - local.get $2 - i32.const 0 - i32.lt_s - if (result i32) - local.get $0 - local.get $2 - i32.add - local.tee $4 - i32.const 0 - local.get $4 - i32.const 0 - i32.gt_s - select - else - local.get $2 - local.get $0 - local.get $2 - local.get $0 - i32.lt_s - select - end - local.set $2 - local.get $3 - i32.const 0 - i32.lt_s - if (result i32) - local.get $0 - local.get $3 - i32.add - local.tee $4 - i32.const 0 - local.get $4 - i32.const 0 - i32.gt_s - select - else - local.get $3 - local.get $0 - local.get $3 - local.get $0 - i32.lt_s - select - end - local.set $3 - loop $repeat|0 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $2 - i32.const 2 - i32.shl - local.get $5 - i32.add - local.get $1 - i32.store offset=8 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $repeat|0 - end - end - ) - (func $std/array/isArraysEqual (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $2 - i32.eqz - if - local.get $0 - i32.load offset=4 - local.tee $2 - local.get $1 - i32.load offset=4 - i32.ne - if - i32.const 0 - return - end - local.get $0 - local.get $1 - i32.eq - if - i32.const 1 - return - end - end - loop $repeat|0 - local.get $3 - local.get $2 - i32.lt_s - if - local.get $3 - local.get $0 - i32.load - local.tee $4 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $3 - i32.const 2 - i32.shl - local.get $4 - i32.add - i32.load offset=8 - else - unreachable - end - local.get $3 - local.get $1 - i32.load - local.tee $4 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $3 - i32.const 2 - i32.shl - local.get $4 - i32.add - i32.load offset=8 - else - unreachable - end - i32.ne - if - i32.const 0 - return - else - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $repeat|0 - end - unreachable - end - end - i32.const 1 - ) - (func $~lib/array/Array#fill|trampoline (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $2 - end - i32.const 2147483647 - local.set $3 - end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/array/Array#fill - ) - (func $~lib/internal/memory/memcpy (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2037,64 +1675,106 @@ i32.store8 end ) - (func $~lib/internal/memory/memmove (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - local.get $1 - i32.eq - if - return - end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - i32.eqz - if + block $~lib/util/memory/memmove|inlined.0 local.get $0 + local.get $1 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $1 local.get $2 i32.add - local.get $1 + local.get $0 i32.le_u - local.set $3 - end - local.get $3 - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/internal/memory/memcpy - return - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq + local.tee $3 + i32.eqz if - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $2 - i32.eqz + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + local.set $3 + end + local.get $3 + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 + local.get $0 + i32.const 7 + i32.and if - return + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + br $continue|0 end + end + loop $continue|1 local.get $2 - i32.const 1 - i32.sub - local.set $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|1 + end + end + end + loop $continue|2 + local.get $2 + if local.get $0 local.tee $4 i32.const 1 @@ -2109,79 +1789,69 @@ local.get $3 i32.load8_u i32.store8 - br $continue|0 - end - end - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store local.get $2 - i32.const 8 + i32.const 1 i32.sub local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $continue|1 + br $continue|2 end end - end - loop $continue|2 - local.get $2 + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - local.get $0 - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if + loop $continue|3 + local.get $0 local.get $2 - i32.eqz + i32.add + i32.const 7 + i32.and if - return + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|3 end + end + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $continue|4 + end + end + end + loop $continue|5 + local.get $2 + if local.get $2 i32.const 1 i32.sub @@ -2193,69 +1863,267 @@ i32.add i32.load8_u i32.store8 - br $continue|3 + br $continue|5 end end - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $2 - i32.const 8 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - br $continue|4 - end - end - end - loop $continue|5 - local.get $2 - if - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end end end ) - (func $~lib/internal/arraybuffer/reallocateUnsafe (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/runtime/doWrapArray (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) + (local $4 i32) + i32.const 16 + call $~lib/runtime/doAllocate + local.get $1 + call $~lib/runtime/doRegister + local.tee $3 + local.get $0 + i32.const 8 + i32.sub + i32.load offset=4 + local.tee $4 + call $~lib/runtime/doAllocate + local.get $1 + call $~lib/runtime/doRegister + local.tee $1 + i32.store + local.get $3 + local.get $1 + i32.store offset=4 + local.get $3 + local.get $4 + i32.store offset=8 + local.get $3 + local.get $4 + local.get $2 + i32.shr_u + i32.store offset=12 local.get $1 local.get $0 - i32.load - local.tee $2 - i32.gt_s + local.get $4 + call $~lib/memory/memory.copy + local.get $3 + ) + (func $std/array/isArraysEqual (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.load offset=12 + local.tee $3 + local.get $1 + i32.load offset=12 + i32.ne if - local.get $1 - i32.const 1073741816 - i32.gt_s + i32.const 0 + return + end + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + loop $repeat|0 + local.get $2 + local.get $3 + i32.lt_s if - i32.const 0 - i32.const 40 - i32.const 40 - i32.const 4 - call $~lib/env/abort + local.get $0 + i32.load offset=4 + local.get $2 + i32.add + i32.const -1 + local.get $2 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load8_u + local.get $1 + i32.load offset=4 + local.get $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load8_u + i32.ne + if + i32.const 0 + return + else + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $repeat|0 + end unreachable end + end + i32.const 1 + ) + (func $~lib/array/Array#fill (; 15 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $5 + local.get $0 + i32.load offset=12 + local.set $0 + local.get $2 + i32.const 0 + i32.lt_s + if (result i32) + local.get $0 + local.get $2 + i32.add + local.tee $4 + i32.const 0 + local.get $4 + i32.const 0 + i32.gt_s + select + else + local.get $2 + local.get $0 + local.get $2 + local.get $0 + i32.lt_s + select + end + local.set $2 + local.get $3 + i32.const 0 + i32.lt_s + if (result i32) + local.get $0 + local.get $3 + i32.add + local.tee $4 + i32.const 0 + local.get $4 + i32.const 0 + i32.gt_s + select + else + local.get $3 + local.get $0 + local.get $3 + local.get $0 + i32.lt_s + select + end + local.set $3 + loop $repeat|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $2 + i32.const 2 + i32.shl + local.get $5 + i32.add + local.get $1 + i32.store + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $repeat|0 + end + end + ) + (func $std/array/isArraysEqual (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + local.get $2 + i32.eqz + if + local.get $0 + i32.load offset=12 + local.tee $2 local.get $1 + i32.load offset=12 + i32.ne + if + i32.const 0 + return + end + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + end + loop $repeat|0 + local.get $3 + local.get $2 + i32.lt_s + if + local.get $3 + i32.const 2 + i32.shl + local.tee $4 + local.get $0 + i32.load offset=4 + i32.add + i32.const -1 + local.get $4 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load + local.get $1 + i32.load offset=4 + local.get $4 + i32.add + i32.const -1 + local.get $4 + local.get $1 + i32.load offset=8 + i32.lt_u + select + i32.load + i32.ne + if + i32.const 0 + return + else + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $repeat|0 + end + unreachable + end + end + i32.const 1 + ) + (func $~lib/runtime/doReallocate (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.const 8 + i32.sub + local.tee $3 + i32.load offset=4 + local.tee $2 + local.get $1 + i32.lt_u + if i32.const 1 i32.const 32 local.get $2 @@ -2264,128 +2132,168 @@ i32.clz i32.sub i32.shl - i32.const 8 - i32.sub - i32.le_s - if - local.get $0 - local.get $1 - i32.store - else - local.get $1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.tee $3 - i32.const 8 - i32.add - local.get $0 - i32.const 8 - i32.add - local.get $2 - call $~lib/internal/memory/memmove - local.get $3 - local.set $0 - end - local.get $0 - i32.const 8 - i32.add - local.get $2 - i32.add i32.const 0 + local.get $0 + i32.const 6444 + i32.gt_u + select + i32.const 1 + i32.const 32 local.get $1 - local.get $2 + i32.const 7 + i32.add + i32.clz i32.sub - call $~lib/internal/memory/memset - else - local.get $1 - local.get $2 - i32.lt_s + i32.shl + local.tee $4 + i32.lt_u if - local.get $1 - i32.const 0 - i32.lt_s - if - i32.const 0 - i32.const 40 - i32.const 62 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 + local.get $4 + call $~lib/memory/memory.allocate + local.tee $4 + local.get $3 + i32.load i32.store + local.get $4 + i32.const 8 + i32.add + local.tee $5 + local.get $0 + local.get $2 + call $~lib/memory/memory.copy + local.get $2 + local.get $5 + i32.add + i32.const 0 + local.get $1 + local.get $2 + i32.sub + call $~lib/memory/memory.fill + local.get $3 + i32.load + i32.const -1520547049 + i32.eq + if + local.get $0 + i32.const 6444 + i32.le_u + if + i32.const 0 + i32.const 16 + i32.const 100 + i32.const 8 + call $~lib/env/abort + unreachable + end + end + local.get $4 + local.set $3 + local.get $5 + local.set $0 + else + local.get $0 + local.get $2 + i32.add + i32.const 0 + local.get $1 + local.get $2 + i32.sub + call $~lib/memory/memory.fill end end + local.get $3 + local.get $1 + i32.store offset=4 local.get $0 ) - (func $~lib/array/Array#push (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureLength (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) + local.get $1 local.get $0 - i32.load offset=4 + i32.load local.tee $2 - i32.const 1 - i32.add - local.set $4 - local.get $2 - local.get $0 - i32.load - local.tee $3 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_u - i32.ge_u + i32.gt_u if - local.get $2 + local.get $1 i32.const 268435454 - i32.ge_u + i32.gt_u if i32.const 0 - i32.const 8 - i32.const 182 - i32.const 42 + i32.const 488 + i32.const 12 + i32.const 59 call $~lib/env/abort unreachable end - local.get $0 - local.get $3 - local.get $4 + local.get $2 + local.get $2 + local.get $1 i32.const 2 i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe local.tee $3 - i32.store + call $~lib/runtime/doReallocate + local.tee $1 + i32.ne + if + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + end + local.get $0 + local.get $3 + i32.store offset=8 end + ) + (func $~lib/array/Array#push (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + local.get $0 + i32.load offset=12 + i32.const 1 + i32.add + local.tee $2 + call $~lib/array/ensureLength local.get $0 - local.get $4 - i32.store offset=4 local.get $2 + i32.store offset=12 + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 1 + i32.sub i32.const 2 i32.shl - local.get $3 i32.add local.get $1 - i32.store offset=8 + i32.store ) - (func $~lib/array/Array#pop (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#pop (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $1 i32.const 1 i32.lt_s if i32.const 0 - i32.const 8 - i32.const 244 + i32.const 488 + i32.const 185 i32.const 20 call $~lib/env/abort unreachable end local.get $0 - i32.load + i32.load offset=4 local.get $1 i32.const 1 i32.sub @@ -2393,78 +2301,63 @@ i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.set $2 local.get $0 local.get $1 - i32.store offset=4 + i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#concat (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#concat (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $2 local.get $1 - i32.load offset=4 + i32.load offset=12 i32.const 0 local.get $1 select - local.tee $4 + local.tee $3 i32.add call $~lib/array/Array#constructor - local.set $3 + local.tee $4 + i32.load offset=4 + local.tee $5 + local.get $0 + i32.load offset=4 local.get $2 - if - local.get $3 - i32.load - i32.const 8 - i32.add - local.get $0 - i32.load - i32.const 8 - i32.add - local.get $2 - i32.const 2 - i32.shl - call $~lib/internal/memory/memmove - end - local.get $4 - if - local.get $3 - i32.load - i32.const 8 - i32.add - local.get $2 - i32.const 2 - i32.shl - i32.add - local.get $1 - i32.load - i32.const 8 - i32.add - local.get $4 - i32.const 2 - i32.shl - call $~lib/internal/memory/memmove - end + i32.const 2 + i32.shl + local.tee $0 + call $~lib/memory/memory.copy + local.get $0 + local.get $5 + i32.add + local.get $1 + i32.load offset=4 local.get $3 + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + local.get $4 ) - (func $~lib/array/Array#copyWithin (; 19 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#copyWithin (; 22 ;) (type $FUNCSIG$iiiii) (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 $0 - i32.load - local.set $7 - local.get $3 local.get $0 i32.load offset=4 - local.tee $5 + local.set $6 local.get $3 + local.tee $4 + local.get $0 + i32.load offset=12 + local.tee $5 + local.get $4 local.get $5 i32.lt_s select @@ -2484,14 +2377,13 @@ select else local.get $1 - local.tee $4 local.get $5 - local.get $4 + local.get $1 local.get $5 i32.lt_s select end - local.set $6 + local.set $1 local.get $2 i32.const 0 i32.lt_s @@ -2539,20 +2431,20 @@ i32.sub local.tee $4 local.get $5 - local.get $6 - i32.sub - local.tee $1 - local.get $4 local.get $1 + i32.sub + local.tee $5 + local.get $4 + local.get $5 i32.lt_s select local.set $3 local.get $2 - local.get $6 + local.get $1 i32.lt_s local.tee $4 if - local.get $6 + local.get $1 local.get $2 local.get $3 i32.add @@ -2564,30 +2456,29 @@ local.get $3 i32.const 1 i32.sub - local.tee $1 + local.tee $4 local.get $2 i32.add local.set $2 local.get $1 - local.get $6 + local.get $4 i32.add - local.set $6 + local.set $1 loop $continue|0 local.get $3 if - local.get $7 - local.get $6 - local.tee $1 + local.get $1 i32.const 2 i32.shl + local.get $6 i32.add - local.get $7 local.get $2 i32.const 2 i32.shl + local.get $6 i32.add - i32.load offset=8 - i32.store offset=8 + i32.load + i32.store local.get $2 i32.const 1 i32.sub @@ -2595,7 +2486,7 @@ local.get $1 i32.const 1 i32.sub - local.set $6 + local.set $1 local.get $3 i32.const 1 i32.sub @@ -2604,220 +2495,149 @@ end end else - local.get $7 - i32.const 8 - i32.add - local.tee $1 - local.get $6 + local.get $1 i32.const 2 i32.shl + local.get $6 i32.add local.get $2 i32.const 2 i32.shl - local.get $1 + local.get $6 i32.add local.get $3 i32.const 2 i32.shl - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy end local.get $0 ) - (func $~lib/array/Array#copyWithin|trampoline (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 2 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 2147483647 - local.set $3 - end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/array/Array#copyWithin - ) - (func $~lib/array/Array#unshift (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#unshift (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $0 - i32.load offset=4 - local.tee $3 + local.get $0 + i32.load offset=12 i32.const 1 i32.add - local.set $4 - local.get $3 - local.get $0 - i32.load local.tee $2 - i32.load - i32.const 2 - i32.shr_u - local.tee $5 - i32.ge_u - if - local.get $3 - i32.const 268435454 - i32.ge_u - if - i32.const 0 - i32.const 8 - i32.const 327 - i32.const 42 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $4 - i32.const 2 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.tee $2 - i32.load - i32.const 2 - i32.shr_u - local.set $5 - local.get $0 - local.get $2 - i32.store - end - local.get $2 - i32.const 8 - i32.add + call $~lib/array/ensureLength + local.get $0 + i32.load offset=4 local.tee $3 i32.const 4 i32.add local.get $3 - local.get $5 + local.get $2 i32.const 1 i32.sub i32.const 2 i32.shl - call $~lib/internal/memory/memmove - local.get $2 + call $~lib/memory/memory.copy + local.get $3 local.get $1 - i32.store offset=8 + i32.store local.get $0 - local.get $4 - i32.store offset=4 + local.get $2 + i32.store offset=12 ) - (func $~lib/array/Array#shift (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#shift (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 - i32.load offset=4 - local.tee $3 + i32.load offset=12 + local.tee $1 i32.const 1 i32.lt_s if i32.const 0 - i32.const 8 - i32.const 299 + i32.const 488 + i32.const 243 i32.const 20 call $~lib/env/abort unreachable end local.get $0 - i32.load + i32.load offset=4 local.tee $2 - i32.load offset=8 - local.set $4 + i32.load + local.set $3 + local.get $2 local.get $2 - i32.const 8 - i32.add - local.tee $5 i32.const 4 i32.add - local.set $1 - local.get $5 local.get $1 - local.get $3 i32.const 1 i32.sub local.tee $1 i32.const 2 i32.shl - call $~lib/internal/memory/memmove + local.tee $4 + call $~lib/memory/memory.copy local.get $2 - local.get $1 - i32.const 2 - i32.shl + local.get $4 i32.add i32.const 0 - i32.store offset=8 + i32.store local.get $0 local.get $1 - i32.store offset=4 - local.get $4 + i32.store offset=12 + local.get $3 ) - (func $~lib/array/Array#reverse (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/array/Array#reverse (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) local.get $0 - i32.load - local.set $3 - local.get $0 - i32.load offset=4 - i32.const 1 - i32.sub - local.set $0 - loop $repeat|0 - local.get $1 + i32.load offset=12 + local.tee $1 + if local.get $0 - i32.lt_s - if - local.get $1 - i32.const 2 - i32.shl - local.get $3 - i32.add - local.tee $2 - i32.load offset=8 - local.set $4 + i32.load offset=4 + local.set $2 + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.sub + i32.const 2 + i32.shl + i32.add + local.set $1 + loop $continue|0 local.get $2 - local.get $0 - i32.const 2 - i32.shl - local.get $3 - i32.add - local.tee $2 - i32.load offset=8 - i32.store offset=8 - local.get $2 - local.get $4 - i32.store offset=8 local.get $1 - i32.const 1 - i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $repeat|0 + i32.lt_u + if + local.get $2 + i32.load + local.set $0 + local.get $2 + local.get $1 + i32.load + i32.store + local.get $1 + local.get $0 + i32.store + local.get $2 + i32.const 4 + i32.add + local.set $2 + local.get $1 + i32.const 4 + i32.sub + local.set $1 + br $continue|0 + end end end ) - (func $~lib/array/Array#indexOf (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#indexOf (; 26 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $4 i32.eqz local.tee $3 @@ -2849,19 +2669,19 @@ local.set $2 end local.get $0 - i32.load + i32.load offset=4 local.set $0 loop $continue|0 local.get $2 local.get $4 i32.lt_s if - local.get $0 local.get $2 i32.const 2 i32.shl + local.get $0 i32.add - i32.load offset=8 + i32.load local.get $1 i32.eq if @@ -2877,17 +2697,26 @@ end i32.const -1 ) - (func $~lib/array/Array#splice (; 25 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#includes (; 27 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array#indexOf + i32.const 0 + i32.ge_s + ) + (func $~lib/array/Array#splice (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.load - local.set $5 + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) local.get $2 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $4 local.get $1 i32.const 0 @@ -2912,9 +2741,9 @@ end local.tee $1 i32.sub - local.tee $3 + local.tee $5 local.get $2 - local.get $3 + local.get $5 i32.lt_s select local.tee $3 @@ -2925,22 +2754,52 @@ select local.tee $2 call $~lib/array/Array#constructor - local.tee $6 - i32.load - i32.const 8 - i32.add - local.get $5 - i32.const 8 - i32.add + local.tee $7 + i32.load offset=4 + local.set $8 + local.get $0 + i32.load offset=4 + local.tee $9 local.get $1 i32.const 2 i32.shl i32.add - local.tee $3 + local.set $6 + i32.const 0 + local.set $3 + loop $repeat|0 + block $break|0 + local.get $3 + local.get $2 + i32.ge_s + br_if $break|0 + local.get $3 + i32.const 2 + i32.shl + local.tee $10 + local.get $6 + i32.add + i32.load + local.set $5 + local.get $8 + local.get $10 + i32.add + local.get $5 + i32.store + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $repeat|0 + end + end + local.get $7 + i32.load offset=4 + local.get $6 local.get $2 i32.const 2 i32.shl - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy local.get $1 local.get $2 i32.add @@ -2948,114 +2807,46 @@ local.get $4 i32.ne if - local.get $3 - local.get $5 - i32.const 8 - i32.add + local.get $6 local.get $1 i32.const 2 i32.shl + local.get $9 i32.add local.get $4 local.get $1 i32.sub i32.const 2 i32.shl - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy end local.get $0 local.get $4 local.get $2 i32.sub - i32.store offset=4 - local.get $6 + i32.store offset=12 + local.get $7 ) - (func $~lib/array/Array#splice|trampoline (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 2147483647 - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/array/Array#splice - ) - (func $~lib/array/Array#__set (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - local.get $0 - i32.load - local.tee $3 - i32.load - i32.const 2 - i32.shr_u - i32.ge_u - if - local.get $1 - i32.const 268435454 - i32.ge_u - if - i32.const 0 - i32.const 8 - i32.const 107 - i32.const 41 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $3 - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 2 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.tee $3 - i32.store - local.get $0 - local.get $4 - i32.store offset=4 - end - local.get $3 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=8 - ) - (func $start:std/array~anonymous|0 (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|0 (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz ) - (func $~lib/array/Array#findIndex (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#findIndex (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) local.get $0 - i32.load offset=4 - local.set $4 + i32.load offset=12 + local.set $3 loop $repeat|0 block $break|0 + local.get $2 + local.get $3 + local.get $0 + i32.load offset=12 + local.tee $4 local.get $3 local.get $4 - local.get $0 - i32.load offset=4 - local.tee $2 - local.get $4 - local.get $2 i32.lt_s select i32.ge_s @@ -3063,13 +2854,12 @@ i32.const 3 global.set $~lib/argc local.get $0 - i32.load - local.get $3 - local.tee $2 + i32.load offset=4 + local.get $2 i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.get $2 local.get $0 local.get $1 @@ -3081,7 +2871,7 @@ local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $repeat|0 end unreachable @@ -3089,17 +2879,17 @@ end i32.const -1 ) - (func $start:std/array~anonymous|1 (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|1 (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.eq ) - (func $start:std/array~anonymous|2 (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|2 (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|3 (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|3 (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3107,7 +2897,7 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|5 (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|5 (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3115,27 +2905,27 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|6 (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|6 (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.ge_s ) - (func $~lib/array/Array#every (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#every (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) local.get $0 - i32.load offset=4 - local.set $4 + i32.load offset=12 + local.set $3 loop $repeat|0 block $break|0 + local.get $2 + local.get $3 + local.get $0 + i32.load offset=12 + local.tee $4 local.get $3 local.get $4 - local.get $0 - i32.load offset=4 - local.tee $2 - local.get $4 - local.get $2 i32.lt_s select i32.ge_s @@ -3143,13 +2933,12 @@ i32.const 3 global.set $~lib/argc local.get $0 - i32.load - local.get $3 - local.tee $2 + i32.load offset=4 + local.get $2 i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.get $2 local.get $0 local.get $1 @@ -3158,7 +2947,7 @@ local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $repeat|0 else i32.const 0 @@ -3169,12 +2958,12 @@ end i32.const 1 ) - (func $start:std/array~anonymous|7 (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|7 (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.le_s ) - (func $start:std/array~anonymous|8 (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|8 (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3182,12 +2971,12 @@ i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|9 (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|9 (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|10 (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|10 (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3195,27 +2984,27 @@ i32.const 3 i32.lt_s ) - (func $start:std/array~anonymous|11 (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|11 (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 3 i32.ge_s ) - (func $~lib/array/Array#some (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#some (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) local.get $0 - i32.load offset=4 - local.set $4 + i32.load offset=12 + local.set $3 loop $repeat|0 block $break|0 + local.get $2 + local.get $3 + local.get $0 + i32.load offset=12 + local.tee $4 local.get $3 local.get $4 - local.get $0 - i32.load offset=4 - local.tee $2 - local.get $4 - local.get $2 i32.lt_s select i32.ge_s @@ -3223,13 +3012,12 @@ i32.const 3 global.set $~lib/argc local.get $0 - i32.load - local.get $3 - local.tee $2 + i32.load offset=4 + local.get $2 i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.get $2 local.get $0 local.get $1 @@ -3241,7 +3029,7 @@ local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $repeat|0 end unreachable @@ -3249,12 +3037,12 @@ end i32.const 0 ) - (func $start:std/array~anonymous|12 (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|12 (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const -1 i32.le_s ) - (func $start:std/array~anonymous|13 (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|13 (; 44 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3262,12 +3050,12 @@ i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|14 (; 44 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|14 (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|15 (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|15 (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3275,28 +3063,28 @@ i32.const 3 i32.gt_s ) - (func $start:std/array~anonymous|16 (; 46 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|16 (; 47 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $~lib/array/Array#forEach (; 47 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#forEach (; 48 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) block $break|0 local.get $0 - i32.load offset=4 - local.set $4 + i32.load offset=12 + local.set $3 loop $repeat|0 + local.get $2 + local.get $3 + local.get $0 + i32.load offset=12 + local.tee $4 local.get $3 local.get $4 - local.get $0 - i32.load offset=4 - local.tee $2 - local.get $4 - local.get $2 i32.lt_s select i32.ge_s @@ -3304,13 +3092,12 @@ i32.const 3 global.set $~lib/argc local.get $0 - i32.load - local.get $3 - local.tee $2 + i32.load offset=4 + local.get $2 i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.get $2 local.get $0 local.get $1 @@ -3318,14 +3105,14 @@ local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $repeat|0 unreachable end unreachable end ) - (func $start:std/array~anonymous|17 (; 48 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|17 (; 49 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3334,7 +3121,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|19 (; 49 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|19 (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/array/Array#pop drop @@ -3343,7 +3130,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|20 (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|20 (; 51 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 i32.eqz @@ -3440,276 +3227,68 @@ end end ) - (func $start:std/array~anonymous|21 (; 51 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $start:std/array~anonymous|21 (; 52 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $0 f32.convert_i32_s ) - (func $~lib/array/Array#map (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#map (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 + local.set $1 + i32.const 16 + call $~lib/runtime/doAllocate + i32.const 9 + call $~lib/runtime/doRegister + local.get $1 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor local.tee $3 - call $~lib/array/Array#constructor - local.tee $4 - i32.load + i32.const 0 + i32.store offset=12 + local.get $3 + local.get $1 + i32.store offset=12 + local.get $3 + i32.load offset=4 local.set $5 loop $repeat|0 - local.get $1 - local.get $3 - local.get $0 - i32.load offset=4 - local.tee $2 - local.get $3 local.get $2 + local.get $1 + local.get $0 + i32.load offset=12 + local.tee $4 + local.get $1 + local.get $4 i32.lt_s select i32.lt_s if - i32.const 3 - global.set $~lib/argc - local.get $1 - local.tee $2 + local.get $2 i32.const 2 i32.shl - local.tee $1 - local.get $5 - i32.add + local.tee $6 local.get $0 - i32.load - local.get $1 + i32.load offset=4 i32.add - i32.load offset=8 + i32.load + local.set $4 + i32.const 3 + global.set $~lib/argc + local.get $5 + local.get $6 + i32.add + local.get $4 local.get $2 local.get $0 i32.const 22 call_indirect (type $FUNCSIG$fiii) - f32.store offset=8 - local.get $2 - i32.const 1 - i32.add - local.set $1 - br $repeat|0 - end - end - local.get $4 - ) - (func $start:std/array~anonymous|22 (; 53 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $2 - i32.const 100 - call $~lib/array/Array#push - global.get $std/array/i - local.get $0 - i32.add - global.set $std/array/i - local.get $0 - ) - (func $~lib/array/Array#map (; 54 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load offset=4 - local.tee $4 - call $~lib/array/Array#constructor - i32.load - local.set $5 - loop $repeat|0 - local.get $2 - local.get $4 - local.get $0 - i32.load offset=4 - local.tee $3 - local.get $4 - local.get $3 - i32.lt_s - select - i32.lt_s - if - i32.const 3 - global.set $~lib/argc - local.get $2 - local.tee $3 - i32.const 2 - i32.shl - local.tee $2 - local.get $5 - i32.add - local.get $0 - i32.load - local.get $2 - i32.add - i32.load offset=8 - local.get $3 - local.get $0 - local.get $1 - call_indirect (type $FUNCSIG$iiii) - i32.store offset=8 - local.get $3 - i32.const 1 - i32.add - local.set $2 - br $repeat|0 - end - end - ) - (func $start:std/array~anonymous|23 (; 55 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - global.get $std/array/i - local.get $0 - i32.add - global.set $std/array/i - local.get $0 - ) - (func $start:std/array~anonymous|24 (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $2 - call $~lib/array/Array#pop - drop - global.get $std/array/i - local.get $0 - i32.add - global.set $std/array/i - local.get $0 - ) - (func $start:std/array~anonymous|25 (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.const 2 - i32.ge_s - ) - (func $~lib/array/Array#filter (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 0 - call $~lib/array/Array#constructor - local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 - loop $repeat|0 - block $break|0 - local.get $2 - local.get $5 - local.get $0 - i32.load offset=4 - local.tee $3 - local.get $5 - local.get $3 - i32.lt_s - select - i32.ge_s - br_if $break|0 - local.get $0 - i32.load - local.get $2 - local.tee $3 - i32.const 2 - i32.shl - i32.add - i32.load offset=8 - local.set $2 - i32.const 3 - global.set $~lib/argc - local.get $2 - local.get $3 - local.get $0 - local.get $1 - call_indirect (type $FUNCSIG$iiii) - if - local.get $4 - local.get $2 - call $~lib/array/Array#push - end - local.get $3 - i32.const 1 - i32.add - local.set $2 - br $repeat|0 - end - end - local.get $4 - ) - (func $start:std/array~anonymous|26 (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $2 - i32.const 100 - call $~lib/array/Array#push - global.get $std/array/i - local.get $0 - i32.add - global.set $std/array/i - local.get $0 - i32.const 2 - i32.ge_s - ) - (func $start:std/array~anonymous|27 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - global.get $std/array/i - local.get $0 - i32.add - global.set $std/array/i - local.get $0 - i32.const 2 - i32.ge_s - ) - (func $start:std/array~anonymous|28 (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $2 - call $~lib/array/Array#pop - drop - global.get $std/array/i - local.get $0 - i32.add - global.set $std/array/i - local.get $0 - i32.const 2 - i32.ge_s - ) - (func $start:std/array~anonymous|29 (; 62 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 - local.get $1 - i32.add - ) - (func $~lib/array/Array#reduce (; 63 ;) (type $FUNCSIG$iiii) (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 - i32.const 0 - local.set $2 - local.get $0 - i32.load offset=4 - local.set $4 - loop $repeat|0 - block $break|0 - local.get $2 - local.get $4 - local.get $0 - i32.load offset=4 - local.tee $5 - local.get $4 - local.get $5 - i32.lt_s - select - i32.ge_s - br_if $break|0 - i32.const 4 - global.set $~lib/argc - local.get $3 - local.get $0 - i32.load - local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load offset=8 - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $FUNCSIG$iiiii) - local.set $3 + f32.store local.get $2 i32.const 1 i32.add @@ -3719,7 +3298,226 @@ end local.get $3 ) - (func $start:std/array~anonymous|31 (; 64 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|22 (; 54 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $2 + i32.const 100 + call $~lib/array/Array#push + global.get $std/array/i + local.get $0 + i32.add + global.set $std/array/i + local.get $0 + ) + (func $~lib/array/Array#map (; 55 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + i32.load offset=12 + local.tee $4 + call $~lib/array/Array#constructor + i32.load offset=4 + local.set $5 + loop $repeat|0 + local.get $2 + local.get $4 + local.get $0 + i32.load offset=12 + local.tee $3 + local.get $4 + local.get $3 + i32.lt_s + select + i32.lt_s + if + local.get $2 + i32.const 2 + i32.shl + local.tee $6 + local.get $0 + i32.load offset=4 + i32.add + i32.load + local.set $3 + i32.const 3 + global.set $~lib/argc + local.get $5 + local.get $6 + i32.add + local.get $3 + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $FUNCSIG$iiii) + i32.store + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $repeat|0 + end + end + ) + (func $start:std/array~anonymous|23 (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $std/array/i + local.get $0 + i32.add + global.set $std/array/i + local.get $0 + ) + (func $start:std/array~anonymous|24 (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $2 + call $~lib/array/Array#pop + drop + global.get $std/array/i + local.get $0 + i32.add + global.set $std/array/i + local.get $0 + ) + (func $start:std/array~anonymous|25 (; 58 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 2 + i32.ge_s + ) + (func $~lib/array/Array#filter (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 0 + call $~lib/array/Array#constructor + local.set $4 + local.get $0 + i32.load offset=12 + local.set $5 + loop $repeat|0 + block $break|0 + local.get $2 + local.get $5 + local.get $0 + i32.load offset=12 + local.tee $3 + local.get $5 + local.get $3 + i32.lt_s + select + i32.ge_s + br_if $break|0 + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $3 + i32.const 3 + global.set $~lib/argc + local.get $3 + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $FUNCSIG$iiii) + if + local.get $4 + local.get $3 + call $~lib/array/Array#push + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $repeat|0 + end + end + local.get $4 + ) + (func $start:std/array~anonymous|26 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $2 + i32.const 100 + call $~lib/array/Array#push + global.get $std/array/i + local.get $0 + i32.add + global.set $std/array/i + local.get $0 + i32.const 2 + i32.ge_s + ) + (func $start:std/array~anonymous|27 (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + global.get $std/array/i + local.get $0 + i32.add + global.set $std/array/i + local.get $0 + i32.const 2 + i32.ge_s + ) + (func $start:std/array~anonymous|28 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $2 + call $~lib/array/Array#pop + drop + global.get $std/array/i + local.get $0 + i32.add + global.set $std/array/i + local.get $0 + i32.const 2 + i32.ge_s + ) + (func $start:std/array~anonymous|29 (; 63 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + local.get $0 + local.get $1 + i32.add + ) + (func $~lib/array/Array#reduce (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load offset=12 + local.set $4 + loop $repeat|0 + block $break|0 + local.get $3 + local.get $4 + local.get $0 + i32.load offset=12 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + i32.ge_s + br_if $break|0 + i32.const 4 + global.set $~lib/argc + local.get $2 + local.get $0 + i32.load offset=4 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $3 + local.get $0 + local.get $1 + call_indirect (type $FUNCSIG$iiiii) + local.set $2 + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $repeat|0 + end + end + local.get $2 + ) + (func $start:std/array~anonymous|31 (; 65 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.eqz if @@ -3730,7 +3528,7 @@ end local.get $0 ) - (func $start:std/array~anonymous|32 (; 65 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|32 (; 66 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.eqz if @@ -3741,7 +3539,7 @@ end local.get $0 ) - (func $start:std/array~anonymous|33 (; 66 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|33 (; 67 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -3749,7 +3547,7 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|35 (; 67 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|35 (; 68 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -3757,10 +3555,10 @@ local.get $1 i32.add ) - (func $~lib/array/Array#reduceRight (; 68 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 69 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $3 @@ -3774,12 +3572,12 @@ global.set $~lib/argc local.get $2 local.get $0 - i32.load + i32.load offset=4 local.get $3 i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.get $3 local.get $0 local.get $1 @@ -3794,7 +3592,7 @@ end local.get $2 ) - (func $~lib/math/splitMix32 (; 69 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 70 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -3826,14 +3624,14 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 70 ;) (type $FUNCSIG$vj) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 71 ;) (type $FUNCSIG$vj) (param $0 i64) (local $1 i64) local.get $0 i64.eqz if i32.const 0 - i32.const 2896 - i32.const 978 + i32.const 2296 + i32.const 1021 i32.const 4 call $~lib/env/abort unreachable @@ -3891,41 +3689,41 @@ call $~lib/math/splitMix32 global.set $~lib/math/random_state1_32 ) - (func $~lib/internal/sort/insertionSort (; 71 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 72 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f32) (local $6 f32) (local $7 i32) - loop $repeat|0 - local.get $4 - local.get $1 - i32.ge_s - i32.eqz - if - local.get $4 + block $break|0 + loop $repeat|0 + local.get $3 + local.get $1 + i32.ge_s + br_if $break|0 + local.get $3 i32.const 2 i32.shl local.get $0 i32.add - f32.load offset=8 + f32.load local.set $5 - local.get $4 + local.get $3 i32.const 1 i32.sub - local.set $3 + local.set $4 loop $continue|1 - local.get $3 + local.get $4 i32.const 0 i32.ge_s if block $break|1 - local.get $3 + local.get $4 i32.const 2 i32.shl local.get $0 i32.add - f32.load offset=8 + f32.load local.set $6 i32.const 2 global.set $~lib/argc @@ -3936,11 +3734,11 @@ i32.const 0 i32.ge_s br_if $break|1 - local.get $3 + local.get $4 local.tee $7 i32.const 1 i32.sub - local.set $3 + local.set $4 local.get $7 i32.const 1 i32.add @@ -3949,12 +3747,12 @@ local.get $0 i32.add local.get $6 - f32.store offset=8 + f32.store br $continue|1 end end end - local.get $3 + local.get $4 i32.const 1 i32.add i32.const 2 @@ -3962,21 +3760,23 @@ local.get $0 i32.add local.get $5 - f32.store offset=8 - local.get $4 + f32.store + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 + unreachable end + unreachable end ) - (func $~lib/internal/sort/weakHeapSort (; 72 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 73 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 f32) + (local $5 i32) (local $6 f32) - (local $7 i32) + (local $7 f32) (local $8 i32) local.get $1 i32.const 31 @@ -3985,36 +3785,36 @@ i32.shr_s i32.const 2 i32.shl - local.tee $3 - call $~lib/allocator/arena/__memory_allocate - local.tee $7 + local.tee $5 + call $~lib/memory/memory.allocate + local.tee $8 i32.const 0 - local.get $3 - call $~lib/internal/memory/memset + local.get $5 + call $~lib/memory/memory.fill local.get $1 i32.const 1 i32.sub - local.set $4 + local.set $3 loop $repeat|0 - local.get $4 + local.get $3 i32.const 0 i32.gt_s if - local.get $4 - local.set $3 + local.get $3 + local.set $5 loop $continue|1 - local.get $3 + local.get $5 i32.const 1 i32.and - local.get $3 + local.get $5 i32.const 6 i32.shr_s i32.const 2 i32.shl - local.get $7 + local.get $8 i32.add i32.load - local.get $3 + local.get $5 i32.const 1 i32.shr_s i32.const 31 @@ -4024,229 +3824,225 @@ i32.and i32.eq if - local.get $3 + local.get $5 i32.const 1 i32.shr_s - local.set $3 + local.set $5 br $continue|1 end end - local.get $3 + local.get $5 i32.const 1 i32.shr_s - local.tee $3 + local.tee $4 i32.const 2 i32.shl local.get $0 i32.add - f32.load offset=8 + f32.load + local.set $7 + local.get $3 + i32.const 2 + i32.shl + local.get $0 + i32.add + f32.load local.set $6 - local.get $4 - i32.const 2 - i32.shl - local.get $0 - i32.add - f32.load offset=8 - local.set $5 i32.const 2 global.set $~lib/argc + local.get $7 local.get $6 - local.get $5 local.get $2 call_indirect (type $FUNCSIG$iff) i32.const 0 i32.lt_s if - local.get $4 + local.get $3 i32.const 5 i32.shr_s i32.const 2 i32.shl - local.get $7 - i32.add - local.tee $8 local.get $8 + i32.add + local.tee $5 + local.get $5 i32.load i32.const 1 - local.get $4 + local.get $3 i32.const 31 i32.and i32.shl i32.xor i32.store + local.get $3 + i32.const 2 + i32.shl + local.get $0 + i32.add + local.get $7 + f32.store local.get $4 i32.const 2 i32.shl local.get $0 i32.add local.get $6 - f32.store offset=8 - local.get $3 - i32.const 2 - i32.shl - local.get $0 - i32.add - local.get $5 - f32.store offset=8 + f32.store end - local.get $4 + local.get $3 i32.const 1 i32.sub - local.set $4 + local.set $3 br $repeat|0 end end local.get $1 i32.const 1 i32.sub - local.set $4 + local.set $3 loop $repeat|2 - local.get $4 + local.get $3 i32.const 2 i32.ge_s if local.get $0 - f32.load offset=8 - local.set $5 + f32.load + local.set $6 local.get $0 - local.get $4 + local.get $3 i32.const 2 i32.shl local.get $0 i32.add local.tee $1 - f32.load offset=8 - f32.store offset=8 + f32.load + f32.store local.get $1 - local.get $5 - f32.store offset=8 + local.get $6 + f32.store i32.const 1 - local.set $1 + local.set $4 loop $continue|3 - local.get $1 + local.get $4 i32.const 5 i32.shr_s i32.const 2 i32.shl - local.get $7 + local.get $8 i32.add i32.load - local.get $1 + local.get $4 i32.const 31 i32.and i32.shr_u i32.const 1 i32.and - local.get $1 + local.get $4 i32.const 1 i32.shl i32.add - local.tee $3 - local.get $4 + local.tee $5 + local.get $3 i32.lt_s if - local.get $3 - local.set $1 + local.get $5 + local.set $4 br $continue|3 end end loop $continue|4 - local.get $1 + local.get $4 i32.const 0 i32.gt_s if local.get $0 - f32.load offset=8 - local.set $5 - local.get $1 + f32.load + local.set $6 + local.get $4 i32.const 2 i32.shl local.get $0 i32.add - f32.load offset=8 - local.set $6 + f32.load + local.set $7 i32.const 2 global.set $~lib/argc - local.get $5 local.get $6 + local.get $7 local.get $2 call_indirect (type $FUNCSIG$iff) i32.const 0 i32.lt_s if - local.get $1 + local.get $4 i32.const 5 i32.shr_s i32.const 2 i32.shl - local.get $7 + local.get $8 i32.add - local.tee $3 - local.get $3 + local.tee $1 + local.get $1 i32.load i32.const 1 - local.get $1 + local.get $4 i32.const 31 i32.and i32.shl i32.xor i32.store - local.get $1 + local.get $4 i32.const 2 i32.shl local.get $0 i32.add - local.get $5 - f32.store offset=8 - local.get $0 local.get $6 - f32.store offset=8 + f32.store + local.get $0 + local.get $7 + f32.store end - local.get $1 + local.get $4 i32.const 1 i32.shr_s - local.set $1 + local.set $4 br $continue|4 end end - local.get $4 + local.get $3 i32.const 1 i32.sub - local.set $4 + local.set $3 br $repeat|2 end end local.get $0 - i32.const 4 - i32.add - local.tee $1 - f32.load offset=8 - local.set $5 - local.get $1 + f32.load offset=4 + local.set $6 local.get $0 - f32.load offset=8 - f32.store offset=8 local.get $0 - local.get $5 - f32.store offset=8 + f32.load + f32.store offset=4 + local.get $0 + local.get $6 + f32.store ) - (func $~lib/array/Array#sort (; 73 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#sort (; 74 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f32) (local $4 f32) - (local $5 i32) local.get $1 i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 488 + i32.const 347 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $2 i32.const 1 i32.le_s @@ -4254,19 +4050,17 @@ return end local.get $0 - i32.load + i32.load offset=4 local.set $0 local.get $2 i32.const 2 i32.eq if local.get $0 - i32.const 4 - i32.add - f32.load offset=8 + f32.load offset=4 local.set $3 local.get $0 - f32.load offset=8 + f32.load local.set $4 i32.const 2 global.set $~lib/argc @@ -4278,35 +4072,30 @@ i32.lt_s if local.get $0 - i32.const 4 - i32.add local.get $4 - f32.store offset=8 + f32.store offset=4 local.get $0 local.get $3 - f32.store offset=8 + f32.store end return end - local.get $0 - local.set $5 local.get $2 - local.tee $0 i32.const 256 i32.lt_s if - local.get $5 local.get $0 + local.get $2 local.get $1 - call $~lib/internal/sort/insertionSort + call $~lib/util/sort/insertionSort else - local.get $5 local.get $0 + local.get $2 local.get $1 - call $~lib/internal/sort/weakHeapSort + call $~lib/util/sort/weakHeapSort end ) - (func $~lib/internal/sort/COMPARATOR~anonymous|0 (; 74 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 75 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4335,166 +4124,141 @@ i32.lt_s i32.sub ) - (func $std/array/isArraysEqual (; 75 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) + (func $std/array/isArraysEqual (; 76 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 f32) (local $5 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $5 - i32.const 3244 - i32.load + local.get $1 + i32.load offset=12 i32.ne if i32.const 0 return end local.get $0 - i32.const 3240 + local.get $1 i32.eq if i32.const 1 return end loop $repeat|0 - local.get $1 + local.get $3 local.get $5 i32.lt_s if - local.get $1 + local.get $3 + i32.const 2 + i32.shl local.tee $2 local.get $0 - i32.load - local.tee $3 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.add + i32.const -1 + local.get $2 + local.get $0 + i32.load offset=8 i32.lt_u - if (result f32) - local.get $2 - i32.const 2 - i32.shl - local.get $3 - i32.add - f32.load offset=8 - else - unreachable - end + select + f32.load local.tee $4 local.get $4 f32.ne local.get $1 - i32.const 3240 - i32.load - local.tee $2 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + local.get $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 i32.lt_u - if (result f32) - local.get $1 - i32.const 2 - i32.shl - local.get $2 - i32.add - f32.load offset=8 - else - unreachable - end + select + f32.load local.tee $4 local.get $4 f32.ne i32.ne if - local.get $1 + local.get $3 + i32.const 2 + i32.shl local.tee $2 local.get $0 - i32.load - local.tee $3 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.add + i32.const -1 + local.get $2 + local.get $0 + i32.load offset=8 i32.lt_u - if (result f32) - local.get $2 - i32.const 2 - i32.shl - local.get $3 - i32.add - f32.load offset=8 - else - unreachable - end + select + f32.load local.get $1 - i32.const 3240 - i32.load - local.tee $2 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + local.get $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 i32.lt_u - if (result f32) - local.get $1 - i32.const 2 - i32.shl - local.get $2 - i32.add - f32.load offset=8 - else - unreachable - end + select + f32.load f32.ne if i32.const 0 return end end - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $repeat|0 end end i32.const 1 ) - (func $~lib/internal/sort/insertionSort (; 76 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 77 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f64) (local $6 f64) (local $7 i32) - loop $repeat|0 - local.get $4 - local.get $1 - i32.ge_s - i32.eqz - if - local.get $4 + block $break|0 + loop $repeat|0 + local.get $3 + local.get $1 + i32.ge_s + br_if $break|0 + local.get $3 i32.const 3 i32.shl local.get $0 i32.add - f64.load offset=8 + f64.load local.set $5 - local.get $4 + local.get $3 i32.const 1 i32.sub - local.set $3 + local.set $4 loop $continue|1 - local.get $3 + local.get $4 i32.const 0 i32.ge_s if block $break|1 - local.get $3 + local.get $4 i32.const 3 i32.shl local.get $0 i32.add - f64.load offset=8 + f64.load local.set $6 i32.const 2 global.set $~lib/argc @@ -4505,11 +4269,11 @@ i32.const 0 i32.ge_s br_if $break|1 - local.get $3 + local.get $4 local.tee $7 i32.const 1 i32.sub - local.set $3 + local.set $4 local.get $7 i32.const 1 i32.add @@ -4518,12 +4282,12 @@ local.get $0 i32.add local.get $6 - f64.store offset=8 + f64.store br $continue|1 end end end - local.get $3 + local.get $4 i32.const 1 i32.add i32.const 3 @@ -4531,21 +4295,23 @@ local.get $0 i32.add local.get $5 - f64.store offset=8 - local.get $4 + f64.store + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 + unreachable end + unreachable end ) - (func $~lib/internal/sort/weakHeapSort (; 77 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 78 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 f64) + (local $5 i32) (local $6 f64) - (local $7 i32) + (local $7 f64) (local $8 i32) local.get $1 i32.const 31 @@ -4554,36 +4320,36 @@ i32.shr_s i32.const 2 i32.shl - local.tee $3 - call $~lib/allocator/arena/__memory_allocate - local.tee $7 + local.tee $5 + call $~lib/memory/memory.allocate + local.tee $8 i32.const 0 - local.get $3 - call $~lib/internal/memory/memset + local.get $5 + call $~lib/memory/memory.fill local.get $1 i32.const 1 i32.sub - local.set $4 + local.set $3 loop $repeat|0 - local.get $4 + local.get $3 i32.const 0 i32.gt_s if - local.get $4 - local.set $3 + local.get $3 + local.set $5 loop $continue|1 - local.get $3 + local.get $5 i32.const 1 i32.and - local.get $3 + local.get $5 i32.const 6 i32.shr_s i32.const 2 i32.shl - local.get $7 + local.get $8 i32.add i32.load - local.get $3 + local.get $5 i32.const 1 i32.shr_s i32.const 31 @@ -4593,229 +4359,225 @@ i32.and i32.eq if - local.get $3 + local.get $5 i32.const 1 i32.shr_s - local.set $3 + local.set $5 br $continue|1 end end - local.get $3 + local.get $5 i32.const 1 i32.shr_s - local.tee $3 + local.tee $4 i32.const 3 i32.shl local.get $0 i32.add - f64.load offset=8 + f64.load + local.set $7 + local.get $3 + i32.const 3 + i32.shl + local.get $0 + i32.add + f64.load local.set $6 - local.get $4 - i32.const 3 - i32.shl - local.get $0 - i32.add - f64.load offset=8 - local.set $5 i32.const 2 global.set $~lib/argc + local.get $7 local.get $6 - local.get $5 local.get $2 call_indirect (type $FUNCSIG$idd) i32.const 0 i32.lt_s if - local.get $4 + local.get $3 i32.const 5 i32.shr_s i32.const 2 i32.shl - local.get $7 - i32.add - local.tee $8 local.get $8 + i32.add + local.tee $5 + local.get $5 i32.load i32.const 1 - local.get $4 + local.get $3 i32.const 31 i32.and i32.shl i32.xor i32.store + local.get $3 + i32.const 3 + i32.shl + local.get $0 + i32.add + local.get $7 + f64.store local.get $4 i32.const 3 i32.shl local.get $0 i32.add local.get $6 - f64.store offset=8 - local.get $3 - i32.const 3 - i32.shl - local.get $0 - i32.add - local.get $5 - f64.store offset=8 + f64.store end - local.get $4 + local.get $3 i32.const 1 i32.sub - local.set $4 + local.set $3 br $repeat|0 end end local.get $1 i32.const 1 i32.sub - local.set $4 + local.set $3 loop $repeat|2 - local.get $4 + local.get $3 i32.const 2 i32.ge_s if local.get $0 - f64.load offset=8 - local.set $5 + f64.load + local.set $6 local.get $0 - local.get $4 + local.get $3 i32.const 3 i32.shl local.get $0 i32.add local.tee $1 - f64.load offset=8 - f64.store offset=8 + f64.load + f64.store local.get $1 - local.get $5 - f64.store offset=8 + local.get $6 + f64.store i32.const 1 - local.set $1 + local.set $4 loop $continue|3 - local.get $1 + local.get $4 i32.const 5 i32.shr_s i32.const 2 i32.shl - local.get $7 + local.get $8 i32.add i32.load - local.get $1 + local.get $4 i32.const 31 i32.and i32.shr_u i32.const 1 i32.and - local.get $1 + local.get $4 i32.const 1 i32.shl i32.add - local.tee $3 - local.get $4 + local.tee $5 + local.get $3 i32.lt_s if - local.get $3 - local.set $1 + local.get $5 + local.set $4 br $continue|3 end end loop $continue|4 - local.get $1 + local.get $4 i32.const 0 i32.gt_s if local.get $0 - f64.load offset=8 - local.set $5 - local.get $1 + f64.load + local.set $6 + local.get $4 i32.const 3 i32.shl local.get $0 i32.add - f64.load offset=8 - local.set $6 + f64.load + local.set $7 i32.const 2 global.set $~lib/argc - local.get $5 local.get $6 + local.get $7 local.get $2 call_indirect (type $FUNCSIG$idd) i32.const 0 i32.lt_s if - local.get $1 + local.get $4 i32.const 5 i32.shr_s i32.const 2 i32.shl - local.get $7 + local.get $8 i32.add - local.tee $3 - local.get $3 + local.tee $1 + local.get $1 i32.load i32.const 1 - local.get $1 + local.get $4 i32.const 31 i32.and i32.shl i32.xor i32.store - local.get $1 + local.get $4 i32.const 3 i32.shl local.get $0 i32.add - local.get $5 - f64.store offset=8 - local.get $0 local.get $6 - f64.store offset=8 + f64.store + local.get $0 + local.get $7 + f64.store end - local.get $1 + local.get $4 i32.const 1 i32.shr_s - local.set $1 + local.set $4 br $continue|4 end end - local.get $4 + local.get $3 i32.const 1 i32.sub - local.set $4 + local.set $3 br $repeat|2 end end local.get $0 - i32.const 8 - i32.add - local.tee $1 f64.load offset=8 - local.set $5 - local.get $1 + local.set $6 local.get $0 - f64.load offset=8 + local.get $0 + f64.load f64.store offset=8 local.get $0 - local.get $5 - f64.store offset=8 + local.get $6 + f64.store ) - (func $~lib/array/Array#sort (; 78 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#sort (; 79 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f64) (local $4 f64) - (local $5 i32) local.get $1 i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 488 + i32.const 347 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $2 i32.const 1 i32.le_s @@ -4823,19 +4585,17 @@ return end local.get $0 - i32.load + i32.load offset=4 local.set $0 local.get $2 i32.const 2 i32.eq if local.get $0 - i32.const 8 - i32.add f64.load offset=8 local.set $3 local.get $0 - f64.load offset=8 + f64.load local.set $4 i32.const 2 global.set $~lib/argc @@ -4847,35 +4607,30 @@ i32.lt_s if local.get $0 - i32.const 8 - i32.add local.get $4 f64.store offset=8 local.get $0 local.get $3 - f64.store offset=8 + f64.store end return end - local.get $0 - local.set $5 local.get $2 - local.tee $0 i32.const 256 i32.lt_s if - local.get $5 local.get $0 + local.get $2 local.get $1 - call $~lib/internal/sort/insertionSort + call $~lib/util/sort/insertionSort else - local.get $5 local.get $0 + local.get $2 local.get $1 - call $~lib/internal/sort/weakHeapSort + call $~lib/util/sort/weakHeapSort end ) - (func $~lib/internal/sort/COMPARATOR~anonymous|0 (; 79 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 80 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -4904,166 +4659,141 @@ i64.lt_s i32.sub ) - (func $std/array/isArraysEqual (; 80 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) + (func $std/array/isArraysEqual (; 81 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 f64) (local $5 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $5 - i32.const 3516 - i32.load + local.get $1 + i32.load offset=12 i32.ne if i32.const 0 return end local.get $0 - i32.const 3512 + local.get $1 i32.eq if i32.const 1 return end loop $repeat|0 - local.get $1 + local.get $3 local.get $5 i32.lt_s if - local.get $1 + local.get $3 + i32.const 3 + i32.shl local.tee $2 local.get $0 - i32.load - local.tee $3 - i32.load - i32.const 3 - i32.shr_u + i32.load offset=4 + i32.add + i32.const -1 + local.get $2 + local.get $0 + i32.load offset=8 i32.lt_u - if (result f64) - local.get $2 - i32.const 3 - i32.shl - local.get $3 - i32.add - f64.load offset=8 - else - unreachable - end + select + f64.load local.tee $4 local.get $4 f64.ne local.get $1 - i32.const 3512 - i32.load - local.tee $2 - i32.load - i32.const 3 - i32.shr_u + i32.load offset=4 + local.get $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 i32.lt_u - if (result f64) - local.get $1 - i32.const 3 - i32.shl - local.get $2 - i32.add - f64.load offset=8 - else - unreachable - end + select + f64.load local.tee $4 local.get $4 f64.ne i32.ne if - local.get $1 + local.get $3 + i32.const 3 + i32.shl local.tee $2 local.get $0 - i32.load - local.tee $3 - i32.load - i32.const 3 - i32.shr_u + i32.load offset=4 + i32.add + i32.const -1 + local.get $2 + local.get $0 + i32.load offset=8 i32.lt_u - if (result f64) - local.get $2 - i32.const 3 - i32.shl - local.get $3 - i32.add - f64.load offset=8 - else - unreachable - end + select + f64.load local.get $1 - i32.const 3512 - i32.load - local.tee $2 - i32.load - i32.const 3 - i32.shr_u + i32.load offset=4 + local.get $2 + i32.add + i32.const -1 + local.get $2 + local.get $1 + i32.load offset=8 i32.lt_u - if (result f64) - local.get $1 - i32.const 3 - i32.shl - local.get $2 - i32.add - f64.load offset=8 - else - unreachable - end + select + f64.load f64.ne if i32.const 0 return end end - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $repeat|0 end end i32.const 1 ) - (func $~lib/internal/sort/insertionSort (; 81 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 82 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - loop $repeat|0 - local.get $4 - local.get $1 - i32.ge_s - i32.eqz - if - local.get $4 + block $break|0 + loop $repeat|0 + local.get $3 + local.get $1 + i32.ge_s + br_if $break|0 + local.get $3 i32.const 2 i32.shl local.get $0 i32.add - i32.load offset=8 + i32.load local.set $5 - local.get $4 + local.get $3 i32.const 1 i32.sub - local.set $3 + local.set $4 loop $continue|1 - local.get $3 + local.get $4 i32.const 0 i32.ge_s if block $break|1 - local.get $3 + local.get $4 i32.const 2 i32.shl local.get $0 i32.add - i32.load offset=8 + i32.load local.set $6 i32.const 2 global.set $~lib/argc @@ -5074,11 +4804,11 @@ i32.const 0 i32.ge_s br_if $break|1 - local.get $3 + local.get $4 local.tee $7 i32.const 1 i32.sub - local.set $3 + local.set $4 local.get $7 i32.const 1 i32.add @@ -5087,12 +4817,12 @@ local.get $0 i32.add local.get $6 - i32.store offset=8 + i32.store br $continue|1 end end end - local.get $3 + local.get $4 i32.const 1 i32.add i32.const 2 @@ -5100,16 +4830,18 @@ local.get $0 i32.add local.get $5 - i32.store offset=8 - local.get $4 + i32.store + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 + unreachable end + unreachable end ) - (func $~lib/internal/sort/weakHeapSort (; 82 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 83 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5124,11 +4856,11 @@ i32.const 2 i32.shl local.tee $3 - call $~lib/allocator/arena/__memory_allocate + call $~lib/memory/memory.allocate local.tee $7 i32.const 0 local.get $3 - call $~lib/internal/memory/memset + call $~lib/memory/memory.fill local.get $1 i32.const 1 i32.sub @@ -5139,12 +4871,12 @@ i32.gt_s if local.get $4 - local.set $3 + local.set $5 loop $continue|1 - local.get $3 + local.get $5 i32.const 1 i32.and - local.get $3 + local.get $5 i32.const 6 i32.shr_s i32.const 2 @@ -5152,7 +4884,7 @@ local.get $7 i32.add i32.load - local.get $3 + local.get $5 i32.const 1 i32.shr_s i32.const 31 @@ -5162,34 +4894,34 @@ i32.and i32.eq if - local.get $3 + local.get $5 i32.const 1 i32.shr_s - local.set $3 + local.set $5 br $continue|1 end end - local.get $3 + local.get $5 i32.const 1 i32.shr_s - local.tee $6 + local.tee $5 i32.const 2 i32.shl local.get $0 i32.add - i32.load offset=8 - local.set $5 + i32.load + local.set $3 local.get $4 i32.const 2 i32.shl local.get $0 i32.add - i32.load offset=8 - local.set $3 + i32.load + local.set $6 i32.const 2 global.set $~lib/argc - local.get $5 local.get $3 + local.get $6 local.get $2 call_indirect (type $FUNCSIG$iii) i32.const 0 @@ -5217,15 +4949,15 @@ i32.shl local.get $0 i32.add + local.get $3 + i32.store local.get $5 - i32.store offset=8 - local.get $6 i32.const 2 i32.shl local.get $0 i32.add - local.get $3 - i32.store offset=8 + local.get $6 + i32.store end local.get $4 i32.const 1 @@ -5244,7 +4976,7 @@ i32.ge_s if local.get $0 - i32.load offset=8 + i32.load local.set $6 local.get $0 local.get $4 @@ -5253,15 +4985,15 @@ local.get $0 i32.add local.tee $1 - i32.load offset=8 - i32.store offset=8 + i32.load + i32.store local.get $1 local.get $6 - i32.store offset=8 + i32.store i32.const 1 - local.set $5 + local.set $3 loop $continue|3 - local.get $5 + local.get $3 i32.const 5 i32.shr_s i32.const 2 @@ -5269,50 +5001,50 @@ local.get $7 i32.add i32.load - local.get $5 + local.get $3 i32.const 31 i32.and i32.shr_u i32.const 1 i32.and - local.get $5 + local.get $3 i32.const 1 i32.shl i32.add - local.tee $3 + local.tee $5 local.get $4 i32.lt_s if - local.get $3 - local.set $5 + local.get $5 + local.set $3 br $continue|3 end end loop $continue|4 - local.get $5 + local.get $3 i32.const 0 i32.gt_s if local.get $0 - i32.load offset=8 + i32.load local.set $6 - local.get $5 + local.get $3 i32.const 2 i32.shl local.get $0 i32.add - i32.load offset=8 - local.set $3 + i32.load + local.set $5 i32.const 2 global.set $~lib/argc local.get $6 - local.get $3 + local.get $5 local.get $2 call_indirect (type $FUNCSIG$iii) i32.const 0 i32.lt_s if - local.get $5 + local.get $3 i32.const 5 i32.shr_s i32.const 2 @@ -5323,27 +5055,27 @@ local.get $1 i32.load i32.const 1 - local.get $5 + local.get $3 i32.const 31 i32.and i32.shl i32.xor i32.store - local.get $5 + local.get $3 i32.const 2 i32.shl local.get $0 i32.add local.get $6 - i32.store offset=8 + i32.store local.get $0 - local.get $3 - i32.store offset=8 + local.get $5 + i32.store end - local.get $5 + local.get $3 i32.const 1 i32.shr_s - local.set $5 + local.set $3 br $continue|4 end end @@ -5355,20 +5087,17 @@ end end local.get $0 - i32.const 4 - i32.add - local.tee $1 - i32.load offset=8 - local.set $3 + i32.load offset=4 + local.set $1 + local.get $0 + local.get $0 + i32.load + i32.store offset=4 + local.get $0 local.get $1 - local.get $0 - i32.load offset=8 - i32.store offset=8 - local.get $0 - local.get $3 - i32.store offset=8 + i32.store ) - (func $~lib/array/Array#sort (; 83 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 84 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5376,15 +5105,15 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 488 + i32.const 347 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.load offset=4 - local.tee $3 + i32.load offset=12 + local.tee $2 i32.const 1 i32.le_s if @@ -5392,67 +5121,61 @@ return end local.get $0 - i32.load - local.set $2 - local.get $3 + i32.load offset=4 + local.set $3 + local.get $2 i32.const 2 i32.eq if - local.get $2 - i32.const 4 - i32.add - i32.load offset=8 - local.set $3 - local.get $2 - i32.load offset=8 + local.get $3 + i32.load offset=4 + local.set $2 + local.get $3 + i32.load local.set $4 i32.const 2 global.set $~lib/argc - local.get $3 + local.get $2 local.get $4 local.get $1 call_indirect (type $FUNCSIG$iii) i32.const 0 i32.lt_s if - local.get $2 - i32.const 4 - i32.add - local.get $4 - i32.store offset=8 - local.get $2 local.get $3 - i32.store offset=8 + local.get $4 + i32.store offset=4 + local.get $3 + local.get $2 + i32.store end local.get $0 return end - local.get $2 - local.set $4 - local.get $1 - local.set $2 local.get $3 + local.set $4 + local.get $2 i32.const 256 i32.lt_s if local.get $4 - local.get $3 local.get $2 - call $~lib/internal/sort/insertionSort + local.get $1 + call $~lib/util/sort/insertionSort else local.get $4 - local.get $3 local.get $2 - call $~lib/internal/sort/weakHeapSort + local.get $1 + call $~lib/util/sort/weakHeapSort end local.get $0 ) - (func $~lib/internal/sort/COMPARATOR~anonymous|0 (; 84 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 85 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $~lib/internal/sort/COMPARATOR~anonymous|0 (; 85 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 86 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.gt_u @@ -5461,7 +5184,7 @@ i32.lt_u i32.sub ) - (func $std/array/createReverseOrderedArray (; 86 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedArray (; 87 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/array/Array#constructor @@ -5469,21 +5192,24 @@ i32.const 0 local.set $0 loop $repeat|0 - block $break|0 - local.get $0 + local.get $0 + local.get $1 + i32.load offset=12 + i32.lt_s + if local.get $1 i32.load offset=4 - i32.ge_s - br_if $break|0 - local.get $1 local.get $0 + i32.const 2 + i32.shl + i32.add local.get $1 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.get $0 i32.sub - call $~lib/array/Array#__set + i32.store local.get $0 i32.const 1 i32.add @@ -5493,15 +5219,15 @@ end local.get $1 ) - (func $~lib/math/NativeMath.random (; 87 ;) (type $FUNCSIG$d) (result f64) + (func $~lib/math/NativeMath.random (; 88 ;) (type $FUNCSIG$d) (result f64) (local $0 i64) (local $1 i64) global.get $~lib/math/random_seeded i32.eqz if i32.const 0 - i32.const 2896 - i32.const 987 + i32.const 2296 + i32.const 1030 i32.const 24 call $~lib/env/abort unreachable @@ -5540,27 +5266,30 @@ f64.const 1 f64.sub ) - (func $std/array/createRandomOrderedArray (; 88 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomOrderedArray (; 89 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 call $~lib/array/Array#constructor local.set $0 loop $repeat|0 - block $break|0 - local.get $1 + local.get $1 + local.get $0 + i32.load offset=12 + i32.lt_s + if local.get $0 i32.load offset=4 - i32.ge_s - br_if $break|0 - local.get $0 local.get $1 + i32.const 2 + i32.shl + i32.add call $~lib/math/NativeMath.random local.get $0 - i32.load offset=4 + i32.load offset=12 f64.convert_i32_s f64.mul i32.trunc_f64_s - call $~lib/array/Array#__set + i32.store local.get $1 i32.const 1 i32.add @@ -5570,15 +5299,14 @@ end local.get $0 ) - (func $std/array/isSorted (; 89 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted (; 90 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) i32.const 1 local.set $2 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $4 loop $repeat|0 local.get $2 @@ -5590,42 +5318,33 @@ local.get $2 i32.const 1 i32.sub + i32.const 2 + i32.shl local.tee $3 local.get $0 - i32.load - local.tee $5 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.add + i32.const -1 + local.get $3 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $3 - i32.const 2 - i32.shl - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load local.get $2 - local.get $0 - i32.load - local.tee $3 - i32.load i32.const 2 - i32.shr_u + i32.shl + local.tee $3 + local.get $0 + i32.load offset=4 + i32.add + i32.const -1 + local.get $3 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $2 - i32.const 2 - i32.shl - local.get $3 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load local.get $1 call_indirect (type $FUNCSIG$iii) i32.const 0 @@ -5645,7 +5364,7 @@ end i32.const 1 ) - (func $std/array/assertSorted (; 90 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 91 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array#sort @@ -5661,101 +5380,137 @@ unreachable end ) - (func $std/array/assertSortedDefault (; 91 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSortedDefault (; 92 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 48 call $std/array/assertSorted ) - (func $start:std/array~anonymous|44 (; 92 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|44 (; 93 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $std/array/createReverseOrderedNestedArray (; 93 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/array/Array>#constructor (; 94 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 16 + call $~lib/runtime/doAllocate + i32.const 11 + call $~lib/runtime/doRegister + local.get $0 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.tee $1 + i32.const 0 + i32.store offset=12 + local.get $1 + local.get $0 + i32.store offset=12 + local.get $1 + ) + (func $~lib/runtime/assertRegistered (; 95 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 8 + i32.sub + i32.load + i32.const -1520547049 + i32.eq + if + i32.const 0 + i32.const 16 + i32.const 199 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doLink (; 96 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + call $~lib/runtime/assertRegistered + local.get $1 + call $~lib/runtime/assertRegistered + ) + (func $std/array/createReverseOrderedNestedArray (; 97 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) + (local $4 i32) i32.const 512 - call $~lib/array/Array#constructor - local.set $1 + call $~lib/array/Array>#constructor + local.set $0 loop $repeat|0 - local.get $0 local.get $1 - i32.load offset=4 + local.get $0 + i32.load offset=12 i32.lt_s if local.get $1 + i32.const 2 + i32.shl + local.tee $3 local.get $0 + i32.load offset=4 + i32.add + local.set $4 i32.const 1 call $~lib/array/Array#constructor - call $~lib/array/Array#__set - local.get $0 - local.get $1 - i32.load local.tee $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $2 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 0 - local.get $1 + local.get $0 + call $~lib/runtime/doLink + local.get $4 + local.get $2 + i32.store + local.get $3 + local.tee $2 + local.get $0 i32.load offset=4 + i32.add + i32.const -1 + local.get $2 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load + i32.load offset=4 + local.get $0 + i32.load offset=12 i32.const 1 i32.sub - local.get $0 + local.get $1 i32.sub - call $~lib/array/Array#__set - local.get $0 + i32.store + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $repeat|0 end end - local.get $1 + local.get $0 ) - (func $start:std/array~anonymous|47 (; 94 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|47 (; 98 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + i32.const -1 i32.const 0 local.get $0 - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + select + i32.load + local.get $1 + i32.load offset=4 + i32.const -1 i32.const 0 local.get $1 - i32.load - local.tee $1 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=8 i32.lt_u - if (result i32) - local.get $1 - i32.load offset=8 - else - unreachable - end + select + i32.load i32.sub ) - (func $~lib/array/Array>#sort (; 95 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#sort (; 99 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5763,14 +5518,14 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 488 + i32.const 347 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $2 i32.const 1 i32.le_s @@ -5779,19 +5534,17 @@ return end local.get $0 - i32.load + i32.load offset=4 local.set $3 local.get $2 i32.const 2 i32.eq if local.get $3 - i32.const 4 - i32.add - i32.load offset=8 + i32.load offset=4 local.set $2 local.get $3 - i32.load offset=8 + i32.load local.set $4 i32.const 2 global.set $~lib/argc @@ -5803,13 +5556,11 @@ i32.lt_s if local.get $3 - i32.const 4 - i32.add local.get $4 - i32.store offset=8 + i32.store offset=4 local.get $3 local.get $2 - i32.store offset=8 + i32.store end local.get $0 return @@ -5817,10 +5568,10 @@ local.get $3 local.get $2 local.get $1 - call $~lib/internal/sort/insertionSort + call $~lib/util/sort/insertionSort local.get $0 ) - (func $std/array/assertSorted> (; 96 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted> (; 100 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array>#sort @@ -5836,36 +5587,58 @@ unreachable end ) - (func $std/array/createReverseOrderedElementsArray (; 97 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/createReverseOrderedElementsArray (; 101 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) + i32.const 16 + call $~lib/runtime/doAllocate + i32.const 12 + call $~lib/runtime/doRegister i32.const 512 - call $~lib/array/Array#constructor - local.set $0 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.tee $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 512 + i32.store offset=12 loop $repeat|0 local.get $1 local.get $0 - i32.load offset=4 + i32.load offset=12 i32.lt_s if local.get $0 i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.set $3 + local.get $0 + i32.load offset=12 i32.const 1 i32.sub local.get $1 i32.sub - local.set $2 + local.set $4 i32.const 4 - call $~lib/allocator/arena/__memory_allocate - local.tee $3 + call $~lib/runtime/doAllocate + i32.const 13 + call $~lib/runtime/doRegister + local.tee $2 + local.get $4 + i32.store + local.get $2 + local.get $0 + call $~lib/runtime/doLink + local.get $3 local.get $2 i32.store - local.get $0 - local.get $1 - local.get $3 - call $~lib/array/Array#__set local.get $1 i32.const 1 i32.add @@ -5875,22 +5648,22 @@ end local.get $0 ) - (func $start:std/array~anonymous|48 (; 98 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|48 (; 102 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.sub ) - (func $~lib/internal/string/compareUnsafe (; 99 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 103 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) loop $continue|0 local.get $2 if (result i32) local.get $0 - i32.load16_u offset=4 + i32.load16_u local.get $1 - i32.load16_u offset=4 + i32.load16_u i32.sub local.tee $3 i32.eqz @@ -5915,46 +5688,56 @@ end local.get $3 ) - (func $~lib/internal/sort/COMPARATOR~anonymous|0 (; 100 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 104 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - local.get $1 - i32.eq - local.tee $2 - i32.eqz - if + block (result i32) local.get $0 + local.get $1 + i32.eq + local.tee $2 + i32.eqz + if + local.get $0 + i32.eqz + local.set $2 + end + local.get $2 i32.eqz - local.set $2 end - local.get $2 - i32.eqz - if + if (result i32) local.get $1 i32.eqz - local.set $2 + else + local.get $2 end - local.get $2 if i32.const 0 return end local.get $1 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.set $3 local.get $0 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.tee $4 i32.eqz local.tee $2 - if + if (result i32) local.get $3 i32.eqz - local.set $2 + else + local.get $2 end - local.get $2 if i32.const 0 return @@ -5980,9 +5763,9 @@ local.get $3 i32.lt_s select - call $~lib/internal/string/compareUnsafe + call $~lib/util/string/compareImpl ) - (func $std/array/assertSorted|trampoline (; 101 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSorted|trampoline (; 105 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) block $1of1 block $0of1 @@ -6001,7 +5784,7 @@ local.get $1 call $std/array/assertSorted> ) - (func $~lib/string/String.__eq (; 102 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.eq (; 106 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -6013,22 +5796,29 @@ local.get $0 i32.eqz local.tee $2 - i32.eqz - if + if (result i32) + local.get $2 + else local.get $1 i32.eqz - local.set $2 end - local.get $2 if i32.const 0 return end local.get $0 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u i32.ne if i32.const 0 @@ -6037,18 +5827,18 @@ local.get $0 local.get $1 local.get $2 - call $~lib/internal/string/compareUnsafe + call $~lib/util/string/compareImpl i32.eqz ) - (func $std/array/isArraysEqual (; 103 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 107 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $4 local.get $1 - i32.load offset=4 + i32.load offset=12 i32.ne if i32.const 0 @@ -6067,42 +5857,31 @@ i32.lt_s if local.get $2 + i32.const 2 + i32.shl + local.tee $3 local.get $0 - i32.load - local.tee $3 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.add + i32.const -1 + local.get $3 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $2 - i32.const 2 - i32.shl - local.get $3 - i32.add - i32.load offset=8 - else - unreachable - end - local.get $2 + select + i32.load local.get $1 - i32.load - local.tee $3 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + local.get $3 + i32.add + i32.const -1 + local.get $3 + local.get $1 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $2 - i32.const 2 - i32.shl - local.get $3 - i32.add - i32.load offset=8 - else - unreachable - end - call $~lib/string/String.__eq + select + i32.load + call $~lib/string/String.eq if local.get $2 i32.const 1 @@ -6118,82 +5897,33 @@ end i32.const 1 ) - (func $~lib/internal/string/allocateUnsafe (; 104 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#charAt (; 108 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - i32.const 0 - i32.gt_s - local.tee $1 - if - local.get $0 - i32.const 536870910 - i32.le_s - local.set $1 - end - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 14 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 1 - i32.shl - i32.const 4 - i32.add - call $~lib/allocator/arena/__memory_allocate - local.tee $1 - local.get $0 - i32.store - local.get $1 - ) - (func $~lib/string/String#charAt (; 105 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 2928 + i32.const 2324 i32.load + i32.const 1 + i32.shr_u i32.ge_u if - i32.const 3904 + i32.const 3264 return end - i32.const 1 - call $~lib/internal/string/allocateUnsafe + i32.const 2 + call $~lib/runtime/doAllocate local.tee $1 local.get $0 i32.const 1 i32.shl - i32.const 2928 + i32.const 2328 i32.add - i32.load16_u offset=4 - i32.store16 offset=4 - local.get $1 - ) - (func $~lib/internal/string/copyUnsafe (; 106 ;) (type $FUNCSIG$viiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) + i32.load16_u + i32.store16 local.get $1 i32.const 1 - i32.shl - local.get $0 - i32.add - i32.const 4 - i32.add - local.get $3 - i32.const 1 - i32.shl - local.get $2 - i32.add - i32.const 4 - i32.add - local.get $4 - i32.const 1 - i32.shl - call $~lib/internal/memory/memmove + call $~lib/runtime/doRegister ) - (func $~lib/string/String#concat (; 107 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 109 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6201,74 +5931,87 @@ i32.eqz if i32.const 0 - i32.const 4056 - i32.const 110 + i32.const 3400 + i32.const 65 i32.const 4 call $~lib/env/abort unreachable end - local.get $0 - i32.load - local.tee $3 local.get $1 - i32.const 4144 + i32.const 3440 local.get $1 select local.tee $1 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl local.tee $4 + local.get $0 + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $3 i32.add local.tee $2 i32.eqz if - i32.const 3904 + i32.const 3264 return end local.get $2 - call $~lib/internal/string/allocateUnsafe + call $~lib/runtime/doAllocate local.tee $2 - i32.const 0 local.get $0 - i32.const 0 local.get $3 - call $~lib/internal/string/copyUnsafe + call $~lib/memory/memory.copy local.get $2 local.get $3 + i32.add local.get $1 - i32.const 0 local.get $4 - call $~lib/internal/string/copyUnsafe + call $~lib/memory/memory.copy local.get $2 + i32.const 1 + call $~lib/runtime/doRegister ) - (func $~lib/string/String.__concat (; 108 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.concat (; 110 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 4144 + i32.const 3440 local.get $0 select local.get $1 call $~lib/string/String#concat ) - (func $std/array/createRandomString (; 109 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomString (; 111 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - i32.const 3904 + i32.const 3264 local.set $1 loop $repeat|0 - block $break|0 - local.get $2 - local.get $0 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $0 + i32.lt_s + if local.get $1 call $~lib/math/NativeMath.random - i32.const 2928 + i32.const 2324 i32.load + i32.const 1 + i32.shr_u f64.convert_i32_s f64.mul f64.floor i32.trunc_f64_s call $~lib/string/String#charAt - call $~lib/string/String.__concat + call $~lib/string/String.concat local.set $1 local.get $2 i32.const 1 @@ -6279,36 +6022,58 @@ end local.get $1 ) - (func $std/array/createRandomStringArray (; 110 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/createRandomStringArray (; 112 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 16 + call $~lib/runtime/doAllocate + i32.const 14 + call $~lib/runtime/doRegister i32.const 400 - call $~lib/array/Array#constructor - local.set $1 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.tee $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 400 + i32.store offset=12 loop $repeat|0 - local.get $0 local.get $1 - i32.load offset=4 + local.get $0 + i32.load offset=12 i32.lt_s if - local.get $1 local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.set $2 call $~lib/math/NativeMath.random f64.const 32 f64.mul i32.trunc_f64_s call $std/array/createRandomString - call $~lib/array/Array#__set + local.tee $3 local.get $0 + call $~lib/runtime/doLink + local.get $2 + local.get $3 + i32.store + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $repeat|0 end end - local.get $1 + local.get $0 ) - (func $~lib/string/String#substring (; 111 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 113 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6316,8 +6081,8 @@ i32.eqz if i32.const 0 - i32.const 4056 - i32.const 249 + i32.const 3400 + i32.const 190 i32.const 4 call $~lib/env/abort unreachable @@ -6330,7 +6095,11 @@ select local.tee $2 local.get $0 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.tee $3 local.get $2 local.get $3 @@ -6349,6 +6118,8 @@ local.get $1 i32.lt_s select + i32.const 1 + i32.shl local.set $4 local.get $2 local.get $1 @@ -6356,42 +6127,51 @@ local.get $1 i32.gt_s select + i32.const 1 + i32.shl local.tee $1 local.get $4 i32.sub local.tee $3 i32.eqz if - i32.const 3904 + i32.const 3264 return end local.get $4 i32.eqz local.tee $2 - if (result i32) + if local.get $0 - i32.load + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl local.get $1 i32.eq - else - local.get $2 + local.set $2 end + local.get $2 if local.get $0 return end local.get $3 - call $~lib/internal/string/allocateUnsafe + call $~lib/runtime/doAllocate local.tee $2 - i32.const 0 local.get $0 local.get $4 + i32.add local.get $3 - call $~lib/internal/string/copyUnsafe + call $~lib/memory/memory.copy local.get $2 + i32.const 1 + call $~lib/runtime/doRegister ) - (func $~lib/array/Array#join (; 112 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) + (func $~lib/array/Array#join_bool (; 114 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6400,144 +6180,150 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - i32.const 4244 - i32.load + local.get $0 + i32.load offset=12 i32.const 1 i32.sub local.tee $4 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 4240 - i32.load + local.get $0 + i32.load offset=4 local.set $5 - i32.const 4216 - i32.load - local.tee $6 - i32.const 0 - i32.ne - local.set $7 local.get $4 i32.eqz if - i32.const 4184 - i32.const 4200 + i32.const 3472 + i32.const 3488 local.get $5 - i32.load8_u offset=8 + i32.load8_u select return end - local.get $6 + i32.const 3508 + i32.load + i32.const 1 + i32.shr_u + local.tee $6 i32.const 5 i32.add local.get $4 i32.mul i32.const 5 i32.add - local.tee $8 - call $~lib/internal/string/allocateUnsafe + local.tee $7 + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate local.set $2 + i32.const 0 + local.set $0 loop $repeat|0 - local.get $1 + local.get $0 local.get $4 i32.lt_s if + local.get $0 local.get $5 - local.get $1 - local.tee $3 i32.add - i32.load8_u offset=8 + i32.load8_u i32.const 0 i32.ne - local.tee $9 + local.tee $8 i32.eqz i32.const 4 i32.add - local.set $1 + local.set $3 + local.get $1 + i32.const 1 + i32.shl local.get $2 - local.get $0 - i32.const 4184 - i32.const 4200 - local.get $9 - select - i32.const 0 - local.get $1 - call $~lib/internal/string/copyUnsafe - local.get $0 - local.get $1 i32.add - local.set $0 - local.get $7 - if - local.get $2 - local.get $0 - i32.const 4216 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe - local.get $0 - local.get $6 - i32.add - local.set $0 - end + i32.const 3472 + i32.const 3488 + local.get $8 + select local.get $3 i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $1 + local.get $3 i32.add local.set $1 + local.get $6 + if + local.get $1 + i32.const 1 + i32.shl + local.get $2 + i32.add + i32.const 3512 + local.get $6 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $1 + local.get $6 + i32.add + local.set $1 + end + local.get $0 + i32.const 1 + i32.add + local.set $0 br $repeat|0 end end local.get $4 local.get $5 i32.add - i32.load8_u offset=8 + i32.load8_u i32.const 0 i32.ne - local.tee $3 + local.tee $0 i32.eqz i32.const 4 i32.add - local.set $1 - local.get $2 - local.get $0 - i32.const 4184 - i32.const 4200 - local.get $3 - select - i32.const 0 - local.get $1 - call $~lib/internal/string/copyUnsafe - local.get $2 local.set $3 - local.get $8 - local.get $0 local.get $1 + i32.const 1 + i32.shl + local.get $2 i32.add - local.tee $0 + i32.const 3472 + i32.const 3488 + local.get $0 + select + local.get $3 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $7 + local.get $1 + local.get $3 + i32.add + local.tee $1 i32.gt_s if local.get $2 - local.get $0 + local.get $1 call $~lib/string/String#substring - local.set $3 + local.set $0 local.get $2 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + call $~lib/runtime/assertUnregistered + local.get $0 + return end - local.get $3 + local.get $2 + i32.const 1 + call $~lib/runtime/doRegister ) - (func $~lib/internal/number/decimalCount32 (; 113 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 115 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 100000 i32.lt_u @@ -6591,10 +6377,10 @@ end end ) - (func $~lib/internal/number/utoa32_lut (; 114 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 116 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - i32.const 4832 + i32.const 4028 i32.load local.set $3 loop $continue|0 @@ -6618,26 +6404,26 @@ i32.shl local.get $0 i32.add - local.get $3 local.get $4 i32.const 100 i32.div_u i32.const 2 i32.shl - i32.add - i64.load32_u offset=8 local.get $3 + i32.add + i64.load32_u local.get $4 i32.const 100 i32.rem_u i32.const 2 i32.shl + local.get $3 i32.add - i64.load32_u offset=8 + i64.load32_u i64.const 32 i64.shl i64.or - i64.store offset=4 + i64.store br $continue|0 end end @@ -6661,13 +6447,13 @@ i32.shl local.get $0 i32.add - local.get $3 local.get $4 i32.const 2 i32.shl + local.get $3 i32.add - i32.load offset=8 - i32.store offset=4 + i32.load + i32.store end local.get $1 i32.const 10 @@ -6680,13 +6466,13 @@ i32.shl local.get $0 i32.add - local.get $3 local.get $1 i32.const 2 i32.shl + local.get $3 i32.add - i32.load offset=8 - i32.store offset=4 + i32.load + i32.store else local.get $2 i32.const 1 @@ -6698,17 +6484,17 @@ local.get $1 i32.const 48 i32.add - i32.store16 offset=4 + i32.store16 end ) - (func $~lib/internal/number/itoa32 (; 115 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 117 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 i32.eqz if - i32.const 4312 + i32.const 3600 return end local.get $0 @@ -6722,24 +6508,28 @@ local.set $0 end local.get $0 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $1 i32.add local.tee $3 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate local.tee $2 local.get $0 local.get $3 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut local.get $1 if local.get $2 i32.const 45 - i32.store16 offset=4 + i32.store16 end local.get $2 + i32.const 1 + call $~lib/runtime/doRegister ) - (func $~lib/internal/number/itoa_stream (; 116 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 118 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -6751,7 +6541,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -6770,64 +6560,65 @@ local.get $2 end local.get $2 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $1 i32.add local.tee $2 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut local.get $1 if local.get $0 i32.const 45 - i32.store16 offset=4 + i32.store16 end local.get $2 ) - (func $~lib/array/Array#join (; 117 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 119 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.tee $4 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end local.get $0 - i32.load + i32.load offset=4 local.set $5 - local.get $1 - i32.load - local.tee $6 - i32.const 0 - i32.ne - local.set $7 local.get $4 i32.eqz if local.get $5 - i32.load offset=8 - call $~lib/internal/number/itoa32 + i32.load + call $~lib/util/number/itoa32 return end - local.get $6 + local.get $1 + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + local.tee $6 i32.const 11 i32.add local.get $4 i32.mul i32.const 11 i32.add - local.tee $8 - call $~lib/internal/string/allocateUnsafe + local.tee $7 + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate local.set $3 i32.const 0 local.set $0 @@ -6843,19 +6634,23 @@ i32.shl local.get $5 i32.add - i32.load offset=8 - call $~lib/internal/number/itoa_stream + i32.load + call $~lib/util/number/itoa_stream local.get $2 i32.add local.set $2 - local.get $7 + local.get $6 if - local.get $3 local.get $2 + i32.const 1 + i32.shl + local.get $3 + i32.add local.get $1 - i32.const 0 local.get $6 - call $~lib/internal/string/copyUnsafe + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $2 local.get $6 i32.add @@ -6868,9 +6663,7 @@ br $repeat|0 end end - local.get $3 - local.set $0 - local.get $8 + local.get $7 local.get $3 local.get $2 local.get $4 @@ -6878,8 +6671,8 @@ i32.shl local.get $5 i32.add - i32.load offset=8 - call $~lib/internal/number/itoa_stream + i32.load + call $~lib/util/number/itoa_stream local.get $2 i32.add local.tee $2 @@ -6890,38 +6683,43 @@ call $~lib/string/String#substring local.set $0 local.get $3 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + call $~lib/runtime/assertUnregistered + local.get $0 + return end - local.get $0 + local.get $3 + i32.const 1 + call $~lib/runtime/doRegister ) - (func $~lib/internal/number/utoa32 (; 118 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join (; 120 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_int + ) + (func $~lib/util/number/utoa32 (; 121 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 i32.eqz if - i32.const 4312 + i32.const 3600 return end local.get $0 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.tee $1 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate local.tee $2 local.get $0 local.get $1 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut local.get $2 + i32.const 1 + call $~lib/runtime/doRegister ) - (func $~lib/internal/number/itoa_stream (; 119 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 122 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -6933,63 +6731,64 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end local.get $0 local.get $2 local.get $2 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.tee $0 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut local.get $0 ) - (func $~lib/array/Array#join (; 120 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 123 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.tee $4 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end local.get $0 - i32.load + i32.load offset=4 local.set $5 - local.get $1 - i32.load - local.tee $6 - i32.const 0 - i32.ne - local.set $7 local.get $4 i32.eqz if local.get $5 - i32.load offset=8 - call $~lib/internal/number/utoa32 + i32.load + call $~lib/util/number/utoa32 return end - local.get $6 + local.get $1 + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + local.tee $6 i32.const 10 i32.add local.get $4 i32.mul i32.const 10 i32.add - local.tee $8 - call $~lib/internal/string/allocateUnsafe + local.tee $7 + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate local.set $3 i32.const 0 local.set $0 @@ -7005,19 +6804,23 @@ i32.shl local.get $5 i32.add - i32.load offset=8 - call $~lib/internal/number/itoa_stream + i32.load + call $~lib/util/number/itoa_stream local.get $2 i32.add local.set $2 - local.get $7 + local.get $6 if - local.get $3 local.get $2 + i32.const 1 + i32.shl + local.get $3 + i32.add local.get $1 - i32.const 0 local.get $6 - call $~lib/internal/string/copyUnsafe + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $2 local.get $6 i32.add @@ -7030,9 +6833,7 @@ br $repeat|0 end end - local.get $3 - local.set $0 - local.get $8 + local.get $7 local.get $3 local.get $2 local.get $4 @@ -7040,8 +6841,8 @@ i32.shl local.get $5 i32.add - i32.load offset=8 - call $~lib/internal/number/itoa_stream + i32.load + call $~lib/util/number/itoa_stream local.get $2 i32.add local.tee $2 @@ -7052,19 +6853,20 @@ call $~lib/string/String#substring local.set $0 local.get $3 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + call $~lib/runtime/assertUnregistered + local.get $0 + return end - local.get $0 + local.get $3 + i32.const 1 + call $~lib/runtime/doRegister ) - (func $~lib/internal/number/genDigits (; 121 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/array/Array#join (; 124 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_int + ) + (func $~lib/util/number/genDigits (; 125 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -7097,9 +6899,9 @@ i64.shr_u i32.wrap_i64 local.tee $7 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $8 - i32.const 6616 + i32.const 5412 i32.load local.set $12 loop $continue|0 @@ -7246,7 +7048,7 @@ i32.and i32.const 48 i32.add - i32.store16 offset=4 + i32.store16 end local.get $8 i32.const 1 @@ -7263,20 +7065,20 @@ local.get $5 i64.le_u if - global.get $~lib/internal/number/_K + global.get $~lib/util/number/_K local.get $8 i32.add - global.set $~lib/internal/number/_K + global.set $~lib/util/number/_K local.get $5 local.set $9 local.get $3 local.set $1 - local.get $12 local.get $8 i32.const 2 i32.shl + local.get $12 i32.add - i64.load32_u offset=8 + i64.load32_u local.get $10 i64.extend_i32_s i64.shl @@ -7284,16 +7086,15 @@ local.get $11 local.set $5 local.get $6 - local.tee $7 i32.const 1 i32.sub i32.const 1 i32.shl local.get $0 i32.add - local.tee $2 - i32.load16_u offset=4 - local.set $6 + local.tee $4 + i32.load16_u + local.set $7 loop $continue|2 local.get $1 local.get $5 @@ -7331,10 +7132,10 @@ end local.get $0 if - local.get $6 + local.get $7 i32.const 1 i32.sub - local.set $6 + local.set $7 local.get $1 local.get $3 i64.add @@ -7342,10 +7143,10 @@ br $continue|2 end end - local.get $2 - local.get $6 - i32.store16 offset=4 + local.get $4 local.get $7 + i32.store16 + local.get $6 return end br $continue|0 @@ -7386,7 +7187,7 @@ i32.and i32.const 48 i32.add - i32.store16 offset=4 + i32.store16 end local.get $8 i32.const 1 @@ -7399,26 +7200,27 @@ local.get $5 i64.ge_u br_if $continue|3 - global.get $~lib/internal/number/_K + global.get $~lib/util/number/_K local.get $8 i32.add - global.set $~lib/internal/number/_K + global.set $~lib/util/number/_K local.get $1 local.set $3 local.get $9 local.set $1 - local.get $12 i32.const 0 local.get $8 i32.sub i32.const 2 i32.shl + local.get $12 i32.add - i64.load32_u offset=8 + i64.load32_u local.get $11 i64.mul local.set $9 local.get $6 + local.tee $7 i32.const 1 i32.sub i32.const 1 @@ -7426,8 +7228,8 @@ local.get $0 i32.add local.tee $4 - i32.load16_u offset=4 - local.set $7 + i32.load16_u + local.set $6 loop $continue|4 local.get $3 local.get $9 @@ -7465,10 +7267,10 @@ end local.get $2 if - local.get $7 + local.get $6 i32.const 1 i32.sub - local.set $7 + local.set $6 local.get $1 local.get $3 i64.add @@ -7477,12 +7279,12 @@ end end local.get $4 - local.get $7 - i32.store16 offset=4 local.get $6 + i32.store16 + local.get $7 end ) - (func $~lib/internal/number/prettify (; 122 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 126 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $2 @@ -7494,7 +7296,7 @@ local.get $0 i32.add i32.const 3145774 - i32.store offset=4 + i32.store local.get $1 i32.const 2 i32.add @@ -7529,7 +7331,7 @@ local.get $0 i32.add i32.const 48 - i32.store16 offset=4 + i32.store16 local.get $4 i32.const 1 i32.add @@ -7543,7 +7345,7 @@ local.get $0 i32.add i32.const 3145774 - i32.store offset=4 + i32.store local.get $3 i32.const 2 i32.add @@ -7565,8 +7367,6 @@ i32.shl local.get $0 i32.add - i32.const 4 - i32.add local.tee $4 i32.const 2 i32.add @@ -7576,14 +7376,10 @@ i32.sub i32.const 1 i32.shl - call $~lib/internal/memory/memmove - local.get $3 - i32.const 1 - i32.shl - local.get $0 - i32.add + call $~lib/memory/memory.copy + local.get $4 i32.const 46 - i32.store16 offset=4 + i32.store16 local.get $1 i32.const 1 i32.add @@ -7600,25 +7396,22 @@ end local.get $4 if (result i32) - local.get $0 - i32.const 4 - i32.add - local.tee $2 i32.const 2 local.get $3 i32.sub local.tee $4 i32.const 1 i32.shl + local.get $0 i32.add - local.get $2 + local.get $0 local.get $1 i32.const 1 i32.shl - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy local.get $0 i32.const 3014704 - i32.store offset=4 + i32.store i32.const 2 local.set $3 loop $repeat|1 @@ -7633,7 +7426,7 @@ local.get $0 i32.add i32.const 48 - i32.store16 offset=4 + i32.store16 local.get $3 i32.const 1 i32.add @@ -7651,7 +7444,7 @@ if (result i32) local.get $0 i32.const 101 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 i32.const 4 i32.add @@ -7673,17 +7466,17 @@ local.get $3 end local.get $3 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 i32.const 1 i32.add local.tee $2 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut local.get $4 i32.const 45 i32.const 43 local.get $0 select - i32.store16 offset=4 + i32.store16 local.get $2 i32.const 2 i32.add @@ -7691,10 +7484,7 @@ local.get $0 i32.const 4 i32.add - local.tee $2 - i32.const 4 - i32.add - local.get $2 + local.get $0 i32.const 2 i32.add local.get $1 @@ -7703,20 +7493,20 @@ local.tee $2 i32.const 2 i32.sub - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy local.get $0 i32.const 46 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 local.get $2 i32.add local.tee $0 i32.const 101 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 i32.const 4 i32.add - local.tee $4 + local.tee $0 block (result i32) local.get $3 i32.const 1 @@ -7724,7 +7514,7 @@ local.tee $3 i32.const 0 i32.lt_s - local.tee $0 + local.tee $4 if i32.const 0 local.get $3 @@ -7734,17 +7524,17 @@ local.get $3 end local.get $3 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 i32.const 1 i32.add local.tee $2 - call $~lib/internal/number/utoa32_lut - local.get $4 + call $~lib/util/number/utoa32_lut + local.get $0 i32.const 45 i32.const 43 - local.get $0 + local.get $4 select - i32.store16 offset=4 + i32.store16 local.get $1 local.get $2 i32.add @@ -7755,21 +7545,20 @@ end end ) - (func $~lib/internal/number/dtoa_core (; 123 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) - (local $2 i64) + (func $~lib/util/number/dtoa_core (; 127 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (local $2 i32) (local $3 i64) (local $4 i64) - (local $5 i32) - (local $6 i32) + (local $5 i64) + (local $6 i64) (local $7 i32) - (local $8 i64) + (local $8 i32) (local $9 i64) (local $10 i64) (local $11 i64) (local $12 i32) (local $13 i64) - (local $14 i32) - (local $15 i64) + (local $14 i64) local.get $1 f64.const 0 f64.lt @@ -7777,7 +7566,7 @@ if (result f64) local.get $0 i32.const 45 - i32.store16 offset=4 + i32.store16 local.get $1 f64.neg else @@ -7790,68 +7579,68 @@ i64.const 52 i64.shr_u i32.wrap_i64 - local.set $6 + local.set $7 local.get $3 i64.const 4503599627370495 i64.and - local.get $6 + local.get $7 i32.const 0 i32.ne - local.tee $7 + local.tee $8 i64.extend_i32_u i64.const 52 i64.shl i64.add - local.tee $4 + local.tee $3 i64.const 1 i64.shl i64.const 1 i64.add - local.tee $3 + local.tee $5 i64.clz i32.wrap_i64 - local.set $5 - local.get $3 + local.set $2 local.get $5 + local.get $2 i64.extend_i32_s i64.shl - global.set $~lib/internal/number/_frc_plus - local.get $6 - i32.const 1 + global.set $~lib/util/number/_frc_plus local.get $7 + i32.const 1 + local.get $8 select i32.const 1075 i32.sub - local.tee $6 + local.tee $7 i32.const 1 i32.sub - local.get $5 + local.get $2 i32.sub - local.set $5 - local.get $4 - local.get $4 + local.set $2 + local.get $3 + local.get $3 i64.const 4503599627370496 i64.eq i32.const 1 i32.add - local.tee $7 + local.tee $8 i64.extend_i32_s i64.shl i64.const 1 i64.sub - local.get $6 local.get $7 + local.get $8 i32.sub - local.get $5 + local.get $2 i32.sub i64.extend_i32_s i64.shl - global.set $~lib/internal/number/_frc_minus - local.get $5 - global.set $~lib/internal/number/_exp + global.set $~lib/util/number/_frc_minus + local.get $2 + global.set $~lib/util/number/_exp i32.const 348 i32.const -61 - global.get $~lib/internal/number/_exp + global.get $~lib/util/number/_exp i32.sub f64.convert_i32_s f64.const 0.30102999566398114 @@ -7860,8 +7649,8 @@ f64.add local.tee $1 i32.trunc_f64_s - local.tee $5 - local.get $5 + local.tee $2 + local.get $2 f64.convert_i32_s local.get $1 f64.ne @@ -7870,107 +7659,105 @@ i32.shr_s i32.const 1 i32.add - local.tee $5 + local.tee $2 i32.const 3 i32.shl - local.tee $14 + local.tee $8 i32.sub - global.set $~lib/internal/number/_K - i32.const 6544 + global.set $~lib/util/number/_K + i32.const 5132 i32.load - local.set $7 - i32.const 6280 - i32.load - local.get $14 + local.get $8 i32.add - i64.load offset=8 - global.set $~lib/internal/number/_frc_pow - local.get $7 - local.get $5 + i64.load + global.set $~lib/util/number/_frc_pow + i32.const 5340 + i32.load + local.get $2 i32.const 1 i32.shl i32.add - i32.load16_s offset=8 - global.set $~lib/internal/number/_exp_pow - local.get $4 - local.get $4 + i32.load16_s + global.set $~lib/util/number/_exp_pow + local.get $3 + local.get $3 i64.clz i32.wrap_i64 - local.tee $7 + local.tee $2 i64.extend_i32_s i64.shl - local.tee $4 - i64.const 4294967295 - i64.and - local.tee $9 - global.get $~lib/internal/number/_frc_pow local.tee $3 i64.const 4294967295 i64.and + local.tee $9 + global.get $~lib/util/number/_frc_pow + local.tee $5 + i64.const 4294967295 + i64.and local.tee $10 i64.mul - local.set $13 - local.get $3 - i64.const 32 - i64.shr_u - local.tee $8 - local.get $9 - i64.mul - local.get $4 - i64.const 32 - i64.shr_u - local.tee $11 - local.get $10 - i64.mul - local.get $13 - i64.const 32 - i64.shr_u - i64.add - local.tee $2 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - local.get $8 - local.get $11 - i64.mul - local.get $2 - i64.const 32 - i64.shr_u - i64.add - i64.add - local.set $15 - local.get $3 - i64.const 4294967295 - i64.and - local.tee $11 - global.get $~lib/internal/number/_frc_plus - local.tee $2 - i64.const 4294967295 - i64.and - local.tee $8 - i64.mul local.set $4 - local.get $8 + local.get $5 + i64.const 32 + i64.shr_u + local.tee $11 + local.get $9 + i64.mul local.get $3 i64.const 32 i64.shr_u - local.tee $9 - i64.mul - local.get $11 - local.get $2 - i64.const 32 - i64.shr_u - local.tee $10 + local.tee $6 + local.get $10 i64.mul local.get $4 i64.const 32 i64.shr_u i64.add - local.tee $2 + local.tee $4 + i64.const 4294967295 + i64.and + i64.add + i64.const 2147483647 + i64.add + i64.const 32 + i64.shr_u + local.get $6 + local.get $11 + i64.mul + local.get $4 + i64.const 32 + i64.shr_u + i64.add + i64.add + local.set $14 + local.get $5 + i64.const 4294967295 + i64.and + local.tee $6 + global.get $~lib/util/number/_frc_plus + local.tee $4 + i64.const 4294967295 + i64.and + local.tee $11 + i64.mul + local.set $3 + local.get $11 + local.get $5 + i64.const 32 + i64.shr_u + local.tee $9 + i64.mul + local.get $6 + local.get $4 + i64.const 32 + i64.shr_u + local.tee $10 + i64.mul + local.get $3 + i64.const 32 + i64.shr_u + i64.add + local.tee $13 i64.const 4294967295 i64.and i64.add @@ -7981,45 +7768,45 @@ local.get $9 local.get $10 i64.mul - local.get $2 - i64.const 32 - i64.shr_u - i64.add - i64.add - local.set $8 - global.get $~lib/internal/number/_frc_minus - local.tee $2 - i64.const 4294967295 - i64.and - local.tee $9 - local.get $3 - local.tee $4 - i64.const 4294967295 - i64.and - local.tee $10 - i64.mul - local.set $13 - local.get $8 - i64.const 1 - i64.sub - local.tee $3 - local.get $4 - i64.const 32 - i64.shr_u - local.tee $8 - local.get $9 - i64.mul - local.get $2 - i64.const 32 - i64.shr_u - local.tee $11 - local.get $10 - i64.mul local.get $13 i64.const 32 i64.shr_u i64.add - local.tee $2 + i64.add + local.set $6 + global.get $~lib/util/number/_frc_minus + local.tee $13 + i64.const 4294967295 + i64.and + local.tee $9 + local.get $5 + local.tee $3 + i64.const 4294967295 + i64.and + local.tee $10 + i64.mul + local.set $4 + local.get $6 + i64.const 1 + i64.sub + local.tee $5 + local.get $3 + i64.const 32 + i64.shr_u + local.tee $11 + local.get $9 + i64.mul + local.get $13 + i64.const 32 + i64.shr_u + local.tee $6 + local.get $10 + i64.mul + local.get $4 + i64.const 32 + i64.shr_u + i64.add + local.tee $4 i64.const 4294967295 i64.and i64.add @@ -8027,10 +7814,10 @@ i64.add i64.const 32 i64.shr_u - local.get $8 + local.get $6 local.get $11 i64.mul - local.get $2 + local.get $4 i64.const 32 i64.shr_u i64.add @@ -8038,46 +7825,46 @@ i64.const 1 i64.add i64.sub - local.set $2 + local.set $4 local.get $12 i32.const 1 i32.shl local.get $0 i32.add local.get $0 - local.get $15 - local.get $6 + local.get $14 local.get $7 - i32.sub - global.get $~lib/internal/number/_exp_pow - local.tee $6 - i32.add - i32.const -64 - i32.sub - local.get $3 - global.get $~lib/internal/number/_exp - local.get $6 - i32.add - i32.const -64 - i32.sub local.get $2 + i32.sub + global.get $~lib/util/number/_exp_pow + local.tee $2 + i32.add + i32.const -64 + i32.sub + local.get $5 + global.get $~lib/util/number/_exp + local.get $2 + i32.add + i32.const -64 + i32.sub + local.get $4 local.get $12 - call $~lib/internal/number/genDigits + call $~lib/util/number/genDigits local.get $12 i32.sub - global.get $~lib/internal/number/_K - call $~lib/internal/number/prettify + global.get $~lib/util/number/_K + call $~lib/util/number/prettify local.get $12 i32.add ) - (func $~lib/internal/number/dtoa (; 124 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 128 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 f64.const 0 f64.eq if - i32.const 5176 + i32.const 4336 return end local.get $0 @@ -8090,40 +7877,32 @@ local.get $0 f64.ne if - i32.const 5192 + i32.const 4352 return end - i32.const 5208 - i32.const 5232 + i32.const 4368 + i32.const 4400 local.get $0 f64.const 0 f64.lt select return end - i32.const 28 - call $~lib/internal/string/allocateUnsafe + i32.const 56 + call $~lib/runtime/doAllocate local.tee $2 local.get $0 - call $~lib/internal/number/dtoa_core + call $~lib/util/number/dtoa_core local.set $1 local.get $2 local.get $1 call $~lib/string/String#substring local.set $1 local.get $2 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + call $~lib/runtime/assertUnregistered local.get $1 ) - (func $~lib/internal/number/dtoa_stream (; 125 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 129 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) local.get $1 i32.const 1 i32.shl @@ -8136,13 +7915,13 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 local.get $0 i32.const 46 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 i32.const 48 - i32.store16 offset=8 + i32.store16 offset=4 i32.const 3 return end @@ -8158,35 +7937,31 @@ if local.get $0 i32.const 78 - i32.store16 offset=4 + i32.store16 local.get $0 i32.const 97 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 i32.const 78 - i32.store16 offset=8 + i32.store16 offset=4 i32.const 3 return else local.get $0 - i32.const 4 - i32.add - i32.const 5208 - i32.const 5232 + i32.const 4368 + i32.const 4400 local.get $2 f64.const 0 f64.lt local.tee $0 select - i32.const 4 - i32.add local.get $0 i32.const 8 i32.add local.tee $0 i32.const 1 i32.shl - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy local.get $0 return end @@ -8194,126 +7969,125 @@ end local.get $0 local.get $2 - call $~lib/internal/number/dtoa_core + call $~lib/util/number/dtoa_core ) - (func $~lib/array/Array#join (; 126 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) + (func $~lib/array/Array#join_flt (; 130 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - i32.const 6692 - i32.load + local.get $0 + i32.load offset=12 i32.const 1 i32.sub local.tee $3 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 6688 - i32.load + local.get $0 + i32.load offset=4 local.set $4 - i32.const 5168 - i32.load - local.tee $5 - i32.const 0 - i32.ne - local.set $6 local.get $3 i32.eqz if local.get $4 - f64.load offset=8 - call $~lib/internal/number/dtoa + f64.load + call $~lib/util/number/dtoa return end - local.get $5 + i32.const 4316 + i32.load + i32.const 1 + i32.shr_u + local.tee $5 i32.const 28 i32.add local.get $3 i32.mul i32.const 28 i32.add - local.tee $7 - call $~lib/internal/string/allocateUnsafe + local.tee $6 + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate local.set $2 + i32.const 0 + local.set $0 loop $repeat|0 - local.get $1 + local.get $0 local.get $3 i32.lt_s if local.get $2 - local.get $0 local.get $1 + local.get $0 i32.const 3 i32.shl local.get $4 i32.add - f64.load offset=8 - call $~lib/internal/number/dtoa_stream - local.get $0 - i32.add - local.set $0 - local.get $6 - if - local.get $2 - local.get $0 - i32.const 5168 - i32.const 0 - local.get $5 - call $~lib/internal/string/copyUnsafe - local.get $0 - local.get $5 - i32.add - local.set $0 - end + f64.load + call $~lib/util/number/dtoa_stream local.get $1 - i32.const 1 i32.add local.set $1 + local.get $5 + if + local.get $1 + i32.const 1 + i32.shl + local.get $2 + i32.add + i32.const 4320 + local.get $5 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $1 + local.get $5 + i32.add + local.set $1 + end + local.get $0 + i32.const 1 + i32.add + local.set $0 br $repeat|0 end end - local.get $7 + local.get $6 local.get $2 - local.tee $1 - local.get $0 + local.get $1 local.get $3 i32.const 3 i32.shl local.get $4 i32.add - f64.load offset=8 - call $~lib/internal/number/dtoa_stream - local.get $0 + f64.load + call $~lib/util/number/dtoa_stream + local.get $1 i32.add - local.tee $0 + local.tee $1 i32.gt_s if local.get $2 - local.get $0 + local.get $1 call $~lib/string/String#substring - local.set $1 + local.set $0 local.get $2 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + call $~lib/runtime/assertUnregistered + local.get $0 + return end - local.get $1 + local.get $2 + i32.const 1 + call $~lib/runtime/doRegister ) - (func $~lib/array/Array#join (; 127 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_str (; 131 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8322,242 +8096,317 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.tee $5 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end local.get $0 - i32.load - local.set $0 - local.get $1 - i32.load - local.tee $7 - i32.const 0 - i32.ne - local.set $8 + i32.load offset=4 + local.set $7 local.get $5 i32.eqz if - local.get $0 - i32.load offset=8 + local.get $7 + i32.load return end + local.get $1 + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + local.set $8 local.get $5 i32.const 1 i32.add - local.set $3 + local.set $0 loop $repeat|0 - block $break|0 - local.get $4 - local.get $3 - i32.ge_s - br_if $break|0 - local.get $0 - local.get $4 + local.get $6 + local.get $0 + i32.lt_s + if + local.get $6 i32.const 2 i32.shl + local.get $7 i32.add - i32.load offset=8 i32.load - local.get $2 - i32.add - local.set $2 - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $repeat|0 - end - end - i32.const 0 - local.set $3 - local.get $5 - local.get $7 - i32.mul - local.get $2 - i32.add - call $~lib/internal/string/allocateUnsafe - local.set $4 - loop $repeat|1 - block $break|1 - local.get $6 - local.get $5 - i32.ge_s - br_if $break|1 - local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=8 - local.tee $2 + local.tee $4 if local.get $4 - local.get $3 + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.get $2 - i32.const 0 - local.get $2 - i32.load - local.tee $2 - call $~lib/internal/string/copyUnsafe - local.get $2 - local.get $3 i32.add - local.set $3 - end - local.get $8 - if - local.get $4 - local.get $3 - local.get $1 - i32.const 0 - local.get $7 - call $~lib/internal/string/copyUnsafe - local.get $3 - local.get $7 - i32.add - local.set $3 + local.set $2 end local.get $6 i32.const 1 i32.add local.set $6 + br $repeat|0 + end + end + local.get $5 + local.get $8 + i32.mul + local.get $2 + i32.add + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate + local.set $2 + i32.const 0 + local.set $0 + loop $repeat|1 + local.get $0 + local.get $5 + i32.lt_s + if + local.get $0 + i32.const 2 + i32.shl + local.get $7 + i32.add + i32.load + local.tee $4 + if + local.get $3 + i32.const 1 + i32.shl + local.get $2 + i32.add + local.get $4 + local.get $4 + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + local.tee $6 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $3 + local.get $6 + i32.add + local.set $3 + end + local.get $8 + if + local.get $3 + i32.const 1 + i32.shl + local.get $2 + i32.add + local.get $1 + local.get $8 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $3 + local.get $8 + i32.add + local.set $3 + end + local.get $0 + i32.const 1 + i32.add + local.set $0 br $repeat|1 end end - local.get $0 local.get $5 i32.const 2 i32.shl + local.get $7 i32.add - i32.load offset=8 - local.tee $2 + i32.load + local.tee $4 if - local.get $4 local.get $3 + i32.const 1 + i32.shl local.get $2 - i32.const 0 - local.get $2 - i32.load - call $~lib/internal/string/copyUnsafe + i32.add + local.get $4 + local.get $4 + i32.const 8 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + call $~lib/memory/memory.copy end - local.get $4 + local.get $2 + i32.const 1 + call $~lib/runtime/doRegister ) - (func $~lib/array/Array#join (; 128 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_str + ) + (func $std/array/Ref#constructor (; 133 ;) (type $FUNCSIG$i) (result i32) + i32.const 0 + call $~lib/runtime/doAllocate + i32.const 18 + call $~lib/runtime/doRegister + ) + (func $~lib/array/Array#__set (; 134 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.add + call $~lib/array/ensureLength + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 + end + ) + (func $~lib/array/Array#join_ref (; 135 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub - local.tee $4 + local.tee $3 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end local.get $0 - i32.load - local.set $6 - i32.const 4216 - i32.load - local.tee $5 - i32.const 0 - i32.ne - local.set $0 - local.get $4 + i32.load offset=4 + local.set $5 + local.get $3 i32.eqz if - i32.const 6872 + i32.const 5640 return end - local.get $5 + i32.const 3508 + i32.load + i32.const 1 + i32.shr_u + local.tee $4 i32.const 15 i32.add - local.get $4 + local.get $3 i32.mul i32.const 15 i32.add - local.tee $7 - call $~lib/internal/string/allocateUnsafe + local.tee $6 + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate local.set $2 + i32.const 0 + local.set $0 loop $repeat|0 + local.get $0 local.get $3 - local.get $4 i32.lt_s if - local.get $3 + local.get $0 i32.const 2 i32.shl - local.get $6 + local.get $5 i32.add - i32.load offset=8 + i32.load if + local.get $1 + i32.const 1 + i32.shl local.get $2 - local.get $1 - i32.const 6872 - i32.const 0 - i32.const 15 - call $~lib/internal/string/copyUnsafe + i32.add + i32.const 5640 + i32.const 30 + call $~lib/memory/memory.copy local.get $1 i32.const 15 i32.add local.set $1 end + local.get $4 + if + local.get $1 + i32.const 1 + i32.shl + local.get $2 + i32.add + i32.const 3512 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $1 + local.get $4 + i32.add + local.set $1 + end local.get $0 - if - local.get $2 - local.get $1 - i32.const 4216 - i32.const 0 - local.get $5 - call $~lib/internal/string/copyUnsafe - local.get $1 - local.get $5 - i32.add - local.set $1 - end - local.get $3 i32.const 1 i32.add - local.set $3 + local.set $0 br $repeat|0 end end - local.get $2 - local.set $3 block (result i32) - local.get $4 + local.get $3 i32.const 2 i32.shl - local.get $6 + local.get $5 i32.add - i32.load offset=8 + i32.load if - local.get $2 local.get $1 - i32.const 6872 - i32.const 0 - i32.const 15 - call $~lib/internal/string/copyUnsafe + i32.const 1 + i32.shl + local.get $2 + i32.add + i32.const 5640 + i32.const 30 + call $~lib/memory/memory.copy local.get $1 i32.const 15 i32.add local.set $1 end - local.get $7 + local.get $6 local.get $1 i32.gt_s end @@ -8565,21 +8414,22 @@ local.get $2 local.get $1 call $~lib/string/String#substring - local.set $3 + local.set $0 local.get $2 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + call $~lib/runtime/assertUnregistered + local.get $0 + return end - local.get $3 + local.get $2 + i32.const 1 + call $~lib/runtime/doRegister ) - (func $~lib/internal/number/itoa_stream (; 129 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#toString (; 136 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 3512 + call $~lib/array/Array#join + ) + (func $~lib/util/number/itoa_stream (; 137 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 i32.const 1 @@ -8594,7 +8444,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -8618,136 +8468,135 @@ i32.const 24 i32.shr_s local.tee $2 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $3 i32.add local.set $1 local.get $0 local.get $2 local.get $1 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut local.get $3 if local.get $0 i32.const 45 - i32.store16 offset=4 + i32.store16 end local.get $1 ) - (func $~lib/array/Array#join (; 130 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) + (func $~lib/array/Array#join_int (; 138 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - i32.const 7068 - i32.load + local.get $0 + i32.load offset=12 i32.const 1 i32.sub local.tee $3 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 7064 - i32.load + local.get $0 + i32.load offset=4 local.set $4 - i32.const 4216 - i32.load - local.tee $5 - i32.const 0 - i32.ne - local.set $6 local.get $3 i32.eqz if local.get $4 - i32.load8_s offset=8 - call $~lib/internal/number/itoa32 + i32.load8_s + call $~lib/util/number/itoa32 return end - local.get $5 + i32.const 3508 + i32.load + i32.const 1 + i32.shr_u + local.tee $5 i32.const 11 i32.add local.get $3 i32.mul i32.const 11 i32.add - local.tee $7 - call $~lib/internal/string/allocateUnsafe + local.tee $6 + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate local.set $2 + i32.const 0 + local.set $0 loop $repeat|0 - local.get $1 + local.get $0 local.get $3 i32.lt_s if local.get $2 - local.get $0 local.get $1 + local.get $0 local.get $4 i32.add - i32.load8_s offset=8 - call $~lib/internal/number/itoa_stream - local.get $0 - i32.add - local.set $0 - local.get $6 - if - local.get $2 - local.get $0 - i32.const 4216 - i32.const 0 - local.get $5 - call $~lib/internal/string/copyUnsafe - local.get $0 - local.get $5 - i32.add - local.set $0 - end + i32.load8_s + call $~lib/util/number/itoa_stream local.get $1 - i32.const 1 i32.add local.set $1 + local.get $5 + if + local.get $1 + i32.const 1 + i32.shl + local.get $2 + i32.add + i32.const 3512 + local.get $5 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $1 + local.get $5 + i32.add + local.set $1 + end + local.get $0 + i32.const 1 + i32.add + local.set $0 br $repeat|0 end end - local.get $7 + local.get $6 local.get $2 - local.tee $1 - local.get $0 + local.get $1 local.get $3 local.get $4 i32.add - i32.load8_s offset=8 - call $~lib/internal/number/itoa_stream - local.get $0 + i32.load8_s + call $~lib/util/number/itoa_stream + local.get $1 i32.add - local.tee $0 + local.tee $1 i32.gt_s if local.get $2 - local.get $0 + local.get $1 call $~lib/string/String#substring - local.set $1 + local.set $0 local.get $2 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + call $~lib/runtime/assertUnregistered + local.get $0 + return end - local.get $1 + local.get $2 + i32.const 1 + call $~lib/runtime/doRegister ) - (func $~lib/internal/number/itoa_stream (; 131 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 139 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -8761,7 +8610,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -8769,132 +8618,131 @@ i32.const 65535 i32.and local.tee $2 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $1 local.get $0 local.get $2 local.get $1 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut local.get $1 ) - (func $~lib/array/Array#join (; 132 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) + (func $~lib/array/Array#join_int (; 140 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - i32.const 7132 - i32.load + local.get $0 + i32.load offset=12 i32.const 1 i32.sub local.tee $3 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 7128 - i32.load + local.get $0 + i32.load offset=4 local.set $4 - i32.const 4216 - i32.load - local.tee $5 - i32.const 0 - i32.ne - local.set $6 local.get $3 i32.eqz if local.get $4 - i32.load16_u offset=8 - call $~lib/internal/number/utoa32 + i32.load16_u + call $~lib/util/number/utoa32 return end - local.get $5 + i32.const 3508 + i32.load + i32.const 1 + i32.shr_u + local.tee $5 i32.const 10 i32.add local.get $3 i32.mul i32.const 10 i32.add - local.tee $7 - call $~lib/internal/string/allocateUnsafe + local.tee $6 + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate local.set $2 + i32.const 0 + local.set $0 loop $repeat|0 - local.get $1 + local.get $0 local.get $3 i32.lt_s if local.get $2 - local.get $0 local.get $1 + local.get $0 i32.const 1 i32.shl local.get $4 i32.add - i32.load16_u offset=8 - call $~lib/internal/number/itoa_stream - local.get $0 - i32.add - local.set $0 - local.get $6 - if - local.get $2 - local.get $0 - i32.const 4216 - i32.const 0 - local.get $5 - call $~lib/internal/string/copyUnsafe - local.get $0 - local.get $5 - i32.add - local.set $0 - end + i32.load16_u + call $~lib/util/number/itoa_stream local.get $1 - i32.const 1 i32.add local.set $1 + local.get $5 + if + local.get $1 + i32.const 1 + i32.shl + local.get $2 + i32.add + i32.const 3512 + local.get $5 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $1 + local.get $5 + i32.add + local.set $1 + end + local.get $0 + i32.const 1 + i32.add + local.set $0 br $repeat|0 end end - local.get $7 + local.get $6 local.get $2 - local.tee $1 - local.get $0 + local.get $1 local.get $3 i32.const 1 i32.shl local.get $4 i32.add - i32.load16_u offset=8 - call $~lib/internal/number/itoa_stream - local.get $0 + i32.load16_u + call $~lib/util/number/itoa_stream + local.get $1 i32.add - local.tee $0 + local.tee $1 i32.gt_s if local.get $2 - local.get $0 + local.get $1 call $~lib/string/String#substring - local.set $1 + local.set $0 local.get $2 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + call $~lib/runtime/assertUnregistered + local.get $0 + return end - local.get $1 + local.get $2 + i32.const 1 + call $~lib/runtime/doRegister ) - (func $~lib/internal/number/decimalCount64 (; 133 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 141 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 i64.const 1000000000000000 i64.lt_u @@ -8948,12 +8796,12 @@ end end ) - (func $~lib/internal/number/utoa64_lut (; 134 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 142 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - i32.const 4832 + i32.const 4028 i32.load local.set $3 loop $continue|0 @@ -8989,7 +8837,6 @@ i32.shl local.get $0 i32.add - local.get $3 local.get $4 i32.const 10000 i32.rem_u @@ -8998,20 +8845,21 @@ i32.div_u i32.const 2 i32.shl - i32.add - i64.load32_u offset=8 local.get $3 + i32.add + i64.load32_u local.get $4 i32.const 100 i32.rem_u i32.const 2 i32.shl + local.get $3 i32.add - i64.load32_u offset=8 + i64.load32_u i64.const 32 i64.shl i64.or - i64.store offset=4 + i64.store local.get $2 i32.const 4 i32.sub @@ -9020,22 +8868,22 @@ i32.shl local.get $0 i32.add - local.get $3 local.get $6 i32.const 2 i32.shl - i32.add - i64.load32_u offset=8 local.get $3 + i32.add + i64.load32_u local.get $5 i32.const 2 i32.shl + local.get $3 i32.add - i64.load32_u offset=8 + i64.load32_u i64.const 32 i64.shl i64.or - i64.store offset=4 + i64.store br $continue|0 end end @@ -9043,16 +8891,16 @@ local.get $1 i32.wrap_i64 local.get $2 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut ) - (func $~lib/internal/number/utoa64 (; 135 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 143 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 i64.eqz if - i32.const 4312 + i32.const 3600 return end local.get $0 @@ -9062,26 +8910,32 @@ local.get $0 i32.wrap_i64 local.tee $3 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.tee $1 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate local.tee $2 local.get $3 local.get $1 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut else local.get $0 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.tee $1 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate local.tee $2 local.get $0 local.get $1 - call $~lib/internal/number/utoa64_lut + call $~lib/util/number/utoa64_lut end local.get $2 + i32.const 1 + call $~lib/runtime/doRegister ) - (func $~lib/internal/number/itoa_stream (; 136 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 144 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) local.get $1 i32.const 1 @@ -9094,7 +8948,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -9105,140 +8959,139 @@ local.get $2 i32.wrap_i64 local.tee $1 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $3 local.get $0 local.get $1 local.get $3 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut else local.get $0 local.get $2 local.get $2 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.tee $3 - call $~lib/internal/number/utoa64_lut + call $~lib/util/number/utoa64_lut end local.get $3 ) - (func $~lib/array/Array#join (; 137 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) + (func $~lib/array/Array#join_int (; 145 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - i32.const 7236 - i32.load + local.get $0 + i32.load offset=12 i32.const 1 i32.sub local.tee $3 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 7232 - i32.load + local.get $0 + i32.load offset=4 local.set $4 - i32.const 4216 - i32.load - local.tee $5 - i32.const 0 - i32.ne - local.set $6 local.get $3 i32.eqz if local.get $4 - i64.load offset=8 - call $~lib/internal/number/utoa64 + i64.load + call $~lib/util/number/utoa64 return end - local.get $5 + i32.const 3508 + i32.load + i32.const 1 + i32.shr_u + local.tee $5 i32.const 20 i32.add local.get $3 i32.mul i32.const 20 i32.add - local.tee $7 - call $~lib/internal/string/allocateUnsafe + local.tee $6 + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate local.set $2 + i32.const 0 + local.set $0 loop $repeat|0 - local.get $1 + local.get $0 local.get $3 i32.lt_s if local.get $2 - local.get $0 local.get $1 + local.get $0 i32.const 3 i32.shl local.get $4 i32.add - i64.load offset=8 - call $~lib/internal/number/itoa_stream - local.get $0 - i32.add - local.set $0 - local.get $6 - if - local.get $2 - local.get $0 - i32.const 4216 - i32.const 0 - local.get $5 - call $~lib/internal/string/copyUnsafe - local.get $0 - local.get $5 - i32.add - local.set $0 - end + i64.load + call $~lib/util/number/itoa_stream local.get $1 - i32.const 1 i32.add local.set $1 + local.get $5 + if + local.get $1 + i32.const 1 + i32.shl + local.get $2 + i32.add + i32.const 3512 + local.get $5 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $1 + local.get $5 + i32.add + local.set $1 + end + local.get $0 + i32.const 1 + i32.add + local.set $0 br $repeat|0 end end - local.get $7 + local.get $6 local.get $2 - local.tee $1 - local.get $0 + local.get $1 local.get $3 i32.const 3 i32.shl local.get $4 i32.add - i64.load offset=8 - call $~lib/internal/number/itoa_stream - local.get $0 + i64.load + call $~lib/util/number/itoa_stream + local.get $1 i32.add - local.tee $0 + local.tee $1 i32.gt_s if local.get $2 - local.get $0 + local.get $1 call $~lib/string/String#substring - local.set $1 + local.set $0 local.get $2 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + call $~lib/runtime/assertUnregistered + local.get $0 + return end - local.get $1 + local.get $2 + i32.const 1 + call $~lib/runtime/doRegister ) - (func $~lib/internal/number/itoa64 (; 138 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 146 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9246,7 +9099,7 @@ local.get $0 i64.eqz if - i32.const 4312 + i32.const 3600 return end block (result i32) @@ -9268,36 +9121,42 @@ local.get $0 i32.wrap_i64 local.tee $4 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $1 i32.add local.tee $2 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate local.tee $3 local.get $4 local.get $2 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut else local.get $0 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.get $1 i32.add local.tee $2 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate local.tee $3 local.get $0 local.get $2 - call $~lib/internal/number/utoa64_lut + call $~lib/util/number/utoa64_lut end local.get $1 if local.get $3 i32.const 45 - i32.store16 offset=4 + i32.store16 end local.get $3 + i32.const 1 + call $~lib/runtime/doRegister ) - (func $~lib/internal/number/itoa_stream (; 139 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 147 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -9311,7 +9170,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -9334,191 +9193,77 @@ local.get $2 i32.wrap_i64 local.tee $1 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $3 i32.add local.set $4 local.get $0 local.get $1 local.get $4 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut else local.get $0 local.get $2 local.get $2 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.get $3 i32.add local.tee $4 - call $~lib/internal/number/utoa64_lut + call $~lib/util/number/utoa64_lut end local.get $3 if local.get $0 i32.const 45 - i32.store16 offset=4 + i32.store16 end local.get $4 ) - (func $~lib/array/Array#join (; 140 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) + (func $~lib/array/Array#join_int (; 148 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - i32.const 7436 - i32.load + local.get $0 + i32.load offset=12 i32.const 1 i32.sub local.tee $3 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 7432 - i32.load + local.get $0 + i32.load offset=4 local.set $4 - i32.const 4216 - i32.load - local.tee $5 - i32.const 0 - i32.ne - local.set $6 local.get $3 i32.eqz if local.get $4 - i64.load offset=8 - call $~lib/internal/number/itoa64 + i64.load + call $~lib/util/number/itoa64 return end - local.get $5 + i32.const 3508 + i32.load + i32.const 1 + i32.shr_u + local.tee $5 i32.const 21 i32.add local.get $3 i32.mul i32.const 21 i32.add - local.tee $7 - call $~lib/internal/string/allocateUnsafe - local.set $2 - loop $repeat|0 - local.get $1 - local.get $3 - i32.lt_s - if - local.get $2 - local.get $0 - local.get $1 - i32.const 3 - i32.shl - local.get $4 - i32.add - i64.load offset=8 - call $~lib/internal/number/itoa_stream - local.get $0 - i32.add - local.set $0 - local.get $6 - if - local.get $2 - local.get $0 - i32.const 4216 - i32.const 0 - local.get $5 - call $~lib/internal/string/copyUnsafe - local.get $0 - local.get $5 - i32.add - local.set $0 - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $repeat|0 - end - end - local.get $7 - local.get $2 - local.tee $1 - local.get $0 - local.get $3 - i32.const 3 - i32.shl - local.get $4 - i32.add - i64.load offset=8 - call $~lib/internal/number/itoa_stream - local.get $0 - i32.add - local.tee $0 - i32.gt_s - if - local.get $2 - local.get $0 - call $~lib/string/String#substring - local.set $1 - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - end - local.get $1 - ) - (func $~lib/array/Array>#join (; 141 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load offset=4 + local.tee $6 i32.const 1 - i32.sub - local.tee $3 - i32.const 0 - i32.lt_s - if - i32.const 3904 - return - end - i32.const 3904 - local.set $1 - local.get $0 - i32.load - local.set $4 - i32.const 4216 - i32.load - i32.const 0 - i32.ne - local.set $5 - local.get $3 - i32.eqz - if - local.get $4 - i32.load offset=8 - local.tee $2 - if (result i32) - local.get $2 - i32.const 4216 - call $~lib/array/Array#join - else - i32.const 3904 - end - return - end + i32.shl + call $~lib/runtime/doAllocate + local.set $2 i32.const 0 local.set $0 loop $repeat|0 @@ -9526,26 +9271,33 @@ local.get $3 i32.lt_s if + local.get $2 + local.get $1 local.get $0 - i32.const 2 + i32.const 3 i32.shl local.get $4 i32.add - i32.load offset=8 - local.tee $2 - if - local.get $1 - local.get $2 - i32.const 4216 - call $~lib/array/Array#join - call $~lib/string/String.__concat - local.set $1 - end + i64.load + call $~lib/util/number/itoa_stream + local.get $1 + i32.add + local.set $1 local.get $5 if local.get $1 - i32.const 4216 - call $~lib/string/String.__concat + i32.const 1 + i32.shl + local.get $2 + i32.add + i32.const 3512 + local.get $5 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $1 + local.get $5 + i32.add local.set $1 end local.get $0 @@ -9555,24 +9307,133 @@ br $repeat|0 end end + local.get $6 + local.get $2 + local.get $1 local.get $3 - i32.const 2 + i32.const 3 i32.shl local.get $4 i32.add - i32.load offset=8 - local.tee $2 - if - local.get $1 - local.get $2 - i32.const 4216 - call $~lib/array/Array#join - call $~lib/string/String.__concat - local.set $1 - end + i64.load + call $~lib/util/number/itoa_stream local.get $1 + i32.add + local.tee $1 + i32.gt_s + if + local.get $2 + local.get $1 + call $~lib/string/String#substring + local.set $0 + local.get $2 + call $~lib/runtime/assertUnregistered + local.get $0 + return + end + local.get $2 + i32.const 1 + call $~lib/runtime/doRegister ) - (func $~lib/internal/number/itoa_stream (; 142 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#toString (; 149 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 3512 + call $~lib/array/Array#join + ) + (func $~lib/array/Array>#join_arr (; 150 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load offset=12 + i32.const 1 + i32.sub + local.tee $2 + i32.const 0 + i32.lt_s + if + i32.const 3264 + return + end + i32.const 3264 + local.set $1 + i32.const 3508 + i32.load + i32.const 1 + i32.shr_u + local.set $5 + local.get $0 + i32.load offset=4 + local.set $3 + local.get $2 + i32.eqz + if + local.get $3 + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 3512 + call $~lib/array/Array#join + else + i32.const 3264 + end + return + end + loop $repeat|0 + local.get $4 + local.get $2 + i32.lt_s + if + local.get $4 + i32.const 2 + i32.shl + local.get $3 + i32.add + i32.load + local.tee $0 + if + local.get $1 + local.get $0 + i32.const 3512 + call $~lib/array/Array#join + call $~lib/string/String.concat + local.set $1 + end + local.get $5 + if + local.get $1 + i32.const 3512 + call $~lib/string/String.concat + local.set $1 + end + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $repeat|0 + end + end + local.get $2 + i32.const 2 + i32.shl + local.get $3 + i32.add + i32.load + local.tee $0 + if (result i32) + local.get $1 + local.get $0 + i32.const 3512 + call $~lib/array/Array#join + call $~lib/string/String.concat + else + local.get $1 + end + ) + (func $~lib/util/number/itoa_stream (; 151 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -9586,7 +9447,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -9594,59 +9455,58 @@ i32.const 255 i32.and local.tee $2 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $1 local.get $0 local.get $2 local.get $1 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut local.get $1 ) - (func $~lib/array/Array#join (; 143 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 152 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.tee $3 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end local.get $0 - i32.load + i32.load offset=4 local.set $4 - i32.const 4216 - i32.load - local.tee $5 - i32.const 0 - i32.ne - local.set $6 local.get $3 i32.eqz if local.get $4 - i32.load8_u offset=8 - call $~lib/internal/number/utoa32 + i32.load8_u + call $~lib/util/number/utoa32 return end - local.get $5 + i32.const 3508 + i32.load + i32.const 1 + i32.shr_u + local.tee $5 i32.const 10 i32.add local.get $3 i32.mul i32.const 10 i32.add - local.tee $7 - call $~lib/internal/string/allocateUnsafe + local.tee $6 + i32.const 1 + i32.shl + call $~lib/runtime/doAllocate local.set $2 i32.const 0 local.set $0 @@ -9660,19 +9520,23 @@ local.get $0 local.get $4 i32.add - i32.load8_u offset=8 - call $~lib/internal/number/itoa_stream + i32.load8_u + call $~lib/util/number/itoa_stream local.get $1 i32.add local.set $1 - local.get $6 + local.get $5 if - local.get $2 local.get $1 - i32.const 4216 - i32.const 0 + i32.const 1 + i32.shl + local.get $2 + i32.add + i32.const 3512 local.get $5 - call $~lib/internal/string/copyUnsafe + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $1 local.get $5 i32.add @@ -9685,15 +9549,14 @@ br $repeat|0 end end - local.get $7 + local.get $6 local.get $2 - local.tee $0 local.get $1 local.get $3 local.get $4 i32.add - i32.load8_u offset=8 - call $~lib/internal/number/itoa_stream + i32.load8_u + call $~lib/util/number/itoa_stream local.get $1 i32.add local.tee $1 @@ -9704,301 +9567,291 @@ call $~lib/string/String#substring local.set $0 local.get $2 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + call $~lib/runtime/assertUnregistered + local.get $0 + return end - local.get $0 + local.get $2 + i32.const 1 + call $~lib/runtime/doRegister ) - (func $~lib/array/Array>#join (; 144 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 153 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 + i32.const 3264 local.set $1 - local.get $0 + i32.const 3508 i32.load - local.set $4 - i32.const 4216 - i32.load - i32.const 0 - i32.ne + i32.const 1 + i32.shr_u local.set $5 - local.get $3 + local.get $0 + i32.load offset=4 + local.set $3 + local.get $2 i32.eqz if - local.get $4 - i32.load offset=8 - local.tee $2 + local.get $3 + i32.load + local.tee $0 if (result i32) - local.get $2 - call $~lib/array/Array#join + local.get $0 + call $~lib/array/Array#join_int else - i32.const 3904 + i32.const 3264 end return end - i32.const 0 - local.set $0 loop $repeat|0 - local.get $0 - local.get $3 + local.get $4 + local.get $2 i32.lt_s if - local.get $0 + local.get $4 i32.const 2 i32.shl - local.get $4 + local.get $3 i32.add - i32.load offset=8 - local.tee $2 + i32.load + local.tee $0 if local.get $1 - local.get $2 - call $~lib/array/Array#join - call $~lib/string/String.__concat + local.get $0 + call $~lib/array/Array#join_int + call $~lib/string/String.concat local.set $1 end local.get $5 if local.get $1 - i32.const 4216 - call $~lib/string/String.__concat + i32.const 3512 + call $~lib/string/String.concat local.set $1 end - local.get $0 + local.get $4 i32.const 1 i32.add - local.set $0 + local.set $4 br $repeat|0 end end - local.get $3 + local.get $2 i32.const 2 i32.shl - local.get $4 + local.get $3 i32.add - i32.load offset=8 - local.tee $2 - if + i32.load + local.tee $0 + if (result i32) + local.get $1 + local.get $0 + call $~lib/array/Array#join_int + call $~lib/string/String.concat + else local.get $1 - local.get $2 - call $~lib/array/Array#join - call $~lib/string/String.__concat - local.set $1 end - local.get $1 ) - (func $~lib/array/Array>#join (; 145 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 154 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 + i32.const 3264 local.set $1 - local.get $0 + i32.const 3508 i32.load - local.set $4 - i32.const 4216 - i32.load - i32.const 0 - i32.ne + i32.const 1 + i32.shr_u local.set $5 - local.get $3 + local.get $0 + i32.load offset=4 + local.set $3 + local.get $2 i32.eqz if - local.get $4 - i32.load offset=8 - local.tee $2 + local.get $3 + i32.load + local.tee $0 if (result i32) - local.get $2 - i32.const 4216 + local.get $0 + i32.const 3512 call $~lib/array/Array#join else - i32.const 3904 + i32.const 3264 end return end - i32.const 0 - local.set $0 loop $repeat|0 - local.get $0 - local.get $3 + local.get $4 + local.get $2 i32.lt_s if - local.get $0 + local.get $4 i32.const 2 i32.shl - local.get $4 + local.get $3 i32.add - i32.load offset=8 - local.tee $2 + i32.load + local.tee $0 if local.get $1 - local.get $2 - i32.const 4216 + local.get $0 + i32.const 3512 call $~lib/array/Array#join - call $~lib/string/String.__concat + call $~lib/string/String.concat local.set $1 end local.get $5 if local.get $1 - i32.const 4216 - call $~lib/string/String.__concat + i32.const 3512 + call $~lib/string/String.concat local.set $1 end - local.get $0 + local.get $4 i32.const 1 i32.add - local.set $0 + local.set $4 br $repeat|0 end end - local.get $3 + local.get $2 i32.const 2 i32.shl - local.get $4 + local.get $3 i32.add - i32.load offset=8 - local.tee $2 - if + i32.load + local.tee $0 + if (result i32) local.get $1 - local.get $2 - i32.const 4216 + local.get $0 + i32.const 3512 call $~lib/array/Array#join - call $~lib/string/String.__concat - local.set $1 + call $~lib/string/String.concat + else + local.get $1 end - local.get $1 ) - (func $~lib/array/Array>>#join (; 146 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>>#join_arr (; 155 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 + i32.const 3264 local.set $1 - local.get $0 + i32.const 3508 i32.load - local.set $4 - i32.const 4216 - i32.load - i32.const 0 - i32.ne + i32.const 1 + i32.shr_u local.set $5 - local.get $3 + local.get $0 + i32.load offset=4 + local.set $3 + local.get $2 i32.eqz if - local.get $4 - i32.load offset=8 - local.tee $2 + local.get $3 + i32.load + local.tee $0 if (result i32) - local.get $2 - call $~lib/array/Array>#join + local.get $0 + call $~lib/array/Array>#join_arr else - i32.const 3904 + i32.const 3264 end return end - i32.const 0 - local.set $0 loop $repeat|0 - local.get $0 - local.get $3 + local.get $4 + local.get $2 i32.lt_s if - local.get $0 + local.get $4 i32.const 2 i32.shl - local.get $4 + local.get $3 i32.add - i32.load offset=8 - local.tee $2 + i32.load + local.tee $0 if local.get $1 - local.get $2 - call $~lib/array/Array>#join - call $~lib/string/String.__concat + local.get $0 + call $~lib/array/Array>#join_arr + call $~lib/string/String.concat local.set $1 end local.get $5 if local.get $1 - i32.const 4216 - call $~lib/string/String.__concat + i32.const 3512 + call $~lib/string/String.concat local.set $1 end - local.get $0 + local.get $4 i32.const 1 i32.add - local.set $0 + local.set $4 br $repeat|0 end end - local.get $3 + local.get $2 i32.const 2 i32.shl - local.get $4 + local.get $3 i32.add - i32.load offset=8 - local.tee $2 - if + i32.load + local.tee $0 + if (result i32) + local.get $1 + local.get $0 + call $~lib/array/Array>#join_arr + call $~lib/string/String.concat + else local.get $1 - local.get $2 - call $~lib/array/Array>#join - call $~lib/string/String.__concat - local.set $1 end - local.get $1 ) - (func $start:std/array (; 147 ;) (type $FUNCSIG$v) + (func $start:std/array (; 156 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - i32.const 7912 + i32.const 6448 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -10028,11 +9881,17 @@ unreachable end i32.const 0 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/doAllocate + i32.const 5 + call $~lib/runtime/doRegister drop i32.const 12 - call $~lib/allocator/arena/__memory_allocate - call $~lib/internal/typedarray/TypedArray#constructor + call $~lib/runtime/doAllocate + i32.const 6 + call $~lib/runtime/doRegister + i32.const 1 + i32.const 0 + call $~lib/runtime/ArrayBufferView#constructor drop global.get $std/array/arr8 i32.const 1 @@ -10040,7 +9899,10 @@ i32.const 3 call $~lib/array/Array#fill global.get $std/array/arr8 - i32.const 256 + i32.const 192 + i32.const 7 + i32.const 0 + call $~lib/runtime/doWrapArray call $std/array/isArraysEqual i32.eqz if @@ -10051,14 +9913,16 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/array/arr8 i32.const 0 i32.const 0 - call $~lib/array/Array#fill|trampoline + i32.const 2147483647 + call $~lib/array/Array#fill global.get $std/array/arr8 - i32.const 280 + i32.const 208 + i32.const 7 + i32.const 0 + call $~lib/runtime/doWrapArray call $std/array/isArraysEqual i32.eqz if @@ -10075,7 +9939,10 @@ i32.const -3 call $~lib/array/Array#fill global.get $std/array/arr8 - i32.const 304 + i32.const 224 + i32.const 7 + i32.const 0 + call $~lib/runtime/doWrapArray call $std/array/isArraysEqual i32.eqz if @@ -10086,14 +9953,16 @@ call $~lib/env/abort unreachable end - i32.const 2 - global.set $~lib/argc global.get $std/array/arr8 i32.const 2 i32.const -2 - call $~lib/array/Array#fill|trampoline + i32.const 2147483647 + call $~lib/array/Array#fill global.get $std/array/arr8 - i32.const 328 + i32.const 240 + i32.const 7 + i32.const 0 + call $~lib/runtime/doWrapArray call $std/array/isArraysEqual i32.eqz if @@ -10110,7 +9979,10 @@ i32.const 0 call $~lib/array/Array#fill global.get $std/array/arr8 - i32.const 352 + i32.const 256 + i32.const 7 + i32.const 0 + call $~lib/runtime/doWrapArray call $std/array/isArraysEqual i32.eqz if @@ -10127,7 +9999,10 @@ i32.const 3 call $~lib/array/Array#fill global.get $std/array/arr32 - i32.const 432 + i32.const 328 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10139,14 +10014,16 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/array/arr32 i32.const 0 i32.const 0 - call $~lib/array/Array#fill|trampoline + i32.const 2147483647 + call $~lib/array/Array#fill global.get $std/array/arr32 - i32.const 472 + i32.const 360 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10164,7 +10041,10 @@ i32.const -3 call $~lib/array/Array#fill global.get $std/array/arr32 - i32.const 512 + i32.const 392 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10176,14 +10056,16 @@ call $~lib/env/abort unreachable end - i32.const 2 - global.set $~lib/argc global.get $std/array/arr32 i32.const 2 i32.const -2 - call $~lib/array/Array#fill|trampoline + i32.const 2147483647 + call $~lib/array/Array#fill global.get $std/array/arr32 - i32.const 552 + i32.const 424 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10201,7 +10083,10 @@ i32.const 0 call $~lib/array/Array#fill global.get $std/array/arr32 - i32.const 592 + i32.const 456 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10214,7 +10099,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 if i32.const 0 i32.const 120 @@ -10225,7 +10110,9 @@ end global.get $std/array/arr i32.load - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s if @@ -10239,20 +10126,16 @@ global.get $std/array/arr i32.const 42 call $~lib/array/Array#push - i32.const 0 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 42 i32.ne if @@ -10264,7 +10147,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.ne if @@ -10277,7 +10160,9 @@ end global.get $std/array/arr i32.load - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 1 @@ -10305,7 +10190,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 if i32.const 0 i32.const 120 @@ -10316,7 +10201,9 @@ end global.get $std/array/arr i32.load - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 1 @@ -10333,7 +10220,7 @@ i32.const 43 call $~lib/array/Array#push global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.ne if @@ -10346,7 +10233,9 @@ end global.get $std/array/arr i32.load - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 1 @@ -10359,20 +10248,16 @@ call $~lib/env/abort unreachable end - i32.const 0 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 43 i32.ne if @@ -10387,7 +10272,7 @@ i32.const 44 call $~lib/array/Array#push global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 2 i32.ne if @@ -10400,7 +10285,9 @@ end global.get $std/array/arr i32.load - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 2 @@ -10413,20 +10300,16 @@ call $~lib/env/abort unreachable end - i32.const 0 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 43 i32.ne if @@ -10437,22 +10320,18 @@ call $~lib/env/abort unreachable end - i32.const 1 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 44 i32.ne if @@ -10467,7 +10346,7 @@ i32.const 45 call $~lib/array/Array#push global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.ne if @@ -10480,7 +10359,9 @@ end global.get $std/array/arr i32.load - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 3 @@ -10493,20 +10374,16 @@ call $~lib/env/abort unreachable end - i32.const 0 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 43 i32.ne if @@ -10517,22 +10394,18 @@ call $~lib/env/abort unreachable end - i32.const 1 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 44 i32.ne if @@ -10543,22 +10416,18 @@ call $~lib/env/abort unreachable end - i32.const 2 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 45 i32.ne if @@ -10578,7 +10447,9 @@ global.set $std/array/out global.get $std/array/arr i32.load - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 3 @@ -10592,7 +10463,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.ne if @@ -10604,7 +10475,7 @@ unreachable end global.get $std/array/out - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.ne if @@ -10616,12 +10487,17 @@ unreachable end global.get $std/array/out - i32.const 608 + i32.const 528 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray call $~lib/array/Array#concat drop global.get $std/array/arr i32.load - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 3 @@ -10634,20 +10510,16 @@ call $~lib/env/abort unreachable end - i32.const 0 global.get $std/array/out - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 43 i32.ne if @@ -10658,22 +10530,18 @@ call $~lib/env/abort unreachable end - i32.const 1 global.get $std/array/out - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 44 i32.ne if @@ -10684,22 +10552,18 @@ call $~lib/env/abort unreachable end - i32.const 2 global.get $std/array/out - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 45 i32.ne if @@ -10722,7 +10586,9 @@ global.set $std/array/out global.get $std/array/arr i32.load - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 3 @@ -10736,7 +10602,7 @@ unreachable end global.get $std/array/other - i32.load offset=4 + i32.load offset=12 i32.const 2 i32.ne if @@ -10748,7 +10614,7 @@ unreachable end global.get $std/array/out - i32.load offset=4 + i32.load offset=12 i32.const 5 i32.ne if @@ -10759,20 +10625,16 @@ call $~lib/env/abort unreachable end - i32.const 0 global.get $std/array/out - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 43 i32.ne if @@ -10783,22 +10645,18 @@ call $~lib/env/abort unreachable end - i32.const 1 global.get $std/array/out - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 44 i32.ne if @@ -10809,22 +10667,18 @@ call $~lib/env/abort unreachable end - i32.const 2 global.get $std/array/out - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 45 i32.ne if @@ -10835,22 +10689,18 @@ call $~lib/env/abort unreachable end - i32.const 3 global.get $std/array/out - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 12 + i32.add + i32.const -1 + i32.const 12 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 12 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 46 i32.ne if @@ -10861,22 +10711,18 @@ call $~lib/env/abort unreachable end - i32.const 4 global.get $std/array/out - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 16 + i32.add + i32.const -1 + i32.const 16 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 16 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 47 i32.ne if @@ -10891,7 +10737,7 @@ call $~lib/array/Array#pop drop global.get $std/array/out - i32.load offset=4 + i32.load offset=12 i32.const 4 i32.ne if @@ -10907,7 +10753,7 @@ call $~lib/array/Array#concat global.set $std/array/out global.get $std/array/out - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.ne if @@ -10918,22 +10764,18 @@ call $~lib/env/abort unreachable end - i32.const 2 global.get $std/array/out - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 45 i32.ne if @@ -10945,7 +10787,7 @@ unreachable end global.get $std/array/source - i32.load offset=4 + i32.load offset=12 if i32.const 0 i32.const 120 @@ -10959,7 +10801,7 @@ call $~lib/array/Array#concat global.set $std/array/out global.get $std/array/out - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.ne if @@ -10971,7 +10813,7 @@ unreachable end global.get $std/array/source - i32.load offset=4 + i32.load offset=12 if i32.const 0 i32.const 120 @@ -10980,15 +10822,20 @@ call $~lib/env/abort unreachable end - i32.const 664 - global.set $std/array/cwArr + i32.const 568 + i32.const 4 i32.const 2 - global.set $~lib/argc + call $~lib/runtime/doWrapArray + global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 i32.const 3 - call $~lib/array/Array#copyWithin|trampoline - i32.const 704 + i32.const 2147483647 + call $~lib/array/Array#copyWithin + i32.const 600 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11000,15 +10847,20 @@ call $~lib/env/abort unreachable end - i32.const 744 - global.set $std/array/cwArr + i32.const 632 + i32.const 4 i32.const 2 - global.set $~lib/argc + call $~lib/runtime/doWrapArray + global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 i32.const 3 - call $~lib/array/Array#copyWithin|trampoline - i32.const 784 + i32.const 2147483647 + call $~lib/array/Array#copyWithin + i32.const 664 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11020,15 +10872,20 @@ call $~lib/env/abort unreachable end - i32.const 824 - global.set $std/array/cwArr + i32.const 696 + i32.const 4 i32.const 2 - global.set $~lib/argc + call $~lib/runtime/doWrapArray + global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 i32.const 2 - call $~lib/array/Array#copyWithin|trampoline - i32.const 864 + i32.const 2147483647 + call $~lib/array/Array#copyWithin + i32.const 728 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11040,15 +10897,20 @@ call $~lib/env/abort unreachable end - i32.const 904 - global.set $std/array/cwArr + i32.const 760 + i32.const 4 i32.const 2 - global.set $~lib/argc + call $~lib/runtime/doWrapArray + global.set $std/array/cwArr global.get $std/array/cwArr i32.const 2 i32.const 2 - call $~lib/array/Array#copyWithin|trampoline - i32.const 944 + i32.const 2147483647 + call $~lib/array/Array#copyWithin + i32.const 792 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11060,14 +10922,20 @@ call $~lib/env/abort unreachable end - i32.const 984 + i32.const 824 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - i32.const 1024 + i32.const 856 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11079,14 +10947,20 @@ call $~lib/env/abort unreachable end - i32.const 1064 + i32.const 888 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - i32.const 1104 + i32.const 920 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11098,14 +10972,20 @@ call $~lib/env/abort unreachable end - i32.const 1144 + i32.const 952 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 i32.const 2 i32.const 4 call $~lib/array/Array#copyWithin - i32.const 1184 + i32.const 984 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11117,15 +10997,20 @@ call $~lib/env/abort unreachable end - i32.const 1224 - global.set $std/array/cwArr + i32.const 1016 + i32.const 4 i32.const 2 - global.set $~lib/argc + call $~lib/runtime/doWrapArray + global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 i32.const -2 - call $~lib/array/Array#copyWithin|trampoline - i32.const 1264 + i32.const 2147483647 + call $~lib/array/Array#copyWithin + i32.const 1048 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11137,14 +11022,20 @@ call $~lib/env/abort unreachable end - i32.const 1304 + i32.const 1080 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 i32.const -2 i32.const -1 call $~lib/array/Array#copyWithin - i32.const 1344 + i32.const 1112 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11156,14 +11047,20 @@ call $~lib/env/abort unreachable end - i32.const 1384 + i32.const 1144 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 i32.const -3 i32.const -2 call $~lib/array/Array#copyWithin - i32.const 1424 + i32.const 1176 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11175,14 +11072,20 @@ call $~lib/env/abort unreachable end - i32.const 1464 + i32.const 1208 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 i32.const -3 i32.const -1 call $~lib/array/Array#copyWithin - i32.const 1504 + i32.const 1240 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11194,15 +11097,20 @@ call $~lib/env/abort unreachable end - i32.const 1544 - global.set $std/array/cwArr + i32.const 1272 + i32.const 4 i32.const 2 - global.set $~lib/argc + call $~lib/runtime/doWrapArray + global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 i32.const -3 - call $~lib/array/Array#copyWithin|trampoline - i32.const 1584 + i32.const 2147483647 + call $~lib/array/Array#copyWithin + i32.const 1304 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11218,7 +11126,7 @@ i32.const 42 call $~lib/array/Array#unshift global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 4 i32.ne if @@ -11231,7 +11139,9 @@ end global.get $std/array/arr i32.load - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 4 @@ -11244,20 +11154,16 @@ call $~lib/env/abort unreachable end - i32.const 0 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 42 i32.ne if @@ -11268,22 +11174,18 @@ call $~lib/env/abort unreachable end - i32.const 1 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 43 i32.ne if @@ -11294,22 +11196,18 @@ call $~lib/env/abort unreachable end - i32.const 2 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 44 i32.ne if @@ -11320,22 +11218,18 @@ call $~lib/env/abort unreachable end - i32.const 3 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 12 + i32.add + i32.const -1 + i32.const 12 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 12 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 45 i32.ne if @@ -11350,7 +11244,7 @@ i32.const 41 call $~lib/array/Array#unshift global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 5 i32.ne if @@ -11363,7 +11257,9 @@ end global.get $std/array/arr i32.load - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 5 @@ -11376,20 +11272,16 @@ call $~lib/env/abort unreachable end - i32.const 0 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 41 i32.ne if @@ -11400,22 +11292,18 @@ call $~lib/env/abort unreachable end - i32.const 1 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 42 i32.ne if @@ -11426,22 +11314,18 @@ call $~lib/env/abort unreachable end - i32.const 2 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 43 i32.ne if @@ -11452,22 +11336,18 @@ call $~lib/env/abort unreachable end - i32.const 3 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 12 + i32.add + i32.const -1 + i32.const 12 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 12 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 44 i32.ne if @@ -11478,22 +11358,18 @@ call $~lib/env/abort unreachable end - i32.const 4 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 16 + i32.add + i32.const -1 + i32.const 16 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 16 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 45 i32.ne if @@ -11519,7 +11395,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 4 i32.ne if @@ -11532,7 +11408,9 @@ end global.get $std/array/arr i32.load - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 5 @@ -11545,20 +11423,16 @@ call $~lib/env/abort unreachable end - i32.const 0 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 42 i32.ne if @@ -11569,22 +11443,18 @@ call $~lib/env/abort unreachable end - i32.const 1 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 43 i32.ne if @@ -11595,22 +11465,18 @@ call $~lib/env/abort unreachable end - i32.const 2 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 44 i32.ne if @@ -11621,22 +11487,18 @@ call $~lib/env/abort unreachable end - i32.const 3 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 12 + i32.add + i32.const -1 + i32.const 12 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 12 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 45 i32.ne if @@ -11662,7 +11524,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.ne if @@ -11675,7 +11537,9 @@ end global.get $std/array/arr i32.load - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 5 @@ -11688,20 +11552,16 @@ call $~lib/env/abort unreachable end - i32.const 0 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 42 i32.ne if @@ -11712,22 +11572,18 @@ call $~lib/env/abort unreachable end - i32.const 1 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 43 i32.ne if @@ -11738,22 +11594,18 @@ call $~lib/env/abort unreachable end - i32.const 2 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 44 i32.ne if @@ -11767,7 +11619,7 @@ global.get $std/array/arr call $~lib/array/Array#reverse global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.ne if @@ -11780,7 +11632,9 @@ end global.get $std/array/arr i32.load - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 5 @@ -11793,20 +11647,16 @@ call $~lib/env/abort unreachable end - i32.const 0 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 44 i32.ne if @@ -11817,22 +11667,18 @@ call $~lib/env/abort unreachable end - i32.const 1 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 43 i32.ne if @@ -11843,22 +11689,18 @@ call $~lib/env/abort unreachable end - i32.const 2 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 42 i32.ne if @@ -12036,11 +11878,7 @@ global.get $std/array/arr i32.const 44 i32.const 0 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -12056,11 +11894,7 @@ global.get $std/array/arr i32.const 42 i32.const 0 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -12076,11 +11910,7 @@ global.get $std/array/arr i32.const 45 i32.const 0 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes if @@ -12094,11 +11924,7 @@ global.get $std/array/arr i32.const 43 i32.const 100 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes if @@ -12112,11 +11938,7 @@ global.get $std/array/arr i32.const 43 i32.const -100 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -12132,11 +11954,7 @@ global.get $std/array/arr i32.const 43 i32.const -2 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -12152,11 +11970,7 @@ global.get $std/array/arr i32.const 43 i32.const -4 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -12172,11 +11986,7 @@ global.get $std/array/arr i32.const 43 i32.const 0 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -12192,11 +12002,7 @@ global.get $std/array/arr i32.const 43 i32.const 1 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -12212,11 +12018,7 @@ global.get $std/array/arr i32.const 43 i32.const 2 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -12235,7 +12037,7 @@ call $~lib/array/Array#splice drop global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 4 i32.ne if @@ -12248,7 +12050,9 @@ end global.get $std/array/arr i32.load - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 5 @@ -12261,20 +12065,16 @@ call $~lib/env/abort unreachable end - i32.const 0 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 44 i32.ne if @@ -12285,22 +12085,18 @@ call $~lib/env/abort unreachable end - i32.const 1 global.get $std/array/arr - i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u + i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + select + i32.load i32.const 42 i32.ne if @@ -12311,12 +12107,14 @@ call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/array/sarr i32.const 0 - call $~lib/array/Array#splice|trampoline - i32.const 1664 + i32.const 2147483647 + call $~lib/array/Array#splice + i32.const 1392 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12329,7 +12127,10 @@ unreachable end global.get $std/array/sarr - i32.const 1680 + i32.const 1424 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12341,14 +12142,19 @@ call $~lib/env/abort unreachable end - i32.const 1720 + i32.const 1432 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/sarr - i32.const 1 - global.set $~lib/argc global.get $std/array/sarr i32.const 2 - call $~lib/array/Array#splice|trampoline - i32.const 1760 + i32.const 2147483647 + call $~lib/array/Array#splice + i32.const 1464 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12361,7 +12167,10 @@ unreachable end global.get $std/array/sarr - i32.const 1784 + i32.const 1488 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12373,13 +12182,19 @@ call $~lib/env/abort unreachable end - i32.const 1824 + i32.const 1504 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/sarr global.get $std/array/sarr i32.const 2 i32.const 2 call $~lib/array/Array#splice - i32.const 1848 + i32.const 1536 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12392,7 +12207,10 @@ unreachable end global.get $std/array/sarr - i32.const 1888 + i32.const 1552 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12404,13 +12222,19 @@ call $~lib/env/abort unreachable end - i32.const 1928 + i32.const 1576 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/sarr global.get $std/array/sarr i32.const 0 i32.const 1 call $~lib/array/Array#splice - i32.const 1952 + i32.const 1608 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12423,7 +12247,10 @@ unreachable end global.get $std/array/sarr - i32.const 1992 + i32.const 1624 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12435,14 +12262,19 @@ call $~lib/env/abort unreachable end - i32.const 2032 + i32.const 1648 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/sarr - i32.const 1 - global.set $~lib/argc global.get $std/array/sarr i32.const -1 - call $~lib/array/Array#splice|trampoline - i32.const 2056 + i32.const 2147483647 + call $~lib/array/Array#splice + i32.const 1680 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12455,7 +12287,10 @@ unreachable end global.get $std/array/sarr - i32.const 2096 + i32.const 1696 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12467,14 +12302,19 @@ call $~lib/env/abort unreachable end - i32.const 2136 + i32.const 1720 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/sarr - i32.const 1 - global.set $~lib/argc global.get $std/array/sarr i32.const -2 - call $~lib/array/Array#splice|trampoline - i32.const 2160 + i32.const 2147483647 + call $~lib/array/Array#splice + i32.const 1752 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12487,7 +12327,10 @@ unreachable end global.get $std/array/sarr - i32.const 2200 + i32.const 1768 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12499,13 +12342,19 @@ call $~lib/env/abort unreachable end - i32.const 2240 + i32.const 1792 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 i32.const 1 call $~lib/array/Array#splice - i32.const 2264 + i32.const 1824 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12518,7 +12367,10 @@ unreachable end global.get $std/array/sarr - i32.const 2304 + i32.const 1840 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12530,13 +12382,19 @@ call $~lib/env/abort unreachable end - i32.const 2344 + i32.const 1864 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/sarr global.get $std/array/sarr i32.const -7 i32.const 1 call $~lib/array/Array#splice - i32.const 2368 + i32.const 1896 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12549,7 +12407,10 @@ unreachable end global.get $std/array/sarr - i32.const 2408 + i32.const 1912 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12561,13 +12422,19 @@ call $~lib/env/abort unreachable end - i32.const 2448 + i32.const 1936 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 i32.const -1 call $~lib/array/Array#splice - i32.const 2464 + i32.const 1968 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12580,7 +12447,10 @@ unreachable end global.get $std/array/sarr - i32.const 2504 + i32.const 1976 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12592,13 +12462,19 @@ call $~lib/env/abort unreachable end - i32.const 2544 + i32.const 2008 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/sarr global.get $std/array/sarr i32.const 1 i32.const -2 call $~lib/array/Array#splice - i32.const 2560 + i32.const 2040 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12611,7 +12487,10 @@ unreachable end global.get $std/array/sarr - i32.const 2600 + i32.const 2048 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12623,13 +12502,19 @@ call $~lib/env/abort unreachable end - i32.const 2640 + i32.const 2080 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/sarr global.get $std/array/sarr i32.const 4 i32.const 0 call $~lib/array/Array#splice - i32.const 2656 + i32.const 2112 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12642,7 +12527,10 @@ unreachable end global.get $std/array/sarr - i32.const 2696 + i32.const 2120 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12654,13 +12542,19 @@ call $~lib/env/abort unreachable end - i32.const 2736 + i32.const 2152 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/sarr global.get $std/array/sarr i32.const 7 i32.const 0 call $~lib/array/Array#splice - i32.const 2752 + i32.const 2184 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12673,7 +12567,10 @@ unreachable end global.get $std/array/sarr - i32.const 2792 + i32.const 2192 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12685,13 +12582,19 @@ call $~lib/env/abort unreachable end - i32.const 2832 + i32.const 2224 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray global.set $std/array/sarr global.get $std/array/sarr i32.const 7 i32.const 5 call $~lib/array/Array#splice - i32.const 2848 + i32.const 2256 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12704,7 +12607,10 @@ unreachable end global.get $std/array/sarr - i32.const 2888 + i32.const 2264 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12717,22 +12623,23 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 0 - i32.const 0 - call $~lib/array/Array#__set - global.get $std/array/arr + i32.store + local.get $0 + i32.load offset=4 i32.const 1 - i32.const 1 - call $~lib/array/Array#__set - global.get $std/array/arr + i32.store offset=4 + local.get $0 + i32.load offset=4 i32.const 2 - i32.const 2 - call $~lib/array/Array#__set - global.get $std/array/arr + i32.store offset=8 + local.get $0 + i32.load offset=4 i32.const 3 - i32.const 3 - call $~lib/array/Array#__set - global.get $std/array/arr + i32.store offset=12 + local.get $0 i32.const 1 call $~lib/array/Array#findIndex global.set $std/array/i @@ -12791,7 +12698,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 8 i32.ne if @@ -12845,7 +12752,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 2 i32.ne if @@ -12906,7 +12813,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 8 i32.ne if @@ -12958,7 +12865,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 2 i32.ne if @@ -13017,7 +12924,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 8 i32.ne if @@ -13069,7 +12976,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 2 i32.ne if @@ -13119,7 +13026,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 8 i32.ne if @@ -13175,7 +13082,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 2 i32.ne if @@ -13196,7 +13103,7 @@ i32.const 21 call $~lib/array/Array#forEach global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 100 i32.ne if @@ -13207,18 +13114,20 @@ call $~lib/env/abort unreachable end + i32.const 0 + local.set $0 loop $repeat|0 - local.get $1 + local.get $0 i32.const 100 i32.lt_s if global.get $std/array/arr call $~lib/array/Array#pop drop - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $repeat|0 end end @@ -13238,7 +13147,7 @@ call $~lib/array/Array#map global.set $std/array/newArr global.get $std/array/newArr - i32.load offset=4 + i32.load offset=12 i32.const 4 i32.ne if @@ -13249,34 +13158,26 @@ call $~lib/env/abort unreachable end - i32.const 0 global.get $std/array/newArr - i32.load - local.tee $1 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result f32) - local.get $1 - f32.load offset=8 - else - unreachable - end + local.tee $0 + i32.load offset=4 + i32.const -1 i32.const 0 - global.get $std/array/arr - i32.load - local.tee $1 - i32.load - i32.const 2 - i32.shr_u + local.get $0 + i32.load offset=8 i32.lt_u - if (result i32) - local.get $1 - i32.load offset=8 - else - unreachable - end + select + f32.load + global.get $std/array/arr + local.tee $0 + i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load f32.convert_i32_s f32.ne if @@ -13304,7 +13205,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 8 i32.ne if @@ -13360,7 +13261,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 2 i32.ne if @@ -13382,7 +13283,7 @@ call $~lib/array/Array#filter global.set $std/array/filteredArr global.get $std/array/filteredArr - i32.load offset=4 + i32.load offset=12 i32.const 2 i32.ne if @@ -13411,7 +13312,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 8 i32.ne if @@ -13469,7 +13370,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 2 i32.ne if @@ -13569,7 +13470,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 8 i32.ne if @@ -13625,7 +13526,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 2 i32.ne if @@ -13725,7 +13626,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 8 i32.ne if @@ -13781,7 +13682,7 @@ unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 if i32.const 0 i32.const 120 @@ -13809,8 +13710,6 @@ global.set $~lib/argc global.get $std/array/f32ArrayTyped local.set $0 - i32.const 0 - local.set $1 block $1of1 block $0of1 block $outOfRange @@ -13826,6 +13725,10 @@ local.get $1 call $~lib/array/Array#sort global.get $std/array/f32ArrayTyped + i32.const 2576 + i32.const 9 + i32.const 2 + call $~lib/runtime/doWrapArray call $std/array/isArraysEqual i32.eqz if @@ -13842,11 +13745,11 @@ local.set $0 i32.const 0 local.set $1 - block $1of155 - block $0of156 - block $outOfRange57 + block $1of143 + block $0of144 + block $outOfRange45 global.get $~lib/argc - br_table $0of156 $1of155 $outOfRange57 + br_table $0of144 $1of143 $outOfRange45 end unreachable end @@ -13857,6 +13760,10 @@ local.get $1 call $~lib/array/Array#sort global.get $std/array/f64ArrayTyped + i32.const 2712 + i32.const 10 + i32.const 3 + call $~lib/runtime/doWrapArray call $std/array/isArraysEqual i32.eqz if @@ -13873,11 +13780,11 @@ local.set $0 i32.const 0 local.set $1 - block $1of158 - block $0of159 - block $outOfRange60 + block $1of146 + block $0of147 + block $outOfRange48 global.get $~lib/argc - br_table $0of159 $1of158 $outOfRange60 + br_table $0of147 $1of146 $outOfRange48 end unreachable end @@ -13889,7 +13796,10 @@ call $~lib/array/Array#sort drop global.get $std/array/i32ArrayTyped - i32.const 3592 + i32.const 2840 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13907,11 +13817,11 @@ local.set $0 i32.const 0 local.set $1 - block $1of161 - block $0of162 - block $outOfRange63 + block $1of149 + block $0of150 + block $outOfRange51 global.get $~lib/argc - br_table $0of162 $1of161 $outOfRange63 + br_table $0of150 $1of149 $outOfRange51 end unreachable end @@ -13923,7 +13833,10 @@ call $~lib/array/Array#sort drop global.get $std/array/u32ArrayTyped - i32.const 3672 + i32.const 2928 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13955,7 +13868,10 @@ global.get $std/array/reversed1 call $std/array/assertSortedDefault global.get $std/array/reversed1 - i32.const 3840 + i32.const 3168 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13970,7 +13886,10 @@ global.get $std/array/reversed2 call $std/array/assertSortedDefault global.get $std/array/reversed2 - i32.const 3864 + i32.const 3184 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14109,9 +14028,13 @@ global.set $~lib/argc global.get $std/array/randomStrings400 call $std/array/assertSorted|trampoline - call $~lib/array/Array#join - i32.const 4248 - call $~lib/string/String.__eq + i32.const 3528 + i32.const 15 + i32.const 0 + call $~lib/runtime/doWrapArray + call $~lib/array/Array#join_bool + i32.const 3544 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14121,11 +14044,14 @@ call $~lib/env/abort unreachable end - i32.const 4872 - i32.const 3904 + i32.const 4048 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + i32.const 3264 call $~lib/array/Array#join - i32.const 4880 - call $~lib/string/String.__eq + i32.const 4072 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14135,11 +14061,14 @@ call $~lib/env/abort unreachable end - i32.const 4976 - i32.const 4936 + i32.const 4136 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray + i32.const 4120 call $~lib/array/Array#join - i32.const 4880 - call $~lib/string/String.__eq + i32.const 4072 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14149,11 +14078,14 @@ call $~lib/env/abort unreachable end - i32.const 5032 - i32.const 5008 + i32.const 4192 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + i32.const 4176 call $~lib/array/Array#join - i32.const 5040 - call $~lib/string/String.__eq + i32.const 4208 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14163,9 +14095,13 @@ call $~lib/env/abort unreachable end - call $~lib/array/Array#join - i32.const 6696 - call $~lib/string/String.__eq + i32.const 5432 + i32.const 10 + i32.const 3 + call $~lib/runtime/doWrapArray + call $~lib/array/Array#join_flt + i32.const 5488 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14175,11 +14111,14 @@ call $~lib/env/abort unreachable end - i32.const 6864 - i32.const 3904 + i32.const 5616 + i32.const 14 + i32.const 2 + call $~lib/runtime/doWrapArray + i32.const 3264 call $~lib/array/Array#join - i32.const 6784 - call $~lib/string/String.__eq + i32.const 5576 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14189,37 +14128,37 @@ call $~lib/env/abort unreachable end + i32.const 16 + call $~lib/runtime/doAllocate + i32.const 19 + call $~lib/runtime/doRegister i32.const 3 - call $~lib/array/Array#constructor - local.set $1 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.tee $0 i32.const 0 - call $~lib/allocator/arena/__memory_allocate - local.set $0 - local.get $1 - i32.load + i32.store offset=12 local.get $0 - i32.store offset=8 - local.get $1 - i32.load - i32.const 4 - i32.add - i32.const 0 - i32.store offset=8 - i32.const 0 - call $~lib/allocator/arena/__memory_allocate - local.set $0 - local.get $1 - i32.load - i32.const 8 - i32.add + i32.const 3 + i32.store offset=12 + local.get $0 + i32.const 0 + call $std/array/Ref#constructor + call $~lib/array/Array#__set + local.get $0 + i32.const 1 + i32.const 0 + call $~lib/array/Array#__set + local.get $0 + i32.const 2 + call $std/array/Ref#constructor + call $~lib/array/Array#__set local.get $0 - i32.store offset=8 - local.get $1 global.set $std/array/refArr global.get $std/array/refArr - call $~lib/array/Array#join - i32.const 6912 - call $~lib/string/String.__eq + call $~lib/array/Array#join_ref + i32.const 5680 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14230,10 +14169,9 @@ unreachable end global.get $std/array/reversed0 - i32.const 4216 - call $~lib/array/Array#join - i32.const 3904 - call $~lib/string/String.__eq + call $~lib/array/Array#toString + i32.const 3264 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14244,10 +14182,9 @@ unreachable end global.get $std/array/reversed1 - i32.const 4216 - call $~lib/array/Array#join - i32.const 6784 - call $~lib/string/String.__eq + call $~lib/array/Array#toString + i32.const 5576 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14258,10 +14195,9 @@ unreachable end global.get $std/array/reversed2 - i32.const 4216 - call $~lib/array/Array#join - i32.const 6984 - call $~lib/string/String.__eq + call $~lib/array/Array#toString + i32.const 5752 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14272,10 +14208,9 @@ unreachable end global.get $std/array/reversed4 - i32.const 4216 - call $~lib/array/Array#join - i32.const 7000 - call $~lib/string/String.__eq + call $~lib/array/Array#toString + i32.const 5768 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14285,9 +14220,13 @@ call $~lib/env/abort unreachable end - call $~lib/array/Array#join - i32.const 7072 - call $~lib/string/String.__eq + i32.const 5808 + i32.const 20 + i32.const 0 + call $~lib/runtime/doWrapArray + call $~lib/array/Array#join_int + i32.const 5824 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14297,9 +14236,13 @@ call $~lib/env/abort unreachable end - call $~lib/array/Array#join - i32.const 7136 - call $~lib/string/String.__eq + i32.const 5864 + i32.const 21 + i32.const 1 + call $~lib/runtime/doWrapArray + call $~lib/array/Array#join_int + i32.const 5880 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14309,9 +14252,13 @@ call $~lib/env/abort unreachable end - call $~lib/array/Array#join - i32.const 7240 - call $~lib/string/String.__eq + i32.const 5944 + i32.const 16 + i32.const 3 + call $~lib/runtime/doWrapArray + call $~lib/array/Array#join_int + i32.const 5976 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14321,9 +14268,13 @@ call $~lib/env/abort unreachable end - call $~lib/array/Array#join - i32.const 7440 - call $~lib/string/String.__eq + i32.const 6072 + i32.const 22 + i32.const 3 + call $~lib/runtime/doWrapArray + call $~lib/array/Array#join_int + i32.const 6112 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14334,10 +14285,9 @@ unreachable end global.get $std/array/randomStringsExpected - i32.const 4216 - call $~lib/array/Array#join - i32.const 7528 - call $~lib/string/String.__eq + call $~lib/array/Array#toString + i32.const 6208 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14347,11 +14297,13 @@ call $~lib/env/abort unreachable end - i32.const 7648 - i32.const 4216 - call $~lib/array/Array#join - i32.const 7656 - call $~lib/string/String.__eq + i32.const 6304 + i32.const 14 + i32.const 2 + call $~lib/runtime/doWrapArray + call $~lib/array/Array#toString + i32.const 6328 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14361,10 +14313,28 @@ call $~lib/env/abort unreachable end + i32.const 2 + call $~lib/array/Array>#constructor + local.tee $0 + i32.const 0 + i32.const 6352 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + call $~lib/array/Array#__set + local.get $0 + i32.const 1 + i32.const 6368 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + call $~lib/array/Array#__set + local.get $0 + global.set $std/array/subarr32 global.get $std/array/subarr32 - call $~lib/array/Array>#join - i32.const 7744 - call $~lib/string/String.__eq + call $~lib/array/Array>#join_arr + i32.const 6384 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14374,10 +14344,39 @@ call $~lib/env/abort unreachable end + i32.const 16 + call $~lib/runtime/doAllocate + i32.const 23 + call $~lib/runtime/doRegister + i32.const 2 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.tee $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 2 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.const 6408 + i32.const 7 + i32.const 0 + call $~lib/runtime/doWrapArray + call $~lib/array/Array#__set + local.get $0 + i32.const 1 + i32.const 6424 + i32.const 7 + i32.const 0 + call $~lib/runtime/doWrapArray + call $~lib/array/Array#__set + local.get $0 + global.set $std/array/subarr8 global.get $std/array/subarr8 - call $~lib/array/Array>#join - i32.const 7744 - call $~lib/string/String.__eq + call $~lib/array/Array>#join_arr + i32.const 6384 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14387,10 +14386,49 @@ call $~lib/env/abort unreachable end + i32.const 16 + call $~lib/runtime/doAllocate + i32.const 25 + call $~lib/runtime/doRegister + i32.const 1 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.tee $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 1 + i32.store offset=12 + i32.const 16 + call $~lib/runtime/doAllocate + i32.const 24 + call $~lib/runtime/doRegister + i32.const 1 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.tee $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 1 + i32.store offset=12 + local.get $1 + i32.const 0 + i32.const 6440 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray + call $~lib/array/Array#__set + local.get $0 + i32.const 0 + local.get $1 + call $~lib/array/Array#__set + local.get $0 + global.set $std/array/subarrU32 global.get $std/array/subarrU32 - call $~lib/array/Array>>#join - i32.const 6784 - call $~lib/string/String.__eq + call $~lib/array/Array>>#join_arr + i32.const 5576 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -14401,10 +14439,10 @@ unreachable end ) - (func $start (; 148 ;) (type $FUNCSIG$v) + (func $start (; 157 ;) (type $FUNCSIG$v) call $start:std/array ) - (func $null (; 149 ;) (type $FUNCSIG$v) + (func $null (; 158 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/array.ts b/tests/compiler/std/array.ts index 551c3691..fb38652b 100644 --- a/tests/compiler/std/array.ts +++ b/tests/compiler/std/array.ts @@ -894,8 +894,8 @@ assertSorted>(reversedElements512, (a: Proxy, b: Proxy): i3 // Test sorting strings -var randomStringsActual: string[] = ["a", "b", "a", "ab", "ba", "", null]; -var randomStringsExpected: string[] = ["", "a", "a", "ab", "b", "ba", null]; +var randomStringsActual: (string | null)[] = ["a", "b", "a", "ab", "ba", "", null]; +var randomStringsExpected: (string | null)[] = ["", "a", "a", "ab", "b", "ba", null]; assertSorted(randomStringsActual); assert(isArraysEqual(randomStringsActual, randomStringsExpected)); @@ -913,7 +913,7 @@ assert(([1, 2, 3]).join("-") == "1-2-3"); assert(([i32.MIN_VALUE, i32.MIN_VALUE]).join("__") == "-2147483648__-2147483648"); assert(([0.0, 1.0, -2.0, NaN, -Infinity, Infinity]).join(", ") == "0.0, 1.0, -2.0, NaN, -Infinity, Infinity"); assert((["", "1", null]).join("") == "1"); -var refArr: Ref[] = [new Ref(), null, new Ref()]; +var refArr: (Ref | null)[] = [new Ref(), null, new Ref()]; assert(refArr.join() == "[object Object],,[object Object]"); // Array#toString ////////////////////////////////////////////////////////////////////////////////// diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index f450133d..4ebd5352 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -1,355 +1,242 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$fiii (func (param i32 i32 i32) (result f32))) - (type $FUNCSIG$fii (func (param i32 i32) (result f32))) (type $FUNCSIG$d (func (result f64))) (type $FUNCSIG$vj (func (param i64))) (type $FUNCSIG$jj (func (param i64) (result i64))) (type $FUNCSIG$iff (func (param f32 f32) (result i32))) (type $FUNCSIG$if (func (param f32) (result i32))) (type $FUNCSIG$idd (func (param f64 f64) (result i32))) - (type $FUNCSIG$dii (func (param i32 i32) (result f64))) (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) - (type $FUNCSIG$viiiii (func (param i32 i32 i32 i32 i32))) (type $FUNCSIG$iid (func (param i32 f64) (result i32))) (type $FUNCSIG$iijijiji (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) (type $FUNCSIG$iiid (func (param i32 i32 f64) (result i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$viji (func (param i32 i64 i32))) (type $FUNCSIG$iiij (func (param i32 i32 i64) (result i32))) + (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "Math" "random" (func $~lib/bindings/Math/random (result f64))) (memory $0 1) - (data (i32.const 8) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 40) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 104) "\03\00\00\00a\00b\00c\00") - (data (i32.const 120) "\0c\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 152) "\1b\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 216) "\05\00\00\00\00\00\00\00\01\02\03\04\05\00\00\00") - (data (i32.const 232) "\d8\00\00\00\05\00\00\00") - (data (i32.const 240) "\05\00\00\00\00\00\00\00\01\01\01\04\05\00\00\00") - (data (i32.const 256) "\f0\00\00\00\05\00\00\00") - (data (i32.const 264) "\05\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 280) "\08\01\00\00\05\00\00\00") - (data (i32.const 288) "\05\00\00\00\00\00\00\00\01\01\00\00\00\00\00\00") - (data (i32.const 304) " \01\00\00\05\00\00\00") - (data (i32.const 312) "\05\00\00\00\00\00\00\00\01\01\00\02\02\00\00\00") - (data (i32.const 328) "8\01\00\00\05\00\00\00") - (data (i32.const 336) "\05\00\00\00\00\00\00\00\01\01\00\02\02\00\00\00") - (data (i32.const 352) "P\01\00\00\05\00\00\00") - (data (i32.const 360) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 392) "h\01\00\00\05\00\00\00") - (data (i32.const 400) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 432) "\90\01\00\00\05\00\00\00") - (data (i32.const 440) "\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 472) "\b8\01\00\00\05\00\00\00") - (data (i32.const 480) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 512) "\e0\01\00\00\05\00\00\00") - (data (i32.const 520) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00\00\00\00\00") - (data (i32.const 552) "\08\02\00\00\05\00\00\00") - (data (i32.const 560) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00\00\00\00\00") - (data (i32.const 592) "0\02\00\00\05\00\00\00") - (data (i32.const 600) "\00\00\00\00\00\00\00\00") - (data (i32.const 608) "X\02\00\00\00\00\00\00") - (data (i32.const 616) "\00\00\00\00\00\00\00\00") - (data (i32.const 624) "h\02\00\00\00\00\00\00") - (data (i32.const 632) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 664) "x\02\00\00\05\00\00\00") - (data (i32.const 672) "\14\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 704) "\a0\02\00\00\05\00\00\00") - (data (i32.const 712) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 744) "\c8\02\00\00\05\00\00\00") - (data (i32.const 752) "\14\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 784) "\f0\02\00\00\05\00\00\00") - (data (i32.const 792) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 824) "\18\03\00\00\05\00\00\00") - (data (i32.const 832) "\14\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 864) "@\03\00\00\05\00\00\00") - (data (i32.const 872) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 904) "h\03\00\00\05\00\00\00") - (data (i32.const 912) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 944) "\90\03\00\00\05\00\00\00") - (data (i32.const 952) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 984) "\b8\03\00\00\05\00\00\00") - (data (i32.const 992) "\14\00\00\00\00\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1024) "\e0\03\00\00\05\00\00\00") - (data (i32.const 1032) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1064) "\08\04\00\00\05\00\00\00") - (data (i32.const 1072) "\14\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1104) "0\04\00\00\05\00\00\00") - (data (i32.const 1112) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1144) "X\04\00\00\05\00\00\00") - (data (i32.const 1152) "\14\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1184) "\80\04\00\00\05\00\00\00") - (data (i32.const 1192) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1224) "\a8\04\00\00\05\00\00\00") - (data (i32.const 1232) "\14\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1264) "\d0\04\00\00\05\00\00\00") - (data (i32.const 1272) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1304) "\f8\04\00\00\05\00\00\00") - (data (i32.const 1312) "\14\00\00\00\00\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1344) " \05\00\00\05\00\00\00") - (data (i32.const 1352) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1384) "H\05\00\00\05\00\00\00") - (data (i32.const 1392) "\14\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1424) "p\05\00\00\05\00\00\00") - (data (i32.const 1432) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1464) "\98\05\00\00\05\00\00\00") - (data (i32.const 1472) "\14\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1504) "\c0\05\00\00\05\00\00\00") - (data (i32.const 1512) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1544) "\e8\05\00\00\05\00\00\00") - (data (i32.const 1552) "\14\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1584) "\10\06\00\00\05\00\00\00") - (data (i32.const 1592) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1624) "8\06\00\00\05\00\00\00") - (data (i32.const 1632) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1664) "`\06\00\00\05\00\00\00") - (data (i32.const 1672) "\00\00\00\00\00\00\00\00") - (data (i32.const 1680) "\88\06\00\00\00\00\00\00") - (data (i32.const 1688) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1720) "\98\06\00\00\05\00\00\00") - (data (i32.const 1728) "\0c\00\00\00\00\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1760) "\c0\06\00\00\03\00\00\00") - (data (i32.const 1768) "\08\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 1784) "\e8\06\00\00\02\00\00\00") - (data (i32.const 1792) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1824) "\00\07\00\00\05\00\00\00") - (data (i32.const 1832) "\08\00\00\00\00\00\00\00\03\00\00\00\04\00\00\00") - (data (i32.const 1848) "(\07\00\00\02\00\00\00") - (data (i32.const 1856) "\0c\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1888) "@\07\00\00\03\00\00\00") - (data (i32.const 1896) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1928) "h\07\00\00\05\00\00\00") - (data (i32.const 1936) "\04\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00") - (data (i32.const 1952) "\90\07\00\00\01\00\00\00") - (data (i32.const 1960) "\10\00\00\00\00\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1992) "\a8\07\00\00\04\00\00\00") - (data (i32.const 2000) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2032) "\d0\07\00\00\05\00\00\00") - (data (i32.const 2040) "\04\00\00\00\00\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2056) "\f8\07\00\00\01\00\00\00") - (data (i32.const 2064) "\10\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2096) "\10\08\00\00\04\00\00\00") - (data (i32.const 2104) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2136) "8\08\00\00\05\00\00\00") - (data (i32.const 2144) "\08\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2160) "`\08\00\00\02\00\00\00") - (data (i32.const 2168) "\0c\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2200) "x\08\00\00\03\00\00\00") - (data (i32.const 2208) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2240) "\a0\08\00\00\05\00\00\00") - (data (i32.const 2248) "\04\00\00\00\00\00\00\00\04\00\00\00\00\00\00\00") - (data (i32.const 2264) "\c8\08\00\00\01\00\00\00") - (data (i32.const 2272) "\10\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2304) "\e0\08\00\00\04\00\00\00") - (data (i32.const 2312) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2344) "\08\t\00\00\05\00\00\00") - (data (i32.const 2352) "\04\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00") - (data (i32.const 2368) "0\t\00\00\01\00\00\00") - (data (i32.const 2376) "\10\00\00\00\00\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2408) "H\t\00\00\04\00\00\00") - (data (i32.const 2416) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2448) "p\t\00\00\05\00\00\00") - (data (i32.const 2456) "\00\00\00\00\00\00\00\00") - (data (i32.const 2464) "\98\t\00\00\00\00\00\00") - (data (i32.const 2472) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2504) "\a8\t\00\00\05\00\00\00") - (data (i32.const 2512) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2544) "\d0\t\00\00\05\00\00\00") - (data (i32.const 2552) "\00\00\00\00\00\00\00\00") - (data (i32.const 2560) "\f8\t\00\00\00\00\00\00") - (data (i32.const 2568) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2600) "\08\n\00\00\05\00\00\00") - (data (i32.const 2608) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2640) "0\n\00\00\05\00\00\00") - (data (i32.const 2648) "\00\00\00\00\00\00\00\00") - (data (i32.const 2656) "X\n\00\00\00\00\00\00") - (data (i32.const 2664) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2696) "h\n\00\00\05\00\00\00") - (data (i32.const 2704) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2736) "\90\n\00\00\05\00\00\00") - (data (i32.const 2744) "\00\00\00\00\00\00\00\00") - (data (i32.const 2752) "\b8\n\00\00\00\00\00\00") - (data (i32.const 2760) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2792) "\c8\n\00\00\05\00\00\00") - (data (i32.const 2800) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2832) "\f0\n\00\00\05\00\00\00") - (data (i32.const 2840) "\00\00\00\00\00\00\00\00") - (data (i32.const 2848) "\18\0b\00\00\00\00\00\00") - (data (i32.const 2856) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2888) "(\0b\00\00\05\00\00\00") - (data (i32.const 2896) "\0c\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00") - (data (i32.const 2928) "V\00\00\00A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\000\001\002\003\004\005\006\007\008\009\00_\00-\00,\00.\00+\00/\00\\\00[\00]\00{\00}\00(\00)\00<\00>\00*\00&\00$\00%\00^\00@\00#\00!\00?\00") - (data (i32.const 3104) " \00\00\00\00\00\00\00\00\00\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 3168) " \0c\00\00\08\00\00\00") - (data (i32.const 3176) " \00\00\00\00\00\00\00\00\00\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 3240) "h\0c\00\00\08\00\00\00") - (data (i32.const 3248) "@\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 3376) "\b0\0c\00\00\08\00\00\00") - (data (i32.const 3384) "@\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\05\00\00\00\00\00\f0?\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 3512) "8\0d\00\00\08\00\00\00") - (data (i32.const 3520) "\14\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\02\00\00\00\00\00\00\00") - (data (i32.const 3552) "\c0\0d\00\00\05\00\00\00") - (data (i32.const 3560) "\14\00\00\00\00\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02\00\00\00\00\00\00\00") - (data (i32.const 3592) "\e8\0d\00\00\05\00\00\00") - (data (i32.const 3600) "\14\00\00\00\00\00\00\00\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02\00\00\00\00\00\00\00") - (data (i32.const 3632) "\10\0e\00\00\05\00\00\00") - (data (i32.const 3640) "\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00") - (data (i32.const 3672) "8\0e\00\00\05\00\00\00") - (data (i32.const 3680) "\00\00\00\00\00\00\00\00") - (data (i32.const 3688) "`\0e\00\00\00\00\00\00") - (data (i32.const 3696) "\04\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00") - (data (i32.const 3712) "p\0e\00\00\01\00\00\00") - (data (i32.const 3720) "\08\00\00\00\00\00\00\00\02\00\00\00\01\00\00\00") - (data (i32.const 3736) "\88\0e\00\00\02\00\00\00") - (data (i32.const 3744) "\10\00\00\00\00\00\00\00\03\00\00\00\02\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 3776) "\a0\0e\00\00\04\00\00\00") - (data (i32.const 3784) "\10\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 3816) "\c8\0e\00\00\04\00\00\00") - (data (i32.const 3824) "\04\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00") - (data (i32.const 3840) "\f0\0e\00\00\01\00\00\00") - (data (i32.const 3848) "\08\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 3864) "\08\0f\00\00\02\00\00\00") - (data (i32.const 3872) "\01\00\00\00a\00") - (data (i32.const 3880) "\01\00\00\00b\00") - (data (i32.const 3888) "\02\00\00\00a\00b\00") - (data (i32.const 3896) "\02\00\00\00b\00a\00") - (data (i32.const 3904) "\00\00\00\00") - (data (i32.const 3912) "\1c\00\00\00\00\00\00\00 \0f\00\00(\0f\00\00 \0f\00\000\0f\00\008\0f\00\00@\0f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 3976) "H\0f\00\00\07\00\00\00") - (data (i32.const 3984) "\1c\00\00\00\00\00\00\00@\0f\00\00 \0f\00\00 \0f\00\000\0f\00\00(\0f\00\008\0f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 4048) "\90\0f\00\00\07\00\00\00") - (data (i32.const 4056) "\0e\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 4088) "\17\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 4144) "\04\00\00\00n\00u\00l\00l\00") - (data (i32.const 4160) "\02\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00") - (data (i32.const 4176) "@\10\00\00\02\00\00\00") - (data (i32.const 4184) "\04\00\00\00t\00r\00u\00e\00") - (data (i32.const 4200) "\05\00\00\00f\00a\00l\00s\00e\00") - (data (i32.const 4216) "\01\00\00\00,\00") - (data (i32.const 4224) "\02\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00") - (data (i32.const 4240) "\80\10\00\00\02\00\00\00") - (data (i32.const 4248) "\n\00\00\00t\00r\00u\00e\00,\00f\00a\00l\00s\00e\00") - (data (i32.const 4272) "\0c\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 4304) "\b0\10\00\00\03\00\00\00") - (data (i32.const 4312) "\01\00\00\000\00") - (data (i32.const 4320) "\90\01\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 4832) "\e0\10\00\00d\00\00\00") - (data (i32.const 4840) "\0c\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 4872) "\e8\12\00\00\03\00\00\00") - (data (i32.const 4880) "\05\00\00\001\00-\002\00-\003\00") - (data (i32.const 4896) "\0c\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 4928) " \13\00\00\03\00\00\00") - (data (i32.const 4936) "\01\00\00\00-\00") - (data (i32.const 4944) "\0c\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 4976) "P\13\00\00\03\00\00\00") - (data (i32.const 4984) "\08\00\00\00\00\00\00\00\00\00\00\80\00\00\00\80") - (data (i32.const 5000) "x\13\00\00\02\00\00\00") - (data (i32.const 5008) "\02\00\00\00_\00_\00") - (data (i32.const 5016) "\08\00\00\00\00\00\00\00\00\00\00\80\00\00\00\80") - (data (i32.const 5032) "\98\13\00\00\02\00\00\00") - (data (i32.const 5040) "\18\00\00\00-\002\001\004\007\004\008\003\006\004\008\00_\00_\00-\002\001\004\007\004\008\003\006\004\008\00") - (data (i32.const 5096) "0\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\00\00") - (data (i32.const 5160) "\e8\13\00\00\06\00\00\00") - (data (i32.const 5168) "\02\00\00\00,\00 \00") - (data (i32.const 5176) "\03\00\00\000\00.\000\00") - (data (i32.const 5192) "\03\00\00\00N\00a\00N\00") - (data (i32.const 5208) "\t\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 5232) "\08\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 5256) "\b8\02\00\00\00\00\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\00*\00&\00$\00%\00^\00@\00#\00!\00?\00") + (data (i32.const 2504) "\02\00\00\00 \00\00\00\00\00\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f") + (data (i32.const 2544) "\t\00\00\00\10\00\00\00\d0\t\00\00\d0\t\00\00 \00\00\00\08\00\00\00") + (data (i32.const 2568) "\02\00\00\00 \00\00\00\00\00\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f") + (data (i32.const 2608) "\02\00\00\00@\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f") + (data (i32.const 2680) "\n\00\00\00\10\00\00\008\n\00\008\n\00\00@\00\00\00\08\00\00\00") + (data (i32.const 2704) "\02\00\00\00@\00\00\00\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\05\00\00\00\00\00\f0?\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\f8\7f") + (data (i32.const 2776) "\02\00\00\00\14\00\00\00\01\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\02\00\00\00") + (data (i32.const 2808) "\04\00\00\00\10\00\00\00\e0\n\00\00\e0\n\00\00\14\00\00\00\05\00\00\00") + (data (i32.const 2832) "\02\00\00\00\14\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 2864) "\02\00\00\00\14\00\00\00\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02\00\00\00") + (data (i32.const 2896) "\08\00\00\00\10\00\00\008\0b\00\008\0b\00\00\14\00\00\00\05\00\00\00") + (data (i32.const 2920) "\02\00\00\00\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff") + (data (i32.const 2952) "\02\00\00\00\00\00\00\00") + (data (i32.const 2960) "\04\00\00\00\10\00\00\00\90\0b\00\00\90\0b\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2984) "\02\00\00\00\04\00\00\00\01\00\00\00") + (data (i32.const 3000) "\04\00\00\00\10\00\00\00\b0\0b\00\00\b0\0b\00\00\04\00\00\00\01\00\00\00") + (data (i32.const 3024) "\02\00\00\00\08\00\00\00\02\00\00\00\01\00\00\00") + (data (i32.const 3040) "\04\00\00\00\10\00\00\00\d8\0b\00\00\d8\0b\00\00\08\00\00\00\02\00\00\00") + (data (i32.const 3064) "\02\00\00\00\10\00\00\00\03\00\00\00\02\00\00\00\01\00\00\00\00\00\00\00") + (data (i32.const 3088) "\04\00\00\00\10\00\00\00\00\0c\00\00\00\0c\00\00\10\00\00\00\04\00\00\00") + (data (i32.const 3112) "\02\00\00\00\10\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") + (data (i32.const 3136) "\04\00\00\00\10\00\00\000\0c\00\000\0c\00\00\10\00\00\00\04\00\00\00") + (data (i32.const 3160) "\02\00\00\00\04\00\00\00\01\00\00\00") + (data (i32.const 3176) "\02\00\00\00\08\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 3192) "\01\00\00\00\02\00\00\00a\00") + (data (i32.const 3208) "\01\00\00\00\02\00\00\00b\00") + (data (i32.const 3224) "\01\00\00\00\04\00\00\00a\00b\00") + (data (i32.const 3240) "\01\00\00\00\04\00\00\00b\00a\00") + (data (i32.const 3256) "\01\00\00\00\00\00\00\00") + (data (i32.const 3264) "\02\00\00\00\1c\00\00\00\80\0c\00\00\90\0c\00\00\80\0c\00\00\a0\0c\00\00\b0\0c\00\00\c0\0c\00\00\00\00\00\00") + (data (i32.const 3304) "\0e\00\00\00\10\00\00\00\c8\0c\00\00\c8\0c\00\00\1c\00\00\00\07\00\00\00") + (data (i32.const 3328) "\02\00\00\00\1c\00\00\00\c0\0c\00\00\80\0c\00\00\80\0c\00\00\a0\0c\00\00\90\0c\00\00\b0\0c\00\00\00\00\00\00") + (data (i32.const 3368) "\0e\00\00\00\10\00\00\00\08\0d\00\00\08\0d\00\00\1c\00\00\00\07\00\00\00") + (data (i32.const 3392) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") + (data (i32.const 3432) "\01\00\00\00\08\00\00\00n\00u\00l\00l\00") + (data (i32.const 3448) "\02\00\00\00\02\00\00\00\01\00") + (data (i32.const 3464) "\01\00\00\00\08\00\00\00t\00r\00u\00e\00") + (data (i32.const 3480) "\01\00\00\00\n\00\00\00f\00a\00l\00s\00e\00") + (data (i32.const 3504) "\01\00\00\00\02\00\00\00,\00") + (data (i32.const 3520) "\02\00\00\00\02\00\00\00\01\00") + (data (i32.const 3536) "\01\00\00\00\14\00\00\00t\00r\00u\00e\00,\00f\00a\00l\00s\00e\00") + (data (i32.const 3568) "\02\00\00\00\0c\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") + (data (i32.const 3592) "\01\00\00\00\02\00\00\000\00") + (data (i32.const 3608) "\02\00\00\00\90\01\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\00") + (data (i32.const 4016) "\08\00\00\00\10\00\00\00 \0e\00\00 \0e\00\00\90\01\00\00d\00\00\00") + (data (i32.const 4040) "\02\00\00\00\0c\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") + (data (i32.const 4064) "\01\00\00\00\n\00\00\001\00-\002\00-\003\00") + (data (i32.const 4088) "\02\00\00\00\0c\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") + (data (i32.const 4112) "\01\00\00\00\02\00\00\00-\00") + (data (i32.const 4128) "\02\00\00\00\0c\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") + (data (i32.const 4152) "\02\00\00\00\08\00\00\00\00\00\00\80\00\00\00\80") + (data (i32.const 4168) "\01\00\00\00\04\00\00\00_\00_\00") + (data (i32.const 4184) "\02\00\00\00\08\00\00\00\00\00\00\80\00\00\00\80") + (data (i32.const 4200) "\01\00\00\000\00\00\00-\002\001\004\007\004\008\003\006\004\008\00_\00_\00-\002\001\004\007\004\008\003\006\004\008\00") + (data (i32.const 4256) "\02\00\00\000\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\f0\7f") + (data (i32.const 4312) "\01\00\00\00\04\00\00\00,\00 \00") + (data (i32.const 4328) "\01\00\00\00\06\00\00\000\00.\000\00") + (data (i32.const 4344) "\01\00\00\00\06\00\00\00N\00a\00N\00") + (data (i32.const 4360) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00") + (data (i32.const 4392) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00") + (data (i32.const 4416) "\02\00\00\00\b8\02\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8~anonymous|0 $~lib/internal/sort/COMPARATOR~anonymous|0 $~lib/internal/sort/COMPARATOR~anonymous|0 $~lib/internal/sort/COMPARATOR~anonymous|0 $~lib/internal/sort/COMPARATOR~anonymous|1 $start:std/array~anonymous|43 $start:std/array~anonymous|44 $start:std/array~anonymous|45 $start:std/array~anonymous|46 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/internal/sort/COMPARATOR~anonymous|0) + (elem (i32.const 0) $null $start:std/array~anonymous|0 $start:std/array~anonymous|1 $start:std/array~anonymous|2 $start:std/array~anonymous|3 $start:std/array~anonymous|4 $start:std/array~anonymous|5 $start:std/array~anonymous|6 $start:std/array~anonymous|7 $start:std/array~anonymous|8 $start:std/array~anonymous|9 $start:std/array~anonymous|10 $start:std/array~anonymous|11 $start:std/array~anonymous|12 $start:std/array~anonymous|13 $start:std/array~anonymous|14 $start:std/array~anonymous|15 $start:std/array~anonymous|16 $start:std/array~anonymous|17 $start:std/array~anonymous|18 $start:std/array~anonymous|19 $start:std/array~anonymous|20 $start:std/array~anonymous|21 $start:std/array~anonymous|22 $start:std/array~anonymous|23 $start:std/array~anonymous|24 $start:std/array~anonymous|25 $start:std/array~anonymous|26 $start:std/array~anonymous|27 $start:std/array~anonymous|28 $start:std/array~anonymous|29 $start:std/array~anonymous|30 $start:std/array~anonymous|31 $start:std/array~anonymous|32 $start:std/array~anonymous|33 $start:std/array~anonymous|34 $start:std/array~anonymous|35 $start:std/array~anonymous|36 $start:std/array~anonymous|37 $start:std/array~anonymous|38 $start:std/array~anonymous|39 $start:std/array~anonymous|40 $start:std/array~anonymous|41 $start:std/array~anonymous|42 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|1 $start:std/array~anonymous|43 $start:std/array~anonymous|44 $start:std/array~anonymous|45 $start:std/array~anonymous|46 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR~anonymous|0) + (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/array/arr (mut i32) (i32.const 0)) (global $std/array/num (mut i32) (i32.const 1)) (global $std/array/Null (mut i32) (i32.const 0)) (global $std/array/str (mut i32) (i32.const 104)) - (global $std/array/arr8 (mut i32) (i32.const 232)) + (global $std/array/arr8 (mut i32) (i32.const 168)) (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) - (global $~lib/argc (mut i32) (i32.const 0)) - (global $std/array/arr32 (mut i32) (i32.const 392)) + (global $std/array/arr32 (mut i32) (i32.const 304)) (global $std/array/i (mut i32) (i32.const 0)) (global $std/array/other (mut i32) (i32.const 0)) (global $std/array/out (mut i32) (i32.const 0)) - (global $std/array/source (mut i32) (i32.const 624)) + (global $std/array/source (mut i32) (i32.const 544)) (global $std/array/cwArr (mut i32) (i32.const 0)) (global $std/array/includes (mut i32) (i32.const 0)) - (global $std/array/sarr (mut i32) (i32.const 1624)) + (global $std/array/sarr (mut i32) (i32.const 1368)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $std/array/every (mut i32) (i32.const 0)) (global $std/array/some (mut i32) (i32.const 0)) (global $std/array/newArr (mut i32) (i32.const 0)) @@ -360,16 +247,16 @@ (global $~lib/math/random_state1_64 (mut i64) (i64.const 0)) (global $~lib/math/random_state0_32 (mut i32) (i32.const 0)) (global $~lib/math/random_state1_32 (mut i32) (i32.const 0)) - (global $std/array/charset i32 (i32.const 2928)) - (global $std/array/f32ArrayTyped (mut i32) (i32.const 3168)) - (global $std/array/f64ArrayTyped (mut i32) (i32.const 3376)) - (global $std/array/i32ArrayTyped (mut i32) (i32.const 3552)) - (global $std/array/u32ArrayTyped (mut i32) (i32.const 3632)) - (global $std/array/reversed0 (mut i32) (i32.const 3688)) - (global $std/array/reversed1 (mut i32) (i32.const 3712)) - (global $std/array/reversed2 (mut i32) (i32.const 3736)) - (global $std/array/reversed4 (mut i32) (i32.const 3776)) - (global $std/array/expected4 (mut i32) (i32.const 3816)) + (global $std/array/charset i32 (i32.const 2328)) + (global $std/array/f32ArrayTyped (mut i32) (i32.const 2552)) + (global $std/array/f64ArrayTyped (mut i32) (i32.const 2688)) + (global $std/array/i32ArrayTyped (mut i32) (i32.const 2816)) + (global $std/array/u32ArrayTyped (mut i32) (i32.const 2904)) + (global $std/array/reversed0 (mut i32) (i32.const 2968)) + (global $std/array/reversed1 (mut i32) (i32.const 3008)) + (global $std/array/reversed2 (mut i32) (i32.const 3048)) + (global $std/array/reversed4 (mut i32) (i32.const 3096)) + (global $std/array/expected4 (mut i32) (i32.const 3144)) (global $std/array/reversed64 (mut i32) (i32.const 0)) (global $std/array/reversed128 (mut i32) (i32.const 0)) (global $std/array/reversed1024 (mut i32) (i32.const 0)) @@ -379,44 +266,32 @@ (global $std/array/randomized257 (mut i32) (i32.const 0)) (global $std/array/reversedNested512 (mut i32) (i32.const 0)) (global $std/array/reversedElements512 (mut i32) (i32.const 0)) - (global $std/array/randomStringsActual (mut i32) (i32.const 3976)) - (global $std/array/randomStringsExpected (mut i32) (i32.const 4048)) + (global $std/array/randomStringsActual (mut i32) (i32.const 3312)) + (global $std/array/randomStringsExpected (mut i32) (i32.const 3376)) (global $std/array/randomStrings400 (mut i32) (i32.const 0)) (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/builtins/i32.MIN_VALUE i32 (i32.const -2147483648)) - (global $~lib/internal/number/_frc_plus (mut i64) (i64.const 0)) - (global $~lib/internal/number/_frc_minus (mut i64) (i64.const 0)) - (global $~lib/internal/number/_exp (mut i32) (i32.const 0)) - (global $~lib/internal/number/_K (mut i32) (i32.const 0)) - (global $~lib/internal/number/_frc_pow (mut i64) (i64.const 0)) - (global $~lib/internal/number/_exp_pow (mut i32) (i32.const 0)) + (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) + (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) + (global $~lib/util/number/_exp (mut i32) (i32.const 0)) + (global $~lib/util/number/_K (mut i32) (i32.const 0)) + (global $~lib/util/number/_frc_pow (mut i64) (i64.const 0)) + (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) (global $std/array/refArr (mut i32) (i32.const 0)) (global $~lib/builtins/u32.MAX_VALUE i32 (i32.const -1)) (global $~lib/builtins/i64.MAX_VALUE i64 (i64.const 9223372036854775807)) - (global $std/array/subarr32 (mut i32) (i32.const 7736)) - (global $std/array/subarr8 (mut i32) (i32.const 7832)) - (global $std/array/subarrU32 (mut i32) (i32.const 7904)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 7912)) + (global $std/array/subarr32 (mut i32) (i32.const 0)) + (global $std/array/subarr8 (mut i32) (i32.const 0)) + (global $std/array/subarrU32 (mut i32) (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 6444)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $start:~lib/allocator/arena (; 2 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - ) - (func $~lib/internal/arraybuffer/computeSize (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 - i32.const 8 + global.get $~lib/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -424,518 +299,474 @@ i32.sub i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $1 - local.get $1 - local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $4 - current_memory - local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $4 + (local $7 i32) + block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) + local.get $0 + local.set $1 local.get $1 - i32.sub - i32.const 65535 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $2 + local.get $2 + local.get $1 + local.tee $3 + i32.const 1 + local.tee $4 + local.get $3 + local.get $4 + i32.gt_u + select i32.add - i32.const 65535 + i32.const 7 + i32.add + i32.const 7 i32.const -1 i32.xor i32.and - i32.const 16 - i32.shr_u - local.set $2 - local.get $5 - local.tee $3 - local.get $2 - local.tee $6 - local.get $3 - local.get $6 - i32.gt_s - select local.set $3 + current_memory + local.set $4 local.get $3 - grow_memory - i32.const 0 - i32.lt_s + local.get $4 + i32.const 16 + i32.shl + i32.gt_u if + local.get $3 local.get $2 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $4 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $6 + local.get $6 grow_memory i32.const 0 i32.lt_s if - unreachable + local.get $5 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + end + local.get $3 + global.set $~lib/allocator/arena/offset + local.get $2 + end + return + ) + (func $~lib/runtime/doAllocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/runtime/ADJUSTOBLOCK + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add + ) + (func $~lib/memory/memory.fill (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i64) + block $~lib/util/memory/memset|inlined.0 + local.get $2 + i32.eqz + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 1 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 2 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 1 + i32.add + local.get $1 + i32.store8 + local.get $0 + i32.const 2 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 2 + i32.sub + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 3 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 6 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 3 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.set $3 + local.get $0 + local.get $3 + i32.add + local.set $0 + local.get $2 + local.get $3 + i32.sub + local.set $2 + local.get $2 + i32.const -4 + i32.and + local.set $2 + i32.const -1 + i32.const 255 + i32.div_u + local.get $1 + i32.const 255 + i32.and + i32.mul + local.set $4 + local.get $0 + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $4 + i32.store + local.get $2 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 12 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 8 + i32.sub + local.get $4 + i32.store + local.get $2 + i32.const 24 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 16 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 20 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 24 + i32.add + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 28 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 24 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 20 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 16 + i32.sub + local.get $4 + i32.store + i32.const 24 + local.get $0 + i32.const 4 + i32.and + i32.add + local.set $3 + local.get $0 + local.get $3 + i32.add + local.set $0 + local.get $2 + local.get $3 + i32.sub + local.set $2 + local.get $4 + i64.extend_i32_u + local.get $4 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $5 + block $break|0 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + block + local.get $0 + local.get $5 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $5 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $5 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $5 + i64.store + local.get $2 + i32.const 32 + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + end + br $continue|0 + end end end end - local.get $4 - global.set $~lib/allocator/arena/offset - local.get $1 ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $~lib/runtime/assertUnregistered (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - i32.const 1073741816 - i32.le_u + global.get $~lib/memory/HEAP_BASE + i32.gt_u i32.eqz if i32.const 0 - i32.const 40 - i32.const 26 + i32.const 16 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable end - block $~lib/memory/memory.allocate|inlined.0 (result i32) - local.get $0 - call $~lib/internal/arraybuffer/computeSize + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 192 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doRegister (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + local.get $1 + i32.store + local.get $0 + ) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + global.get $~lib/runtime/MAX_BYTELENGTH + i32.gt_u + if + i32.const 0 + i32.const 56 + i32.const 24 + i32.const 43 + call $~lib/env/abort + unreachable + end + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + local.get $1 local.set $2 local.get $2 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 + call $~lib/runtime/doAllocate end - local.set $1 - local.get $1 - local.get $0 - i32.store + local.set $3 + local.get $3 + i32.const 0 local.get $1 + call $~lib/memory/memory.fill + block $~lib/runtime/REGISTER|inlined.0 (result i32) + local.get $3 + local.set $2 + local.get $2 + i32.const 2 + call $~lib/runtime/doRegister + end ) - (func $~lib/memory/memory.allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ALLOCATE (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/allocator/arena/__memory_allocate - return + call $~lib/runtime/doAllocate ) - (func $~lib/internal/memory/memset (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/runtime/ArrayBufferView#constructor (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i64) + local.get $1 + global.get $~lib/runtime/MAX_BYTELENGTH local.get $2 - i32.eqz + i32.shr_u + i32.gt_u if - return - end - local.get $0 - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 1 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 2 - i32.le_u - if - return - end - local.get $0 - i32.const 1 - i32.add - local.get $1 - i32.store8 - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 2 - i32.sub - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 3 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u - if - return + i32.const 0 + i32.const 16 + i32.const 226 + i32.const 57 + call $~lib/env/abort + unreachable end i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $2 - i32.const -4 - i32.and - local.set $2 - i32.const -1 - i32.const 255 - i32.div_u local.get $1 - i32.const 255 - i32.and - i32.mul - local.set $4 - local.get $0 - local.get $4 - i32.store - local.get $0 local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 8 - i32.le_u - if - return - end - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 12 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 8 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 24 - i32.le_u - if - return - end - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 16 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 20 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 24 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 28 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 24 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 20 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 16 - i32.sub - local.get $4 - i32.store - i32.const 24 - local.get $0 - i32.const 4 - i32.and - i32.add + i32.shl + local.tee $1 + call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $4 - i64.extend_i32_u - local.get $4 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $5 - block $break|0 - loop $continue|0 - local.get $2 - i32.const 32 - i32.ge_u - if - block - local.get $0 - local.get $5 - i64.store - local.get $0 - i32.const 8 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 16 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 24 - i32.add - local.get $5 - i64.store - local.get $2 - i32.const 32 - i32.sub - local.set $2 - local.get $0 - i32.const 32 - i32.add - local.set $0 - end - br $continue|0 + block (result i32) + local.get $0 + i32.eqz + if + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 12 + call $~lib/runtime/ALLOCATE + local.set $4 + local.get $4 + i32.const 3 + call $~lib/runtime/doRegister end - end - end - ) - (func $~lib/array/Array#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 8 - i32.const 45 - i32.const 39 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block (result i32) - local.get $0 - i32.eqz - if - i32.const 8 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - end - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - block $~lib/memory/memory.fill|inlined.0 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - local.get $0 - ) - (func $~lib/array/Array.isArray | null> (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 1 - if (result i32) - local.get $0 - i32.const 0 - i32.ne - else - i32.const 1 - end - ) - (func $~lib/array/Array.isArray> (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 1 - if (result i32) - local.get $0 - i32.const 0 - i32.ne - else - i32.const 1 - end - ) - (func $std/array/P#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - ) - (func $~lib/array/Array.isArray

(; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 0 - if (result i32) - local.get $0 - i32.const 0 - i32.ne - else - i32.const 0 - end - ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 152 - i32.const 23 - i32.const 34 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 0 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/memory/memory.fill|inlined.1 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - block (result i32) - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/memory/memory.allocate local.set $0 end local.get $0 @@ -952,28 +783,105 @@ local.get $3 i32.store local.get $0 - i32.const 0 + local.get $3 i32.store offset=4 local.get $0 - local.get $2 + local.get $1 i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Uint8Array#constructor (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + if (result i32) + local.get $0 + else + i32.const 16 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 4 + call $~lib/runtime/doRegister + end + local.get $1 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + local.get $1 + i32.store offset=12 + local.get $0 + ) + (func $~lib/array/Array.isArray | null> (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + if (result i32) + local.get $0 + i32.const 0 + i32.ne + else + i32.const 1 + end + ) + (func $~lib/array/Array.isArray> (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + if (result i32) + local.get $0 + i32.const 0 + i32.ne + else + i32.const 1 + end + ) + (func $std/array/P#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 i32.eqz if - i32.const 12 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER

|inlined.0 (result i32) + i32.const 0 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + i32.const 5 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 + ) + (func $~lib/array/Array.isArray

(; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 0 + if (result i32) + local.get $0 + i32.const 0 + i32.ne + else + i32.const 0 + end + ) + (func $~lib/typedarray/Uint8Array#constructor (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + if (result i32) + local.get $0 + else + i32.const 12 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 6 + call $~lib/runtime/doRegister + end local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor + i32.const 0 + call $~lib/runtime/ArrayBufferView#constructor local.set $0 local.get $0 ) - (func $~lib/array/Array.isArray (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -983,7 +891,7 @@ i32.const 0 end ) - (func $~lib/array/Array.isArray (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -993,7 +901,7 @@ i32.const 0 end ) - (func $~lib/array/Array.isArray (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -1003,17 +911,16 @@ i32.const 0 end ) - (func $~lib/array/Array#fill (; 18 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (; 20 ;) (type $FUNCSIG$iiiii) (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.get $0 - i32.load - local.set $4 local.get $0 i32.load offset=4 + local.set $4 + local.get $0 + i32.load offset=12 local.set $5 local.get $2 i32.const 0 @@ -1072,377 +979,21 @@ local.get $4 local.get $2 i32.add - i32.const 8 - i32.add - local.set $6 local.get $1 - local.set $7 local.get $3 local.get $2 i32.sub - local.set $8 - local.get $6 - local.get $7 - local.get $8 - call $~lib/internal/memory/memset + call $~lib/memory/memory.fill end local.get $0 ) - (func $~lib/array/Array#__get (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load - i32.const 0 - i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 0 - i32.shl - i32.add - local.get $5 - i32.add - i32.load8_u offset=8 - else - unreachable - end - ) - (func $std/array/isArraysEqual (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $2 - i32.eqz - if - block $~lib/array/Array#get:length|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=4 - end - local.set $2 - local.get $2 - block $~lib/array/Array#get:length|inlined.2 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end - i32.ne - if - i32.const 0 - return - end - local.get $0 - local.get $1 - i32.eq - if - i32.const 1 - return - end - end - block $break|0 - i32.const 0 - local.set $3 - loop $repeat|0 - local.get $3 - local.get $2 - i32.lt_s - i32.eqz - br_if $break|0 - local.get $0 - local.get $3 - call $~lib/array/Array#__get - i32.const 255 - i32.and - local.get $1 - local.get $3 - call $~lib/array/Array#__get - i32.const 255 - i32.and - i32.ne - if - i32.const 0 - return - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $repeat|0 - unreachable - end - unreachable - end - i32.const 1 - ) - (func $~lib/array/Array#fill|trampoline (; 21 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $2 - end - global.get $~lib/builtins/i32.MAX_VALUE - local.set $3 - end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/array/Array#fill - ) - (func $~lib/array/Array#fill (; 22 ;) (type $FUNCSIG$iiiii) (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.get $0 - i32.load - local.set $4 + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub i32.load offset=4 - local.set $5 - local.get $2 - i32.const 0 - i32.lt_s - if (result i32) - local.get $5 - local.get $2 - i32.add - local.tee $6 - i32.const 0 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - else - local.get $2 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.lt_s - select - end - local.set $2 - local.get $3 - i32.const 0 - i32.lt_s - if (result i32) - local.get $5 - local.get $3 - i32.add - local.tee $6 - i32.const 0 - local.tee $7 - local.get $6 - local.get $7 - i32.gt_s - select - else - local.get $3 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.lt_s - select - end - local.set $3 - block $break|0 - loop $repeat|0 - local.get $2 - local.get $3 - i32.lt_s - i32.eqz - br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $4 - local.set $6 - local.get $2 - local.set $7 - local.get $1 - local.set $8 - i32.const 0 - local.set $9 - local.get $6 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $8 - i32.store offset=8 - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $repeat|0 - unreachable - end - unreachable - end - local.get $0 ) - (func $~lib/array/Array#__get (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end - ) - (func $std/array/isArraysEqual (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $2 - i32.eqz - if - block $~lib/array/Array#get:length|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=4 - end - local.set $2 - local.get $2 - block $~lib/array/Array#get:length|inlined.2 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end - i32.ne - if - i32.const 0 - return - end - local.get $0 - local.get $1 - i32.eq - if - i32.const 1 - return - end - end - block $break|0 - i32.const 0 - local.set $3 - loop $repeat|0 - local.get $3 - local.get $2 - i32.lt_s - i32.eqz - br_if $break|0 - local.get $0 - local.get $3 - call $~lib/array/Array#__get - local.get $1 - local.get $3 - call $~lib/array/Array#__get - i32.ne - if - i32.const 0 - return - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $repeat|0 - unreachable - end - unreachable - end - i32.const 1 - ) - (func $~lib/array/Array#fill|trampoline (; 25 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $2 - end - global.get $~lib/builtins/i32.MAX_VALUE - local.set $3 - end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/array/Array#fill - ) - (func $std/array/internalCapacity (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.load - local.set $1 - local.get $1 - i32.load - i32.const 2 - i32.shr_s - ) - (func $~lib/internal/memory/memcpy (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/memory/memcpy (; 22 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2643,64 +2194,122 @@ i32.store8 end ) - (func $~lib/internal/memory/memmove (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - local.get $0 - local.get $1 - i32.eq - if - return - end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - if (result i32) - local.get $3 - else - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - end - if + block $~lib/util/memory/memmove|inlined.0 local.get $0 local.get $1 - local.get $2 - call $~lib/internal/memory/memcpy - return - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and i32.eq if - block $break|0 - loop $continue|0 - local.get $0 - i32.const 7 - i32.and + br $~lib/util/memory/memmove|inlined.0 + end + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + local.tee $3 + if (result i32) + local.get $3 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|0 + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block (result i32) + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + end + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + end + i32.load8_u + i32.store8 + end + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + br $continue|1 + end + end + end + end + block $break|2 + loop $continue|2 + local.get $2 if block - local.get $2 - i32.eqz - if - return - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 block (result i32) local.get $0 local.tee $3 @@ -2719,495 +2328,673 @@ end i32.load8_u i32.store8 - end - br $continue|0 - end - end - end - block $break|1 - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $0 - local.get $1 - i64.load - i64.store local.get $2 - i32.const 8 + i32.const 1 i32.sub local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 end - br $continue|1 + br $continue|2 end end end - end - block $break|2 - loop $continue|2 - local.get $2 - if - block - block (result i32) - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|3 + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + end + br $continue|3 end - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 + end + end + block $break|4 + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + end + br $continue|4 end - i32.load8_u - i32.store8 + end + end + end + block $break|5 + loop $continue|5 + local.get $2 + if + local.get $0 local.get $2 i32.const 1 i32.sub - local.set $2 + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 end - br $continue|2 - end - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|3 - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - return - end - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - end - br $continue|3 - end - end - end - block $break|4 - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - local.get $2 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - end - br $continue|4 - end - end - end - end - block $break|5 - loop $continue|5 - local.get $2 - if - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 end end end end ) - (func $~lib/allocator/arena/__memory_free (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) - nop + (func $~lib/runtime/doWrapArray (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 16 + call $~lib/runtime/doAllocate + local.get $1 + call $~lib/runtime/doRegister + local.set $3 + local.get $0 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + local.get $4 + call $~lib/runtime/doAllocate + local.get $1 + call $~lib/runtime/doRegister + local.set $5 + local.get $3 + local.get $5 + i32.store + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $4 + i32.store offset=8 + local.get $3 + local.get $4 + local.get $2 + i32.shr_u + i32.store offset=12 + local.get $5 + local.get $0 + local.get $4 + call $~lib/memory/memory.copy + local.get $3 ) - (func $~lib/internal/arraybuffer/reallocateUnsafe (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#get:length (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=12 + ) + (func $std/array/isArraysEqual (; 26 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $2 + i32.eqz + if + local.get $0 + call $~lib/array/Array#get:length + local.set $2 + local.get $2 + local.get $1 + call $~lib/array/Array#get:length + i32.ne + if + i32.const 0 + return + end + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + end + block $break|0 + i32.const 0 + local.set $3 + loop $repeat|0 + local.get $3 + local.get $2 + i32.lt_s + i32.eqz + br_if $break|0 + local.get $0 + local.tee $4 + i32.load offset=4 + local.get $3 + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load8_u + local.get $1 + local.tee $4 + i32.load offset=4 + local.get $3 + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load8_u + i32.ne + if + i32.const 0 + return + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $repeat|0 + unreachable + end + unreachable + end + i32.const 1 + ) + (func $~lib/array/Array#fill (; 27 ;) (type $FUNCSIG$iiiii) (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 $0 + i32.load offset=4 + local.set $4 + local.get $0 + i32.load offset=12 + local.set $5 + local.get $2 + i32.const 0 + i32.lt_s + if (result i32) + local.get $5 + local.get $2 + i32.add + local.tee $6 + i32.const 0 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + else + local.get $2 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.lt_s + select + end + local.set $2 + local.get $3 + i32.const 0 + i32.lt_s + if (result i32) + local.get $5 + local.get $3 + i32.add + local.tee $6 + i32.const 0 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + else + local.get $3 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.lt_s + select + end + local.set $3 + block $break|0 + loop $repeat|0 + local.get $2 + local.get $3 + i32.lt_s + i32.eqz + br_if $break|0 + local.get $4 + local.get $2 + i32.const 2 + i32.shl + i32.add + local.get $1 + i32.store + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $repeat|0 + unreachable + end + unreachable + end + local.get $0 + ) + (func $~lib/array/Array#get:length (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=12 + ) + (func $std/array/isArraysEqual (; 29 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $2 + i32.eqz + if + local.get $0 + call $~lib/array/Array#get:length + local.set $2 + local.get $2 + local.get $1 + call $~lib/array/Array#get:length + i32.ne + if + i32.const 0 + return + end + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + end + block $break|0 + i32.const 0 + local.set $3 + loop $repeat|0 + local.get $3 + local.get $2 + i32.lt_s + i32.eqz + br_if $break|0 + local.get $0 + local.tee $4 + i32.load offset=4 + local.get $3 + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load + local.get $1 + local.tee $4 + i32.load offset=4 + local.get $3 + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load + i32.ne + if + i32.const 0 + return + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $repeat|0 + unreachable + end + unreachable + end + i32.const 1 + ) + (func $~lib/array/Array#get:length (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=12 + ) + (func $std/array/internalCapacity (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.load + local.set $1 + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + i32.const 2 + i32.shr_s + ) + (func $~lib/memory/memory.free (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + local.set $1 + ) + (func $~lib/runtime/doReallocate (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) local.get $0 - i32.load + global.get $~lib/runtime/HEADER_SIZE + i32.sub local.set $2 - local.get $1 local.get $2 - i32.gt_s + i32.load offset=4 + local.set $3 + local.get $3 + local.get $1 + i32.lt_u if local.get $1 - i32.const 1073741816 - i32.le_s - i32.eqz + call $~lib/runtime/ADJUSTOBLOCK + local.set $4 + local.get $3 + call $~lib/runtime/ADJUSTOBLOCK + i32.const 0 + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + select + local.get $4 + i32.lt_u if - i32.const 0 - i32.const 40 - i32.const 40 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - local.get $2 - call $~lib/internal/arraybuffer/computeSize - i32.const 8 - i32.sub - i32.le_s - if - local.get $0 - local.get $1 - i32.store - else - local.get $1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/memory/memory.copy|inlined.0 - local.get $3 - i32.const 8 - i32.add - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memmove - end - block $~lib/memory/memory.free|inlined.0 - local.get $0 - local.set $6 - local.get $6 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.0 - end - local.get $3 - local.set $0 - end - block $~lib/memory/memory.fill|inlined.3 - local.get $0 - i32.const 8 - i32.add - local.get $2 - i32.add - local.set $3 - i32.const 0 - local.set $6 - local.get $1 - local.get $2 - i32.sub + local.get $4 + call $~lib/memory/memory.allocate local.set $5 - local.get $3 - local.get $6 local.get $5 - call $~lib/internal/memory/memset + local.get $2 + i32.load + i32.store + local.get $5 + global.get $~lib/runtime/HEADER_SIZE + i32.add + local.set $6 + local.get $6 + local.get $0 + local.get $3 + call $~lib/memory/memory.copy + local.get $6 + local.get $3 + i32.add + i32.const 0 + local.get $1 + local.get $3 + i32.sub + call $~lib/memory/memory.fill + local.get $2 + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq + if + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 16 + i32.const 100 + i32.const 8 + call $~lib/env/abort + unreachable + end + local.get $2 + call $~lib/memory/memory.free + else + nop + end + local.get $5 + local.set $2 + local.get $6 + local.set $0 + else + local.get $0 + local.get $3 + i32.add + i32.const 0 + local.get $1 + local.get $3 + i32.sub + call $~lib/memory/memory.fill end else - local.get $1 - local.get $2 - i32.lt_s - if - local.get $1 - i32.const 0 - i32.ge_s - i32.eqz - if - i32.const 0 - i32.const 40 - i32.const 62 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - i32.store - end + nop end + local.get $2 + local.get $1 + i32.store offset=4 local.get $0 ) - (func $~lib/array/Array#push (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/array/ensureLength (; 34 ;) (type $FUNCSIG$viii) (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.get $0 - i32.load offset=4 - local.set $2 local.get $0 i32.load local.set $3 local.get $3 - i32.load - i32.const 2 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.get $2 i32.shr_u local.set $4 - local.get $2 - i32.const 1 - i32.add - local.set $5 - local.get $2 + local.get $1 local.get $4 - i32.ge_u + i32.gt_u if + local.get $1 + global.get $~lib/runtime/MAX_BYTELENGTH local.get $2 - i32.const 268435454 - i32.ge_u + i32.shr_u + i32.gt_u if i32.const 0 - i32.const 8 - i32.const 182 - i32.const 42 + i32.const 488 + i32.const 12 + i32.const 59 call $~lib/env/abort unreachable end - local.get $3 - local.get $5 - i32.const 2 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.set $3 - local.get $0 - local.get $3 - i32.store - end - local.get $0 - local.get $5 - i32.store offset=4 - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $3 - local.set $6 - local.get $2 - local.set $7 local.get $1 - local.set $8 - i32.const 0 - local.set $9 - local.get $6 - local.get $7 - i32.const 2 + local.get $2 i32.shl - i32.add - local.get $9 - i32.add - local.get $8 + local.set $5 + block $~lib/runtime/REALLOCATE|inlined.0 (result i32) + local.get $3 + local.set $6 + local.get $5 + local.set $7 + local.get $6 + local.get $7 + call $~lib/runtime/doReallocate + end + local.set $7 + local.get $7 + local.get $3 + i32.ne + if + local.get $0 + local.get $7 + i32.store + local.get $0 + local.get $7 + i32.store offset=4 + end + local.get $0 + local.get $5 i32.store offset=8 end - local.get $5 ) - (func $~lib/array/Array#__get (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#push (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $0 - i32.load + i32.load offset=12 + i32.const 1 + i32.add local.set $2 - local.get $1 + local.get $0 local.get $2 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end - ) - (func $~lib/array/Array#pop (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + call $~lib/array/ensureLength + local.get $0 + local.get $2 + i32.store offset=12 local.get $0 i32.load offset=4 + local.get $2 + i32.const 1 + i32.sub + i32.const 2 + i32.shl + i32.add + local.get $1 + i32.store + local.get $2 + ) + (func $~lib/array/Array#pop (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=12 local.set $1 local.get $1 i32.const 1 i32.lt_s if i32.const 0 - i32.const 8 - i32.const 244 + i32.const 488 + i32.const 185 i32.const 20 call $~lib/env/abort unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - i32.const 1 - i32.sub - local.tee $1 - local.set $3 - i32.const 0 - local.set $4 - local.get $2 - local.get $3 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - i32.load offset=8 - end - local.set $5 + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.sub + local.tee $1 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $2 local.get $0 local.get $1 - i32.store offset=4 - local.get $5 + i32.store offset=12 + local.get $2 ) - (func $~lib/array/Array#concat (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#concat (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 i32.const 0 local.get $1 - i32.load offset=4 + i32.load offset=12 local.get $1 i32.const 0 i32.eq select local.set $3 + i32.const 0 local.get $2 local.get $3 i32.add - local.set $4 - i32.const 0 - local.get $4 call $~lib/array/Array#constructor + local.set $4 + local.get $4 + i32.load offset=4 local.set $5 local.get $2 - if - local.get $5 - i32.load - i32.const 8 - i32.add - local.set $6 - local.get $0 - i32.load - i32.const 8 - i32.add - local.set $7 - local.get $2 - i32.const 2 - i32.shl - local.set $8 - local.get $6 - local.get $7 - local.get $8 - call $~lib/internal/memory/memmove - end - local.get $3 - if - local.get $5 - i32.load - i32.const 8 - i32.add - local.get $2 - i32.const 2 - i32.shl - i32.add - local.set $8 - local.get $1 - i32.load - i32.const 8 - i32.add - local.set $7 - local.get $3 - i32.const 2 - i32.shl - local.set $6 - local.get $8 - local.get $7 - local.get $6 - call $~lib/internal/memory/memmove - end + i32.const 2 + i32.shl + local.set $6 local.get $5 + local.get $0 + i32.load offset=4 + local.get $6 + call $~lib/memory/memory.copy + local.get $5 + local.get $6 + i32.add + local.get $1 + i32.load offset=4 + local.get $3 + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + local.get $4 ) - (func $~lib/array/Array#copyWithin (; 35 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#copyWithin (; 38 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3216,14 +3003,11 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - local.get $0 - i32.load - local.set $4 local.get $0 i32.load offset=4 + local.set $4 + local.get $0 + i32.load offset=12 local.set $5 local.get $3 local.tee $6 @@ -3353,40 +3137,18 @@ local.get $11 if block - block $~lib/internal/arraybuffer/STORE|inlined.1 - local.get $4 - local.set $6 - local.get $8 - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $4 - local.set $12 - local.get $9 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - i32.load offset=8 - end - local.set $14 - i32.const 0 - local.set $13 - local.get $6 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $13 - i32.add - local.get $14 - i32.store offset=8 - end + local.get $4 + local.get $8 + i32.const 2 + i32.shl + i32.add + local.get $4 + local.get $9 + i32.const 2 + i32.shl + i32.add + i32.load + i32.store local.get $9 i32.const 1 i32.sub @@ -3406,71 +3168,35 @@ end else local.get $4 - i32.const 8 - i32.add local.get $8 i32.const 2 i32.shl i32.add - local.set $13 local.get $4 - i32.const 8 - i32.add local.get $9 i32.const 2 i32.shl i32.add - local.set $14 local.get $11 i32.const 2 i32.shl - local.set $7 - local.get $13 - local.get $14 - local.get $7 - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy end local.get $0 ) - (func $~lib/array/Array#copyWithin|trampoline (; 36 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 2 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - global.get $~lib/builtins/i32.MAX_VALUE - local.set $3 - end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/array/Array#copyWithin - ) - (func $std/array/isArraysEqual (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $2 i32.eqz if - block $~lib/array/Array#get:length|inlined.15 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $0 + call $~lib/array/Array#get:length local.set $2 local.get $2 - block $~lib/array/Array#get:length|inlined.17 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $1 + call $~lib/array/Array#get:length i32.ne if i32.const 0 @@ -3494,11 +3220,35 @@ i32.eqz br_if $break|0 local.get $0 + local.tee $4 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load local.get $1 + local.tee $4 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load i32.ne if i32.const 0 @@ -3515,323 +3265,150 @@ end i32.const 1 ) - (func $~lib/array/Array#unshift (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#unshift (; 40 ;) (type $FUNCSIG$iii) (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 $0 - i32.load - local.set $2 - local.get $2 - i32.load - i32.const 2 - i32.shr_u - local.set $3 - local.get $0 - i32.load offset=4 - local.set $4 - local.get $4 + i32.load offset=12 i32.const 1 i32.add - local.set $5 - local.get $4 - local.get $3 - i32.ge_u - if - local.get $4 - i32.const 268435454 - i32.ge_u - if - i32.const 0 - i32.const 8 - i32.const 327 - i32.const 42 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $5 - i32.const 2 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.set $2 - local.get $2 - i32.load - i32.const 2 - i32.shr_u - local.set $3 - local.get $0 - local.get $2 - i32.store - end - block $~lib/memory/memory.copy|inlined.4 - local.get $2 - i32.const 8 - i32.add - i32.const 4 - i32.add - local.set $6 - local.get $2 - i32.const 8 - i32.add - local.set $7 - local.get $3 - i32.const 1 - i32.sub - i32.const 2 - i32.shl - local.set $8 - local.get $6 - local.get $7 - local.get $8 - call $~lib/internal/memory/memmove - end - block $~lib/internal/arraybuffer/STORE|inlined.2 - local.get $2 - local.set $8 - i32.const 0 - local.set $7 - local.get $1 - local.set $6 - i32.const 0 - local.set $9 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $6 - i32.store offset=8 - end + local.set $2 local.get $0 - local.get $5 - i32.store offset=4 - local.get $5 + local.get $2 + i32.const 2 + call $~lib/array/ensureLength + local.get $0 + i32.load offset=4 + local.set $3 + local.get $3 + i32.const 4 + i32.add + local.get $3 + local.get $2 + i32.const 1 + i32.sub + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + local.get $3 + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.store offset=12 + local.get $2 ) - (func $~lib/array/Array#shift (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#shift (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $1 local.get $1 i32.const 1 i32.lt_s if i32.const 0 - i32.const 8 - i32.const 299 + i32.const 488 + i32.const 243 i32.const 20 call $~lib/env/abort unreachable end local.get $0 - i32.load + i32.load offset=4 local.set $2 - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i32) - local.get $2 - local.set $3 - i32.const 0 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - end - local.set $6 + local.get $2 + i32.load + local.set $3 local.get $1 i32.const 1 i32.sub - local.set $7 - block $~lib/memory/memory.copy|inlined.5 - local.get $2 - i32.const 8 - i32.add - local.set $5 - local.get $2 - i32.const 8 - i32.add - i32.const 4 - i32.add - local.set $4 - local.get $7 - i32.const 2 - i32.shl - local.set $3 - local.get $5 - local.get $4 - local.get $3 - call $~lib/internal/memory/memmove - end - block $~lib/internal/arraybuffer/STORE|inlined.3 - local.get $2 - local.set $3 - local.get $7 - local.set $4 - i32.const 0 - local.set $5 - i32.const 0 - local.set $8 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - local.get $5 - i32.store offset=8 - end + local.set $4 + local.get $2 + local.get $2 + i32.const 4 + i32.add + local.get $4 + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + local.get $2 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.const 0 + i32.store local.get $0 - local.get $7 - i32.store offset=4 - local.get $6 + local.get $4 + i32.store offset=12 + local.get $3 ) - (func $~lib/array/Array#reverse (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#reverse (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) local.get $0 - i32.load + i32.load offset=12 local.set $1 - block $break|0 - block - i32.const 0 - local.set $2 - local.get $0 - i32.load offset=4 - i32.const 1 - i32.sub - local.set $3 - end - loop $repeat|0 - local.get $2 - local.get $3 - i32.lt_s - i32.eqz - br_if $break|0 - block - block $~lib/internal/arraybuffer/LOAD|inlined.4 (result i32) - local.get $1 - local.set $4 - local.get $2 - local.set $5 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - i32.load offset=8 - end - local.set $6 - block $~lib/internal/arraybuffer/STORE|inlined.4 - local.get $1 - local.set $5 - local.get $2 - local.set $4 - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result i32) - local.get $1 - local.set $7 - local.get $3 - local.set $8 - i32.const 0 - local.set $9 - local.get $7 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - i32.load offset=8 - end - local.set $9 - i32.const 0 - local.set $8 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - local.get $9 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.5 - local.get $1 - local.set $8 - local.get $3 - local.set $9 - local.get $6 - local.set $4 - i32.const 0 - local.set $5 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - local.get $4 - i32.store offset=8 - end - end - block + local.get $1 + if + local.get $0 + i32.load offset=4 + local.set $2 + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.sub + i32.const 2 + i32.shl + i32.add + local.set $3 + block $break|0 + loop $continue|0 local.get $2 - i32.const 1 - i32.add - local.set $2 local.get $3 - i32.const 1 - i32.sub - local.set $3 + i32.lt_u + if + block + local.get $2 + i32.load + local.set $4 + local.get $2 + local.get $3 + i32.load + i32.store + local.get $3 + local.get $4 + i32.store + local.get $2 + i32.const 4 + i32.add + local.set $2 + local.get $3 + i32.const 4 + i32.sub + local.set $3 + end + br $continue|0 + end end - br $repeat|0 - unreachable end - unreachable end local.get $0 ) - (func $~lib/array/Array#indexOf (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#indexOf (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $3 local.get $3 i32.const 0 @@ -3865,7 +3442,7 @@ local.set $2 end local.get $0 - i32.load + i32.load offset=4 local.set $6 block $break|0 loop $continue|0 @@ -3874,22 +3451,12 @@ i32.lt_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result i32) - local.get $6 - local.set $7 - local.get $2 - local.set $5 - i32.const 0 - local.set $4 - local.get $7 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - i32.load offset=8 - end + local.get $6 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load local.get $1 i32.eq if @@ -3907,7 +3474,15 @@ end i32.const -1 ) - (func $~lib/array/Array#splice (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#includes (; 44 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array#indexOf + i32.const 0 + i32.ge_s + ) + (func $~lib/array/Array#splice (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3917,7 +3492,7 @@ (local $9 i32) (local $10 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $3 local.get $1 i32.const 0 @@ -3962,38 +3537,63 @@ i32.gt_s select local.set $2 - local.get $0 - i32.load - local.set $6 i32.const 0 local.get $2 call $~lib/array/Array#constructor - local.set $7 + local.set $6 local.get $6 - i32.const 8 - i32.add + i32.load offset=4 + local.set $7 + local.get $0 + i32.load offset=4 + local.set $8 + local.get $8 local.get $1 i32.const 2 i32.shl i32.add - local.set $8 - block $~lib/memory/memory.copy|inlined.6 - local.get $7 - i32.load - i32.const 8 - i32.add + local.set $9 + block $break|0 + i32.const 0 local.set $4 - local.get $8 - local.set $5 - local.get $2 - i32.const 2 - i32.shl - local.set $9 - local.get $4 - local.get $5 - local.get $9 - call $~lib/internal/memory/memmove + loop $repeat|0 + local.get $4 + local.get $2 + i32.lt_s + i32.eqz + br_if $break|0 + block + local.get $9 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $5 + local.get $7 + local.get $4 + i32.const 2 + i32.shl + i32.add + local.get $5 + i32.store + end + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $repeat|0 + unreachable + end + unreachable end + local.get $6 + i32.load offset=4 + local.get $9 + local.get $2 + i32.const 2 + i32.shl + call $~lib/memory/memory.copy local.get $1 local.get $2 i32.add @@ -4002,137 +3602,42 @@ local.get $10 i32.ne if + local.get $9 local.get $8 - local.set $9 - local.get $6 - i32.const 8 - i32.add local.get $10 i32.const 2 i32.shl i32.add - local.set $5 local.get $3 local.get $10 i32.sub i32.const 2 i32.shl - local.set $4 - local.get $9 - local.get $5 - local.get $4 - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy end local.get $0 local.get $3 local.get $2 i32.sub - i32.store offset=4 - local.get $7 + i32.store offset=12 + local.get $6 ) - (func $~lib/array/Array#splice|trampoline (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - global.get $~lib/builtins/i32.MAX_VALUE - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/array/Array#splice - ) - (func $~lib/array/Array#__set (; 44 ;) (type $FUNCSIG$viii) (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 - i32.load - local.set $3 - local.get $3 - i32.load - i32.const 2 - i32.shr_u - local.set $4 - local.get $1 - local.get $4 - i32.ge_u - if - local.get $1 - i32.const 268435454 - i32.ge_u - if - i32.const 0 - i32.const 8 - i32.const 107 - i32.const 41 - call $~lib/env/abort - unreachable - end - local.get $3 - local.get $1 - i32.const 1 - i32.add - i32.const 2 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.set $3 - local.get $0 - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - end - block $~lib/internal/arraybuffer/STORE|inlined.6 - local.get $3 - local.set $5 - local.get $1 - local.set $6 - local.get $2 - local.set $7 - i32.const 0 - local.set $8 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - local.get $7 - i32.store offset=8 - end - ) - (func $start:std/array~anonymous|0 (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|0 (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $~lib/array/Array#findIndex (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#findIndex (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) block $break|0 block i32.const 0 local.set $2 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $3 end loop $repeat|0 @@ -4140,7 +3645,7 @@ local.get $3 local.tee $4 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $5 local.get $4 local.get $5 @@ -4152,23 +3657,13 @@ block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.9 (result i32) - local.get $0 - i32.load - local.set $6 - local.get $2 - local.set $5 - i32.const 0 - local.set $4 - local.get $6 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - i32.load offset=8 - end + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load local.get $2 local.get $0 local.get $1 @@ -4191,17 +3686,17 @@ end i32.const -1 ) - (func $start:std/array~anonymous|1 (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|1 (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.eq ) - (func $start:std/array~anonymous|2 (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|2 (; 49 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|3 (; 49 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|3 (; 50 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4210,12 +3705,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|4 (; 50 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|4 (; 51 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|5 (; 51 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|5 (; 52 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4223,23 +3718,22 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|6 (; 52 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|6 (; 53 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.ge_s ) - (func $~lib/array/Array#every (; 53 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#every (; 54 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) block $break|0 block i32.const 0 local.set $2 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $3 end loop $repeat|0 @@ -4247,7 +3741,7 @@ local.get $3 local.tee $4 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $5 local.get $4 local.get $5 @@ -4259,23 +3753,13 @@ block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.11 (result i32) - local.get $0 - i32.load - local.set $6 - local.get $2 - local.set $5 - i32.const 0 - local.set $4 - local.get $6 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - i32.load offset=8 - end + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load local.get $2 local.get $0 local.get $1 @@ -4299,12 +3783,12 @@ end i32.const 1 ) - (func $start:std/array~anonymous|7 (; 54 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|7 (; 55 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.le_s ) - (func $start:std/array~anonymous|8 (; 55 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|8 (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4313,12 +3797,12 @@ i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|9 (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|9 (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|10 (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|10 (; 58 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4326,23 +3810,22 @@ i32.const 3 i32.lt_s ) - (func $start:std/array~anonymous|11 (; 58 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|11 (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 3 i32.ge_s ) - (func $~lib/array/Array#some (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#some (; 60 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) block $break|0 block i32.const 0 local.set $2 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $3 end loop $repeat|0 @@ -4350,7 +3833,7 @@ local.get $3 local.tee $4 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $5 local.get $4 local.get $5 @@ -4362,23 +3845,13 @@ block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.13 (result i32) - local.get $0 - i32.load - local.set $6 - local.get $2 - local.set $5 - i32.const 0 - local.set $4 - local.get $6 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - i32.load offset=8 - end + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load local.get $2 local.get $0 local.get $1 @@ -4401,12 +3874,12 @@ end i32.const 0 ) - (func $start:std/array~anonymous|12 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|12 (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const -1 i32.le_s ) - (func $start:std/array~anonymous|13 (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|13 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4415,12 +3888,12 @@ i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|14 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|14 (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|15 (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|15 (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4428,24 +3901,23 @@ i32.const 3 i32.gt_s ) - (func $start:std/array~anonymous|16 (; 64 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|16 (; 65 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $~lib/array/Array#forEach (; 65 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#forEach (; 66 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) block $break|0 block i32.const 0 local.set $2 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $3 end loop $repeat|0 @@ -4453,7 +3925,7 @@ local.get $3 local.tee $4 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $5 local.get $4 local.get $5 @@ -4465,23 +3937,13 @@ block i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.14 (result i32) - local.get $0 - i32.load - local.set $4 - local.get $2 - local.set $5 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - i32.load offset=8 - end + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load local.get $2 local.get $0 local.get $1 @@ -4497,7 +3959,7 @@ unreachable end ) - (func $start:std/array~anonymous|17 (; 66 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|17 (; 67 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4507,13 +3969,13 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|18 (; 67 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|18 (; 68 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|19 (; 68 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|19 (; 69 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/array/Array#pop drop @@ -4522,7 +3984,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|20 (; 69 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|20 (; 70 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 i32.const 0 @@ -4637,91 +4099,52 @@ end end ) - (func $start:std/array~anonymous|21 (; 70 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $start:std/array~anonymous|21 (; 71 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $0 f32.convert_i32_s ) - (func $~lib/array/Array#constructor (; 71 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 72 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 8 - i32.const 45 - i32.const 39 - call $~lib/env/abort - unreachable + local.get $0 + if (result i32) + local.get $0 + else + i32.const 16 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 9 + call $~lib/runtime/doRegister end local.get $1 i32.const 2 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block (result i32) - local.get $0 - i32.eqz - if - i32.const 8 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - end - local.get $3 - i32.store + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 + local.get $0 + i32.const 0 + i32.store offset=12 local.get $0 local.get $1 - i32.store offset=4 - block $~lib/memory/memory.fill|inlined.4 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end + i32.store offset=12 local.get $0 ) - (func $~lib/array/Array#map (; 72 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 73 ;) (type $FUNCSIG$iii) (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 f32) + (local $8 f32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 i32.const 0 local.get $2 call $~lib/array/Array#constructor local.set $3 local.get $3 - i32.load + i32.load offset=4 local.set $4 block $break|0 i32.const 0 @@ -4731,7 +4154,7 @@ local.get $2 local.tee $6 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $7 local.get $6 local.get $7 @@ -4740,48 +4163,32 @@ i32.lt_s i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $4 - local.set $6 + block + local.get $0 + i32.load offset=4 local.get $5 - local.set $7 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 block (result f32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.15 (result i32) - local.get $0 - i32.load - local.set $8 - local.get $5 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end + local.get $6 local.get $5 local.get $0 local.get $1 call_indirect (type $FUNCSIG$fiii) end - local.set $11 - i32.const 0 - local.set $10 - local.get $6 - local.get $7 + local.set $8 + local.get $4 + local.get $5 i32.const 2 i32.shl i32.add - local.get $10 - i32.add - local.get $11 - f32.store offset=8 + local.get $8 + f32.store end local.get $5 i32.const 1 @@ -4794,40 +4201,11 @@ end local.get $3 ) - (func $~lib/array/Array#__get (; 73 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#get:length (; 74 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result f32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - f32.load offset=8 - else - unreachable - end + i32.load offset=12 ) - (func $start:std/array~anonymous|22 (; 74 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|22 (; 75 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4838,25 +4216,22 @@ global.set $std/array/i local.get $0 ) - (func $~lib/array/Array#map (; 75 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 76 ;) (type $FUNCSIG$iii) (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.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 i32.const 0 local.get $2 call $~lib/array/Array#constructor local.set $3 local.get $3 - i32.load + i32.load offset=4 local.set $4 block $break|0 i32.const 0 @@ -4866,7 +4241,7 @@ local.get $2 local.tee $6 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $7 local.get $6 local.get $7 @@ -4875,48 +4250,32 @@ i32.lt_s i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.7 - local.get $4 - local.set $6 + block + local.get $0 + i32.load offset=4 local.get $5 - local.set $7 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.16 (result i32) - local.get $0 - i32.load - local.set $8 - local.get $5 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end + local.get $6 local.get $5 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) end - local.set $10 - i32.const 0 - local.set $9 - local.get $6 - local.get $7 + local.set $7 + local.get $4 + local.get $5 i32.const 2 i32.shl i32.add - local.get $9 - i32.add - local.get $10 - i32.store offset=8 + local.get $7 + i32.store end local.get $5 i32.const 1 @@ -4929,14 +4288,14 @@ end local.get $3 ) - (func $start:std/array~anonymous|23 (; 76 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|23 (; 77 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|24 (; 77 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|24 (; 78 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4946,18 +4305,17 @@ global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|25 (; 78 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|25 (; 79 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.ge_s ) - (func $~lib/array/Array#filter (; 79 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#filter (; 80 ;) (type $FUNCSIG$iii) (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) i32.const 0 i32.const 0 call $~lib/array/Array#constructor @@ -4967,7 +4325,7 @@ i32.const 0 local.set $3 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $4 end loop $repeat|0 @@ -4975,7 +4333,7 @@ local.get $4 local.tee $5 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $6 local.get $5 local.get $6 @@ -4985,28 +4343,18 @@ i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.17 (result i32) - local.get $0 - i32.load - local.set $5 - local.get $3 - local.set $6 - i32.const 0 - local.set $7 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 + local.get $0 + i32.load offset=4 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $5 block (result i32) i32.const 3 global.set $~lib/argc - local.get $7 + local.get $5 local.get $3 local.get $0 local.get $1 @@ -5016,7 +4364,7 @@ i32.ne if local.get $2 - local.get $7 + local.get $5 call $~lib/array/Array#push drop end @@ -5032,7 +4380,7 @@ end local.get $2 ) - (func $start:std/array~anonymous|26 (; 80 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|26 (; 81 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -5045,7 +4393,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|27 (; 81 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|27 (; 82 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add @@ -5054,7 +4402,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|28 (; 82 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|28 (; 83 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -5066,18 +4414,17 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|29 (; 83 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|29 (; 84 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduce (; 84 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 85 ;) (type $FUNCSIG$iiii) (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 local.set $3 block $break|0 @@ -5085,7 +4432,7 @@ i32.const 0 local.set $4 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $5 end loop $repeat|0 @@ -5093,7 +4440,7 @@ local.get $5 local.tee $6 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $7 local.get $6 local.get $7 @@ -5106,23 +4453,13 @@ i32.const 4 global.set $~lib/argc local.get $3 - block $~lib/internal/arraybuffer/LOAD|inlined.18 (result i32) - local.get $0 - i32.load - local.set $6 - local.get $4 - local.set $7 - i32.const 0 - local.set $8 - local.get $6 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end + local.get $0 + i32.load offset=4 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.load local.get $4 local.get $0 local.get $1 @@ -5140,12 +4477,12 @@ end local.get $3 ) - (func $start:std/array~anonymous|30 (; 85 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|30 (; 86 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|31 (; 86 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|31 (; 87 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -5157,13 +4494,12 @@ i32.gt_s end ) - (func $~lib/array/Array#reduce (; 87 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 88 ;) (type $FUNCSIG$iiii) (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 local.set $3 block $break|0 @@ -5171,7 +4507,7 @@ i32.const 0 local.set $4 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $5 end loop $repeat|0 @@ -5179,7 +4515,7 @@ local.get $5 local.tee $6 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $7 local.get $6 local.get $7 @@ -5192,23 +4528,13 @@ i32.const 4 global.set $~lib/argc local.get $3 - block $~lib/internal/arraybuffer/LOAD|inlined.19 (result i32) - local.get $0 - i32.load - local.set $6 - local.get $4 - local.set $7 - i32.const 0 - local.set $8 - local.get $6 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end + local.get $0 + i32.load offset=4 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.load local.get $4 local.get $0 local.get $1 @@ -5226,7 +4552,7 @@ end local.get $3 ) - (func $start:std/array~anonymous|32 (; 88 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|32 (; 89 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -5238,7 +4564,7 @@ i32.gt_s end ) - (func $start:std/array~anonymous|33 (; 89 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|33 (; 90 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -5247,12 +4573,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|34 (; 90 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|34 (; 91 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|35 (; 91 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|35 (; 92 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -5260,22 +4586,19 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|36 (; 92 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|36 (; 93 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduceRight (; 93 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 94 ;) (type $FUNCSIG$iiii) (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 block $break|0 local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $4 @@ -5289,23 +4612,13 @@ i32.const 4 global.set $~lib/argc local.get $3 - block $~lib/internal/arraybuffer/LOAD|inlined.20 (result i32) - local.get $0 - i32.load - local.set $5 - local.get $4 - local.set $6 - i32.const 0 - local.set $7 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end + local.get $0 + i32.load offset=4 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.load local.get $4 local.get $0 local.get $1 @@ -5323,12 +4636,12 @@ end local.get $3 ) - (func $start:std/array~anonymous|37 (; 94 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|37 (; 95 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|38 (; 95 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|38 (; 96 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -5340,17 +4653,14 @@ i32.gt_s end ) - (func $~lib/array/Array#reduceRight (; 96 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 97 ;) (type $FUNCSIG$iiii) (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 block $break|0 local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $4 @@ -5364,23 +4674,13 @@ i32.const 4 global.set $~lib/argc local.get $3 - block $~lib/internal/arraybuffer/LOAD|inlined.21 (result i32) - local.get $0 - i32.load - local.set $5 - local.get $4 - local.set $6 - i32.const 0 - local.set $7 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end + local.get $0 + i32.load offset=4 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.load local.get $4 local.get $0 local.get $1 @@ -5398,7 +4698,7 @@ end local.get $3 ) - (func $start:std/array~anonymous|39 (; 97 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|39 (; 98 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 i32.const 0 i32.ne @@ -5410,7 +4710,7 @@ i32.gt_s end ) - (func $start:std/array~anonymous|40 (; 98 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|40 (; 99 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -5419,12 +4719,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|41 (; 99 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|41 (; 100 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|42 (; 100 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|42 (; 101 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -5432,7 +4732,7 @@ local.get $1 i32.add ) - (func $~lib/math/murmurHash3 (; 101 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/math/murmurHash3 (; 102 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) local.get $0 local.get $0 i64.const 33 @@ -5461,7 +4761,7 @@ local.set $0 local.get $0 ) - (func $~lib/math/splitMix32 (; 102 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 103 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -5496,13 +4796,13 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 103 ;) (type $FUNCSIG$vj) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 104 ;) (type $FUNCSIG$vj) (param $0 i64) local.get $0 i64.eqz if i32.const 0 - i32.const 2896 - i32.const 978 + i32.const 2296 + i32.const 1021 i32.const 4 call $~lib/env/abort unreachable @@ -5525,107 +4825,74 @@ call $~lib/math/splitMix32 global.set $~lib/math/random_state1_32 ) - (func $~lib/internal/sort/insertionSort (; 104 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) + (func $~lib/util/sort/insertionSort (; 105 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 f32) (local $5 i32) - (local $6 i32) + (local $6 f32) (local $7 i32) - (local $8 f32) - (local $9 i32) - (local $10 f32) - (local $11 f32) block $break|0 i32.const 0 - local.set $4 + local.set $3 loop $repeat|0 - local.get $4 - local.get $2 + local.get $3 + local.get $1 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result f32) - local.get $0 - local.set $5 - local.get $4 - local.set $6 - local.get $1 - local.set $7 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - f32.load offset=8 - end - local.set $8 - local.get $4 + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $4 + local.get $3 i32.const 1 i32.sub - local.set $7 + local.set $5 block $break|1 loop $continue|1 - local.get $7 + local.get $5 i32.const 0 i32.ge_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.4 (result f32) - local.get $0 - local.set $6 - local.get $7 - local.set $5 - local.get $1 - local.set $9 - local.get $6 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - f32.load offset=8 - end - local.set $10 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $6 block (result i32) i32.const 2 global.set $~lib/argc - local.get $8 - local.get $10 - local.get $3 + local.get $4 + local.get $6 + local.get $2 call_indirect (type $FUNCSIG$iff) end i32.const 0 i32.lt_s if local.get $0 - local.set $9 block (result i32) - local.get $7 - local.tee $5 + local.get $5 + local.tee $7 i32.const 1 i32.sub - local.set $7 - local.get $5 + local.set $5 + local.get $7 end i32.const 1 i32.add - local.set $5 - local.get $10 - local.set $11 - local.get $1 - local.set $6 - local.get $9 - local.get $5 i32.const 2 i32.shl i32.add local.get $6 - i32.add - local.get $11 - f32.store offset=8 + f32.store else br $break|1 end @@ -5634,107 +4901,78 @@ end end end - block $~lib/internal/arraybuffer/STORE|inlined.4 - local.get $0 - local.set $6 - local.get $7 - i32.const 1 - i32.add - local.set $5 - local.get $8 - local.set $10 - local.get $1 - local.set $9 - local.get $6 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $10 - f32.store offset=8 - end + local.get $0 + local.get $5 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $4 + f32.store end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 unreachable end unreachable end ) - (func $~lib/internal/sort/weakHeapSort (; 105 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/util/sort/weakHeapSort (; 106 ;) (type $FUNCSIG$viii) (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 $13 f32) - (local $14 f32) - (local $15 f32) - local.get $2 + (local $8 f32) + (local $9 f32) + (local $10 f32) + local.get $1 i32.const 31 i32.add i32.const 5 i32.shr_s i32.const 2 i32.shl + local.set $3 + local.get $3 + call $~lib/memory/memory.allocate local.set $4 - block $~lib/memory/memory.allocate|inlined.1 (result i32) - local.get $4 - local.set $5 - local.get $5 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.1 - end - local.set $6 - block $~lib/memory/memory.fill|inlined.5 - local.get $6 - local.set $5 - i32.const 0 - local.set $7 - local.get $4 - local.set $8 - local.get $5 - local.get $7 - local.get $8 - call $~lib/internal/memory/memset - end + local.get $4 + i32.const 0 + local.get $3 + call $~lib/memory/memory.fill block $break|0 - local.get $2 + local.get $1 i32.const 1 i32.sub - local.set $8 + local.set $5 loop $repeat|0 - local.get $8 + local.get $5 i32.const 0 i32.gt_s i32.eqz br_if $break|0 block - local.get $8 - local.set $7 + local.get $5 + local.set $6 block $break|1 loop $continue|1 - local.get $7 + local.get $6 i32.const 1 i32.and + local.get $4 local.get $6 - local.get $7 i32.const 6 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $7 + local.get $6 i32.const 1 i32.shr_s i32.const 31 @@ -5744,72 +4982,52 @@ i32.and i32.eq if - local.get $7 + local.get $6 i32.const 1 i32.shr_s - local.set $7 + local.set $6 br $continue|1 end end end - local.get $7 + local.get $6 i32.const 1 i32.shr_s - local.set $5 - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result f32) - local.get $0 - local.set $9 - local.get $5 - local.set $10 - local.get $1 - local.set $11 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - f32.load offset=8 - end - local.set $12 - block $~lib/internal/arraybuffer/LOAD|inlined.6 (result f32) - local.get $0 - local.set $11 - local.get $8 - local.set $10 - local.get $1 - local.set $9 - local.get $11 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - f32.load offset=8 - end - local.set $13 + local.set $7 + local.get $0 + local.get $7 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $8 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $9 block (result i32) i32.const 2 global.set $~lib/argc - local.get $12 - local.get $13 - local.get $3 + local.get $8 + local.get $9 + local.get $2 call_indirect (type $FUNCSIG$iff) end i32.const 0 i32.lt_s if - local.get $6 - local.get $8 + local.get $4 + local.get $5 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.get $6 - local.get $8 + local.get $4 + local.get $5 i32.const 5 i32.shr_s i32.const 2 @@ -5817,236 +5035,136 @@ i32.add i32.load i32.const 1 - local.get $8 + local.get $5 i32.const 31 i32.and i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/STORE|inlined.5 - local.get $0 - local.set $9 - local.get $8 - local.set $10 - local.get $12 - local.set $14 - local.get $1 - local.set $11 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - local.get $14 - f32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.6 - local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $13 - local.set $14 - local.get $1 - local.set $9 - local.get $11 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $14 - f32.store offset=8 - end + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + local.get $8 + f32.store + local.get $0 + local.get $7 + i32.const 2 + i32.shl + i32.add + local.get $9 + f32.store end end - local.get $8 + local.get $5 i32.const 1 i32.sub - local.set $8 + local.set $5 br $repeat|0 unreachable end unreachable end block $break|2 - local.get $2 + local.get $1 i32.const 1 i32.sub - local.set $8 + local.set $5 loop $repeat|2 - local.get $8 + local.get $5 i32.const 2 i32.ge_s i32.eqz br_if $break|2 block - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result f32) - local.get $0 - local.set $5 - i32.const 0 - local.set $7 - local.get $1 - local.set $9 - local.get $5 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - f32.load offset=8 - end - local.set $13 - block $~lib/internal/arraybuffer/STORE|inlined.7 - local.get $0 - local.set $9 - i32.const 0 - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.8 (result f32) - local.get $0 - local.set $5 - local.get $8 - local.set $10 - local.get $1 - local.set $11 - local.get $5 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - f32.load offset=8 - end - local.set $12 - local.get $1 - local.set $11 - local.get $9 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - local.get $12 - f32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.8 - local.get $0 - local.set $11 - local.get $8 - local.set $7 - local.get $13 - local.set $12 - local.get $1 - local.set $9 - local.get $11 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $12 - f32.store offset=8 - end - i32.const 1 + local.get $0 + f32.load local.set $9 + local.get $0 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + f32.load + f32.store + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + local.get $9 + f32.store + i32.const 1 + local.set $7 block $break|3 loop $continue|3 - local.get $9 + local.get $7 i32.const 1 i32.shl - local.get $6 - local.get $9 + local.get $4 + local.get $7 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $9 + local.get $7 i32.const 31 i32.and i32.shr_u i32.const 1 i32.and i32.add - local.tee $7 - local.get $8 + local.tee $6 + local.get $5 i32.lt_s if - local.get $7 - local.set $9 + local.get $6 + local.set $7 br $continue|3 end end end block $break|4 loop $continue|4 - local.get $9 + local.get $7 i32.const 0 i32.gt_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.9 (result f32) - local.get $0 - local.set $11 - i32.const 0 - local.set $10 - local.get $1 - local.set $5 - local.get $11 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - f32.load offset=8 - end - local.set $13 - block $~lib/internal/arraybuffer/LOAD|inlined.10 (result f32) - local.get $0 - local.set $5 - local.get $9 - local.set $10 - local.get $1 - local.set $11 - local.get $5 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - f32.load offset=8 - end - local.set $12 + local.get $0 + f32.load + local.set $9 + local.get $0 + local.get $7 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $8 block (result i32) i32.const 2 global.set $~lib/argc - local.get $13 - local.get $12 - local.get $3 + local.get $9 + local.get $8 + local.get $2 call_indirect (type $FUNCSIG$iff) end i32.const 0 i32.lt_s if - local.get $6 - local.get $9 + local.get $4 + local.get $7 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.get $6 - local.get $9 + local.get $4 + local.get $7 i32.const 5 i32.shr_s i32.const 2 @@ -6054,170 +5172,75 @@ i32.add i32.load i32.const 1 - local.get $9 + local.get $7 i32.const 31 i32.and i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/STORE|inlined.9 - local.get $0 - local.set $11 - local.get $9 - local.set $10 - local.get $13 - local.set $14 - local.get $1 - local.set $5 - local.get $11 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - local.get $14 - f32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.10 - local.get $0 - local.set $5 - i32.const 0 - local.set $10 - local.get $12 - local.set $14 - local.get $1 - local.set $11 - local.get $5 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - local.get $14 - f32.store offset=8 - end + local.get $0 + local.get $7 + i32.const 2 + i32.shl + i32.add + local.get $9 + f32.store + local.get $0 + local.get $8 + f32.store end - local.get $9 + local.get $7 i32.const 1 i32.shr_s - local.set $9 + local.set $7 end br $continue|4 end end end end - local.get $8 + local.get $5 i32.const 1 i32.sub - local.set $8 + local.set $5 br $repeat|2 unreachable end unreachable end - block $~lib/memory/memory.free|inlined.1 - local.get $6 - local.set $8 - local.get $8 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.1 - end - block $~lib/internal/arraybuffer/LOAD|inlined.11 (result f32) - local.get $0 - local.set $8 - i32.const 1 - local.set $7 - local.get $1 - local.set $9 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - f32.load offset=8 - end - local.set $15 - block $~lib/internal/arraybuffer/STORE|inlined.11 - local.get $0 - local.set $9 - i32.const 1 - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.12 (result f32) - local.get $0 - local.set $8 - i32.const 0 - local.set $11 - local.get $1 - local.set $10 - local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - f32.load offset=8 - end - local.set $13 - local.get $1 - local.set $10 - local.get $9 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - local.get $13 - f32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.12 - local.get $0 - local.set $10 - i32.const 0 - local.set $7 - local.get $15 - local.set $13 - local.get $1 - local.set $9 - local.get $10 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $13 - f32.store offset=8 - end + local.get $4 + call $~lib/memory/memory.free + local.get $0 + f32.load offset=4 + local.set $10 + local.get $0 + local.get $0 + f32.load + f32.store offset=4 + local.get $0 + local.get $10 + f32.store ) - (func $~lib/array/Array#sort (; 106 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 107 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) + (local $4 f32) + (local $5 f32) (local $6 i32) - (local $7 f32) - (local $8 f32) - (local $9 f32) - (local $10 i32) + (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 488 + i32.const 347 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 local.get $2 i32.const 1 @@ -6227,128 +5250,64 @@ return end local.get $0 - i32.load + i32.load offset=4 local.set $3 local.get $2 i32.const 2 i32.eq if - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result f32) - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - f32.load offset=8 - end - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result f32) - local.get $3 - local.set $6 - i32.const 0 - local.set $5 - i32.const 0 - local.set $4 - local.get $6 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - f32.load offset=8 - end - local.set $8 + local.get $3 + f32.load offset=4 + local.set $4 + local.get $3 + f32.load + local.set $5 block (result i32) i32.const 2 global.set $~lib/argc - local.get $7 - local.get $8 + local.get $4 + local.get $5 local.get $1 call_indirect (type $FUNCSIG$iff) end i32.const 0 i32.lt_s if - block $~lib/internal/arraybuffer/STORE|inlined.1 - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - local.get $8 - local.set $9 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - local.get $9 - f32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.2 - local.get $3 - local.set $6 - i32.const 0 - local.set $5 - local.get $7 - local.set $9 - i32.const 0 - local.set $4 - local.get $6 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - local.get $9 - f32.store offset=8 - end + local.get $3 + local.get $5 + f32.store offset=4 + local.get $3 + local.get $4 + f32.store end local.get $0 return end - block $~lib/internal/sort/SORT|inlined.0 + block $~lib/util/sort/SORT|inlined.0 local.get $3 - local.set $4 - i32.const 0 - local.set $5 - local.get $2 local.set $6 + local.get $2 + local.set $7 local.get $1 - local.set $10 - local.get $6 + local.set $8 + local.get $7 i32.const 256 i32.lt_s if - local.get $4 - local.get $5 local.get $6 - local.get $10 - call $~lib/internal/sort/insertionSort + local.get $7 + local.get $8 + call $~lib/util/sort/insertionSort else - local.get $4 - local.get $5 local.get $6 - local.get $10 - call $~lib/internal/sort/weakHeapSort + local.get $7 + local.get $8 + call $~lib/util/sort/weakHeapSort end end local.get $0 ) - (func $~lib/internal/sort/COMPARATOR~anonymous|0 (; 107 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 108 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -6381,7 +5340,7 @@ i32.lt_s i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 108 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 109 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -6390,9 +5349,9 @@ end unreachable end - block $~lib/internal/sort/COMPARATOR|inlined.0 (result i32) + block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) i32.const 44 - br $~lib/internal/sort/COMPARATOR|inlined.0 + br $~lib/util/sort/COMPARATOR|inlined.0 end local.set $1 end @@ -6400,30 +5359,24 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/builtins/isNaN (; 109 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 110 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) local.get $0 local.get $0 f32.ne ) - (func $std/array/isArraysEqual (; 110 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 111 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $2 i32.eqz if - block $~lib/array/Array#get:length|inlined.1 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $0 + call $~lib/array/Array#get:length local.set $2 local.get $2 - block $~lib/array/Array#get:length|inlined.3 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $1 + call $~lib/array/Array#get:length i32.ne if i32.const 0 @@ -6449,23 +5402,71 @@ br_if $break|0 block local.get $0 + local.tee $4 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + f32.load call $~lib/builtins/isNaN local.get $1 + local.tee $4 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + f32.load call $~lib/builtins/isNaN i32.eq if br $continue|0 end local.get $0 + local.tee $4 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + f32.load local.get $1 + local.tee $4 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + f32.load f32.ne if i32.const 0 @@ -6484,107 +5485,74 @@ end i32.const 1 ) - (func $~lib/internal/sort/insertionSort (; 111 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) + (func $~lib/util/sort/insertionSort (; 112 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 f64) (local $5 i32) - (local $6 i32) + (local $6 f64) (local $7 i32) - (local $8 f64) - (local $9 i32) - (local $10 f64) - (local $11 f64) block $break|0 i32.const 0 - local.set $4 + local.set $3 loop $repeat|0 - local.get $4 - local.get $2 + local.get $3 + local.get $1 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result f64) - local.get $0 - local.set $5 - local.get $4 - local.set $6 - local.get $1 - local.set $7 - local.get $5 - local.get $6 - i32.const 3 - i32.shl - i32.add - local.get $7 - i32.add - f64.load offset=8 - end - local.set $8 - local.get $4 + local.get $0 + local.get $3 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $4 + local.get $3 i32.const 1 i32.sub - local.set $7 + local.set $5 block $break|1 loop $continue|1 - local.get $7 + local.get $5 i32.const 0 i32.ge_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result f64) - local.get $0 - local.set $6 - local.get $7 - local.set $5 - local.get $1 - local.set $9 - local.get $6 - local.get $5 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - f64.load offset=8 - end - local.set $10 + local.get $0 + local.get $5 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $6 block (result i32) i32.const 2 global.set $~lib/argc - local.get $8 - local.get $10 - local.get $3 + local.get $4 + local.get $6 + local.get $2 call_indirect (type $FUNCSIG$idd) end i32.const 0 i32.lt_s if local.get $0 - local.set $9 block (result i32) - local.get $7 - local.tee $5 + local.get $5 + local.tee $7 i32.const 1 i32.sub - local.set $7 - local.get $5 + local.set $5 + local.get $7 end i32.const 1 i32.add - local.set $5 - local.get $10 - local.set $11 - local.get $1 - local.set $6 - local.get $9 - local.get $5 i32.const 3 i32.shl i32.add local.get $6 - i32.add - local.get $11 - f64.store offset=8 + f64.store else br $break|1 end @@ -6593,107 +5561,78 @@ end end end - block $~lib/internal/arraybuffer/STORE|inlined.3 - local.get $0 - local.set $6 - local.get $7 - i32.const 1 - i32.add - local.set $5 - local.get $8 - local.set $10 - local.get $1 - local.set $9 - local.get $6 - local.get $5 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - local.get $10 - f64.store offset=8 - end + local.get $0 + local.get $5 + i32.const 1 + i32.add + i32.const 3 + i32.shl + i32.add + local.get $4 + f64.store end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 unreachable end unreachable end ) - (func $~lib/internal/sort/weakHeapSort (; 112 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/util/sort/weakHeapSort (; 113 ;) (type $FUNCSIG$viii) (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 $13 f64) - (local $14 f64) - (local $15 f64) - local.get $2 + (local $8 f64) + (local $9 f64) + (local $10 f64) + local.get $1 i32.const 31 i32.add i32.const 5 i32.shr_s i32.const 2 i32.shl + local.set $3 + local.get $3 + call $~lib/memory/memory.allocate local.set $4 - block $~lib/memory/memory.allocate|inlined.2 (result i32) - local.get $4 - local.set $5 - local.get $5 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.2 - end - local.set $6 - block $~lib/memory/memory.fill|inlined.6 - local.get $6 - local.set $5 - i32.const 0 - local.set $7 - local.get $4 - local.set $8 - local.get $5 - local.get $7 - local.get $8 - call $~lib/internal/memory/memset - end + local.get $4 + i32.const 0 + local.get $3 + call $~lib/memory/memory.fill block $break|0 - local.get $2 + local.get $1 i32.const 1 i32.sub - local.set $8 + local.set $5 loop $repeat|0 - local.get $8 + local.get $5 i32.const 0 i32.gt_s i32.eqz br_if $break|0 block - local.get $8 - local.set $7 + local.get $5 + local.set $6 block $break|1 loop $continue|1 - local.get $7 + local.get $6 i32.const 1 i32.and + local.get $4 local.get $6 - local.get $7 i32.const 6 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $7 + local.get $6 i32.const 1 i32.shr_s i32.const 31 @@ -6703,72 +5642,52 @@ i32.and i32.eq if - local.get $7 + local.get $6 i32.const 1 i32.shr_s - local.set $7 + local.set $6 br $continue|1 end end end - local.get $7 + local.get $6 i32.const 1 i32.shr_s - local.set $5 - block $~lib/internal/arraybuffer/LOAD|inlined.4 (result f64) - local.get $0 - local.set $9 - local.get $5 - local.set $10 - local.get $1 - local.set $11 - local.get $9 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - f64.load offset=8 - end - local.set $12 - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result f64) - local.get $0 - local.set $11 - local.get $8 - local.set $10 - local.get $1 - local.set $9 - local.get $11 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - f64.load offset=8 - end - local.set $13 + local.set $7 + local.get $0 + local.get $7 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $8 + local.get $0 + local.get $5 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $9 block (result i32) i32.const 2 global.set $~lib/argc - local.get $12 - local.get $13 - local.get $3 + local.get $8 + local.get $9 + local.get $2 call_indirect (type $FUNCSIG$idd) end i32.const 0 i32.lt_s if - local.get $6 - local.get $8 + local.get $4 + local.get $5 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.get $6 - local.get $8 + local.get $4 + local.get $5 i32.const 5 i32.shr_s i32.const 2 @@ -6776,236 +5695,136 @@ i32.add i32.load i32.const 1 - local.get $8 + local.get $5 i32.const 31 i32.and i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/STORE|inlined.4 - local.get $0 - local.set $9 - local.get $8 - local.set $10 - local.get $12 - local.set $14 - local.get $1 - local.set $11 - local.get $9 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - local.get $14 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.5 - local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $13 - local.set $14 - local.get $1 - local.set $9 - local.get $11 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - local.get $14 - f64.store offset=8 - end + local.get $0 + local.get $5 + i32.const 3 + i32.shl + i32.add + local.get $8 + f64.store + local.get $0 + local.get $7 + i32.const 3 + i32.shl + i32.add + local.get $9 + f64.store end end - local.get $8 + local.get $5 i32.const 1 i32.sub - local.set $8 + local.set $5 br $repeat|0 unreachable end unreachable end block $break|2 - local.get $2 + local.get $1 i32.const 1 i32.sub - local.set $8 + local.set $5 loop $repeat|2 - local.get $8 + local.get $5 i32.const 2 i32.ge_s i32.eqz br_if $break|2 block - block $~lib/internal/arraybuffer/LOAD|inlined.6 (result f64) - local.get $0 - local.set $5 - i32.const 0 - local.set $7 - local.get $1 - local.set $9 - local.get $5 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - f64.load offset=8 - end - local.set $13 - block $~lib/internal/arraybuffer/STORE|inlined.6 - local.get $0 - local.set $9 - i32.const 0 - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result f64) - local.get $0 - local.set $5 - local.get $8 - local.set $10 - local.get $1 - local.set $11 - local.get $5 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - f64.load offset=8 - end - local.set $12 - local.get $1 - local.set $11 - local.get $9 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - local.get $12 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.7 - local.get $0 - local.set $11 - local.get $8 - local.set $7 - local.get $13 - local.set $12 - local.get $1 - local.set $9 - local.get $11 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - local.get $12 - f64.store offset=8 - end - i32.const 1 + local.get $0 + f64.load local.set $9 + local.get $0 + local.get $0 + local.get $5 + i32.const 3 + i32.shl + i32.add + f64.load + f64.store + local.get $0 + local.get $5 + i32.const 3 + i32.shl + i32.add + local.get $9 + f64.store + i32.const 1 + local.set $7 block $break|3 loop $continue|3 - local.get $9 + local.get $7 i32.const 1 i32.shl - local.get $6 - local.get $9 + local.get $4 + local.get $7 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $9 + local.get $7 i32.const 31 i32.and i32.shr_u i32.const 1 i32.and i32.add - local.tee $7 - local.get $8 + local.tee $6 + local.get $5 i32.lt_s if - local.get $7 - local.set $9 + local.get $6 + local.set $7 br $continue|3 end end end block $break|4 loop $continue|4 - local.get $9 + local.get $7 i32.const 0 i32.gt_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.8 (result f64) - local.get $0 - local.set $11 - i32.const 0 - local.set $10 - local.get $1 - local.set $5 - local.get $11 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $5 - i32.add - f64.load offset=8 - end - local.set $13 - block $~lib/internal/arraybuffer/LOAD|inlined.9 (result f64) - local.get $0 - local.set $5 - local.get $9 - local.set $10 - local.get $1 - local.set $11 - local.get $5 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - f64.load offset=8 - end - local.set $12 + local.get $0 + f64.load + local.set $9 + local.get $0 + local.get $7 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $8 block (result i32) i32.const 2 global.set $~lib/argc - local.get $13 - local.get $12 - local.get $3 + local.get $9 + local.get $8 + local.get $2 call_indirect (type $FUNCSIG$idd) end i32.const 0 i32.lt_s if - local.get $6 - local.get $9 + local.get $4 + local.get $7 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.get $6 - local.get $9 + local.get $4 + local.get $7 i32.const 5 i32.shr_s i32.const 2 @@ -7013,170 +5832,75 @@ i32.add i32.load i32.const 1 - local.get $9 + local.get $7 i32.const 31 i32.and i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/STORE|inlined.8 - local.get $0 - local.set $11 - local.get $9 - local.set $10 - local.get $13 - local.set $14 - local.get $1 - local.set $5 - local.get $11 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $5 - i32.add - local.get $14 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.9 - local.get $0 - local.set $5 - i32.const 0 - local.set $10 - local.get $12 - local.set $14 - local.get $1 - local.set $11 - local.get $5 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - local.get $14 - f64.store offset=8 - end + local.get $0 + local.get $7 + i32.const 3 + i32.shl + i32.add + local.get $9 + f64.store + local.get $0 + local.get $8 + f64.store end - local.get $9 + local.get $7 i32.const 1 i32.shr_s - local.set $9 + local.set $7 end br $continue|4 end end end end - local.get $8 + local.get $5 i32.const 1 i32.sub - local.set $8 + local.set $5 br $repeat|2 unreachable end unreachable end - block $~lib/memory/memory.free|inlined.2 - local.get $6 - local.set $8 - local.get $8 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.2 - end - block $~lib/internal/arraybuffer/LOAD|inlined.10 (result f64) - local.get $0 - local.set $8 - i32.const 1 - local.set $7 - local.get $1 - local.set $9 - local.get $8 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - f64.load offset=8 - end - local.set $15 - block $~lib/internal/arraybuffer/STORE|inlined.10 - local.get $0 - local.set $9 - i32.const 1 - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.11 (result f64) - local.get $0 - local.set $8 - i32.const 0 - local.set $11 - local.get $1 - local.set $10 - local.get $8 - local.get $11 - i32.const 3 - i32.shl - i32.add - local.get $10 - i32.add - f64.load offset=8 - end - local.set $13 - local.get $1 - local.set $10 - local.get $9 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $10 - i32.add - local.get $13 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.11 - local.get $0 - local.set $10 - i32.const 0 - local.set $7 - local.get $15 - local.set $13 - local.get $1 - local.set $9 - local.get $10 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - local.get $13 - f64.store offset=8 - end + local.get $4 + call $~lib/memory/memory.free + local.get $0 + f64.load offset=8 + local.set $10 + local.get $0 + local.get $0 + f64.load + f64.store offset=8 + local.get $0 + local.get $10 + f64.store ) - (func $~lib/array/Array#sort (; 113 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 114 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) + (local $4 f64) + (local $5 f64) (local $6 i32) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 i32) + (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 488 + i32.const 347 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 local.get $2 i32.const 1 @@ -7186,128 +5910,64 @@ return end local.get $0 - i32.load + i32.load offset=4 local.set $3 local.get $2 i32.const 2 i32.eq if - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result f64) - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 3 - i32.shl - i32.add - local.get $6 - i32.add - f64.load offset=8 - end - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result f64) - local.get $3 - local.set $6 - i32.const 0 - local.set $5 - i32.const 0 - local.set $4 - local.get $6 - local.get $5 - i32.const 3 - i32.shl - i32.add - local.get $4 - i32.add - f64.load offset=8 - end - local.set $8 + local.get $3 + f64.load offset=8 + local.set $4 + local.get $3 + f64.load + local.set $5 block (result i32) i32.const 2 global.set $~lib/argc - local.get $7 - local.get $8 + local.get $4 + local.get $5 local.get $1 call_indirect (type $FUNCSIG$idd) end i32.const 0 i32.lt_s if - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - local.get $8 - local.set $9 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 3 - i32.shl - i32.add - local.get $6 - i32.add - local.get $9 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.1 - local.get $3 - local.set $6 - i32.const 0 - local.set $5 - local.get $7 - local.set $9 - i32.const 0 - local.set $4 - local.get $6 - local.get $5 - i32.const 3 - i32.shl - i32.add - local.get $4 - i32.add - local.get $9 - f64.store offset=8 - end + local.get $3 + local.get $5 + f64.store offset=8 + local.get $3 + local.get $4 + f64.store end local.get $0 return end - block $~lib/internal/sort/SORT|inlined.0 + block $~lib/util/sort/SORT|inlined.0 local.get $3 - local.set $4 - i32.const 0 - local.set $5 - local.get $2 local.set $6 + local.get $2 + local.set $7 local.get $1 - local.set $10 - local.get $6 + local.set $8 + local.get $7 i32.const 256 i32.lt_s if - local.get $4 - local.get $5 local.get $6 - local.get $10 - call $~lib/internal/sort/insertionSort + local.get $7 + local.get $8 + call $~lib/util/sort/insertionSort else - local.get $4 - local.get $5 local.get $6 - local.get $10 - call $~lib/internal/sort/weakHeapSort + local.get $7 + local.get $8 + call $~lib/util/sort/weakHeapSort end end local.get $0 ) - (func $~lib/internal/sort/COMPARATOR~anonymous|0 (; 114 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 115 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -7340,7 +6000,7 @@ i64.lt_s i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 115 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 116 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -7349,9 +6009,9 @@ end unreachable end - block $~lib/internal/sort/COMPARATOR|inlined.0 (result i32) + block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) i32.const 45 - br $~lib/internal/sort/COMPARATOR|inlined.0 + br $~lib/util/sort/COMPARATOR|inlined.0 end local.set $1 end @@ -7359,63 +6019,28 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/array/Array#__get (; 116 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#get:length (; 117 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load - i32.const 3 - i32.shr_u - i32.lt_u - if (result f64) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 3 - i32.shl - i32.add - local.get $5 - i32.add - f64.load offset=8 - else - unreachable - end + i32.load offset=12 ) - (func $~lib/builtins/isNaN (; 117 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 118 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $std/array/isArraysEqual (; 118 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 119 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $2 i32.eqz if - block $~lib/array/Array#get:length|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $0 + call $~lib/array/Array#get:length local.set $2 local.get $2 - block $~lib/array/Array#get:length|inlined.2 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $1 + call $~lib/array/Array#get:length i32.ne if i32.const 0 @@ -7441,23 +6066,71 @@ br_if $break|0 block local.get $0 + local.tee $4 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 3 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + f64.load call $~lib/builtins/isNaN local.get $1 + local.tee $4 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 3 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + f64.load call $~lib/builtins/isNaN i32.eq if br $continue|0 end local.get $0 + local.tee $4 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 3 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + f64.load local.get $1 + local.tee $4 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 3 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + f64.load f64.ne if i32.const 0 @@ -7476,107 +6149,74 @@ end i32.const 1 ) - (func $~lib/internal/sort/insertionSort (; 119 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/util/sort/insertionSort (; 120 ;) (type $FUNCSIG$viii) (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) block $break|0 i32.const 0 - local.set $4 + local.set $3 loop $repeat|0 - local.get $4 - local.get $2 + local.get $3 + local.get $1 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.24 (result i32) - local.get $0 - local.set $5 - local.get $4 - local.set $6 - local.get $1 - local.set $7 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 - local.get $4 + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $4 + local.get $3 i32.const 1 i32.sub - local.set $6 + local.set $5 block $break|1 loop $continue|1 - local.get $6 + local.get $5 i32.const 0 i32.ge_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.25 (result i32) - local.get $0 - local.set $5 - local.get $6 - local.set $8 - local.get $1 - local.set $9 - local.get $5 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - i32.load offset=8 - end - local.set $9 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 block (result i32) i32.const 2 global.set $~lib/argc - local.get $7 - local.get $9 - local.get $3 + local.get $4 + local.get $6 + local.get $2 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if local.get $0 - local.set $8 block (result i32) - local.get $6 - local.tee $5 + local.get $5 + local.tee $7 i32.const 1 i32.sub - local.set $6 - local.get $5 + local.set $5 + local.get $7 end i32.const 1 i32.add - local.set $5 - local.get $9 - local.set $10 - local.get $1 - local.set $11 - local.get $8 - local.get $5 i32.const 2 i32.shl i32.add - local.get $11 - i32.add - local.get $10 - i32.store offset=8 + local.get $6 + i32.store else br $break|1 end @@ -7585,39 +6225,28 @@ end end end - block $~lib/internal/arraybuffer/STORE|inlined.11 - local.get $0 - local.set $9 - local.get $6 - i32.const 1 - i32.add - local.set $11 - local.get $7 - local.set $10 - local.get $1 - local.set $5 - local.get $9 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - local.get $10 - i32.store offset=8 - end + local.get $0 + local.get $5 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $4 + i32.store end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 unreachable end unreachable end ) - (func $~lib/internal/sort/weakHeapSort (; 120 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/util/sort/weakHeapSort (; 121 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -7625,67 +6254,49 @@ (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.get $2 + local.get $1 i32.const 31 i32.add i32.const 5 i32.shr_s i32.const 2 i32.shl + local.set $3 + local.get $3 + call $~lib/memory/memory.allocate local.set $4 - block $~lib/memory/memory.allocate|inlined.3 (result i32) - local.get $4 - local.set $5 - local.get $5 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.3 - end - local.set $6 - block $~lib/memory/memory.fill|inlined.7 - local.get $6 - local.set $5 - i32.const 0 - local.set $7 - local.get $4 - local.set $8 - local.get $5 - local.get $7 - local.get $8 - call $~lib/internal/memory/memset - end + local.get $4 + i32.const 0 + local.get $3 + call $~lib/memory/memory.fill block $break|0 - local.get $2 + local.get $1 i32.const 1 i32.sub - local.set $8 + local.set $5 loop $repeat|0 - local.get $8 + local.get $5 i32.const 0 i32.gt_s i32.eqz br_if $break|0 block - local.get $8 - local.set $7 + local.get $5 + local.set $6 block $break|1 loop $continue|1 - local.get $7 + local.get $6 i32.const 1 i32.and + local.get $4 local.get $6 - local.get $7 i32.const 6 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $7 + local.get $6 i32.const 1 i32.shr_s i32.const 31 @@ -7695,72 +6306,52 @@ i32.and i32.eq if - local.get $7 + local.get $6 i32.const 1 i32.shr_s - local.set $7 + local.set $6 br $continue|1 end end end - local.get $7 + local.get $6 i32.const 1 i32.shr_s - local.set $5 - block $~lib/internal/arraybuffer/LOAD|inlined.26 (result i32) - local.get $0 - local.set $9 - local.get $5 - local.set $10 - local.get $1 - local.set $11 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 - end - local.set $11 - block $~lib/internal/arraybuffer/LOAD|inlined.27 (result i32) - local.get $0 - local.set $10 - local.get $8 - local.set $9 - local.get $1 - local.set $12 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $12 - i32.add - i32.load offset=8 - end - local.set $12 + local.set $7 + local.get $0 + local.get $7 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $8 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $9 block (result i32) i32.const 2 global.set $~lib/argc - local.get $11 - local.get $12 - local.get $3 + local.get $8 + local.get $9 + local.get $2 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if - local.get $6 - local.get $8 + local.get $4 + local.get $5 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.get $6 - local.get $8 + local.get $4 + local.get $5 i32.const 5 i32.shr_s i32.const 2 @@ -7768,236 +6359,136 @@ i32.add i32.load i32.const 1 - local.get $8 + local.get $5 i32.const 31 i32.and i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/STORE|inlined.12 - local.get $0 - local.set $9 - local.get $8 - local.set $10 - local.get $11 - local.set $13 - local.get $1 - local.set $14 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - local.get $13 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.13 - local.get $0 - local.set $14 - local.get $5 - local.set $13 - local.get $12 - local.set $10 - local.get $1 - local.set $9 - local.get $14 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $10 - i32.store offset=8 - end + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + local.get $8 + i32.store + local.get $0 + local.get $7 + i32.const 2 + i32.shl + i32.add + local.get $9 + i32.store end end - local.get $8 + local.get $5 i32.const 1 i32.sub - local.set $8 + local.set $5 br $repeat|0 unreachable end unreachable end block $break|2 - local.get $2 + local.get $1 i32.const 1 i32.sub - local.set $8 + local.set $5 loop $repeat|2 - local.get $8 + local.get $5 i32.const 2 i32.ge_s i32.eqz br_if $break|2 block - block $~lib/internal/arraybuffer/LOAD|inlined.28 (result i32) - local.get $0 - local.set $12 - i32.const 0 - local.set $11 - local.get $1 - local.set $5 - local.get $12 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - end - local.set $5 - block $~lib/internal/arraybuffer/STORE|inlined.14 - local.get $0 - local.set $11 - i32.const 0 - local.set $12 - block $~lib/internal/arraybuffer/LOAD|inlined.29 (result i32) - local.get $0 - local.set $7 - local.get $8 - local.set $9 - local.get $1 - local.set $10 - local.get $7 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.set $10 - local.get $1 - local.set $9 - local.get $11 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $10 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.15 - local.get $0 - local.set $9 - local.get $8 - local.set $10 - local.get $5 - local.set $12 - local.get $1 - local.set $11 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - local.get $12 - i32.store offset=8 - end + local.get $0 + i32.load + local.set $9 + local.get $0 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + i32.store + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + local.get $9 + i32.store i32.const 1 - local.set $11 + local.set $8 block $break|3 loop $continue|3 - local.get $11 + local.get $8 i32.const 1 i32.shl - local.get $6 - local.get $11 + local.get $4 + local.get $8 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $11 + local.get $8 i32.const 31 i32.and i32.shr_u i32.const 1 i32.and i32.add - local.tee $12 - local.get $8 + local.tee $7 + local.get $5 i32.lt_s if - local.get $12 - local.set $11 + local.get $7 + local.set $8 br $continue|3 end end end block $break|4 loop $continue|4 - local.get $11 + local.get $8 i32.const 0 i32.gt_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.30 (result i32) - local.get $0 - local.set $10 - i32.const 0 - local.set $9 - local.get $1 - local.set $7 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $5 - block $~lib/internal/arraybuffer/LOAD|inlined.31 (result i32) - local.get $0 - local.set $7 - local.get $11 - local.set $9 - local.get $1 - local.set $10 - local.get $7 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.set $10 + local.get $0 + i32.load + local.set $9 + local.get $0 + local.get $8 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 block (result i32) i32.const 2 global.set $~lib/argc - local.get $5 - local.get $10 - local.get $3 + local.get $9 + local.get $6 + local.get $2 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if - local.get $6 - local.get $11 + local.get $4 + local.get $8 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.get $6 - local.get $11 + local.get $4 + local.get $8 i32.const 5 i32.shr_s i32.const 2 @@ -8005,169 +6496,73 @@ i32.add i32.load i32.const 1 - local.get $11 + local.get $8 i32.const 31 i32.and i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/STORE|inlined.16 - local.get $0 - local.set $9 - local.get $11 - local.set $7 - local.get $5 - local.set $13 - local.get $1 - local.set $14 - local.get $9 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - local.get $13 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.17 - local.get $0 - local.set $14 - i32.const 0 - local.set $13 - local.get $10 - local.set $7 - local.get $1 - local.set $9 - local.get $14 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $7 - i32.store offset=8 - end + local.get $0 + local.get $8 + i32.const 2 + i32.shl + i32.add + local.get $9 + i32.store + local.get $0 + local.get $6 + i32.store end - local.get $11 + local.get $8 i32.const 1 i32.shr_s - local.set $11 + local.set $8 end br $continue|4 end end end end - local.get $8 + local.get $5 i32.const 1 i32.sub - local.set $8 + local.set $5 br $repeat|2 unreachable end unreachable end - block $~lib/memory/memory.free|inlined.3 - local.get $6 - local.set $8 - local.get $8 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.3 - end - block $~lib/internal/arraybuffer/LOAD|inlined.32 (result i32) - local.get $0 - local.set $8 - i32.const 1 - local.set $12 - local.get $1 - local.set $11 - local.get $8 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 - end - local.set $15 - block $~lib/internal/arraybuffer/STORE|inlined.18 - local.get $0 - local.set $11 - i32.const 1 - local.set $12 - block $~lib/internal/arraybuffer/LOAD|inlined.33 (result i32) - local.get $0 - local.set $8 - i32.const 0 - local.set $5 - local.get $1 - local.set $10 - local.get $8 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.set $10 - local.get $1 - local.set $5 - local.get $11 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - local.get $10 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.19 - local.get $0 - local.set $5 - i32.const 0 - local.set $10 - local.get $15 - local.set $12 - local.get $1 - local.set $11 - local.get $5 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - local.get $12 - i32.store offset=8 - end + local.get $4 + call $~lib/memory/memory.free + local.get $0 + i32.load offset=4 + local.set $10 + local.get $0 + local.get $0 + i32.load + i32.store offset=4 + local.get $0 + local.get $10 + i32.store ) - (func $~lib/array/Array#sort (; 121 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 122 ;) (type $FUNCSIG$iii) (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 i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 488 + i32.const 347 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 local.get $2 i32.const 1 @@ -8177,133 +6572,69 @@ return end local.get $0 - i32.load + i32.load offset=4 local.set $3 local.get $2 i32.const 2 i32.eq if - block $~lib/internal/arraybuffer/LOAD|inlined.22 (result i32) - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - i32.load offset=8 - end - local.set $6 - block $~lib/internal/arraybuffer/LOAD|inlined.23 (result i32) - local.get $3 - local.set $5 - i32.const 0 - local.set $4 - i32.const 0 - local.set $7 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 + local.get $3 + i32.load offset=4 + local.set $4 + local.get $3 + i32.load + local.set $5 block (result i32) i32.const 2 global.set $~lib/argc - local.get $6 - local.get $7 + local.get $4 + local.get $5 local.get $1 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if - block $~lib/internal/arraybuffer/STORE|inlined.8 - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - local.get $7 - local.set $8 - i32.const 0 - local.set $9 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $8 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.9 - local.get $3 - local.set $9 - i32.const 0 - local.set $8 - local.get $6 - local.set $5 - i32.const 0 - local.set $4 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - local.get $5 - i32.store offset=8 - end + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $4 + i32.store end local.get $0 return end - block $~lib/internal/sort/SORT|inlined.0 + block $~lib/util/sort/SORT|inlined.0 local.get $3 - local.set $7 - i32.const 0 - local.set $6 + local.set $5 local.get $2 local.set $4 local.get $1 - local.set $5 + local.set $6 local.get $4 i32.const 256 i32.lt_s if - local.get $7 - local.get $6 - local.get $4 local.get $5 - call $~lib/internal/sort/insertionSort + local.get $4 + local.get $6 + call $~lib/util/sort/insertionSort else - local.get $7 - local.get $6 - local.get $4 local.get $5 - call $~lib/internal/sort/weakHeapSort + local.get $4 + local.get $6 + call $~lib/util/sort/weakHeapSort end end local.get $0 ) - (func $~lib/internal/sort/COMPARATOR~anonymous|0 (; 122 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 123 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 123 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 124 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -8312,9 +6643,9 @@ end unreachable end - block $~lib/internal/sort/COMPARATOR|inlined.0 (result i32) + block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) i32.const 46 - br $~lib/internal/sort/COMPARATOR|inlined.0 + br $~lib/util/sort/COMPARATOR|inlined.0 end local.set $1 end @@ -8322,107 +6653,74 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/internal/sort/insertionSort (; 124 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/util/sort/insertionSort (; 125 ;) (type $FUNCSIG$viii) (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) block $break|0 i32.const 0 - local.set $4 + local.set $3 loop $repeat|0 - local.get $4 - local.get $2 + local.get $3 + local.get $1 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i32) - local.get $0 - local.set $5 - local.get $4 - local.set $6 - local.get $1 - local.set $7 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 - local.get $4 + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $4 + local.get $3 i32.const 1 i32.sub - local.set $6 + local.set $5 block $break|1 loop $continue|1 - local.get $6 + local.get $5 i32.const 0 i32.ge_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.4 (result i32) - local.get $0 - local.set $5 - local.get $6 - local.set $8 - local.get $1 - local.set $9 - local.get $5 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - i32.load offset=8 - end - local.set $9 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 block (result i32) i32.const 2 global.set $~lib/argc - local.get $7 - local.get $9 - local.get $3 + local.get $4 + local.get $6 + local.get $2 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if local.get $0 - local.set $8 block (result i32) - local.get $6 - local.tee $5 + local.get $5 + local.tee $7 i32.const 1 i32.sub - local.set $6 - local.get $5 + local.set $5 + local.get $7 end i32.const 1 i32.add - local.set $5 - local.get $9 - local.set $10 - local.get $1 - local.set $11 - local.get $8 - local.get $5 i32.const 2 i32.shl i32.add - local.get $11 - i32.add - local.get $10 - i32.store offset=8 + local.get $6 + i32.store else br $break|1 end @@ -8431,39 +6729,28 @@ end end end - block $~lib/internal/arraybuffer/STORE|inlined.4 - local.get $0 - local.set $9 - local.get $6 - i32.const 1 - i32.add - local.set $11 - local.get $7 - local.set $10 - local.get $1 - local.set $5 - local.get $9 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - local.get $10 - i32.store offset=8 - end + local.get $0 + local.get $5 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $4 + i32.store end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 unreachable end unreachable end ) - (func $~lib/internal/sort/weakHeapSort (; 125 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/util/sort/weakHeapSort (; 126 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -8471,67 +6758,49 @@ (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.get $2 + local.get $1 i32.const 31 i32.add i32.const 5 i32.shr_s i32.const 2 i32.shl + local.set $3 + local.get $3 + call $~lib/memory/memory.allocate local.set $4 - block $~lib/memory/memory.allocate|inlined.4 (result i32) - local.get $4 - local.set $5 - local.get $5 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.4 - end - local.set $6 - block $~lib/memory/memory.fill|inlined.8 - local.get $6 - local.set $5 - i32.const 0 - local.set $7 - local.get $4 - local.set $8 - local.get $5 - local.get $7 - local.get $8 - call $~lib/internal/memory/memset - end + local.get $4 + i32.const 0 + local.get $3 + call $~lib/memory/memory.fill block $break|0 - local.get $2 + local.get $1 i32.const 1 i32.sub - local.set $8 + local.set $5 loop $repeat|0 - local.get $8 + local.get $5 i32.const 0 i32.gt_s i32.eqz br_if $break|0 block - local.get $8 - local.set $7 + local.get $5 + local.set $6 block $break|1 loop $continue|1 - local.get $7 + local.get $6 i32.const 1 i32.and + local.get $4 local.get $6 - local.get $7 i32.const 6 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $7 + local.get $6 i32.const 1 i32.shr_s i32.const 31 @@ -8541,72 +6810,52 @@ i32.and i32.eq if - local.get $7 + local.get $6 i32.const 1 i32.shr_s - local.set $7 + local.set $6 br $continue|1 end end end - local.get $7 + local.get $6 i32.const 1 i32.shr_s - local.set $5 - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result i32) - local.get $0 - local.set $9 - local.get $5 - local.set $10 - local.get $1 - local.set $11 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 - end - local.set $11 - block $~lib/internal/arraybuffer/LOAD|inlined.6 (result i32) - local.get $0 - local.set $10 - local.get $8 - local.set $9 - local.get $1 - local.set $12 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $12 - i32.add - i32.load offset=8 - end - local.set $12 + local.set $7 + local.get $0 + local.get $7 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $8 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $9 block (result i32) i32.const 2 global.set $~lib/argc - local.get $11 - local.get $12 - local.get $3 + local.get $8 + local.get $9 + local.get $2 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if - local.get $6 - local.get $8 + local.get $4 + local.get $5 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.get $6 - local.get $8 + local.get $4 + local.get $5 i32.const 5 i32.shr_s i32.const 2 @@ -8614,236 +6863,136 @@ i32.add i32.load i32.const 1 - local.get $8 + local.get $5 i32.const 31 i32.and i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/STORE|inlined.5 - local.get $0 - local.set $9 - local.get $8 - local.set $10 - local.get $11 - local.set $13 - local.get $1 - local.set $14 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - local.get $13 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.6 - local.get $0 - local.set $14 - local.get $5 - local.set $13 - local.get $12 - local.set $10 - local.get $1 - local.set $9 - local.get $14 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $10 - i32.store offset=8 - end + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + local.get $8 + i32.store + local.get $0 + local.get $7 + i32.const 2 + i32.shl + i32.add + local.get $9 + i32.store end end - local.get $8 + local.get $5 i32.const 1 i32.sub - local.set $8 + local.set $5 br $repeat|0 unreachable end unreachable end block $break|2 - local.get $2 + local.get $1 i32.const 1 i32.sub - local.set $8 + local.set $5 loop $repeat|2 - local.get $8 + local.get $5 i32.const 2 i32.ge_s i32.eqz br_if $break|2 block - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result i32) - local.get $0 - local.set $12 - i32.const 0 - local.set $11 - local.get $1 - local.set $5 - local.get $12 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - end - local.set $5 - block $~lib/internal/arraybuffer/STORE|inlined.7 - local.get $0 - local.set $11 - i32.const 0 - local.set $12 - block $~lib/internal/arraybuffer/LOAD|inlined.8 (result i32) - local.get $0 - local.set $7 - local.get $8 - local.set $9 - local.get $1 - local.set $10 - local.get $7 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.set $10 - local.get $1 - local.set $9 - local.get $11 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $10 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.8 - local.get $0 - local.set $9 - local.get $8 - local.set $10 - local.get $5 - local.set $12 - local.get $1 - local.set $11 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - local.get $12 - i32.store offset=8 - end + local.get $0 + i32.load + local.set $9 + local.get $0 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + i32.store + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + local.get $9 + i32.store i32.const 1 - local.set $11 + local.set $8 block $break|3 loop $continue|3 - local.get $11 + local.get $8 i32.const 1 i32.shl - local.get $6 - local.get $11 + local.get $4 + local.get $8 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $11 + local.get $8 i32.const 31 i32.and i32.shr_u i32.const 1 i32.and i32.add - local.tee $12 - local.get $8 + local.tee $7 + local.get $5 i32.lt_s if - local.get $12 - local.set $11 + local.get $7 + local.set $8 br $continue|3 end end end block $break|4 loop $continue|4 - local.get $11 + local.get $8 i32.const 0 i32.gt_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.9 (result i32) - local.get $0 - local.set $10 - i32.const 0 - local.set $9 - local.get $1 - local.set $7 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $5 - block $~lib/internal/arraybuffer/LOAD|inlined.10 (result i32) - local.get $0 - local.set $7 - local.get $11 - local.set $9 - local.get $1 - local.set $10 - local.get $7 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.set $10 + local.get $0 + i32.load + local.set $9 + local.get $0 + local.get $8 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 block (result i32) i32.const 2 global.set $~lib/argc - local.get $5 - local.get $10 - local.get $3 + local.get $9 + local.get $6 + local.get $2 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if - local.get $6 - local.get $11 + local.get $4 + local.get $8 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.get $6 - local.get $11 + local.get $4 + local.get $8 i32.const 5 i32.shr_s i32.const 2 @@ -8851,169 +7000,73 @@ i32.add i32.load i32.const 1 - local.get $11 + local.get $8 i32.const 31 i32.and i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/STORE|inlined.9 - local.get $0 - local.set $9 - local.get $11 - local.set $7 - local.get $5 - local.set $13 - local.get $1 - local.set $14 - local.get $9 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - local.get $13 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.10 - local.get $0 - local.set $14 - i32.const 0 - local.set $13 - local.get $10 - local.set $7 - local.get $1 - local.set $9 - local.get $14 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $7 - i32.store offset=8 - end + local.get $0 + local.get $8 + i32.const 2 + i32.shl + i32.add + local.get $9 + i32.store + local.get $0 + local.get $6 + i32.store end - local.get $11 + local.get $8 i32.const 1 i32.shr_s - local.set $11 + local.set $8 end br $continue|4 end end end end - local.get $8 + local.get $5 i32.const 1 i32.sub - local.set $8 + local.set $5 br $repeat|2 unreachable end unreachable end - block $~lib/memory/memory.free|inlined.4 - local.get $6 - local.set $8 - local.get $8 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.4 - end - block $~lib/internal/arraybuffer/LOAD|inlined.11 (result i32) - local.get $0 - local.set $8 - i32.const 1 - local.set $12 - local.get $1 - local.set $11 - local.get $8 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 - end - local.set $15 - block $~lib/internal/arraybuffer/STORE|inlined.11 - local.get $0 - local.set $11 - i32.const 1 - local.set $12 - block $~lib/internal/arraybuffer/LOAD|inlined.12 (result i32) - local.get $0 - local.set $8 - i32.const 0 - local.set $5 - local.get $1 - local.set $10 - local.get $8 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.set $10 - local.get $1 - local.set $5 - local.get $11 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - local.get $10 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.12 - local.get $0 - local.set $5 - i32.const 0 - local.set $10 - local.get $15 - local.set $12 - local.get $1 - local.set $11 - local.get $5 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - local.get $12 - i32.store offset=8 - end + local.get $4 + call $~lib/memory/memory.free + local.get $0 + i32.load offset=4 + local.set $10 + local.get $0 + local.get $0 + i32.load + i32.store offset=4 + local.get $0 + local.get $10 + i32.store ) - (func $~lib/array/Array#sort (; 126 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 127 ;) (type $FUNCSIG$iii) (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 i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 488 + i32.const 347 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 local.get $2 i32.const 1 @@ -9023,128 +7076,64 @@ return end local.get $0 - i32.load + i32.load offset=4 local.set $3 local.get $2 i32.const 2 i32.eq if - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - i32.load offset=8 - end - local.set $6 - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $3 - local.set $5 - i32.const 0 - local.set $4 - i32.const 0 - local.set $7 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 + local.get $3 + i32.load offset=4 + local.set $4 + local.get $3 + i32.load + local.set $5 block (result i32) i32.const 2 global.set $~lib/argc - local.get $6 - local.get $7 + local.get $4 + local.get $5 local.get $1 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if - block $~lib/internal/arraybuffer/STORE|inlined.1 - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - local.get $7 - local.set $8 - i32.const 0 - local.set $9 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $8 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.2 - local.get $3 - local.set $9 - i32.const 0 - local.set $8 - local.get $6 - local.set $5 - i32.const 0 - local.set $4 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - local.get $5 - i32.store offset=8 - end + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $4 + i32.store end local.get $0 return end - block $~lib/internal/sort/SORT|inlined.0 + block $~lib/util/sort/SORT|inlined.0 local.get $3 - local.set $7 - i32.const 0 - local.set $6 + local.set $5 local.get $2 local.set $4 local.get $1 - local.set $5 + local.set $6 local.get $4 i32.const 256 i32.lt_s if - local.get $7 - local.get $6 - local.get $4 local.get $5 - call $~lib/internal/sort/insertionSort + local.get $4 + local.get $6 + call $~lib/util/sort/insertionSort else - local.get $7 - local.get $6 - local.get $4 local.get $5 - call $~lib/internal/sort/weakHeapSort + local.get $4 + local.get $6 + call $~lib/util/sort/weakHeapSort end end local.get $0 ) - (func $~lib/internal/sort/COMPARATOR~anonymous|0 (; 127 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 128 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.gt_u @@ -9153,7 +7142,7 @@ i32.lt_u i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 128 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 129 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -9162,9 +7151,9 @@ end unreachable end - block $~lib/internal/sort/COMPARATOR|inlined.0 (result i32) + block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) i32.const 47 - br $~lib/internal/sort/COMPARATOR|inlined.0 + br $~lib/util/sort/COMPARATOR|inlined.0 end local.set $1 end @@ -9172,10 +7161,9 @@ local.get $1 call $~lib/array/Array#sort ) - (func $std/array/createReverseOrderedArray (; 129 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedArray (; 130 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - (local $3 i32) i32.const 0 local.get $0 call $~lib/array/Array#constructor @@ -9185,28 +7173,24 @@ local.set $2 loop $repeat|0 local.get $2 - block $~lib/array/Array#get:length|inlined.43 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $1 + call $~lib/array/Array#get:length i32.lt_s i32.eqz br_if $break|0 local.get $1 + i32.load offset=4 local.get $2 - block $~lib/array/Array#get:length|inlined.44 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + i32.const 2 + i32.shl + i32.add + local.get $1 + call $~lib/array/Array#get:length i32.const 1 i32.sub local.get $2 i32.sub - call $~lib/array/Array#__set + i32.store local.get $2 i32.const 1 i32.add @@ -9218,7 +7202,7 @@ end local.get $1 ) - (func $~lib/math/NativeMath.random (; 130 ;) (type $FUNCSIG$d) (result f64) + (func $~lib/math/NativeMath.random (; 131 ;) (type $FUNCSIG$d) (result f64) (local $0 i64) (local $1 i64) (local $2 i64) @@ -9226,8 +7210,8 @@ i32.eqz if i32.const 0 - i32.const 2896 - i32.const 987 + i32.const 2296 + i32.const 1030 i32.const 24 call $~lib/env/abort unreachable @@ -9275,10 +7259,9 @@ f64.const 1 f64.sub ) - (func $std/array/createRandomOrderedArray (; 131 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomOrderedArray (; 132 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - (local $3 i32) i32.const 0 local.get $0 call $~lib/array/Array#constructor @@ -9288,28 +7271,24 @@ local.set $2 loop $repeat|0 local.get $2 - block $~lib/array/Array#get:length|inlined.46 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $1 + call $~lib/array/Array#get:length i32.lt_s i32.eqz br_if $break|0 local.get $1 + i32.load offset=4 local.get $2 + i32.const 2 + i32.shl + i32.add call $~lib/math/NativeMath.random - block $~lib/array/Array#get:length|inlined.47 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $1 + call $~lib/array/Array#get:length f64.convert_i32_s f64.mul i32.trunc_f64_s - call $~lib/array/Array#__set + i32.store local.get $2 i32.const 1 i32.add @@ -9321,24 +7300,22 @@ end local.get $1 ) - (func $~lib/internal/sort/COMPARATOR~anonymous|1 (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|1 (; 133 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $std/array/isSorted (; 133 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted (; 134 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) block $break|0 block i32.const 1 local.set $2 - block $~lib/array/Array#get:length|inlined.48 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $0 + call $~lib/array/Array#get:length local.set $3 end loop $repeat|0 @@ -9351,13 +7328,37 @@ i32.const 2 global.set $~lib/argc local.get $0 + local.tee $4 + i32.load offset=4 local.get $2 i32.const 1 i32.sub - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load local.get $0 + local.tee $4 + i32.load offset=4 local.get $2 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load local.get $1 call_indirect (type $FUNCSIG$iii) end @@ -9378,7 +7379,7 @@ end i32.const 1 ) - (func $std/array/assertSorted (; 134 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 135 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array#sort @@ -9394,199 +7395,91 @@ unreachable end ) - (func $std/array/assertSortedDefault (; 135 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSortedDefault (; 136 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - block $~lib/internal/sort/COMPARATOR|inlined.1 (result i32) + block $~lib/util/sort/COMPARATOR|inlined.1 (result i32) i32.const 48 - br $~lib/internal/sort/COMPARATOR|inlined.1 + br $~lib/util/sort/COMPARATOR|inlined.1 end call $std/array/assertSorted ) - (func $start:std/array~anonymous|43 (; 136 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|43 (; 137 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $start:std/array~anonymous|44 (; 137 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|44 (; 138 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $start:std/array~anonymous|45 (; 138 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|45 (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $start:std/array~anonymous|46 (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|46 (; 140 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $~lib/array/Array>#constructor (; 140 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#constructor (; 141 ;) (type $FUNCSIG$iii) (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 + if (result i32) + local.get $0 + else + i32.const 16 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 11 + call $~lib/runtime/doRegister + end local.get $1 - i32.const 268435454 - i32.gt_u + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + local.get $1 + i32.store offset=12 + local.get $0 + ) + (func $~lib/array/Array>#get:length (; 142 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=12 + ) + (func $~lib/runtime/assertRegistered (; 143 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.ne + i32.eqz if i32.const 0 - i32.const 8 - i32.const 45 - i32.const 39 + i32.const 16 + i32.const 199 + i32.const 2 call $~lib/env/abort unreachable end - local.get $1 - i32.const 2 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block (result i32) - local.get $0 - i32.eqz - if - i32.const 8 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - end - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - block $~lib/memory/memory.fill|inlined.9 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - local.get $0 ) - (func $~lib/array/Array>#__set (; 141 ;) (type $FUNCSIG$viii) (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) + (func $~lib/runtime/doLink (; 144 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 - i32.load - local.set $3 - local.get $3 - i32.load - i32.const 2 - i32.shr_u - local.set $4 + call $~lib/runtime/assertRegistered local.get $1 - local.get $4 - i32.ge_u - if - local.get $1 - i32.const 268435454 - i32.ge_u - if - i32.const 0 - i32.const 8 - i32.const 107 - i32.const 41 - call $~lib/env/abort - unreachable - end - local.get $3 - local.get $1 - i32.const 1 - i32.add - i32.const 2 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.set $3 - local.get $0 - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - end - block $~lib/internal/arraybuffer/STORE,Array>|inlined.0 - local.get $3 - local.set $5 - local.get $1 - local.set $6 - local.get $2 - local.set $7 - i32.const 0 - local.set $8 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - local.get $7 - i32.store offset=8 - end + call $~lib/runtime/assertRegistered ) - (func $~lib/array/Array>#__get (; 142 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end - ) - (func $std/array/createReverseOrderedNestedArray (; 143 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedNestedArray (; 145 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) i32.const 0 local.get $0 call $~lib/array/Array>#constructor @@ -9596,37 +7489,53 @@ local.set $2 loop $repeat|0 local.get $2 - block $~lib/array/Array>#get:length|inlined.1 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $1 + call $~lib/array/Array>#get:length i32.lt_s i32.eqz br_if $break|0 block local.get $1 + local.tee $3 + i32.load offset=4 local.get $2 - i32.const 0 - i32.const 1 - call $~lib/array/Array#constructor - call $~lib/array/Array>#__set - local.get $1 - local.get $2 - call $~lib/array/Array>#__get - i32.const 0 - block $~lib/array/Array>#get:length|inlined.2 (result i32) - local.get $1 - local.set $3 + i32.const 2 + i32.shl + i32.add + block $~lib/runtime/LINK,Array>>|inlined.0 (result i32) + i32.const 0 + i32.const 1 + call $~lib/array/Array#constructor + local.set $4 + local.get $4 local.get $3 - i32.load offset=4 + call $~lib/runtime/doLink + local.get $4 end + i32.store + local.get $1 + local.tee $3 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + local.tee $4 + i32.add + i32.const -1 + local.get $4 + local.get $3 + i32.load offset=8 + i32.lt_u + select + i32.load + i32.load offset=4 + local.get $1 + call $~lib/array/Array>#get:length i32.const 1 i32.sub local.get $2 i32.sub - call $~lib/array/Array#__set + i32.store end local.get $2 i32.const 1 @@ -9639,116 +7548,109 @@ end local.get $1 ) - (func $start:std/array~anonymous|47 (; 144 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|47 (; 146 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $2 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load local.get $1 + local.tee $2 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $3 + i32.add + i32.const -1 + local.get $3 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load i32.sub ) - (func $~lib/internal/sort/insertionSort> (; 145 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/util/sort/insertionSort> (; 147 ;) (type $FUNCSIG$viii) (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) block $break|0 i32.const 0 - local.set $4 + local.set $3 loop $repeat|0 - local.get $4 - local.get $2 + local.get $3 + local.get $1 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD,Array>|inlined.3 (result i32) - local.get $0 - local.set $5 - local.get $4 - local.set $6 - local.get $1 - local.set $7 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 - local.get $4 + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $4 + local.get $3 i32.const 1 i32.sub - local.set $6 + local.set $5 block $break|1 loop $continue|1 - local.get $6 + local.get $5 i32.const 0 i32.ge_s if block - block $~lib/internal/arraybuffer/LOAD,Array>|inlined.4 (result i32) - local.get $0 - local.set $5 - local.get $6 - local.set $8 - local.get $1 - local.set $9 - local.get $5 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - i32.load offset=8 - end - local.set $9 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 block (result i32) i32.const 2 global.set $~lib/argc - local.get $7 - local.get $9 - local.get $3 + local.get $4 + local.get $6 + local.get $2 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if local.get $0 - local.set $8 block (result i32) - local.get $6 - local.tee $5 + local.get $5 + local.tee $7 i32.const 1 i32.sub - local.set $6 - local.get $5 + local.set $5 + local.get $7 end i32.const 1 i32.add - local.set $5 - local.get $9 - local.set $10 - local.get $1 - local.set $11 - local.get $8 - local.get $5 i32.const 2 i32.shl i32.add - local.get $11 - i32.add - local.get $10 - i32.store offset=8 + local.get $6 + i32.store else br $break|1 end @@ -9757,59 +7659,44 @@ end end end - block $~lib/internal/arraybuffer/STORE,Array>|inlined.4 - local.get $0 - local.set $9 - local.get $6 - i32.const 1 - i32.add - local.set $11 - local.get $7 - local.set $10 - local.get $1 - local.set $5 - local.get $9 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - local.get $10 - i32.store offset=8 - end + local.get $0 + local.get $5 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $4 + i32.store end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 unreachable end unreachable end ) - (func $~lib/array/Array>#sort (; 146 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#sort (; 148 ;) (type $FUNCSIG$iii) (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 i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 488 + i32.const 347 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 local.get $2 i32.const 1 @@ -9819,129 +7706,64 @@ return end local.get $0 - i32.load + i32.load offset=4 local.set $3 local.get $2 i32.const 2 i32.eq if - block $~lib/internal/arraybuffer/LOAD,Array>|inlined.1 (result i32) - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - i32.load offset=8 - end - local.set $6 - block $~lib/internal/arraybuffer/LOAD,Array>|inlined.2 (result i32) - local.get $3 - local.set $5 - i32.const 0 - local.set $4 - i32.const 0 - local.set $7 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 + local.get $3 + i32.load offset=4 + local.set $4 + local.get $3 + i32.load + local.set $5 block (result i32) i32.const 2 global.set $~lib/argc - local.get $6 - local.get $7 + local.get $4 + local.get $5 local.get $1 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if - block $~lib/internal/arraybuffer/STORE,Array>|inlined.1 - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - local.get $7 - local.set $8 - i32.const 0 - local.set $9 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $8 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE,Array>|inlined.2 - local.get $3 - local.set $9 - i32.const 0 - local.set $8 - local.get $6 - local.set $5 - i32.const 0 - local.set $4 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - local.get $5 - i32.store offset=8 - end + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $4 + i32.store end local.get $0 return end - block $~lib/internal/sort/SORT>|inlined.0 + block $~lib/util/sort/SORT>|inlined.0 local.get $3 - local.set $7 - i32.const 0 - local.set $6 + local.set $5 local.get $2 local.set $4 local.get $1 - local.set $5 - local.get $7 - local.get $6 - local.get $4 + local.set $6 local.get $5 - call $~lib/internal/sort/insertionSort> + local.get $4 + local.get $6 + call $~lib/util/sort/insertionSort> end local.get $0 ) - (func $std/array/isSorted> (; 147 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted> (; 149 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) block $break|0 block i32.const 1 local.set $2 - block $~lib/array/Array>#get:length|inlined.3 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $0 + call $~lib/array/Array>#get:length local.set $3 end loop $repeat|0 @@ -9954,13 +7776,37 @@ i32.const 2 global.set $~lib/argc local.get $0 + local.tee $4 + i32.load offset=4 local.get $2 i32.const 1 i32.sub - call $~lib/array/Array>#__get + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load local.get $0 + local.tee $4 + i32.load offset=4 local.get $2 - call $~lib/array/Array>#__get + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load local.get $1 call_indirect (type $FUNCSIG$iii) end @@ -9981,7 +7827,7 @@ end i32.const 1 ) - (func $std/array/assertSorted> (; 148 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted> (; 150 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array>#sort @@ -9997,73 +7843,48 @@ unreachable end ) - (func $~lib/array/Array>#constructor (; 149 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#constructor (; 151 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 8 - i32.const 45 - i32.const 39 - call $~lib/env/abort - unreachable + local.get $0 + if (result i32) + local.get $0 + else + i32.const 16 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 12 + call $~lib/runtime/doRegister end local.get $1 i32.const 2 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block (result i32) - local.get $0 - i32.eqz - if - i32.const 8 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - end - local.get $3 - i32.store + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 + local.get $0 + i32.const 0 + i32.store offset=12 local.get $0 local.get $1 - i32.store offset=4 - block $~lib/memory/memory.fill|inlined.10 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end + i32.store offset=12 local.get $0 ) - (func $std/array/Proxy#constructor (; 150 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#get:length (; 152 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=12 + ) + (func $std/array/Proxy#constructor (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 i32.eqz if - i32.const 4 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER>|inlined.0 (result i32) + i32.const 4 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 13 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -10071,77 +7892,11 @@ i32.store local.get $0 ) - (func $~lib/array/Array>#__set (; 151 ;) (type $FUNCSIG$viii) (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 - i32.load - local.set $3 - local.get $3 - i32.load - i32.const 2 - i32.shr_u - local.set $4 - local.get $1 - local.get $4 - i32.ge_u - if - local.get $1 - i32.const 268435454 - i32.ge_u - if - i32.const 0 - i32.const 8 - i32.const 107 - i32.const 41 - call $~lib/env/abort - unreachable - end - local.get $3 - local.get $1 - i32.const 1 - i32.add - i32.const 2 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.set $3 - local.get $0 - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - end - block $~lib/internal/arraybuffer/STORE,Proxy>|inlined.0 - local.get $3 - local.set $5 - local.get $1 - local.set $6 - local.get $2 - local.set $7 - i32.const 0 - local.set $8 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - local.get $7 - i32.store offset=8 - end - ) - (func $std/array/createReverseOrderedElementsArray (; 152 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedElementsArray (; 154 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) i32.const 0 local.get $0 call $~lib/array/Array>#constructor @@ -10151,30 +7906,34 @@ local.set $2 loop $repeat|0 local.get $2 - block $~lib/array/Array>#get:length|inlined.1 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $1 + call $~lib/array/Array>#get:length i32.lt_s i32.eqz br_if $break|0 local.get $1 + local.tee $3 + i32.load offset=4 local.get $2 - i32.const 0 - block $~lib/array/Array>#get:length|inlined.2 (result i32) + i32.const 2 + i32.shl + i32.add + block $~lib/runtime/LINK,Array>>|inlined.0 (result i32) + i32.const 0 local.get $1 - local.set $3 + call $~lib/array/Array>#get:length + i32.const 1 + i32.sub + local.get $2 + i32.sub + call $std/array/Proxy#constructor + local.set $4 + local.get $4 local.get $3 - i32.load offset=4 + call $~lib/runtime/doLink + local.get $4 end - i32.const 1 - i32.sub - local.get $2 - i32.sub - call $std/array/Proxy#constructor - call $~lib/array/Array>#__set + i32.store local.get $2 i32.const 1 i32.add @@ -10186,114 +7945,81 @@ end local.get $1 ) - (func $start:std/array~anonymous|48 (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|48 (; 155 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.sub ) - (func $~lib/internal/sort/insertionSort> (; 154 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/util/sort/insertionSort> (; 156 ;) (type $FUNCSIG$viii) (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) block $break|0 i32.const 0 - local.set $4 + local.set $3 loop $repeat|0 - local.get $4 - local.get $2 + local.get $3 + local.get $1 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD,Proxy>|inlined.2 (result i32) - local.get $0 - local.set $5 - local.get $4 - local.set $6 - local.get $1 - local.set $7 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 - local.get $4 + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $4 + local.get $3 i32.const 1 i32.sub - local.set $6 + local.set $5 block $break|1 loop $continue|1 - local.get $6 + local.get $5 i32.const 0 i32.ge_s if block - block $~lib/internal/arraybuffer/LOAD,Proxy>|inlined.3 (result i32) - local.get $0 - local.set $5 - local.get $6 - local.set $8 - local.get $1 - local.set $9 - local.get $5 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - i32.load offset=8 - end - local.set $9 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 block (result i32) i32.const 2 global.set $~lib/argc - local.get $7 - local.get $9 - local.get $3 + local.get $4 + local.get $6 + local.get $2 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if local.get $0 - local.set $8 block (result i32) - local.get $6 - local.tee $5 + local.get $5 + local.tee $7 i32.const 1 i32.sub - local.set $6 - local.get $5 + local.set $5 + local.get $7 end i32.const 1 i32.add - local.set $5 - local.get $9 - local.set $10 - local.get $1 - local.set $11 - local.get $8 - local.get $5 i32.const 2 i32.shl i32.add - local.get $11 - i32.add - local.get $10 - i32.store offset=8 + local.get $6 + i32.store else br $break|1 end @@ -10302,59 +8028,44 @@ end end end - block $~lib/internal/arraybuffer/STORE,Proxy>|inlined.4 - local.get $0 - local.set $9 - local.get $6 - i32.const 1 - i32.add - local.set $11 - local.get $7 - local.set $10 - local.get $1 - local.set $5 - local.get $9 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - local.get $10 - i32.store offset=8 - end + local.get $0 + local.get $5 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $4 + i32.store end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 unreachable end unreachable end ) - (func $~lib/array/Array>#sort (; 155 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#sort (; 157 ;) (type $FUNCSIG$iii) (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 i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 488 + i32.const 347 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 local.get $2 i32.const 1 @@ -10364,162 +8075,64 @@ return end local.get $0 - i32.load + i32.load offset=4 local.set $3 local.get $2 i32.const 2 i32.eq if - block $~lib/internal/arraybuffer/LOAD,Proxy>|inlined.0 (result i32) - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - i32.load offset=8 - end - local.set $6 - block $~lib/internal/arraybuffer/LOAD,Proxy>|inlined.1 (result i32) - local.get $3 - local.set $5 - i32.const 0 - local.set $4 - i32.const 0 - local.set $7 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 + local.get $3 + i32.load offset=4 + local.set $4 + local.get $3 + i32.load + local.set $5 block (result i32) i32.const 2 global.set $~lib/argc - local.get $6 - local.get $7 + local.get $4 + local.get $5 local.get $1 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if - block $~lib/internal/arraybuffer/STORE,Proxy>|inlined.1 - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - local.get $7 - local.set $8 - i32.const 0 - local.set $9 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $8 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE,Proxy>|inlined.2 - local.get $3 - local.set $9 - i32.const 0 - local.set $8 - local.get $6 - local.set $5 - i32.const 0 - local.set $4 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - local.get $5 - i32.store offset=8 - end + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $4 + i32.store end local.get $0 return end - block $~lib/internal/sort/SORT>|inlined.0 + block $~lib/util/sort/SORT>|inlined.0 local.get $3 - local.set $7 - i32.const 0 - local.set $6 + local.set $5 local.get $2 local.set $4 local.get $1 - local.set $5 - local.get $7 - local.get $6 - local.get $4 + local.set $6 local.get $5 - call $~lib/internal/sort/insertionSort> + local.get $4 + local.get $6 + call $~lib/util/sort/insertionSort> end local.get $0 ) - (func $~lib/array/Array>#__get (; 156 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted> (; 158 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end - ) - (func $std/array/isSorted> (; 157 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) block $break|0 block i32.const 1 local.set $2 - block $~lib/array/Array>#get:length|inlined.3 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $0 + call $~lib/array/Array>#get:length local.set $3 end loop $repeat|0 @@ -10532,13 +8145,37 @@ i32.const 2 global.set $~lib/argc local.get $0 + local.tee $4 + i32.load offset=4 local.get $2 i32.const 1 i32.sub - call $~lib/array/Array>#__get + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load local.get $0 + local.tee $4 + i32.load offset=4 local.get $2 - call $~lib/array/Array>#__get + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load local.get $1 call_indirect (type $FUNCSIG$iii) end @@ -10559,7 +8196,7 @@ end i32.const 1 ) - (func $std/array/assertSorted> (; 158 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted> (; 159 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array>#sort @@ -10575,107 +8212,74 @@ unreachable end ) - (func $~lib/internal/sort/insertionSort (; 159 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/util/sort/insertionSort (; 160 ;) (type $FUNCSIG$viii) (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) block $break|0 i32.const 0 - local.set $4 + local.set $3 loop $repeat|0 - local.get $4 - local.get $2 + local.get $3 + local.get $1 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $0 - local.set $5 - local.get $4 - local.set $6 - local.get $1 - local.set $7 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 - local.get $4 + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $4 + local.get $3 i32.const 1 i32.sub - local.set $6 + local.set $5 block $break|1 loop $continue|1 - local.get $6 + local.get $5 i32.const 0 i32.ge_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i32) - local.get $0 - local.set $5 - local.get $6 - local.set $8 - local.get $1 - local.set $9 - local.get $5 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - i32.load offset=8 - end - local.set $9 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 block (result i32) i32.const 2 global.set $~lib/argc - local.get $7 - local.get $9 - local.get $3 + local.get $4 + local.get $6 + local.get $2 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if local.get $0 - local.set $8 block (result i32) - local.get $6 - local.tee $5 + local.get $5 + local.tee $7 i32.const 1 i32.sub - local.set $6 - local.get $5 + local.set $5 + local.get $7 end i32.const 1 i32.add - local.set $5 - local.get $9 - local.set $10 - local.get $1 - local.set $11 - local.get $8 - local.get $5 i32.const 2 i32.shl i32.add - local.get $11 - i32.add - local.get $10 - i32.store offset=8 + local.get $6 + i32.store else br $break|1 end @@ -10684,59 +8288,44 @@ end end end - block $~lib/internal/arraybuffer/STORE|inlined.3 - local.get $0 - local.set $9 - local.get $6 - i32.const 1 - i32.add - local.set $11 - local.get $7 - local.set $10 - local.get $1 - local.set $5 - local.get $9 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - local.get $10 - i32.store offset=8 - end + local.get $0 + local.get $5 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $4 + i32.store end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 unreachable end unreachable end ) - (func $~lib/array/Array#sort (; 160 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 161 ;) (type $FUNCSIG$iii) (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 i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 488 + i32.const 347 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 local.get $2 i32.const 1 @@ -10746,162 +8335,68 @@ return end local.get $0 - i32.load + i32.load offset=4 local.set $3 local.get $2 i32.const 2 i32.eq if - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - i32.load offset=8 - end - local.set $6 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $3 - local.set $5 - i32.const 0 - local.set $4 - i32.const 0 - local.set $7 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 + local.get $3 + i32.load offset=4 + local.set $4 + local.get $3 + i32.load + local.set $5 block (result i32) i32.const 2 global.set $~lib/argc - local.get $6 - local.get $7 + local.get $4 + local.get $5 local.get $1 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - local.get $7 - local.set $8 - i32.const 0 - local.set $9 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $8 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.1 - local.get $3 - local.set $9 - i32.const 0 - local.set $8 - local.get $6 - local.set $5 - i32.const 0 - local.set $4 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - local.get $5 - i32.store offset=8 - end + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $4 + i32.store end local.get $0 return end - block $~lib/internal/sort/SORT|inlined.0 + block $~lib/util/sort/SORT|inlined.0 local.get $3 - local.set $7 - i32.const 0 - local.set $6 + local.set $5 local.get $2 local.set $4 local.get $1 - local.set $5 - local.get $7 - local.get $6 - local.get $4 + local.set $6 local.get $5 - call $~lib/internal/sort/insertionSort + local.get $4 + local.get $6 + call $~lib/util/sort/insertionSort end local.get $0 ) - (func $~lib/array/Array#__get (; 161 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#get:length (; 162 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=12 + ) + (func $std/array/isSorted (; 163 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end - ) - (func $std/array/isSorted (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) block $break|0 block i32.const 1 local.set $2 - block $~lib/array/Array#get:length|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $0 + call $~lib/array/Array#get:length local.set $3 end loop $repeat|0 @@ -10914,13 +8409,37 @@ i32.const 2 global.set $~lib/argc local.get $0 + local.tee $4 + i32.load offset=4 local.get $2 i32.const 1 i32.sub - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load local.get $0 + local.tee $4 + i32.load offset=4 local.get $2 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load local.get $1 call_indirect (type $FUNCSIG$iii) end @@ -10941,7 +8460,7 @@ end i32.const 1 ) - (func $std/array/assertSorted (; 163 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 164 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array#sort @@ -10957,7 +8476,15 @@ unreachable end ) - (func $~lib/internal/string/compareUnsafe (; 164 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (func $~lib/string/String#get:length (; 165 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + ) + (func $~lib/util/string/compareImpl (; 166 ;) (type $FUNCSIG$iiiiii) (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) @@ -10980,9 +8507,9 @@ local.get $4 if (result i32) local.get $6 - i32.load16_u offset=4 + i32.load16_u local.get $7 - i32.load16_u offset=4 + i32.load16_u i32.sub local.tee $5 i32.eqz @@ -11010,7 +8537,7 @@ end local.get $5 ) - (func $~lib/internal/sort/COMPARATOR~anonymous|0 (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 167 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11039,10 +8566,10 @@ return end local.get $0 - i32.load + call $~lib/string/String#get:length local.set $3 local.get $1 - i32.load + call $~lib/string/String#get:length local.set $4 local.get $3 i32.eqz @@ -11081,9 +8608,9 @@ local.get $5 i32.lt_s select - call $~lib/internal/string/compareUnsafe + call $~lib/util/string/compareImpl ) - (func $std/array/assertSorted|trampoline (; 166 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted|trampoline (; 168 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) block $1of1 block $0of1 block $outOfRange @@ -11094,9 +8621,9 @@ end unreachable end - block $~lib/internal/sort/COMPARATOR|inlined.0 (result i32) + block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) i32.const 55 - br $~lib/internal/sort/COMPARATOR|inlined.0 + br $~lib/util/sort/COMPARATOR|inlined.0 end local.set $1 end @@ -11104,7 +8631,7 @@ local.get $1 call $std/array/assertSorted ) - (func $~lib/string/String.__eq (; 167 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.eq (; 169 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -11130,11 +8657,11 @@ return end local.get $0 - i32.load + call $~lib/string/String#get:length local.set $3 local.get $3 local.get $1 - i32.load + call $~lib/string/String#get:length i32.ne if i32.const 0 @@ -11145,34 +8672,28 @@ local.get $1 i32.const 0 local.get $3 - call $~lib/internal/string/compareUnsafe + call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String.__ne (; 168 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.ne (; 170 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 - call $~lib/string/String.__eq + call $~lib/string/String.eq i32.eqz ) - (func $std/array/isArraysEqual (; 169 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 171 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $2 i32.eqz if - block $~lib/array/Array#get:length|inlined.1 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $0 + call $~lib/array/Array#get:length local.set $2 local.get $2 - block $~lib/array/Array#get:length|inlined.3 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $1 + call $~lib/array/Array#get:length i32.ne if i32.const 0 @@ -11196,12 +8717,36 @@ i32.eqz br_if $break|0 local.get $0 + local.tee $4 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load local.get $1 + local.tee $4 + i32.load offset=4 local.get $3 - call $~lib/array/Array#__get - call $~lib/string/String.__ne + i32.const 2 + i32.shl + local.tee $5 + i32.add + i32.const -1 + local.get $5 + local.get $4 + i32.load offset=8 + i32.lt_u + select + i32.load + call $~lib/string/String.ne if i32.const 0 return @@ -11217,184 +8762,91 @@ end i32.const 1 ) - (func $~lib/array/Array#constructor (; 170 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 172 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 8 - i32.const 45 - i32.const 39 - call $~lib/env/abort - unreachable + local.get $0 + if (result i32) + local.get $0 + else + i32.const 16 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 14 + call $~lib/runtime/doRegister end local.get $1 i32.const 2 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block (result i32) - local.get $0 - i32.eqz - if - i32.const 8 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - end - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - block $~lib/memory/memory.fill|inlined.11 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - local.get $0 - ) - (func $~lib/internal/string/allocateUnsafe (; 171 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 local.get $0 i32.const 0 - i32.gt_s - local.tee $1 - if (result i32) - local.get $0 - i32.const 536870910 - i32.le_s - else - local.get $1 - end - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 14 - i32.const 2 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.allocate|inlined.5 (result i32) - i32.const 4 - local.get $0 - i32.const 1 - i32.shl - i32.add - local.set $1 - local.get $1 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.5 - end - local.set $2 - local.get $2 + i32.store offset=12 + local.get $0 + local.get $1 + i32.store offset=12 local.get $0 - i32.store - local.get $2 ) - (func $~lib/string/String#charAt (; 172 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#charAt (; 173 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) local.get $0 i32.const 0 i32.ne i32.eqz if i32.const 0 - i32.const 4056 - i32.const 58 + i32.const 3400 + i32.const 36 i32.const 4 call $~lib/env/abort unreachable end local.get $1 local.get $0 - i32.load + call $~lib/string/String#get:length i32.ge_u if - i32.const 3904 + i32.const 3264 return end - i32.const 1 - call $~lib/internal/string/allocateUnsafe - local.set $2 - local.get $2 - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_u offset=4 - i32.store16 offset=4 - local.get $2 - ) - (func $~lib/internal/string/copyUnsafe (; 173 ;) (type $FUNCSIG$viiiii) (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.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 4 - i32.add - local.set $5 - local.get $2 + block $~lib/runtime/ALLOCATE|inlined.1 (result i32) + i32.const 2 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end + local.set $3 local.get $3 + local.get $0 + local.get $1 i32.const 1 i32.shl i32.add - i32.const 4 - i32.add - local.set $6 - local.get $4 - i32.const 1 - i32.shl - local.set $7 - local.get $5 - local.get $6 - local.get $7 - call $~lib/internal/memory/memmove + i32.load16_u + i32.store16 + block $~lib/runtime/REGISTER|inlined.0 (result i32) + local.get $3 + local.set $2 + local.get $2 + i32.const 1 + call $~lib/runtime/doRegister + end ) (func $~lib/string/String#concat (; 174 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) local.get $0 i32.const 0 i32.ne i32.eqz if i32.const 0 - i32.const 4056 - i32.const 110 + i32.const 3400 + i32.const 65 i32.const 4 call $~lib/env/abort unreachable @@ -11403,14 +8855,18 @@ i32.const 0 i32.eq if - i32.const 4144 + i32.const 3440 local.set $1 end local.get $0 - i32.load + call $~lib/string/String#get:length + i32.const 1 + i32.shl local.set $2 local.get $1 - i32.load + call $~lib/string/String#get:length + i32.const 1 + i32.shl local.set $3 local.get $2 local.get $3 @@ -11420,31 +8876,39 @@ i32.const 0 i32.eq if - i32.const 3904 + i32.const 3264 return end - local.get $4 - call $~lib/internal/string/allocateUnsafe - local.set $5 - local.get $5 - i32.const 0 + block $~lib/runtime/ALLOCATE|inlined.2 (result i32) + local.get $4 + local.set $5 + local.get $5 + call $~lib/runtime/doAllocate + end + local.set $6 + local.get $6 local.get $0 - i32.const 0 local.get $2 - call $~lib/internal/string/copyUnsafe - local.get $5 + call $~lib/memory/memory.copy + local.get $6 local.get $2 + i32.add local.get $1 - i32.const 0 local.get $3 - call $~lib/internal/string/copyUnsafe - local.get $5 + call $~lib/memory/memory.copy + block $~lib/runtime/REGISTER|inlined.1 (result i32) + local.get $6 + local.set $5 + local.get $5 + i32.const 1 + call $~lib/runtime/doRegister + end ) - (func $~lib/string/String.__concat (; 175 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.concat (; 175 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.eqz if - i32.const 4144 + i32.const 3440 local.set $0 end local.get $0 @@ -11455,7 +8919,7 @@ (local $1 i32) (local $2 i32) (local $3 f64) - i32.const 3904 + i32.const 3264 local.set $1 block $break|0 i32.const 0 @@ -11471,7 +8935,7 @@ block $~lib/math/NativeMath.floor|inlined.0 (result f64) call $~lib/math/NativeMath.random global.get $std/array/charset - i32.load + call $~lib/string/String#get:length f64.convert_i32_s f64.mul local.set $3 @@ -11480,7 +8944,7 @@ end i32.trunc_f64_s call $~lib/string/String#charAt - call $~lib/string/String.__concat + call $~lib/string/String.concat local.set $1 local.get $2 i32.const 1 @@ -11493,77 +8957,11 @@ end local.get $1 ) - (func $~lib/array/Array#__set (; 177 ;) (type $FUNCSIG$viii) (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 - i32.load - local.set $3 - local.get $3 - i32.load - i32.const 2 - i32.shr_u - local.set $4 - local.get $1 - local.get $4 - i32.ge_u - if - local.get $1 - i32.const 268435454 - i32.ge_u - if - i32.const 0 - i32.const 8 - i32.const 107 - i32.const 41 - call $~lib/env/abort - unreachable - end - local.get $3 - local.get $1 - i32.const 1 - i32.add - i32.const 2 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.set $3 - local.get $0 - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - end - block $~lib/internal/arraybuffer/STORE|inlined.4 - local.get $3 - local.set $5 - local.get $1 - local.set $6 - local.get $2 - local.set $7 - i32.const 0 - local.set $8 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - local.get $7 - i32.store offset=8 - end - ) - (func $std/array/createRandomStringArray (; 178 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomStringArray (; 177 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) i32.const 0 local.get $0 call $~lib/array/Array#constructor @@ -11573,23 +8971,31 @@ local.set $2 loop $repeat|0 local.get $2 - block $~lib/array/Array#get:length|inlined.5 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $1 + call $~lib/array/Array#get:length i32.lt_s i32.eqz br_if $break|0 local.get $1 + local.tee $3 + i32.load offset=4 local.get $2 - call $~lib/math/NativeMath.random - f64.const 32 - f64.mul - i32.trunc_f64_s - call $std/array/createRandomString - call $~lib/array/Array#__set + i32.const 2 + i32.shl + i32.add + block $~lib/runtime/LINK>|inlined.0 (result i32) + call $~lib/math/NativeMath.random + f64.const 32 + f64.mul + i32.trunc_f64_s + call $std/array/createRandomString + local.set $4 + local.get $4 + local.get $3 + call $~lib/runtime/doLink + local.get $4 + end + i32.store local.get $2 i32.const 1 i32.add @@ -11601,7 +9007,7 @@ end local.get $1 ) - (func $~lib/string/String#substring (; 179 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 178 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -11616,14 +9022,14 @@ i32.eqz if i32.const 0 - i32.const 4056 - i32.const 249 + i32.const 3400 + i32.const 190 i32.const 4 call $~lib/env/abort unreachable end local.get $0 - i32.load + call $~lib/string/String#get:length local.set $3 local.get $1 local.tee $4 @@ -11665,6 +9071,8 @@ local.get $5 i32.lt_s select + i32.const 1 + i32.shl local.set $8 local.get $6 local.tee $4 @@ -11674,6 +9082,8 @@ local.get $5 i32.gt_s select + i32.const 1 + i32.shl local.set $9 local.get $9 local.get $8 @@ -11682,7 +9092,7 @@ local.get $3 i32.eqz if - i32.const 3904 + i32.const 3264 return end local.get $8 @@ -11691,7 +9101,9 @@ if (result i32) local.get $9 local.get $0 - i32.load + call $~lib/string/String#get:length + i32.const 1 + i32.shl i32.eq else local.get $4 @@ -11700,18 +9112,36 @@ local.get $0 return end - local.get $3 - call $~lib/internal/string/allocateUnsafe + block $~lib/runtime/ALLOCATE|inlined.4 (result i32) + local.get $3 + local.set $4 + local.get $4 + call $~lib/runtime/doAllocate + end local.set $10 local.get $10 - i32.const 0 local.get $0 local.get $8 + i32.add local.get $3 - call $~lib/internal/string/copyUnsafe - local.get $10 + call $~lib/memory/memory.copy + block $~lib/runtime/REGISTER|inlined.2 (result i32) + local.get $10 + local.set $4 + local.get $4 + i32.const 1 + call $~lib/runtime/doRegister + end ) - (func $~lib/array/Array#join (; 180 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/doDiscard (; 179 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + call $~lib/memory/memory.free + ) + (func $~lib/array/Array#join_bool (; 180 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11722,12 +9152,8 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -11735,210 +9161,180 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - i32.const 4184 - i32.const 4200 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $10 - i32.add - i32.load8_u offset=8 - end + i32.const 3472 + i32.const 3488 + local.get $3 + i32.load8_u i32.const 0 i32.ne select return end + local.get $1 + call $~lib/string/String#get:length + local.set $4 i32.const 5 - local.set $10 - local.get $10 - local.get $6 + local.set $5 + local.get $5 + local.get $4 i32.add local.get $2 i32.mul - local.get $10 + local.get $5 i32.add - local.set $9 - local.get $9 - call $~lib/internal/string/allocateUnsafe + local.set $6 + block $~lib/runtime/ALLOCATE|inlined.3 (result i32) + local.get $6 + i32.const 1 + i32.shl + local.set $7 + local.get $7 + call $~lib/runtime/doAllocate + end local.set $8 i32.const 0 - local.set $11 + local.set $9 block $break|0 i32.const 0 - local.set $12 + local.set $7 loop $repeat|0 - local.get $12 + local.get $7 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $5 - local.set $13 - local.get $12 - local.set $14 - i32.const 0 - local.set $15 - local.get $13 - local.get $14 - i32.const 0 - i32.shl - i32.add - local.get $15 - i32.add - i32.load8_u offset=8 - end - local.set $4 + local.get $3 + local.get $7 + i32.add + i32.load8_u + local.set $10 i32.const 4 - local.get $4 + local.get $10 i32.const 0 i32.ne i32.eqz i32.add - local.set $10 + local.set $5 local.get $8 - local.get $11 - i32.const 4184 - i32.const 4200 - local.get $4 + local.get $9 + i32.const 1 + i32.shl + i32.add + i32.const 3472 + i32.const 3488 + local.get $10 i32.const 0 i32.ne select - i32.const 0 - local.get $10 - call $~lib/internal/string/copyUnsafe - local.get $11 - local.get $10 + local.get $5 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $9 + local.get $5 i32.add - local.set $11 - local.get $7 + local.set $9 + local.get $4 if local.get $8 - local.get $11 - local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe - local.get $11 - local.get $6 + local.get $9 + i32.const 1 + i32.shl i32.add - local.set $11 + local.get $1 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $9 + local.get $4 + i32.add + local.set $9 end end - local.get $12 + local.get $7 i32.const 1 i32.add - local.set $12 + local.set $7 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $5 - local.set $12 - local.get $2 - local.set $15 - i32.const 0 - local.set $14 - local.get $12 - local.get $15 - i32.const 0 - i32.shl - i32.add - local.get $14 - i32.add - i32.load8_u offset=8 - end - local.set $4 + local.get $3 + local.get $2 + i32.add + i32.load8_u + local.set $10 i32.const 4 - local.get $4 + local.get $10 i32.const 0 i32.ne i32.eqz i32.add - local.set $10 + local.set $5 local.get $8 - local.get $11 - i32.const 4184 - i32.const 4200 - local.get $4 + local.get $9 + i32.const 1 + i32.shl + i32.add + i32.const 3472 + i32.const 3488 + local.get $10 i32.const 0 i32.ne select - i32.const 0 - local.get $10 - call $~lib/internal/string/copyUnsafe - local.get $11 - local.get $10 - i32.add - local.set $11 - local.get $8 - local.set $14 + local.get $5 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $9 + local.get $5 + i32.add + local.set $9 + local.get $6 local.get $9 - local.get $11 i32.gt_s if local.get $8 i32.const 0 - local.get $11 + local.get $9 call $~lib/string/String#substring - local.set $14 - block $~lib/internal/string/freeUnsafe|inlined.0 + local.set $7 + block $~lib/runtime/DISCARD|inlined.0 local.get $8 - local.set $15 - local.get $15 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.5 - local.get $15 - local.set $12 - local.get $12 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.5 - end + local.set $11 + local.get $11 + call $~lib/runtime/doDiscard end + local.get $7 + return end - local.get $14 + block $~lib/runtime/REGISTER|inlined.3 (result i32) + local.get $8 + local.set $7 + local.get $7 + i32.const 1 + call $~lib/runtime/doRegister + end + ) + (func $~lib/array/Array#join (; 181 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_bool return ) - (func $~lib/internal/number/decimalCount32 (; 181 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 182 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 100000 @@ -12007,19 +9403,16 @@ unreachable unreachable ) - (func $~lib/internal/number/utoa32_lut (; 182 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 183 ;) (type $FUNCSIG$viii) (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 i64) - (local $12 i64) - i32.const 4832 - i32.load + (local $8 i64) + (local $9 i64) + i32.const 4024 + i32.load offset=4 local.set $3 block $break|0 loop $continue|0 @@ -12046,40 +9439,20 @@ i32.const 100 i32.rem_u local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i64) - local.get $3 - local.set $8 - local.get $6 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i64.load32_u offset=8 - end - local.set $11 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i64) - local.get $3 - local.set $10 - local.get $7 - local.set $9 - i32.const 0 - local.set $8 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i64.load32_u offset=8 - end - local.set $12 + local.get $3 + local.get $6 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $8 + local.get $3 + local.get $7 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $9 local.get $2 i32.const 4 i32.sub @@ -12089,12 +9462,12 @@ i32.const 1 i32.shl i32.add - local.get $11 - local.get $12 + local.get $8 + local.get $9 i64.const 32 i64.shl i64.or - i64.store offset=4 + i64.store end br $continue|0 end @@ -12118,30 +9491,20 @@ i32.const 2 i32.sub local.set $2 - block $~lib/internal/arraybuffer/LOAD|inlined.13 (result i32) - local.get $3 - local.set $5 - local.get $6 - local.set $4 - i32.const 0 - local.set $8 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.set $8 + local.get $3 + local.get $6 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $5 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $8 - i32.store offset=4 + local.get $5 + i32.store end local.get $1 i32.const 10 @@ -12151,30 +9514,20 @@ i32.const 2 i32.sub local.set $2 - block $~lib/internal/arraybuffer/LOAD|inlined.14 (result i32) - local.get $3 - local.set $8 - local.get $1 - local.set $6 - i32.const 0 - local.set $7 - local.get $8 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 + local.get $3 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $5 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $7 - i32.store offset=4 + local.get $5 + i32.store else local.get $2 i32.const 1 @@ -12183,17 +9536,17 @@ i32.const 48 local.get $1 i32.add - local.set $7 + local.set $5 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $7 - i32.store16 offset=4 + local.get $5 + i32.store16 end ) - (func $~lib/internal/number/itoa32 (; 183 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 184 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12203,7 +9556,7 @@ local.get $0 i32.eqz if - i32.const 4312 + i32.const 3600 return end local.get $0 @@ -12218,39 +9571,51 @@ local.set $0 end local.get $0 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $1 i32.add local.set $2 - local.get $2 - call $~lib/internal/string/allocateUnsafe - local.set $3 - block $~lib/internal/number/utoa32_core|inlined.0 + block $~lib/runtime/ALLOCATE|inlined.5 (result i32) + local.get $2 + i32.const 1 + i32.shl + local.set $3 local.get $3 - local.set $4 + call $~lib/runtime/doAllocate + end + local.set $4 + block $~lib/util/number/utoa32_core|inlined.0 + local.get $4 + local.set $3 local.get $0 local.set $5 local.get $2 local.set $6 - local.get $4 + local.get $3 local.get $5 local.get $6 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end local.get $1 if - local.get $3 + local.get $4 i32.const 45 - i32.store16 offset=4 + i32.store16 + end + block $~lib/runtime/REGISTER|inlined.4 (result i32) + local.get $4 + local.set $6 + local.get $6 + i32.const 1 + call $~lib/runtime/doRegister end - local.get $3 ) - (func $~lib/internal/number/itoa (; 184 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 185 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/internal/number/itoa32 + call $~lib/util/number/itoa32 return ) - (func $~lib/internal/number/itoa_stream (; 185 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 186 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12267,7 +9632,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -12285,11 +9650,11 @@ local.set $2 end local.get $2 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $4 i32.add local.set $3 - block $~lib/internal/number/utoa32_core|inlined.1 + block $~lib/util/number/utoa32_core|inlined.1 local.get $0 local.set $5 local.get $2 @@ -12299,17 +9664,17 @@ local.get $5 local.get $6 local.get $7 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end local.get $4 if local.get $0 i32.const 45 - i32.store16 offset=4 + i32.store16 end local.get $3 ) - (func $~lib/array/Array#join (; 186 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 187 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12319,12 +9684,8 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -12332,174 +9693,140 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD|inlined.34 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - call $~lib/internal/number/itoa + local.get $3 + i32.load + call $~lib/util/number/itoa return end + local.get $1 + call $~lib/string/String#get:length + local.set $4 i32.const 11 - local.get $6 + local.get $4 i32.add local.get $2 i32.mul i32.const 11 i32.add - local.set $10 - local.get $10 - call $~lib/internal/string/allocateUnsafe - local.set $9 + local.set $5 + block $~lib/runtime/ALLOCATE|inlined.6 (result i32) + local.get $5 + i32.const 1 + i32.shl + local.set $6 + local.get $6 + call $~lib/runtime/doAllocate + end + local.set $7 i32.const 0 local.set $8 block $break|0 i32.const 0 - local.set $11 + local.set $6 loop $repeat|0 - local.get $11 + local.get $6 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.35 (result i32) - local.get $5 - local.set $12 - local.get $11 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - i32.load offset=8 - end - local.set $4 + local.get $3 + local.get $6 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $9 + local.get $8 + local.get $7 local.get $8 local.get $9 - local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + call $~lib/util/number/itoa_stream i32.add local.set $8 - local.get $7 + local.get $4 if - local.get $9 + local.get $7 local.get $8 + i32.const 1 + i32.shl + i32.add local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $8 - local.get $6 + local.get $4 i32.add local.set $8 end end - local.get $11 + local.get $6 i32.const 1 i32.add - local.set $11 + local.set $6 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.36 (result i32) - local.get $5 - local.set $11 - local.get $2 - local.set $14 - i32.const 0 - local.set $13 - local.get $11 - local.get $14 - i32.const 2 - i32.shl - i32.add - local.get $13 - i32.add - i32.load offset=8 - end - local.set $4 + local.get $3 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $9 + local.get $8 + local.get $7 local.get $8 local.get $9 - local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + call $~lib/util/number/itoa_stream i32.add local.set $8 - local.get $9 - local.set $13 - local.get $10 + local.get $5 local.get $8 i32.gt_s if - local.get $9 + local.get $7 i32.const 0 local.get $8 call $~lib/string/String#substring - local.set $13 - block $~lib/internal/string/freeUnsafe|inlined.1 - local.get $9 - local.set $14 - local.get $14 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.6 - local.get $14 - local.set $11 - local.get $11 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.6 - end + local.set $6 + block $~lib/runtime/DISCARD|inlined.1 + local.get $7 + local.set $10 + local.get $10 + call $~lib/runtime/doDiscard end + local.get $6 + return end - local.get $13 + block $~lib/runtime/REGISTER|inlined.5 (result i32) + local.get $7 + local.set $6 + local.get $6 + i32.const 1 + call $~lib/runtime/doRegister + end + ) + (func $~lib/array/Array#join (; 188 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_int return ) - (func $~lib/internal/number/utoa32 (; 187 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 189 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12508,35 +9835,47 @@ local.get $0 i32.eqz if - i32.const 4312 + i32.const 3600 return end local.get $0 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $1 - local.get $1 - call $~lib/internal/string/allocateUnsafe - local.set $2 - block $~lib/internal/number/utoa32_core|inlined.2 + block $~lib/runtime/ALLOCATE|inlined.7 (result i32) + local.get $1 + i32.const 1 + i32.shl + local.set $2 local.get $2 - local.set $3 + call $~lib/runtime/doAllocate + end + local.set $3 + block $~lib/util/number/utoa32_core|inlined.2 + local.get $3 + local.set $2 local.get $0 local.set $4 local.get $1 local.set $5 - local.get $3 + local.get $2 local.get $4 local.get $5 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut + end + block $~lib/runtime/REGISTER|inlined.6 (result i32) + local.get $3 + local.set $5 + local.get $5 + i32.const 1 + call $~lib/runtime/doRegister end - local.get $2 ) - (func $~lib/internal/number/itoa (; 188 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 190 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/internal/number/utoa32 + call $~lib/util/number/utoa32 return ) - (func $~lib/internal/number/itoa_stream (; 189 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 191 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12552,16 +9891,16 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end i32.const 0 local.set $3 local.get $2 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $3 - block $~lib/internal/number/utoa32_core|inlined.3 + block $~lib/util/number/utoa32_core|inlined.3 local.get $0 local.set $4 local.get $2 @@ -12571,11 +9910,11 @@ local.get $4 local.get $5 local.get $6 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end local.get $3 ) - (func $~lib/array/Array#join (; 190 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 192 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12585,12 +9924,8 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -12598,181 +9933,147 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD|inlined.15 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - call $~lib/internal/number/itoa + local.get $3 + i32.load + call $~lib/util/number/itoa return end + local.get $1 + call $~lib/string/String#get:length + local.set $4 i32.const 10 - local.get $6 + local.get $4 i32.add local.get $2 i32.mul i32.const 10 i32.add - local.set $10 - local.get $10 - call $~lib/internal/string/allocateUnsafe - local.set $9 + local.set $5 + block $~lib/runtime/ALLOCATE|inlined.8 (result i32) + local.get $5 + i32.const 1 + i32.shl + local.set $6 + local.get $6 + call $~lib/runtime/doAllocate + end + local.set $7 i32.const 0 local.set $8 block $break|0 i32.const 0 - local.set $11 + local.set $6 loop $repeat|0 - local.get $11 + local.get $6 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.16 (result i32) - local.get $5 - local.set $12 - local.get $11 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - i32.load offset=8 - end - local.set $4 + local.get $3 + local.get $6 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $9 + local.get $8 + local.get $7 local.get $8 local.get $9 - local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + call $~lib/util/number/itoa_stream i32.add local.set $8 - local.get $7 + local.get $4 if - local.get $9 + local.get $7 local.get $8 + i32.const 1 + i32.shl + i32.add local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $8 - local.get $6 + local.get $4 i32.add local.set $8 end end - local.get $11 + local.get $6 i32.const 1 i32.add - local.set $11 + local.set $6 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.17 (result i32) - local.get $5 - local.set $11 - local.get $2 - local.set $14 - i32.const 0 - local.set $13 - local.get $11 - local.get $14 - i32.const 2 - i32.shl - i32.add - local.get $13 - i32.add - i32.load offset=8 - end - local.set $4 + local.get $3 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $9 + local.get $8 + local.get $7 local.get $8 local.get $9 - local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + call $~lib/util/number/itoa_stream i32.add local.set $8 - local.get $9 - local.set $13 - local.get $10 + local.get $5 local.get $8 i32.gt_s if - local.get $9 + local.get $7 i32.const 0 local.get $8 call $~lib/string/String#substring - local.set $13 - block $~lib/internal/string/freeUnsafe|inlined.2 - local.get $9 - local.set $14 - local.get $14 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.7 - local.get $14 - local.set $11 - local.get $11 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.7 - end + local.set $6 + block $~lib/runtime/DISCARD|inlined.2 + local.get $7 + local.set $10 + local.get $10 + call $~lib/runtime/doDiscard end + local.get $6 + return end - local.get $13 + block $~lib/runtime/REGISTER|inlined.7 (result i32) + local.get $7 + local.set $6 + local.get $6 + i32.const 1 + call $~lib/runtime/doRegister + end + ) + (func $~lib/array/Array#join (; 193 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_int return ) - (func $~lib/builtins/isFinite (; 191 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 194 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/internal/number/genDigits (; 192 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 195 ;) (type $FUNCSIG$iijijiji) (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) @@ -12789,11 +10090,11 @@ (local $20 i32) (local $21 i64) (local $22 i64) - (local $23 i32) - (local $24 i32) + (local $23 i64) + (local $24 i64) (local $25 i32) - (local $26 i64) - (local $27 i64) + (local $26 i32) + (local $27 i32) i32.const 0 local.get $4 i32.sub @@ -12824,12 +10125,12 @@ i64.and local.set $13 local.get $12 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $14 local.get $6 local.set $15 - i32.const 6616 - i32.load + i32.const 5408 + i32.load offset=4 local.set $16 block $break|0 loop $continue|0 @@ -13059,7 +10360,7 @@ i32.const 65535 i32.and i32.add - i32.store16 offset=4 + i32.store16 end local.get $14 i32.const 1 @@ -13077,11 +10378,11 @@ local.get $5 i64.le_u if - global.get $~lib/internal/number/_K + global.get $~lib/util/number/_K local.get $14 i32.add - global.set $~lib/internal/number/_K - block $~lib/internal/number/grisuRound|inlined.0 + global.set $~lib/util/number/_K + block $~lib/util/number/grisuRound|inlined.0 local.get $0 local.set $18 local.get $15 @@ -13090,28 +10391,18 @@ local.set $21 local.get $19 local.set $22 - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i64) - local.get $16 - local.set $23 - local.get $14 - local.set $24 - i32.const 0 - local.set $25 - local.get $23 - local.get $24 - i32.const 2 - i32.shl - i32.add - local.get $25 - i32.add - i64.load32_u offset=8 - end + local.get $16 + local.get $14 + i32.const 2 + i32.shl + i32.add + i64.load32_u local.get $7 i64.extend_i32_s i64.shl - local.set $26 + local.set $23 local.get $10 - local.set $27 + local.set $24 local.get $18 local.get $20 i32.const 1 @@ -13121,55 +10412,55 @@ i32.add local.set $25 local.get $25 - i32.load16_u offset=4 - local.set $24 + i32.load16_u + local.set $26 block $break|2 loop $continue|2 local.get $22 - local.get $27 + local.get $24 i64.lt_u - local.tee $23 + local.tee $27 if (result i32) local.get $21 local.get $22 i64.sub - local.get $26 + local.get $23 i64.ge_u else - local.get $23 + local.get $27 end - local.tee $23 + local.tee $27 if (result i32) local.get $22 - local.get $26 + local.get $23 i64.add - local.get $27 + local.get $24 i64.lt_u - local.tee $23 + local.tee $27 if (result i32) - local.get $23 - else local.get $27 + else + local.get $24 local.get $22 i64.sub local.get $22 - local.get $26 + local.get $23 i64.add - local.get $27 + local.get $24 i64.sub i64.gt_u end else - local.get $23 + local.get $27 end if block - local.get $24 + local.get $26 i32.const 1 i32.sub - local.set $24 + local.set $26 local.get $22 - local.get $26 + local.get $23 i64.add local.set $22 end @@ -13178,8 +10469,8 @@ end end local.get $25 - local.get $24 - i32.store16 offset=4 + local.get $26 + i32.store16 end local.get $15 return @@ -13232,7 +10523,7 @@ i32.const 65535 i32.and i32.add - i32.store16 offset=4 + i32.store16 end local.get $13 local.get $9 @@ -13246,64 +10537,54 @@ local.get $5 i64.lt_u if - global.get $~lib/internal/number/_K + global.get $~lib/util/number/_K local.get $14 i32.add - global.set $~lib/internal/number/_K + global.set $~lib/util/number/_K local.get $10 - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i64) - local.get $16 - local.set $17 - i32.const 0 - local.get $14 - i32.sub - local.set $24 - i32.const 0 - local.set $25 - local.get $17 - local.get $24 - i32.const 2 - i32.shl - i32.add - local.get $25 - i32.add - i64.load32_u offset=8 - end + local.get $16 + i32.const 0 + local.get $14 + i32.sub + i32.const 2 + i32.shl + i32.add + i64.load32_u i64.mul local.set $10 - block $~lib/internal/number/grisuRound|inlined.1 + block $~lib/util/number/grisuRound|inlined.1 local.get $0 - local.set $25 + local.set $17 local.get $15 - local.set $24 - local.get $5 - local.set $27 - local.get $13 local.set $26 + local.get $5 + local.set $24 + local.get $13 + local.set $23 local.get $8 local.set $22 local.get $10 local.set $21 - local.get $25 - local.get $24 + local.get $17 + local.get $26 i32.const 1 i32.sub i32.const 1 i32.shl i32.add - local.set $17 - local.get $17 - i32.load16_u offset=4 + local.set $25 + local.get $25 + i32.load16_u local.set $20 block $break|4 loop $continue|4 - local.get $26 + local.get $23 local.get $21 i64.lt_u local.tee $18 if (result i32) - local.get $27 - local.get $26 + local.get $24 + local.get $23 i64.sub local.get $22 i64.ge_u @@ -13312,7 +10593,7 @@ end local.tee $18 if (result i32) - local.get $26 + local.get $23 local.get $22 i64.add local.get $21 @@ -13322,9 +10603,9 @@ local.get $18 else local.get $21 - local.get $26 + local.get $23 i64.sub - local.get $26 + local.get $23 local.get $22 i64.add local.get $21 @@ -13340,18 +10621,18 @@ i32.const 1 i32.sub local.set $20 - local.get $26 + local.get $23 local.get $22 i64.add - local.set $26 + local.set $23 end br $continue|4 end end end - local.get $17 + local.get $25 local.get $20 - i32.store16 offset=4 + i32.store16 end local.get $15 return @@ -13363,7 +10644,7 @@ end local.get $15 ) - (func $~lib/internal/number/prettify (; 193 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 196 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13386,7 +10667,7 @@ i32.const 16 i32.shl i32.or - i32.store offset=4 + i32.store local.get $1 i32.const 2 i32.add @@ -13423,7 +10704,7 @@ i32.shl i32.add i32.const 48 - i32.store16 offset=4 + i32.store16 local.get $4 i32.const 1 i32.add @@ -13443,7 +10724,7 @@ i32.const 16 i32.shl i32.or - i32.store offset=4 + i32.store local.get $3 i32.const 2 i32.add @@ -13467,35 +10748,23 @@ i32.shl i32.add local.set $4 - block $~lib/memory/memory.copy|inlined.9 - local.get $4 - i32.const 4 - i32.add - i32.const 2 - i32.add - local.set $5 - local.get $4 - i32.const 4 - i32.add - local.set $6 - i32.const 0 - local.get $2 - i32.sub - i32.const 1 - i32.shl - local.set $7 - local.get $5 - local.get $6 - local.get $7 - call $~lib/internal/memory/memmove - end + local.get $4 + i32.const 2 + i32.add + local.get $4 + i32.const 0 + local.get $2 + i32.sub + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $0 local.get $3 i32.const 1 i32.shl i32.add i32.const 46 - i32.store16 offset=4 + i32.store16 local.get $1 i32.const 1 i32.add @@ -13517,35 +10786,23 @@ local.get $3 i32.sub local.set $4 - block $~lib/memory/memory.copy|inlined.10 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 1 - i32.shl - i32.add - local.set $7 - local.get $0 - i32.const 4 - i32.add - local.set $6 - local.get $1 - i32.const 1 - i32.shl - local.set $5 - local.get $7 - local.get $6 - local.get $5 - call $~lib/internal/memory/memmove - end + local.get $0 + local.get $4 + i32.const 1 + i32.shl + i32.add + local.get $0 + local.get $1 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $0 i32.const 48 i32.const 46 i32.const 16 i32.shl i32.or - i32.store offset=4 + i32.store block $break|1 i32.const 2 local.set $5 @@ -13561,7 +10818,7 @@ i32.shl i32.add i32.const 48 - i32.store16 offset=4 + i32.store16 local.get $5 i32.const 1 i32.add @@ -13582,8 +10839,8 @@ if local.get $0 i32.const 101 - i32.store16 offset=6 - block $~lib/internal/number/genExponent|inlined.0 (result i32) + i32.store16 offset=2 + block $~lib/util/number/genExponent|inlined.0 (result i32) local.get $0 i32.const 4 i32.add @@ -13604,11 +10861,11 @@ local.set $5 end local.get $5 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 i32.const 1 i32.add local.set $7 - block $~lib/internal/number/utoa32_core|inlined.4 + block $~lib/util/number/utoa32_core|inlined.4 local.get $4 local.set $8 local.get $5 @@ -13618,14 +10875,14 @@ local.get $8 local.get $9 local.get $10 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end local.get $4 i32.const 45 i32.const 43 local.get $6 select - i32.store16 offset=4 + i32.store16 local.get $7 end local.set $1 @@ -13638,44 +10895,32 @@ i32.const 1 i32.shl local.set $7 - block $~lib/memory/memory.copy|inlined.11 - local.get $0 - i32.const 4 - i32.add - i32.const 4 - i32.add - local.set $6 - local.get $0 - i32.const 4 - i32.add - i32.const 2 - i32.add - local.set $5 - local.get $7 - i32.const 2 - i32.sub - local.set $4 - local.get $6 - local.get $5 - local.get $4 - call $~lib/internal/memory/memmove - end + local.get $0 + i32.const 4 + i32.add + local.get $0 + i32.const 2 + i32.add + local.get $7 + i32.const 2 + i32.sub + call $~lib/memory/memory.copy local.get $0 i32.const 46 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 local.get $7 i32.add i32.const 101 - i32.store16 offset=6 + i32.store16 offset=2 local.get $1 - block $~lib/internal/number/genExponent|inlined.1 (result i32) + block $~lib/util/number/genExponent|inlined.1 (result i32) local.get $0 local.get $7 i32.add i32.const 4 i32.add - local.set $4 + local.set $6 local.get $3 i32.const 1 i32.sub @@ -13683,8 +10928,8 @@ local.get $5 i32.const 0 i32.lt_s - local.set $6 - local.get $6 + local.set $4 + local.get $4 if i32.const 0 local.get $5 @@ -13692,12 +10937,12 @@ local.set $5 end local.get $5 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 i32.const 1 i32.add local.set $10 - block $~lib/internal/number/utoa32_core|inlined.5 - local.get $4 + block $~lib/util/number/utoa32_core|inlined.5 + local.get $6 local.set $9 local.get $5 local.set $8 @@ -13706,14 +10951,14 @@ local.get $9 local.get $8 local.get $11 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end - local.get $4 + local.get $6 i32.const 45 i32.const 43 - local.get $6 + local.get $4 select - i32.store16 offset=4 + i32.store16 local.get $10 end i32.add @@ -13732,7 +10977,7 @@ unreachable unreachable ) - (func $~lib/internal/number/dtoa_core (; 194 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 197 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -13748,21 +10993,18 @@ (local $14 i32) (local $15 i32) (local $16 f64) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) + (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 $26 i32) (local $27 i64) - (local $28 i64) - (local $29 i64) - (local $30 i64) - (local $31 i32) + (local $28 i32) local.get $1 f64.const 0 f64.lt @@ -13774,9 +11016,9 @@ local.set $1 local.get $0 i32.const 45 - i32.store16 offset=4 + i32.store16 end - block $~lib/internal/number/grisu2|inlined.0 (result i32) + block $~lib/util/number/grisu2|inlined.0 (result i32) local.get $1 local.set $3 local.get $0 @@ -13817,7 +11059,7 @@ i32.add i32.sub local.set $7 - block $~lib/internal/number/normalizedBoundaries|inlined.0 + block $~lib/util/number/normalizedBoundaries|inlined.0 local.get $9 local.set $10 local.get $7 @@ -13852,7 +11094,7 @@ i32.add local.set $15 local.get $12 - global.set $~lib/internal/number/_frc_plus + global.set $~lib/util/number/_frc_plus local.get $10 local.get $15 i64.extend_i32_s @@ -13866,12 +11108,12 @@ i32.sub i64.extend_i32_s i64.shl - global.set $~lib/internal/number/_frc_minus + global.set $~lib/util/number/_frc_minus local.get $13 - global.set $~lib/internal/number/_exp + global.set $~lib/util/number/_exp end - block $~lib/internal/number/getCachedPower|inlined.0 - global.get $~lib/internal/number/_exp + block $~lib/util/number/getCachedPower|inlined.0 + global.get $~lib/util/number/_exp local.set $15 i32.const -61 local.get $15 @@ -13903,319 +11145,294 @@ i32.const 3 i32.shl i32.sub - global.set $~lib/internal/number/_K - i32.const 6280 - i32.load - local.set $11 - i32.const 6544 - i32.load - local.set $17 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i64) - local.get $11 - local.set $18 - local.get $13 - local.set $19 - i32.const 0 - local.set $20 - local.get $18 - local.get $19 - i32.const 3 - i32.shl - i32.add - local.get $20 - i32.add - i64.load offset=8 - end - global.set $~lib/internal/number/_frc_pow - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $17 - local.set $20 - local.get $13 - local.set $19 - i32.const 0 - local.set $18 - local.get $20 - local.get $19 - i32.const 1 - i32.shl - i32.add - local.get $18 - i32.add - i32.load16_s offset=8 - end - global.set $~lib/internal/number/_exp_pow + global.set $~lib/util/number/_K + i32.const 5128 + i32.load offset=4 + local.get $13 + i32.const 3 + i32.shl + i32.add + i64.load + global.set $~lib/util/number/_frc_pow + i32.const 5336 + i32.load offset=4 + local.get $13 + i32.const 1 + i32.shl + i32.add + i32.load16_s + global.set $~lib/util/number/_exp_pow end local.get $9 i64.clz i32.wrap_i64 - local.set $17 + local.set $13 local.get $9 - local.get $17 + local.get $13 i64.extend_i32_s i64.shl local.set $9 local.get $7 - local.get $17 + local.get $13 i32.sub local.set $7 - global.get $~lib/internal/number/_frc_pow + global.get $~lib/util/number/_frc_pow local.set $12 - global.get $~lib/internal/number/_exp_pow - local.set $11 - block $~lib/internal/number/umul64f|inlined.0 (result i64) + global.get $~lib/util/number/_exp_pow + local.set $14 + block $~lib/util/number/umul64f|inlined.0 (result i64) local.get $9 local.set $10 local.get $12 + local.set $17 + local.get $10 + i64.const 4294967295 + i64.and + local.set $18 + local.get $17 + i64.const 4294967295 + i64.and + local.set $19 + local.get $10 + i64.const 32 + i64.shr_u + local.set $20 + local.get $17 + i64.const 32 + i64.shr_u local.set $21 - local.get $10 - i64.const 4294967295 - i64.and + local.get $18 + local.get $19 + i64.mul local.set $22 + local.get $20 + local.get $19 + i64.mul + local.get $22 + i64.const 32 + i64.shr_u + i64.add + local.set $23 + local.get $18 local.get $21 + i64.mul + local.get $23 i64.const 4294967295 i64.and + i64.add + local.set $24 + local.get $24 + i64.const 2147483647 + i64.add + local.set $24 + local.get $23 + i64.const 32 + i64.shr_u local.set $23 - local.get $10 + local.get $24 i64.const 32 i64.shr_u local.set $24 + local.get $20 local.get $21 - i64.const 32 - i64.shr_u - local.set $25 - local.get $22 + i64.mul local.get $23 - i64.mul - local.set $26 + i64.add local.get $24 - local.get $23 - i64.mul - local.get $26 - i64.const 32 - i64.shr_u - i64.add - local.set $27 - local.get $22 - local.get $25 - i64.mul - local.get $27 - i64.const 4294967295 - i64.and - i64.add - local.set $28 - local.get $28 - i64.const 2147483647 - i64.add - local.set $28 - local.get $27 - i64.const 32 - i64.shr_u - local.set $27 - local.get $28 - i64.const 32 - i64.shr_u - local.set $28 - local.get $24 - local.get $25 - i64.mul - local.get $27 - i64.add - local.get $28 i64.add end - local.set $28 - block $~lib/internal/number/umul64e|inlined.0 (result i32) + local.set $24 + block $~lib/util/number/umul64e|inlined.0 (result i32) local.get $7 - local.set $13 - local.get $11 - local.set $14 - local.get $13 + local.set $15 local.get $14 + local.set $11 + local.get $15 + local.get $11 i32.add i32.const 64 i32.add end - local.set $14 - block $~lib/internal/number/umul64f|inlined.1 (result i64) - global.get $~lib/internal/number/_frc_plus - local.set $27 - local.get $12 - local.set $26 - local.get $27 - i64.const 4294967295 - i64.and - local.set $25 - local.get $26 - i64.const 4294967295 - i64.and - local.set $24 - local.get $27 - i64.const 32 - i64.shr_u + local.set $11 + block $~lib/util/number/umul64f|inlined.1 (result i64) + global.get $~lib/util/number/_frc_plus local.set $23 - local.get $26 + local.get $12 + local.set $22 + local.get $23 + i64.const 4294967295 + i64.and + local.set $21 + local.get $22 + i64.const 4294967295 + i64.and + local.set $20 + local.get $23 i64.const 32 i64.shr_u - local.set $22 - local.get $25 - local.get $24 - i64.mul - local.set $21 - local.get $23 - local.get $24 - i64.mul + local.set $19 + local.get $22 + i64.const 32 + i64.shr_u + local.set $18 local.get $21 + local.get $20 + i64.mul + local.set $17 + local.get $19 + local.get $20 + i64.mul + local.get $17 i64.const 32 i64.shr_u i64.add local.set $10 - local.get $25 - local.get $22 + local.get $21 + local.get $18 i64.mul local.get $10 i64.const 4294967295 i64.and i64.add - local.set $29 - local.get $29 + local.set $25 + local.get $25 i64.const 2147483647 i64.add - local.set $29 + local.set $25 local.get $10 i64.const 32 i64.shr_u local.set $10 - local.get $29 + local.get $25 i64.const 32 i64.shr_u - local.set $29 - local.get $23 - local.get $22 + local.set $25 + local.get $19 + local.get $18 i64.mul local.get $10 i64.add - local.get $29 + local.get $25 i64.add end i64.const 1 i64.sub - local.set $29 - block $~lib/internal/number/umul64e|inlined.1 (result i32) - global.get $~lib/internal/number/_exp - local.set $13 - local.get $11 + local.set $25 + block $~lib/util/number/umul64e|inlined.1 (result i32) + global.get $~lib/util/number/_exp local.set $15 - local.get $13 + local.get $14 + local.set $26 local.get $15 + local.get $26 i32.add i32.const 64 i32.add end - local.set $15 - block $~lib/internal/number/umul64f|inlined.2 (result i64) - global.get $~lib/internal/number/_frc_minus + local.set $26 + block $~lib/util/number/umul64f|inlined.2 (result i64) + global.get $~lib/util/number/_frc_minus local.set $10 local.get $12 + local.set $17 + local.get $10 + i64.const 4294967295 + i64.and + local.set $18 + local.get $17 + i64.const 4294967295 + i64.and + local.set $19 + local.get $10 + i64.const 32 + i64.shr_u + local.set $20 + local.get $17 + i64.const 32 + i64.shr_u local.set $21 - local.get $10 - i64.const 4294967295 - i64.and + local.get $18 + local.get $19 + i64.mul local.set $22 + local.get $20 + local.get $19 + i64.mul + local.get $22 + i64.const 32 + i64.shr_u + i64.add + local.set $23 + local.get $18 local.get $21 + i64.mul + local.get $23 i64.const 4294967295 i64.and - local.set $23 - local.get $10 - i64.const 32 - i64.shr_u - local.set $24 - local.get $21 - i64.const 32 - i64.shr_u - local.set $25 - local.get $22 - local.get $23 - i64.mul - local.set $26 - local.get $24 - local.get $23 - i64.mul - local.get $26 - i64.const 32 - i64.shr_u i64.add local.set $27 - local.get $22 - local.get $25 - i64.mul local.get $27 - i64.const 4294967295 - i64.and - i64.add - local.set $30 - local.get $30 i64.const 2147483647 i64.add - local.set $30 + local.set $27 + local.get $23 + i64.const 32 + i64.shr_u + local.set $23 local.get $27 i64.const 32 i64.shr_u local.set $27 - local.get $30 - i64.const 32 - i64.shr_u - local.set $30 - local.get $24 - local.get $25 + local.get $20 + local.get $21 i64.mul - local.get $27 + local.get $23 i64.add - local.get $30 + local.get $27 i64.add end i64.const 1 i64.add - local.set $30 - local.get $29 - local.get $30 - i64.sub local.set $27 - local.get $4 - local.get $28 - local.get $14 - local.get $29 - local.get $15 + local.get $25 local.get $27 + i64.sub + local.set $23 + local.get $4 + local.get $24 + local.get $11 + local.get $25 + local.get $26 + local.get $23 local.get $5 - call $~lib/internal/number/genDigits + call $~lib/util/number/genDigits end - local.set $31 + local.set $28 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $31 + local.get $28 local.get $2 i32.sub - global.get $~lib/internal/number/_K - call $~lib/internal/number/prettify - local.set $31 - local.get $31 + global.get $~lib/util/number/_K + call $~lib/util/number/prettify + local.set $28 + local.get $28 local.get $2 i32.add ) - (func $~lib/internal/number/dtoa (; 195 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 198 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 f64.const 0 f64.eq if - i32.const 5176 + i32.const 4336 return end local.get $0 @@ -14225,59 +11442,47 @@ local.get $0 call $~lib/builtins/isNaN if - i32.const 5192 + i32.const 4352 return end - i32.const 5208 - i32.const 5232 + i32.const 4368 + i32.const 4400 local.get $0 f64.const 0 f64.lt select return end - i32.const 28 - call $~lib/internal/string/allocateUnsafe - local.set $1 - local.get $1 - local.get $0 - call $~lib/internal/number/dtoa_core - local.set $2 - local.get $1 - i32.const 0 - local.get $2 - call $~lib/string/String#substring - local.set $3 - block $~lib/internal/string/freeUnsafe|inlined.3 + block $~lib/runtime/ALLOCATE|inlined.9 (result i32) + i32.const 28 + i32.const 1 + i32.shl + local.set $1 local.get $1 - local.set $4 - local.get $4 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.8 - local.get $4 - local.set $5 - local.get $5 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.8 - end + call $~lib/runtime/doAllocate end + local.set $2 + local.get $2 + local.get $0 + call $~lib/util/number/dtoa_core + local.set $3 + local.get $2 + i32.const 0 local.get $3 + call $~lib/string/String#substring + local.set $4 + block $~lib/runtime/DISCARD|inlined.3 + local.get $2 + local.set $1 + local.get $1 + call $~lib/runtime/doDiscard + end + local.get $4 ) - (func $~lib/internal/number/dtoa_stream (; 196 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 199 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 local.get $1 i32.const 1 @@ -14290,13 +11495,13 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 local.get $0 i32.const 46 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 i32.const 48 - i32.store16 offset=8 + i32.store16 offset=4 i32.const 3 return end @@ -14309,13 +11514,13 @@ if local.get $0 i32.const 78 - i32.store16 offset=4 + i32.store16 local.get $0 i32.const 97 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 i32.const 78 - i32.store16 offset=8 + i32.store16 offset=4 i32.const 3 return else @@ -14327,29 +11532,17 @@ local.get $3 i32.add local.set $4 - i32.const 5208 - i32.const 5232 + i32.const 4368 + i32.const 4400 local.get $3 select local.set $5 - block $~lib/memory/memory.copy|inlined.12 - local.get $0 - i32.const 4 - i32.add - local.set $6 - local.get $5 - i32.const 4 - i32.add - local.set $7 - local.get $4 - i32.const 1 - i32.shl - local.set $8 - local.get $6 - local.get $7 - local.get $8 - call $~lib/internal/memory/memmove - end + local.get $0 + local.get $5 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $4 return end @@ -14358,24 +11551,20 @@ end local.get $0 local.get $2 - call $~lib/internal/number/dtoa_core + call $~lib/util/number/dtoa_core ) - (func $~lib/array/Array#join (; 197 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_flt (; 200 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 f64) + (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) + (local $9 f64) (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -14383,174 +11572,140 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD|inlined.13 (result f64) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $10 - i32.add - f64.load offset=8 - end - call $~lib/internal/number/dtoa + local.get $3 + f64.load + call $~lib/util/number/dtoa return end + local.get $1 + call $~lib/string/String#get:length + local.set $4 i32.const 28 - local.get $6 + local.get $4 i32.add local.get $2 i32.mul i32.const 28 i32.add - local.set $10 - local.get $10 - call $~lib/internal/string/allocateUnsafe - local.set $9 + local.set $5 + block $~lib/runtime/ALLOCATE|inlined.10 (result i32) + local.get $5 + i32.const 1 + i32.shl + local.set $6 + local.get $6 + call $~lib/runtime/doAllocate + end + local.set $7 i32.const 0 local.set $8 block $break|0 i32.const 0 - local.set $11 + local.set $6 loop $repeat|0 - local.get $11 + local.get $6 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.14 (result f64) - local.get $5 - local.set $12 - local.get $11 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 3 - i32.shl - i32.add - local.get $14 - i32.add - f64.load offset=8 - end - local.set $4 + local.get $3 + local.get $6 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $9 + local.get $8 + local.get $7 local.get $8 local.get $9 - local.get $8 - local.get $4 - call $~lib/internal/number/dtoa_stream + call $~lib/util/number/dtoa_stream i32.add local.set $8 - local.get $7 + local.get $4 if - local.get $9 + local.get $7 local.get $8 + i32.const 1 + i32.shl + i32.add local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $8 - local.get $6 + local.get $4 i32.add local.set $8 end end - local.get $11 + local.get $6 i32.const 1 i32.add - local.set $11 + local.set $6 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.15 (result f64) - local.get $5 - local.set $11 - local.get $2 - local.set $14 - i32.const 0 - local.set $13 - local.get $11 - local.get $14 - i32.const 3 - i32.shl - i32.add - local.get $13 - i32.add - f64.load offset=8 - end - local.set $4 + local.get $3 + local.get $2 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $9 + local.get $8 + local.get $7 local.get $8 local.get $9 - local.get $8 - local.get $4 - call $~lib/internal/number/dtoa_stream + call $~lib/util/number/dtoa_stream i32.add local.set $8 - local.get $9 - local.set $13 - local.get $10 + local.get $5 local.get $8 i32.gt_s if - local.get $9 + local.get $7 i32.const 0 local.get $8 call $~lib/string/String#substring - local.set $13 - block $~lib/internal/string/freeUnsafe|inlined.4 - local.get $9 - local.set $14 - local.get $14 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.9 - local.get $14 - local.set $11 - local.get $11 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.9 - end + local.set $6 + block $~lib/runtime/DISCARD|inlined.4 + local.get $7 + local.set $10 + local.get $10 + call $~lib/runtime/doDiscard end + local.get $6 + return end - local.get $13 + block $~lib/runtime/REGISTER|inlined.8 (result i32) + local.get $7 + local.set $6 + local.get $6 + i32.const 1 + call $~lib/runtime/doRegister + end + ) + (func $~lib/array/Array#join (; 201 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_flt return ) - (func $~lib/array/Array#join (; 198 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_str (; 202 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14560,12 +11715,8 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -14573,291 +11724,255 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end + local.get $3 + i32.load return end + local.get $1 + call $~lib/string/String#get:length + local.set $4 i32.const 0 - local.set $10 + local.set $5 block $break|0 block i32.const 0 - local.set $9 + local.set $7 local.get $2 i32.const 1 i32.add local.set $8 end loop $repeat|0 - local.get $9 + local.get $7 local.get $8 i32.lt_s i32.eqz br_if $break|0 - local.get $10 - block $~lib/internal/arraybuffer/LOAD|inlined.6 (result i32) - local.get $5 - local.set $11 - local.get $9 - local.set $12 - i32.const 0 - local.set $13 - local.get $11 - local.get $12 + block + local.get $3 + local.get $7 i32.const 2 i32.shl i32.add - local.get $13 - i32.add - i32.load offset=8 + i32.load + local.set $6 + local.get $6 + i32.const 0 + i32.ne + if + local.get $5 + local.get $6 + call $~lib/string/String#get:length + i32.add + local.set $5 + end end - i32.load - i32.add - local.set $10 - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $repeat|0 unreachable end unreachable end i32.const 0 - local.set $8 - local.get $10 - local.get $6 - local.get $2 - i32.mul - i32.add - call $~lib/internal/string/allocateUnsafe local.set $9 + block $~lib/runtime/ALLOCATE|inlined.11 (result i32) + local.get $5 + local.get $4 + local.get $2 + i32.mul + i32.add + i32.const 1 + i32.shl + local.set $8 + local.get $8 + call $~lib/runtime/doAllocate + end + local.set $10 block $break|1 i32.const 0 - local.set $13 + local.set $8 loop $repeat|1 - local.get $13 + local.get $8 local.get $2 i32.lt_s i32.eqz br_if $break|1 block - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result i32) - local.get $5 - local.set $12 - local.get $13 - local.set $11 - i32.const 0 - local.set $14 - local.get $12 - local.get $11 - i32.const 2 + local.get $3 + local.get $8 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 + i32.const 0 + i32.ne + if + local.get $6 + call $~lib/string/String#get:length + local.set $7 + local.get $10 + local.get $9 + i32.const 1 i32.shl i32.add - local.get $14 + local.get $6 + local.get $7 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $9 + local.get $7 i32.add - i32.load offset=8 + local.set $9 end - local.set $4 local.get $4 if - local.get $4 - i32.load - local.set $14 + local.get $10 local.get $9 - local.get $8 - local.get $4 - i32.const 0 - local.get $14 - call $~lib/internal/string/copyUnsafe - local.get $8 - local.get $14 + i32.const 1 + i32.shl i32.add - local.set $8 - end - local.get $7 - if - local.get $9 - local.get $8 local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe - local.get $8 - local.get $6 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $9 + local.get $4 i32.add - local.set $8 + local.set $9 end end - local.get $13 + local.get $8 i32.const 1 i32.add - local.set $13 + local.set $8 br $repeat|1 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.8 (result i32) - local.get $5 - local.set $13 - local.get $2 - local.set $14 - i32.const 0 - local.set $11 - local.get $13 - local.get $14 - i32.const 2 + local.get $3 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 + i32.const 0 + i32.ne + if + local.get $10 + local.get $9 + i32.const 1 i32.shl i32.add - local.get $11 - i32.add - i32.load offset=8 + local.get $6 + local.get $6 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + call $~lib/memory/memory.copy end - local.set $4 - local.get $4 - if - local.get $4 - i32.load - local.set $11 - local.get $9 + block $~lib/runtime/REGISTER|inlined.9 (result i32) + local.get $10 + local.set $8 local.get $8 - local.get $4 - i32.const 0 - local.get $11 - call $~lib/internal/string/copyUnsafe + i32.const 1 + call $~lib/runtime/doRegister end - local.get $9 + ) + (func $~lib/array/Array#join (; 203 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_str return ) - (func $std/array/Ref#constructor (; 199 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/Ref#constructor (; 204 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 i32.eqz if - i32.const 0 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 0 + call $~lib/runtime/ALLOCATE + local.set $1 + local.get $1 + i32.const 18 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 ) - (func $~lib/array/Array#constructor (; 200 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 205 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 8 - i32.const 45 - i32.const 39 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block (result i32) - local.get $0 - i32.eqz - if - i32.const 8 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - end - local.get $3 - i32.store local.get $0 - local.get $1 - i32.store offset=4 - block $~lib/memory/memory.fill|inlined.12 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 + if (result i32) + local.get $0 + else + i32.const 16 + call $~lib/runtime/ALLOCATE + local.set $2 local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset + i32.const 19 + call $~lib/runtime/doRegister end + local.get $1 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + local.get $1 + i32.store offset=12 local.get $0 ) - (func $~lib/array/Array#__unchecked_set (; 201 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + (func $~lib/array/Array#__set (; 206 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 - i32.load - local.set $3 local.get $1 - local.set $4 - local.get $2 - local.set $5 - i32.const 0 - local.set $6 - local.get $3 - local.get $4 + i32.const 1 + i32.add + i32.const 2 + call $~lib/array/ensureLength + local.get $0 + i32.load offset=4 + local.get $1 i32.const 2 i32.shl i32.add - local.get $6 - i32.add - local.get $5 - i32.store offset=8 + local.get $2 + i32.store + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 + end ) - (func $~lib/array/Array#join (; 202 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_ref (; 207 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14867,12 +11982,8 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -14880,177 +11991,170 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - i32.const 6872 + i32.const 5640 return end + local.get $1 + call $~lib/string/String#get:length + local.set $4 i32.const 15 - local.get $6 + local.get $4 i32.add local.get $2 i32.mul i32.const 15 i32.add - local.set $8 - local.get $8 - call $~lib/internal/string/allocateUnsafe - local.set $9 + local.set $5 + block $~lib/runtime/ALLOCATE|inlined.12 (result i32) + local.get $5 + i32.const 1 + i32.shl + local.set $6 + local.get $6 + call $~lib/runtime/doAllocate + end + local.set $7 i32.const 0 - local.set $10 + local.set $8 block $break|0 i32.const 0 - local.set $11 + local.set $6 loop $repeat|0 - local.get $11 + local.get $6 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $5 - local.set $12 - local.get $11 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 2 + local.get $3 + local.get $6 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $9 + local.get $9 + if + local.get $7 + local.get $8 + i32.const 1 i32.shl i32.add - local.get $14 + i32.const 5640 + i32.const 15 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $8 + i32.const 15 i32.add - i32.load offset=8 + local.set $8 end - local.set $4 local.get $4 if - local.get $9 - local.get $10 - i32.const 6872 - i32.const 0 - i32.const 15 - call $~lib/internal/string/copyUnsafe - local.get $10 - i32.const 15 + local.get $7 + local.get $8 + i32.const 1 + i32.shl i32.add - local.set $10 - end - local.get $7 - if - local.get $9 - local.get $10 local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe - local.get $10 - local.get $6 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $8 + local.get $4 i32.add - local.set $10 + local.set $8 end end - local.get $11 + local.get $6 i32.const 1 i32.add - local.set $11 + local.set $6 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $5 - local.set $13 - local.get $2 - local.set $14 - i32.const 0 - local.set $11 - local.get $13 - local.get $14 - i32.const 2 + local.get $3 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + if + local.get $7 + local.get $8 + i32.const 1 i32.shl i32.add - local.get $11 - i32.add - i32.load offset=8 - end - if - local.get $9 - local.get $10 - i32.const 6872 - i32.const 0 + i32.const 5640 i32.const 15 - call $~lib/internal/string/copyUnsafe - local.get $10 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $8 i32.const 15 i32.add - local.set $10 + local.set $8 end - local.get $9 - local.set $11 + local.get $5 local.get $8 - local.get $10 i32.gt_s if - local.get $9 + local.get $7 i32.const 0 - local.get $10 + local.get $8 call $~lib/string/String#substring - local.set $11 - block $~lib/internal/string/freeUnsafe|inlined.5 - local.get $9 - local.set $14 - local.get $14 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.10 - local.get $14 - local.set $13 - local.get $13 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.10 - end + local.set $6 + block $~lib/runtime/DISCARD|inlined.5 + local.get $7 + local.set $10 + local.get $10 + call $~lib/runtime/doDiscard end + local.get $6 + return end - local.get $11 + block $~lib/runtime/REGISTER|inlined.10 (result i32) + local.get $7 + local.set $6 + local.get $6 + i32.const 1 + call $~lib/runtime/doRegister + end + ) + (func $~lib/array/Array#join (; 208 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_ref return ) - (func $~lib/internal/number/itoa (; 203 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 209 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 3512 + call $~lib/array/Array#join + ) + (func $~lib/util/number/itoa (; 210 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 24 i32.shl i32.const 24 i32.shr_s - call $~lib/internal/number/itoa32 + call $~lib/util/number/itoa32 return ) - (func $~lib/internal/number/itoa_stream (; 204 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 211 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15071,7 +12175,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -15097,11 +12201,11 @@ i32.shl i32.const 24 i32.shr_s - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $4 i32.add local.set $3 - block $~lib/internal/number/utoa32_core|inlined.6 + block $~lib/util/number/utoa32_core|inlined.6 local.get $0 local.set $5 local.get $2 @@ -15115,17 +12219,17 @@ local.get $5 local.get $6 local.get $7 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end local.get $4 if local.get $0 i32.const 45 - i32.store16 offset=4 + i32.store16 end local.get $3 ) - (func $~lib/array/Array#join (; 205 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 212 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -15135,12 +12239,8 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -15148,181 +12248,152 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $10 - i32.add - i32.load8_s offset=8 - end - call $~lib/internal/number/itoa + local.get $3 + i32.load8_s + call $~lib/util/number/itoa return end + local.get $1 + call $~lib/string/String#get:length + local.set $4 i32.const 11 - local.get $6 + local.get $4 i32.add local.get $2 i32.mul i32.const 11 i32.add - local.set $10 - local.get $10 - call $~lib/internal/string/allocateUnsafe - local.set $9 + local.set $5 + block $~lib/runtime/ALLOCATE|inlined.13 (result i32) + local.get $5 + i32.const 1 + i32.shl + local.set $6 + local.get $6 + call $~lib/runtime/doAllocate + end + local.set $7 i32.const 0 local.set $8 block $break|0 i32.const 0 - local.set $11 + local.set $6 loop $repeat|0 - local.get $11 + local.get $6 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $5 - local.set $12 - local.get $11 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 0 - i32.shl - i32.add - local.get $14 - i32.add - i32.load8_s offset=8 - end - local.set $4 + local.get $3 + local.get $6 + i32.const 0 + i32.shl + i32.add + i32.load8_s + local.set $9 + local.get $8 + local.get $7 local.get $8 local.get $9 - local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + call $~lib/util/number/itoa_stream i32.add local.set $8 - local.get $7 + local.get $4 if - local.get $9 + local.get $7 local.get $8 + i32.const 1 + i32.shl + i32.add local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $8 - local.get $6 + local.get $4 i32.add local.set $8 end end - local.get $11 + local.get $6 i32.const 1 i32.add - local.set $11 + local.set $6 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $5 - local.set $11 - local.get $2 - local.set $14 - i32.const 0 - local.set $13 - local.get $11 - local.get $14 - i32.const 0 - i32.shl - i32.add - local.get $13 - i32.add - i32.load8_s offset=8 - end - local.set $4 + local.get $3 + local.get $2 + i32.const 0 + i32.shl + i32.add + i32.load8_s + local.set $9 + local.get $8 + local.get $7 local.get $8 local.get $9 - local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + call $~lib/util/number/itoa_stream i32.add local.set $8 - local.get $9 - local.set $13 - local.get $10 + local.get $5 local.get $8 i32.gt_s if - local.get $9 + local.get $7 i32.const 0 local.get $8 call $~lib/string/String#substring - local.set $13 - block $~lib/internal/string/freeUnsafe|inlined.6 - local.get $9 - local.set $14 - local.get $14 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.11 - local.get $14 - local.set $11 - local.get $11 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.11 - end + local.set $6 + block $~lib/runtime/DISCARD|inlined.6 + local.get $7 + local.set $10 + local.get $10 + call $~lib/runtime/doDiscard end + local.get $6 + return end - local.get $13 + block $~lib/runtime/REGISTER|inlined.11 (result i32) + local.get $7 + local.set $6 + local.get $6 + i32.const 1 + call $~lib/runtime/doRegister + end + ) + (func $~lib/array/Array#join (; 213 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_int return ) - (func $~lib/internal/number/itoa (; 206 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 214 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 3512 + call $~lib/array/Array#join + ) + (func $~lib/util/number/itoa (; 215 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 65535 i32.and - call $~lib/internal/number/utoa32 + call $~lib/util/number/utoa32 return ) - (func $~lib/internal/number/itoa_stream (; 207 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 216 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15340,7 +12411,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -15349,9 +12420,9 @@ local.get $2 i32.const 65535 i32.and - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $3 - block $~lib/internal/number/utoa32_core|inlined.7 + block $~lib/util/number/utoa32_core|inlined.7 local.get $0 local.set $4 local.get $2 @@ -15363,11 +12434,11 @@ local.get $4 local.get $5 local.get $6 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end local.get $3 ) - (func $~lib/array/Array#join (; 208 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 217 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -15377,12 +12448,8 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -15390,174 +12457,145 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 1 - i32.shl - i32.add - local.get $10 - i32.add - i32.load16_u offset=8 - end - call $~lib/internal/number/itoa + local.get $3 + i32.load16_u + call $~lib/util/number/itoa return end + local.get $1 + call $~lib/string/String#get:length + local.set $4 i32.const 10 - local.get $6 + local.get $4 i32.add local.get $2 i32.mul i32.const 10 i32.add - local.set $10 - local.get $10 - call $~lib/internal/string/allocateUnsafe - local.set $9 + local.set $5 + block $~lib/runtime/ALLOCATE|inlined.14 (result i32) + local.get $5 + i32.const 1 + i32.shl + local.set $6 + local.get $6 + call $~lib/runtime/doAllocate + end + local.set $7 i32.const 0 local.set $8 block $break|0 i32.const 0 - local.set $11 + local.set $6 loop $repeat|0 - local.get $11 + local.get $6 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $5 - local.set $12 - local.get $11 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 + local.get $3 + local.get $6 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.set $9 + local.get $8 + local.get $7 + local.get $8 + local.get $9 + call $~lib/util/number/itoa_stream + i32.add + local.set $8 + local.get $4 + if + local.get $7 + local.get $8 i32.const 1 i32.shl i32.add - local.get $14 - i32.add - i32.load16_u offset=8 - end - local.set $4 - local.get $8 - local.get $9 - local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream - i32.add - local.set $8 - local.get $7 - if - local.get $9 - local.get $8 local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $8 - local.get $6 + local.get $4 i32.add local.set $8 end end - local.get $11 + local.get $6 i32.const 1 i32.add - local.set $11 + local.set $6 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $5 - local.set $11 - local.get $2 - local.set $14 - i32.const 0 - local.set $13 - local.get $11 - local.get $14 - i32.const 1 - i32.shl - i32.add - local.get $13 - i32.add - i32.load16_u offset=8 - end - local.set $4 + local.get $3 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.set $9 + local.get $8 + local.get $7 local.get $8 local.get $9 - local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + call $~lib/util/number/itoa_stream i32.add local.set $8 - local.get $9 - local.set $13 - local.get $10 + local.get $5 local.get $8 i32.gt_s if - local.get $9 + local.get $7 i32.const 0 local.get $8 call $~lib/string/String#substring - local.set $13 - block $~lib/internal/string/freeUnsafe|inlined.7 - local.get $9 - local.set $14 - local.get $14 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.12 - local.get $14 - local.set $11 - local.get $11 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.12 - end + local.set $6 + block $~lib/runtime/DISCARD|inlined.7 + local.get $7 + local.set $10 + local.get $10 + call $~lib/runtime/doDiscard end + local.get $6 + return end - local.get $13 + block $~lib/runtime/REGISTER|inlined.12 (result i32) + local.get $7 + local.set $6 + local.get $6 + i32.const 1 + call $~lib/runtime/doRegister + end + ) + (func $~lib/array/Array#join (; 218 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_int return ) - (func $~lib/internal/number/decimalCount64 (; 209 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/array/Array#toString (; 219 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 3512 + call $~lib/array/Array#join + ) + (func $~lib/util/number/decimalCount64 (; 220 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i64.const 1000000000000000 @@ -15626,7 +12664,7 @@ unreachable unreachable ) - (func $~lib/internal/number/utoa64_lut (; 210 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 221 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i64) (local $5 i32) @@ -15636,13 +12674,10 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i64) - (local $16 i64) - i32.const 4832 - i32.load + (local $12 i64) + (local $13 i64) + i32.const 4024 + i32.load offset=4 local.set $3 block $break|0 loop $continue|0 @@ -15688,40 +12723,20 @@ i32.const 100 i32.rem_u local.set $11 - block $~lib/internal/arraybuffer/LOAD|inlined.4 (result i64) - local.get $3 - local.set $12 - local.get $10 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - i64.load32_u offset=8 - end - local.set $15 - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result i64) - local.get $3 - local.set $14 - local.get $11 - local.set $13 - i32.const 0 - local.set $12 - local.get $14 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $12 - i32.add - i64.load32_u offset=8 - end - local.set $16 + local.get $3 + local.get $10 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $12 + local.get $3 + local.get $11 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $13 local.get $2 i32.const 4 i32.sub @@ -15731,46 +12746,26 @@ i32.const 1 i32.shl i32.add - local.get $15 - local.get $16 + local.get $12 + local.get $13 i64.const 32 i64.shl i64.or - i64.store offset=4 - block $~lib/internal/arraybuffer/LOAD|inlined.6 (result i64) - local.get $3 - local.set $12 - local.get $8 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - i64.load32_u offset=8 - end - local.set $15 - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result i64) - local.get $3 - local.set $14 - local.get $9 - local.set $13 - i32.const 0 - local.set $12 - local.get $14 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $12 - i32.add - i64.load32_u offset=8 - end - local.set $16 + i64.store + local.get $3 + local.get $8 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $12 + local.get $3 + local.get $9 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $13 local.get $2 i32.const 4 i32.sub @@ -15780,12 +12775,12 @@ i32.const 1 i32.shl i32.add - local.get $15 - local.get $16 + local.get $12 + local.get $13 i64.const 32 i64.shl i64.or - i64.store offset=4 + i64.store end br $continue|0 end @@ -15795,9 +12790,9 @@ local.get $1 i32.wrap_i64 local.get $2 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut ) - (func $~lib/internal/number/utoa64 (; 211 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 222 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15808,7 +12803,7 @@ local.get $0 i64.eqz if - i32.const 4312 + i32.const 3600 return end local.get $0 @@ -15820,12 +12815,18 @@ i32.wrap_i64 local.set $2 local.get $2 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $3 - local.get $3 - call $~lib/internal/string/allocateUnsafe + block $~lib/runtime/ALLOCATE|inlined.15 (result i32) + local.get $3 + i32.const 1 + i32.shl + local.set $4 + local.get $4 + call $~lib/runtime/doAllocate + end local.set $1 - block $~lib/internal/number/utoa32_core|inlined.8 + block $~lib/util/number/utoa32_core|inlined.8 local.get $1 local.set $4 local.get $2 @@ -15835,16 +12836,22 @@ local.get $4 local.get $5 local.get $6 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end else local.get $0 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.set $3 - local.get $3 - call $~lib/internal/string/allocateUnsafe + block $~lib/runtime/ALLOCATE|inlined.16 (result i32) + local.get $3 + i32.const 1 + i32.shl + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end local.set $1 - block $~lib/internal/number/utoa64_core|inlined.0 + block $~lib/util/number/utoa64_core|inlined.0 local.get $1 local.set $2 local.get $0 @@ -15854,17 +12861,23 @@ local.get $2 local.get $7 local.get $6 - call $~lib/internal/number/utoa64_lut + call $~lib/util/number/utoa64_lut end end - local.get $1 + block $~lib/runtime/REGISTER|inlined.13 (result i32) + local.get $1 + local.set $3 + local.get $3 + i32.const 1 + call $~lib/runtime/doRegister + end ) - (func $~lib/internal/number/itoa (; 212 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa (; 223 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 - call $~lib/internal/number/utoa64 + call $~lib/util/number/utoa64 return ) - (func $~lib/internal/number/itoa_stream (; 213 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 224 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15882,7 +12895,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -15897,9 +12910,9 @@ i32.wrap_i64 local.set $4 local.get $4 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $3 - block $~lib/internal/number/utoa32_core|inlined.9 + block $~lib/util/number/utoa32_core|inlined.9 local.get $0 local.set $5 local.get $4 @@ -15909,13 +12922,13 @@ local.get $5 local.get $6 local.get $7 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end else local.get $2 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.set $3 - block $~lib/internal/number/utoa64_core|inlined.1 + block $~lib/util/number/utoa64_core|inlined.1 local.get $0 local.set $4 local.get $2 @@ -15925,27 +12938,23 @@ local.get $4 local.get $8 local.get $7 - call $~lib/internal/number/utoa64_lut + call $~lib/util/number/utoa64_lut end end local.get $3 ) - (func $~lib/array/Array#join (; 214 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 225 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i64) + (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) + (local $9 i64) (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -15953,174 +12962,145 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i64) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $10 - i32.add - i64.load offset=8 - end - call $~lib/internal/number/itoa + local.get $3 + i64.load + call $~lib/util/number/itoa return end + local.get $1 + call $~lib/string/String#get:length + local.set $4 i32.const 20 - local.get $6 + local.get $4 i32.add local.get $2 i32.mul i32.const 20 i32.add - local.set $10 - local.get $10 - call $~lib/internal/string/allocateUnsafe - local.set $9 + local.set $5 + block $~lib/runtime/ALLOCATE|inlined.17 (result i32) + local.get $5 + i32.const 1 + i32.shl + local.set $6 + local.get $6 + call $~lib/runtime/doAllocate + end + local.set $7 i32.const 0 local.set $8 block $break|0 i32.const 0 - local.set $11 + local.set $6 loop $repeat|0 - local.get $11 + local.get $6 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i64) - local.get $5 - local.set $12 - local.get $11 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 3 - i32.shl - i32.add - local.get $14 - i32.add - i64.load offset=8 - end - local.set $4 + local.get $3 + local.get $6 + i32.const 3 + i32.shl + i32.add + i64.load + local.set $9 + local.get $8 + local.get $7 local.get $8 local.get $9 - local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + call $~lib/util/number/itoa_stream i32.add local.set $8 - local.get $7 + local.get $4 if - local.get $9 + local.get $7 local.get $8 + i32.const 1 + i32.shl + i32.add local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $8 - local.get $6 + local.get $4 i32.add local.set $8 end end - local.get $11 + local.get $6 i32.const 1 i32.add - local.set $11 + local.set $6 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i64) - local.get $5 - local.set $11 - local.get $2 - local.set $14 - i32.const 0 - local.set $13 - local.get $11 - local.get $14 - i32.const 3 - i32.shl - i32.add - local.get $13 - i32.add - i64.load offset=8 - end - local.set $4 + local.get $3 + local.get $2 + i32.const 3 + i32.shl + i32.add + i64.load + local.set $9 + local.get $8 + local.get $7 local.get $8 local.get $9 - local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + call $~lib/util/number/itoa_stream i32.add local.set $8 - local.get $9 - local.set $13 - local.get $10 + local.get $5 local.get $8 i32.gt_s if - local.get $9 + local.get $7 i32.const 0 local.get $8 call $~lib/string/String#substring - local.set $13 - block $~lib/internal/string/freeUnsafe|inlined.8 - local.get $9 - local.set $14 - local.get $14 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.13 - local.get $14 - local.set $11 - local.get $11 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.13 - end + local.set $6 + block $~lib/runtime/DISCARD|inlined.8 + local.get $7 + local.set $10 + local.get $10 + call $~lib/runtime/doDiscard end + local.get $6 + return end - local.get $13 + block $~lib/runtime/REGISTER|inlined.14 (result i32) + local.get $7 + local.set $6 + local.get $6 + i32.const 1 + call $~lib/runtime/doRegister + end + ) + (func $~lib/array/Array#join (; 226 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_int return ) - (func $~lib/internal/number/itoa64 (; 215 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/array/Array#toString (; 227 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 3512 + call $~lib/array/Array#join + ) + (func $~lib/util/number/itoa64 (; 228 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16132,7 +13112,7 @@ local.get $0 i64.eqz if - i32.const 4312 + i32.const 3600 return end local.get $0 @@ -16155,14 +13135,20 @@ i32.wrap_i64 local.set $3 local.get $3 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $1 i32.add local.set $4 - local.get $4 - call $~lib/internal/string/allocateUnsafe + block $~lib/runtime/ALLOCATE|inlined.18 (result i32) + local.get $4 + i32.const 1 + i32.shl + local.set $5 + local.get $5 + call $~lib/runtime/doAllocate + end local.set $2 - block $~lib/internal/number/utoa32_core|inlined.10 + block $~lib/util/number/utoa32_core|inlined.10 local.get $2 local.set $5 local.get $3 @@ -16172,18 +13158,24 @@ local.get $5 local.get $6 local.get $7 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end else local.get $0 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.get $1 i32.add local.set $4 - local.get $4 - call $~lib/internal/string/allocateUnsafe + block $~lib/runtime/ALLOCATE|inlined.19 (result i32) + local.get $4 + i32.const 1 + i32.shl + local.set $3 + local.get $3 + call $~lib/runtime/doAllocate + end local.set $2 - block $~lib/internal/number/utoa64_core|inlined.2 + block $~lib/util/number/utoa64_core|inlined.2 local.get $2 local.set $3 local.get $0 @@ -16193,23 +13185,29 @@ local.get $3 local.get $8 local.get $7 - call $~lib/internal/number/utoa64_lut + call $~lib/util/number/utoa64_lut end end local.get $1 if local.get $2 i32.const 45 - i32.store16 offset=4 + i32.store16 + end + block $~lib/runtime/REGISTER|inlined.15 (result i32) + local.get $2 + local.set $4 + local.get $4 + i32.const 1 + call $~lib/runtime/doRegister end - local.get $2 ) - (func $~lib/internal/number/itoa (; 216 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa (; 229 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 - call $~lib/internal/number/itoa64 + call $~lib/util/number/itoa64 return ) - (func $~lib/internal/number/itoa_stream (; 217 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 230 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -16228,7 +13226,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -16254,11 +13252,11 @@ i32.wrap_i64 local.set $5 local.get $5 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $4 i32.add local.set $3 - block $~lib/internal/number/utoa32_core|inlined.11 + block $~lib/util/number/utoa32_core|inlined.11 local.get $0 local.set $6 local.get $5 @@ -16268,15 +13266,15 @@ local.get $6 local.get $7 local.get $8 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end else local.get $2 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.get $4 i32.add local.set $3 - block $~lib/internal/number/utoa64_core|inlined.3 + block $~lib/util/number/utoa64_core|inlined.3 local.get $0 local.set $5 local.get $2 @@ -16286,208 +13284,18 @@ local.get $5 local.get $9 local.get $8 - call $~lib/internal/number/utoa64_lut + call $~lib/util/number/utoa64_lut end end local.get $4 if local.get $0 i32.const 45 - i32.store16 offset=4 + i32.store16 end local.get $3 ) - (func $~lib/array/Array#join (; 218 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i64) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - local.get $0 - i32.load offset=4 - i32.const 1 - i32.sub - local.set $2 - local.get $2 - i32.const 0 - i32.lt_s - if - i32.const 3904 - return - end - i32.const 3904 - local.set $3 - local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 - local.get $2 - i32.eqz - if - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i64) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $10 - i32.add - i64.load offset=8 - end - call $~lib/internal/number/itoa - return - end - i32.const 21 - local.get $6 - i32.add - local.get $2 - i32.mul - i32.const 21 - i32.add - local.set $10 - local.get $10 - call $~lib/internal/string/allocateUnsafe - local.set $9 - i32.const 0 - local.set $8 - block $break|0 - i32.const 0 - local.set $11 - loop $repeat|0 - local.get $11 - local.get $2 - i32.lt_s - i32.eqz - br_if $break|0 - block - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i64) - local.get $5 - local.set $12 - local.get $11 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 3 - i32.shl - i32.add - local.get $14 - i32.add - i64.load offset=8 - end - local.set $4 - local.get $8 - local.get $9 - local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream - i32.add - local.set $8 - local.get $7 - if - local.get $9 - local.get $8 - local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe - local.get $8 - local.get $6 - i32.add - local.set $8 - end - end - local.get $11 - i32.const 1 - i32.add - local.set $11 - br $repeat|0 - unreachable - end - unreachable - end - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i64) - local.get $5 - local.set $11 - local.get $2 - local.set $14 - i32.const 0 - local.set $13 - local.get $11 - local.get $14 - i32.const 3 - i32.shl - i32.add - local.get $13 - i32.add - i64.load offset=8 - end - local.set $4 - local.get $8 - local.get $9 - local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream - i32.add - local.set $8 - local.get $9 - local.set $13 - local.get $10 - local.get $8 - i32.gt_s - if - local.get $9 - i32.const 0 - local.get $8 - call $~lib/string/String#substring - local.set $13 - block $~lib/internal/string/freeUnsafe|inlined.9 - local.get $9 - local.set $14 - local.get $14 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.14 - local.get $14 - local.set $11 - local.get $11 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.14 - end - end - end - local.get $13 - return - ) - (func $~lib/array/Array>#join (; 219 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 231 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -16495,11 +13303,10 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) + (local $9 i64) (local $10 i32) - (local $11 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -16507,141 +13314,351 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD,Array>|inlined.5 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $4 - if (result i32) - local.get $4 - local.get $1 - call $~lib/array/Array#join - else - i32.const 3904 - end + local.get $3 + i64.load + call $~lib/util/number/itoa return end + local.get $1 + call $~lib/string/String#get:length + local.set $4 + i32.const 21 + local.get $4 + i32.add + local.get $2 + i32.mul + i32.const 21 + i32.add + local.set $5 + block $~lib/runtime/ALLOCATE|inlined.20 (result i32) + local.get $5 + i32.const 1 + i32.shl + local.set $6 + local.get $6 + call $~lib/runtime/doAllocate + end + local.set $7 + i32.const 0 + local.set $8 block $break|0 i32.const 0 - local.set $10 + local.set $6 loop $repeat|0 - local.get $10 + local.get $6 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD,Array>|inlined.6 (result i32) - local.get $5 - local.set $9 - local.get $10 - local.set $8 - i32.const 0 - local.set $11 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 - end - local.set $4 + local.get $3 + local.get $6 + i32.const 3 + i32.shl + i32.add + i64.load + local.set $9 + local.get $8 + local.get $7 + local.get $8 + local.get $9 + call $~lib/util/number/itoa_stream + i32.add + local.set $8 local.get $4 if - local.get $3 + local.get $7 + local.get $8 + i32.const 1 + i32.shl + i32.add + local.get $1 local.get $4 - local.get $1 - call $~lib/array/Array#join - call $~lib/string/String.__concat - local.set $3 - end - local.get $7 - if - local.get $3 - local.get $1 - call $~lib/string/String.__concat - local.set $3 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $8 + local.get $4 + i32.add + local.set $8 end end - local.get $10 + local.get $6 i32.const 1 i32.add - local.set $10 + local.set $6 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD,Array>|inlined.7 (result i32) - local.get $5 - local.set $10 - local.get $2 - local.set $11 + local.get $3 + local.get $2 + i32.const 3 + i32.shl + i32.add + i64.load + local.set $9 + local.get $8 + local.get $7 + local.get $8 + local.get $9 + call $~lib/util/number/itoa_stream + i32.add + local.set $8 + local.get $5 + local.get $8 + i32.gt_s + if + local.get $7 i32.const 0 - local.set $8 - local.get $10 - local.get $11 - i32.const 2 - i32.shl - i32.add local.get $8 - i32.add - i32.load offset=8 + call $~lib/string/String#substring + local.set $6 + block $~lib/runtime/DISCARD|inlined.9 + local.get $7 + local.set $10 + local.get $10 + call $~lib/runtime/doDiscard + end + local.get $6 + return end + block $~lib/runtime/REGISTER|inlined.16 (result i32) + local.get $7 + local.set $6 + local.get $6 + i32.const 1 + call $~lib/runtime/doRegister + end + ) + (func $~lib/array/Array#join (; 232 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_int + return + ) + (func $~lib/array/Array#toString (; 233 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 3512 + call $~lib/array/Array#join + ) + (func $~lib/array/Array#toString (; 234 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 3512 + call $~lib/array/Array#join + ) + (func $~lib/array/Array>#__set (; 235 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.const 2 + call $~lib/array/ensureLength + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 + end + ) + (func $~lib/array/Array>#join_arr (; 236 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + local.get $0 + i32.load offset=12 + i32.const 1 + i32.sub + local.set $2 + local.get $2 + i32.const 0 + i32.lt_s + if + i32.const 3264 + return + end + i32.const 3264 + local.set $3 + local.get $1 + call $~lib/string/String#get:length local.set $4 - local.get $4 + local.get $0 + i32.load offset=4 + local.set $5 + local.get $2 + i32.eqz + if + local.get $5 + i32.load + local.set $6 + local.get $6 + if (result i32) + local.get $6 + local.get $1 + call $~lib/array/Array#join + else + i32.const 3264 + end + return + end + block $break|0 + i32.const 0 + local.set $7 + loop $repeat|0 + local.get $7 + local.get $2 + i32.lt_s + i32.eqz + br_if $break|0 + block + local.get $5 + local.get $7 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 + if + local.get $3 + local.get $6 + local.get $1 + call $~lib/array/Array#join + call $~lib/string/String.concat + local.set $3 + end + local.get $4 + if + local.get $3 + local.get $1 + call $~lib/string/String.concat + local.set $3 + end + end + local.get $7 + i32.const 1 + i32.add + local.set $7 + br $repeat|0 + unreachable + end + unreachable + end + local.get $5 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 if local.get $3 - local.get $4 + local.get $6 local.get $1 call $~lib/array/Array#join - call $~lib/string/String.__concat + call $~lib/string/String.concat local.set $3 end local.get $3 + ) + (func $~lib/array/Array>#join (; 237 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array>#join_arr return ) - (func $~lib/internal/number/itoa (; 220 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#toString (; 238 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 3512 + call $~lib/array/Array>#join + ) + (func $~lib/array/Array>#constructor (; 239 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + if (result i32) + local.get $0 + else + i32.const 16 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 23 + call $~lib/runtime/doRegister + end + local.get $1 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + local.get $1 + i32.store offset=12 + local.get $0 + ) + (func $~lib/array/Array>#__set (; 240 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.const 2 + call $~lib/array/ensureLength + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 + end + ) + (func $~lib/util/number/itoa (; 241 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and - call $~lib/internal/number/utoa32 + call $~lib/util/number/utoa32 return ) - (func $~lib/internal/number/itoa_stream (; 221 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 242 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -16659,7 +13676,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -16668,9 +13685,9 @@ local.get $2 i32.const 255 i32.and - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $3 - block $~lib/internal/number/utoa32_core|inlined.12 + block $~lib/util/number/utoa32_core|inlined.12 local.get $0 local.set $4 local.get $2 @@ -16682,11 +13699,11 @@ local.get $4 local.get $5 local.get $6 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut end local.get $3 ) - (func $~lib/array/Array#join (; 222 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 243 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -16696,12 +13713,8 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -16709,186 +13722,148 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $10 - i32.add - i32.load8_u offset=8 - end - call $~lib/internal/number/itoa + local.get $3 + i32.load8_u + call $~lib/util/number/itoa return end + local.get $1 + call $~lib/string/String#get:length + local.set $4 i32.const 10 - local.get $6 + local.get $4 i32.add local.get $2 i32.mul i32.const 10 i32.add - local.set $10 - local.get $10 - call $~lib/internal/string/allocateUnsafe - local.set $9 + local.set $5 + block $~lib/runtime/ALLOCATE|inlined.21 (result i32) + local.get $5 + i32.const 1 + i32.shl + local.set $6 + local.get $6 + call $~lib/runtime/doAllocate + end + local.set $7 i32.const 0 local.set $8 block $break|0 i32.const 0 - local.set $11 + local.set $6 loop $repeat|0 - local.get $11 + local.get $6 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $5 - local.set $12 - local.get $11 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 0 - i32.shl - i32.add - local.get $14 - i32.add - i32.load8_u offset=8 - end - local.set $4 + local.get $3 + local.get $6 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.set $9 + local.get $8 + local.get $7 local.get $8 local.get $9 - local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + call $~lib/util/number/itoa_stream i32.add local.set $8 - local.get $7 + local.get $4 if - local.get $9 + local.get $7 local.get $8 + i32.const 1 + i32.shl + i32.add local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $8 - local.get $6 + local.get $4 i32.add local.set $8 end end - local.get $11 + local.get $6 i32.const 1 i32.add - local.set $11 + local.set $6 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i32) - local.get $5 - local.set $11 - local.get $2 - local.set $14 - i32.const 0 - local.set $13 - local.get $11 - local.get $14 - i32.const 0 - i32.shl - i32.add - local.get $13 - i32.add - i32.load8_u offset=8 - end - local.set $4 + local.get $3 + local.get $2 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.set $9 + local.get $8 + local.get $7 local.get $8 local.get $9 - local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + call $~lib/util/number/itoa_stream i32.add local.set $8 - local.get $9 - local.set $13 - local.get $10 + local.get $5 local.get $8 i32.gt_s if - local.get $9 + local.get $7 i32.const 0 local.get $8 call $~lib/string/String#substring - local.set $13 - block $~lib/internal/string/freeUnsafe|inlined.10 - local.get $9 - local.set $14 - local.get $14 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.15 - local.get $14 - local.set $11 - local.get $11 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.15 - end + local.set $6 + block $~lib/runtime/DISCARD|inlined.10 + local.get $7 + local.set $10 + local.get $10 + call $~lib/runtime/doDiscard end + local.get $6 + return end - local.get $13 + block $~lib/runtime/REGISTER|inlined.17 (result i32) + local.get $7 + local.set $6 + local.get $6 + i32.const 1 + call $~lib/runtime/doRegister + end + ) + (func $~lib/array/Array#join (; 244 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_int return ) - (func $~lib/array/Array>#join (; 223 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#join_arr (; 245 ;) (type $FUNCSIG$iii) (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.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -16896,146 +13871,218 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 + i32.const 3264 local.set $3 - local.get $0 - i32.load - local.set $5 local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + call $~lib/string/String#get:length + local.set $4 + local.get $0 + i32.load offset=4 + local.set $5 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD,Array>|inlined.0 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $4 + local.get $5 + i32.load + local.set $6 + local.get $6 if (result i32) - local.get $4 + local.get $6 local.get $1 call $~lib/array/Array#join else - i32.const 3904 + i32.const 3264 end return end block $break|0 i32.const 0 - local.set $10 + local.set $7 loop $repeat|0 - local.get $10 + local.get $7 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD,Array>|inlined.1 (result i32) - local.get $5 - local.set $9 - local.get $10 - local.set $8 - i32.const 0 - local.set $11 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 + local.get $5 + local.get $7 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 + if + local.get $3 + local.get $6 + local.get $1 + call $~lib/array/Array#join + call $~lib/string/String.concat + local.set $3 end - local.set $4 local.get $4 if local.get $3 - local.get $4 local.get $1 - call $~lib/array/Array#join - call $~lib/string/String.__concat - local.set $3 - end - local.get $7 - if - local.get $3 - local.get $1 - call $~lib/string/String.__concat + call $~lib/string/String.concat local.set $3 end end - local.get $10 + local.get $7 i32.const 1 i32.add - local.set $10 + local.set $7 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD,Array>|inlined.2 (result i32) - local.get $5 - local.set $10 - local.get $2 - local.set $11 - i32.const 0 - local.set $8 - local.get $10 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $4 + local.get $5 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 if local.get $3 - local.get $4 + local.get $6 local.get $1 call $~lib/array/Array#join - call $~lib/string/String.__concat + call $~lib/string/String.concat local.set $3 end local.get $3 + ) + (func $~lib/array/Array>#join (; 246 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array>#join_arr return ) - (func $~lib/array/Array>#join (; 224 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#toString (; 247 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 3512 + call $~lib/array/Array>#join + ) + (func $~lib/array/Array>#constructor (; 248 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + if (result i32) + local.get $0 + else + i32.const 16 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 24 + call $~lib/runtime/doRegister + end + local.get $1 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + local.get $1 + i32.store offset=12 + local.get $0 + ) + (func $~lib/array/Array>#__set (; 249 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.const 2 + call $~lib/array/ensureLength + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 + end + ) + (func $~lib/array/Array>>#constructor (; 250 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + if (result i32) + local.get $0 + else + i32.const 16 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 25 + call $~lib/runtime/doRegister + end + local.get $1 + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + local.set $0 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + local.get $1 + i32.store offset=12 + local.get $0 + ) + (func $~lib/array/Array>>#__set (; 251 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.const 2 + call $~lib/array/ensureLength + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 + end + ) + (func $~lib/array/Array>#join_arr (; 252 ;) (type $FUNCSIG$iii) (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.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -17043,146 +14090,109 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 + i32.const 3264 local.set $3 - local.get $0 - i32.load - local.set $5 local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + call $~lib/string/String#get:length + local.set $4 + local.get $0 + i32.load offset=4 + local.set $5 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD,Array>|inlined.0 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $4 + local.get $5 + i32.load + local.set $6 + local.get $6 if (result i32) - local.get $4 + local.get $6 local.get $1 call $~lib/array/Array#join else - i32.const 3904 + i32.const 3264 end return end block $break|0 i32.const 0 - local.set $10 + local.set $7 loop $repeat|0 - local.get $10 + local.get $7 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD,Array>|inlined.1 (result i32) - local.get $5 - local.set $9 - local.get $10 - local.set $8 - i32.const 0 - local.set $11 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 + local.get $5 + local.get $7 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 + if + local.get $3 + local.get $6 + local.get $1 + call $~lib/array/Array#join + call $~lib/string/String.concat + local.set $3 end - local.set $4 local.get $4 if local.get $3 - local.get $4 local.get $1 - call $~lib/array/Array#join - call $~lib/string/String.__concat - local.set $3 - end - local.get $7 - if - local.get $3 - local.get $1 - call $~lib/string/String.__concat + call $~lib/string/String.concat local.set $3 end end - local.get $10 + local.get $7 i32.const 1 i32.add - local.set $10 + local.set $7 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD,Array>|inlined.2 (result i32) - local.get $5 - local.set $10 - local.get $2 - local.set $11 - i32.const 0 - local.set $8 - local.get $10 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $4 + local.get $5 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 if local.get $3 - local.get $4 + local.get $6 local.get $1 call $~lib/array/Array#join - call $~lib/string/String.__concat + call $~lib/string/String.concat local.set $3 end local.get $3 + ) + (func $~lib/array/Array>#join (; 253 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array>#join_arr return ) - (func $~lib/array/Array>>#join (; 225 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>>#join_arr (; 254 ;) (type $FUNCSIG$iii) (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.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -17190,139 +14200,123 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 3264 return end - i32.const 3904 + i32.const 3264 local.set $3 - local.get $0 - i32.load - local.set $5 local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + call $~lib/string/String#get:length + local.set $4 + local.get $0 + i32.load offset=4 + local.set $5 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD>,Array>>|inlined.0 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $4 + local.get $5 + i32.load + local.set $6 + local.get $6 if (result i32) - local.get $4 + local.get $6 local.get $1 call $~lib/array/Array>#join else - i32.const 3904 + i32.const 3264 end return end block $break|0 i32.const 0 - local.set $10 + local.set $7 loop $repeat|0 - local.get $10 + local.get $7 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD>,Array>>|inlined.1 (result i32) - local.get $5 - local.set $9 - local.get $10 - local.set $8 - i32.const 0 - local.set $11 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 + local.get $5 + local.get $7 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 + if + local.get $3 + local.get $6 + local.get $1 + call $~lib/array/Array>#join + call $~lib/string/String.concat + local.set $3 end - local.set $4 local.get $4 if local.get $3 - local.get $4 local.get $1 - call $~lib/array/Array>#join - call $~lib/string/String.__concat - local.set $3 - end - local.get $7 - if - local.get $3 - local.get $1 - call $~lib/string/String.__concat + call $~lib/string/String.concat local.set $3 end end - local.get $10 + local.get $7 i32.const 1 i32.add - local.set $10 + local.set $7 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD>,Array>>|inlined.2 (result i32) - local.get $5 - local.set $10 - local.get $2 - local.set $11 - i32.const 0 - local.set $8 - local.get $10 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $4 + local.get $5 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 if local.get $3 - local.get $4 + local.get $6 local.get $1 call $~lib/array/Array>#join - call $~lib/string/String.__concat + call $~lib/string/String.concat local.set $3 end local.get $3 + ) + (func $~lib/array/Array>>#join (; 255 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array>>#join_arr return ) - (func $start:std/array (; 226 ;) (type $FUNCSIG$v) + (func $~lib/array/Array>>#toString (; 256 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 3512 + call $~lib/array/Array>>#join + ) + (func $start:std/array (; 257 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - call $start:~lib/allocator/arena + (local $4 i32) + (local $5 i32) + (local $6 i32) + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset i32.const 0 i32.const 0 call $~lib/array/Array#constructor @@ -17415,7 +14409,14 @@ call $~lib/array/Array#fill drop global.get $std/array/arr8 - i32.const 256 + block $~lib/runtime/WRAPARRAY|inlined.0 (result i32) + i32.const 192 + local.set $0 + local.get $0 + i32.const 7 + i32.const 0 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17427,18 +14428,21 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/array/arr8 - i32.const 0 - i32.const 0 - i32.const 0 - call $~lib/array/Array#fill|trampoline - end + global.get $std/array/arr8 + i32.const 0 + i32.const 0 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#fill drop global.get $std/array/arr8 - i32.const 280 + block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) + i32.const 208 + local.set $0 + local.get $0 + i32.const 7 + i32.const 0 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17457,7 +14461,14 @@ call $~lib/array/Array#fill drop global.get $std/array/arr8 - i32.const 304 + block $~lib/runtime/WRAPARRAY|inlined.2 (result i32) + i32.const 224 + local.set $0 + local.get $0 + i32.const 7 + i32.const 0 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17469,18 +14480,21 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 2 - global.set $~lib/argc - global.get $std/array/arr8 - i32.const 2 - i32.const -2 - i32.const 0 - call $~lib/array/Array#fill|trampoline - end + global.get $std/array/arr8 + i32.const 2 + i32.const -2 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#fill drop global.get $std/array/arr8 - i32.const 328 + block $~lib/runtime/WRAPARRAY|inlined.3 (result i32) + i32.const 240 + local.set $0 + local.get $0 + i32.const 7 + i32.const 0 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17499,7 +14513,14 @@ call $~lib/array/Array#fill drop global.get $std/array/arr8 - i32.const 352 + block $~lib/runtime/WRAPARRAY|inlined.4 (result i32) + i32.const 256 + local.set $0 + local.get $0 + i32.const 7 + i32.const 0 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17518,7 +14539,14 @@ call $~lib/array/Array#fill drop global.get $std/array/arr32 - i32.const 432 + block $~lib/runtime/WRAPARRAY|inlined.0 (result i32) + i32.const 328 + local.set $0 + local.get $0 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17530,18 +14558,21 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/array/arr32 - i32.const 0 - i32.const 0 - i32.const 0 - call $~lib/array/Array#fill|trampoline - end + global.get $std/array/arr32 + i32.const 0 + i32.const 0 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#fill drop global.get $std/array/arr32 - i32.const 472 + block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) + i32.const 360 + local.set $0 + local.get $0 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17560,7 +14591,14 @@ call $~lib/array/Array#fill drop global.get $std/array/arr32 - i32.const 512 + block $~lib/runtime/WRAPARRAY|inlined.2 (result i32) + i32.const 392 + local.set $0 + local.get $0 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17572,18 +14610,21 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 2 - global.set $~lib/argc - global.get $std/array/arr32 - i32.const 2 - i32.const -2 - i32.const 0 - call $~lib/array/Array#fill|trampoline - end + global.get $std/array/arr32 + i32.const 2 + i32.const -2 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#fill drop global.get $std/array/arr32 - i32.const 552 + block $~lib/runtime/WRAPARRAY|inlined.3 (result i32) + i32.const 424 + local.set $0 + local.get $0 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17602,7 +14643,14 @@ call $~lib/array/Array#fill drop global.get $std/array/arr32 - i32.const 592 + block $~lib/runtime/WRAPARRAY|inlined.4 (result i32) + i32.const 456 + local.set $0 + local.get $0 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -17614,12 +14662,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.0 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 0 i32.eq i32.eqz @@ -17649,8 +14693,20 @@ call $~lib/array/Array#push drop global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 42 i32.eq i32.eqz @@ -17662,12 +14718,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.1 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 1 i32.eq i32.eqz @@ -17707,12 +14759,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.2 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 0 i32.eq i32.eqz @@ -17741,12 +14789,8 @@ i32.const 43 call $~lib/array/Array#push drop - block $~lib/array/Array#get:length|inlined.3 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 1 i32.eq i32.eqz @@ -17772,8 +14816,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 43 i32.eq i32.eqz @@ -17789,12 +14845,8 @@ i32.const 44 call $~lib/array/Array#push drop - block $~lib/array/Array#get:length|inlined.4 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz @@ -17820,8 +14872,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 43 i32.eq i32.eqz @@ -17834,8 +14898,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 1 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 44 i32.eq i32.eqz @@ -17851,12 +14927,8 @@ i32.const 45 call $~lib/array/Array#push drop - block $~lib/array/Array#get:length|inlined.5 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz @@ -17882,8 +14954,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 43 i32.eq i32.eqz @@ -17896,8 +14980,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 1 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 44 i32.eq i32.eqz @@ -17910,8 +15006,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 2 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 45 i32.eq i32.eqz @@ -17944,12 +15052,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.6 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz @@ -17961,12 +15065,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.7 (result i32) - global.get $std/array/out - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/out + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz @@ -17979,7 +15079,14 @@ unreachable end global.get $std/array/out - i32.const 608 + block $~lib/runtime/WRAPARRAY|inlined.0 (result i32) + i32.const 528 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end call $~lib/array/Array#concat drop global.get $std/array/arr @@ -17996,8 +15103,20 @@ unreachable end global.get $std/array/out + local.tee $0 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 43 i32.eq i32.eqz @@ -18010,8 +15129,20 @@ unreachable end global.get $std/array/out + local.tee $0 + i32.load offset=4 i32.const 1 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 44 i32.eq i32.eqz @@ -18024,8 +15155,20 @@ unreachable end global.get $std/array/out + local.tee $0 + i32.load offset=4 i32.const 2 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 45 i32.eq i32.eqz @@ -18062,12 +15205,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.8 (result i32) - global.get $std/array/other - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/other + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz @@ -18079,12 +15218,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.9 (result i32) - global.get $std/array/out - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/out + call $~lib/array/Array#get:length i32.const 5 i32.eq i32.eqz @@ -18097,8 +15232,20 @@ unreachable end global.get $std/array/out + local.tee $0 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 43 i32.eq i32.eqz @@ -18111,8 +15258,20 @@ unreachable end global.get $std/array/out + local.tee $0 + i32.load offset=4 i32.const 1 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 44 i32.eq i32.eqz @@ -18125,8 +15284,20 @@ unreachable end global.get $std/array/out + local.tee $0 + i32.load offset=4 i32.const 2 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 45 i32.eq i32.eqz @@ -18139,8 +15310,20 @@ unreachable end global.get $std/array/out + local.tee $0 + i32.load offset=4 i32.const 3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 46 i32.eq i32.eqz @@ -18153,8 +15336,20 @@ unreachable end global.get $std/array/out + local.tee $0 + i32.load offset=4 i32.const 4 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 47 i32.eq i32.eqz @@ -18169,12 +15364,8 @@ global.get $std/array/out call $~lib/array/Array#pop drop - block $~lib/array/Array#get:length|inlined.10 (result i32) - global.get $std/array/out - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/out + call $~lib/array/Array#get:length i32.const 4 i32.eq i32.eqz @@ -18190,12 +15381,8 @@ i32.const 0 call $~lib/array/Array#concat global.set $std/array/out - block $~lib/array/Array#get:length|inlined.11 (result i32) - global.get $std/array/out - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/out + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz @@ -18208,8 +15395,20 @@ unreachable end global.get $std/array/out + local.tee $0 + i32.load offset=4 i32.const 2 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 45 i32.eq i32.eqz @@ -18221,12 +15420,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.12 (result i32) - global.get $std/array/source - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/source + call $~lib/array/Array#get:length i32.const 0 i32.eq i32.eqz @@ -18242,12 +15437,8 @@ global.get $std/array/arr call $~lib/array/Array#concat global.set $std/array/out - block $~lib/array/Array#get:length|inlined.13 (result i32) - global.get $std/array/out - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/out + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz @@ -18259,12 +15450,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.14 (result i32) - global.get $std/array/source - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/source + call $~lib/array/Array#get:length i32.const 0 i32.eq i32.eqz @@ -18276,18 +15463,28 @@ call $~lib/env/abort unreachable end - i32.const 664 - global.set $std/array/cwArr - block (result i32) + block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) + i32.const 568 + local.set $0 + local.get $0 + i32.const 4 i32.const 2 - global.set $~lib/argc - global.get $std/array/cwArr - i32.const 0 - i32.const 3 - i32.const 0 - call $~lib/array/Array#copyWithin|trampoline + call $~lib/runtime/doWrapArray + end + global.set $std/array/cwArr + global.get $std/array/cwArr + i32.const 0 + i32.const 3 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#copyWithin + block $~lib/runtime/WRAPARRAY|inlined.2 (result i32) + i32.const 600 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray end - i32.const 704 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18299,18 +15496,28 @@ call $~lib/env/abort unreachable end - i32.const 744 - global.set $std/array/cwArr - block (result i32) + block $~lib/runtime/WRAPARRAY|inlined.3 (result i32) + i32.const 632 + local.set $0 + local.get $0 + i32.const 4 i32.const 2 - global.set $~lib/argc - global.get $std/array/cwArr - i32.const 1 - i32.const 3 - i32.const 0 - call $~lib/array/Array#copyWithin|trampoline + call $~lib/runtime/doWrapArray + end + global.set $std/array/cwArr + global.get $std/array/cwArr + i32.const 1 + i32.const 3 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#copyWithin + block $~lib/runtime/WRAPARRAY|inlined.4 (result i32) + i32.const 664 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray end - i32.const 784 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18322,18 +15529,28 @@ call $~lib/env/abort unreachable end - i32.const 824 - global.set $std/array/cwArr - block (result i32) + block $~lib/runtime/WRAPARRAY|inlined.5 (result i32) + i32.const 696 + local.set $0 + local.get $0 + i32.const 4 i32.const 2 - global.set $~lib/argc - global.get $std/array/cwArr - i32.const 1 - i32.const 2 - i32.const 0 - call $~lib/array/Array#copyWithin|trampoline + call $~lib/runtime/doWrapArray + end + global.set $std/array/cwArr + global.get $std/array/cwArr + i32.const 1 + i32.const 2 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#copyWithin + block $~lib/runtime/WRAPARRAY|inlined.6 (result i32) + i32.const 728 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray end - i32.const 864 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18345,18 +15562,28 @@ call $~lib/env/abort unreachable end - i32.const 904 - global.set $std/array/cwArr - block (result i32) + block $~lib/runtime/WRAPARRAY|inlined.7 (result i32) + i32.const 760 + local.set $0 + local.get $0 + i32.const 4 i32.const 2 - global.set $~lib/argc - global.get $std/array/cwArr - i32.const 2 - i32.const 2 - i32.const 0 - call $~lib/array/Array#copyWithin|trampoline + call $~lib/runtime/doWrapArray + end + global.set $std/array/cwArr + global.get $std/array/cwArr + i32.const 2 + i32.const 2 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#copyWithin + block $~lib/runtime/WRAPARRAY|inlined.8 (result i32) + i32.const 792 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray end - i32.const 944 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18368,14 +15595,28 @@ call $~lib/env/abort unreachable end - i32.const 984 + block $~lib/runtime/WRAPARRAY|inlined.9 (result i32) + i32.const 824 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - i32.const 1024 + block $~lib/runtime/WRAPARRAY|inlined.10 (result i32) + i32.const 856 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18387,14 +15628,28 @@ call $~lib/env/abort unreachable end - i32.const 1064 + block $~lib/runtime/WRAPARRAY|inlined.11 (result i32) + i32.const 888 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - i32.const 1104 + block $~lib/runtime/WRAPARRAY|inlined.12 (result i32) + i32.const 920 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18406,14 +15661,28 @@ call $~lib/env/abort unreachable end - i32.const 1144 + block $~lib/runtime/WRAPARRAY|inlined.13 (result i32) + i32.const 952 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 i32.const 2 i32.const 4 call $~lib/array/Array#copyWithin - i32.const 1184 + block $~lib/runtime/WRAPARRAY|inlined.14 (result i32) + i32.const 984 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18425,18 +15694,28 @@ call $~lib/env/abort unreachable end - i32.const 1224 - global.set $std/array/cwArr - block (result i32) + block $~lib/runtime/WRAPARRAY|inlined.15 (result i32) + i32.const 1016 + local.set $0 + local.get $0 + i32.const 4 i32.const 2 - global.set $~lib/argc - global.get $std/array/cwArr - i32.const 0 - i32.const -2 - i32.const 0 - call $~lib/array/Array#copyWithin|trampoline + call $~lib/runtime/doWrapArray + end + global.set $std/array/cwArr + global.get $std/array/cwArr + i32.const 0 + i32.const -2 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#copyWithin + block $~lib/runtime/WRAPARRAY|inlined.16 (result i32) + i32.const 1048 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray end - i32.const 1264 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18448,14 +15727,28 @@ call $~lib/env/abort unreachable end - i32.const 1304 + block $~lib/runtime/WRAPARRAY|inlined.17 (result i32) + i32.const 1080 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 i32.const -2 i32.const -1 call $~lib/array/Array#copyWithin - i32.const 1344 + block $~lib/runtime/WRAPARRAY|inlined.18 (result i32) + i32.const 1112 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18467,14 +15760,28 @@ call $~lib/env/abort unreachable end - i32.const 1384 + block $~lib/runtime/WRAPARRAY|inlined.19 (result i32) + i32.const 1144 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 i32.const -3 i32.const -2 call $~lib/array/Array#copyWithin - i32.const 1424 + block $~lib/runtime/WRAPARRAY|inlined.20 (result i32) + i32.const 1176 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18486,14 +15793,28 @@ call $~lib/env/abort unreachable end - i32.const 1464 + block $~lib/runtime/WRAPARRAY|inlined.21 (result i32) + i32.const 1208 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 i32.const -3 i32.const -1 call $~lib/array/Array#copyWithin - i32.const 1504 + block $~lib/runtime/WRAPARRAY|inlined.22 (result i32) + i32.const 1240 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18505,18 +15826,28 @@ call $~lib/env/abort unreachable end - i32.const 1544 - global.set $std/array/cwArr - block (result i32) + block $~lib/runtime/WRAPARRAY|inlined.23 (result i32) + i32.const 1272 + local.set $0 + local.get $0 + i32.const 4 i32.const 2 - global.set $~lib/argc - global.get $std/array/cwArr - i32.const -4 - i32.const -3 - i32.const 0 - call $~lib/array/Array#copyWithin|trampoline + call $~lib/runtime/doWrapArray + end + global.set $std/array/cwArr + global.get $std/array/cwArr + i32.const -4 + i32.const -3 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#copyWithin + block $~lib/runtime/WRAPARRAY|inlined.24 (result i32) + i32.const 1304 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray end - i32.const 1584 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -18532,12 +15863,8 @@ i32.const 42 call $~lib/array/Array#unshift drop - block $~lib/array/Array#get:length|inlined.18 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 4 i32.eq i32.eqz @@ -18563,8 +15890,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 42 i32.eq i32.eqz @@ -18577,8 +15916,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 1 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 43 i32.eq i32.eqz @@ -18591,8 +15942,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 2 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 44 i32.eq i32.eqz @@ -18605,8 +15968,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 45 i32.eq i32.eqz @@ -18622,12 +15997,8 @@ i32.const 41 call $~lib/array/Array#unshift drop - block $~lib/array/Array#get:length|inlined.19 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 5 i32.eq i32.eqz @@ -18653,8 +16024,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 41 i32.eq i32.eqz @@ -18667,8 +16050,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 1 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 42 i32.eq i32.eqz @@ -18681,8 +16076,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 2 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 43 i32.eq i32.eqz @@ -18695,8 +16102,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 44 i32.eq i32.eqz @@ -18709,8 +16128,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 4 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 45 i32.eq i32.eqz @@ -18737,12 +16168,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.20 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 4 i32.eq i32.eqz @@ -18768,8 +16195,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 42 i32.eq i32.eqz @@ -18782,8 +16221,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 1 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 43 i32.eq i32.eqz @@ -18796,8 +16247,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 2 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 44 i32.eq i32.eqz @@ -18810,8 +16273,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 3 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 45 i32.eq i32.eqz @@ -18838,12 +16313,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.21 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz @@ -18869,8 +16340,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 42 i32.eq i32.eqz @@ -18883,8 +16366,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 1 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 43 i32.eq i32.eqz @@ -18897,8 +16392,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 2 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 44 i32.eq i32.eqz @@ -18913,12 +16420,8 @@ global.get $std/array/arr call $~lib/array/Array#reverse drop - block $~lib/array/Array#get:length|inlined.22 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz @@ -18944,8 +16447,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 44 i32.eq i32.eqz @@ -18958,8 +16473,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 1 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 43 i32.eq i32.eqz @@ -18972,8 +16499,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 2 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 42 i32.eq i32.eqz @@ -19163,22 +16702,10 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#includes|inlined.0 (result i32) - global.get $std/array/arr - local.set $0 - i32.const 44 - local.set $1 - i32.const 0 - local.set $2 - local.get $0 - local.get $1 - local.get $2 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - end + global.get $std/array/arr + i32.const 44 i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -19192,22 +16719,10 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#includes|inlined.1 (result i32) - global.get $std/array/arr - local.set $2 - i32.const 42 - local.set $1 - i32.const 0 - local.set $0 - local.get $2 - local.get $1 - local.get $0 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - end + global.get $std/array/arr + i32.const 42 i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -19221,22 +16736,10 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#includes|inlined.2 (result i32) - global.get $std/array/arr - local.set $0 - i32.const 45 - local.set $1 - i32.const 0 - local.set $2 - local.get $0 - local.get $1 - local.get $2 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - end + global.get $std/array/arr + i32.const 45 i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 0 @@ -19250,22 +16753,10 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#includes|inlined.3 (result i32) - global.get $std/array/arr - local.set $2 - i32.const 43 - local.set $1 - i32.const 100 - local.set $0 - local.get $2 - local.get $1 - local.get $0 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - end - i32.const 0 - i32.ne + global.get $std/array/arr + i32.const 43 + i32.const 100 + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 0 @@ -19279,22 +16770,10 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#includes|inlined.4 (result i32) - global.get $std/array/arr - local.set $0 - i32.const 43 - local.set $1 - i32.const -100 - local.set $2 - local.get $0 - local.get $1 - local.get $2 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - end - i32.const 0 - i32.ne + global.get $std/array/arr + i32.const 43 + i32.const -100 + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -19308,22 +16787,10 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#includes|inlined.5 (result i32) - global.get $std/array/arr - local.set $2 - i32.const 43 - local.set $1 - i32.const -2 - local.set $0 - local.get $2 - local.get $1 - local.get $0 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - end - i32.const 0 - i32.ne + global.get $std/array/arr + i32.const 43 + i32.const -2 + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -19337,22 +16804,10 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#includes|inlined.6 (result i32) - global.get $std/array/arr - local.set $0 - i32.const 43 - local.set $1 - i32.const -4 - local.set $2 - local.get $0 - local.get $1 - local.get $2 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - end - i32.const 0 - i32.ne + global.get $std/array/arr + i32.const 43 + i32.const -4 + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -19366,22 +16821,10 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#includes|inlined.7 (result i32) - global.get $std/array/arr - local.set $2 - i32.const 43 - local.set $1 - i32.const 0 - local.set $0 - local.get $2 - local.get $1 - local.get $0 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - end + global.get $std/array/arr + i32.const 43 i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -19395,22 +16838,10 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#includes|inlined.8 (result i32) - global.get $std/array/arr - local.set $0 - i32.const 43 - local.set $1 - i32.const 1 - local.set $2 - local.get $0 - local.get $1 - local.get $2 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - end - i32.const 0 - i32.ne + global.get $std/array/arr + i32.const 43 + i32.const 1 + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -19424,22 +16855,10 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#includes|inlined.9 (result i32) - global.get $std/array/arr - local.set $2 - i32.const 43 - local.set $1 - i32.const 2 - local.set $0 - local.get $2 - local.get $1 - local.get $0 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - end - i32.const 0 - i32.ne + global.get $std/array/arr + i32.const 43 + i32.const 2 + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -19458,12 +16877,8 @@ i32.const 1 call $~lib/array/Array#splice drop - block $~lib/array/Array#get:length|inlined.23 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 4 i32.eq i32.eqz @@ -19489,8 +16904,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 44 i32.eq i32.eqz @@ -19503,8 +16930,20 @@ unreachable end global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 1 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 42 i32.eq i32.eqz @@ -19516,15 +16955,18 @@ call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/array/sarr - i32.const 0 - i32.const 0 - call $~lib/array/Array#splice|trampoline + global.get $std/array/sarr + i32.const 0 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#splice + block $~lib/runtime/WRAPARRAY|inlined.25 (result i32) + i32.const 1392 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray end - i32.const 1664 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19537,7 +16979,14 @@ unreachable end global.get $std/array/sarr - i32.const 1680 + block $~lib/runtime/WRAPARRAY|inlined.26 (result i32) + i32.const 1424 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19549,17 +16998,27 @@ call $~lib/env/abort unreachable end - i32.const 1720 - global.set $std/array/sarr - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/array/sarr + block $~lib/runtime/WRAPARRAY|inlined.27 (result i32) + i32.const 1432 + local.set $0 + local.get $0 + i32.const 4 i32.const 2 - i32.const 0 - call $~lib/array/Array#splice|trampoline + call $~lib/runtime/doWrapArray + end + global.set $std/array/sarr + global.get $std/array/sarr + i32.const 2 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#splice + block $~lib/runtime/WRAPARRAY|inlined.28 (result i32) + i32.const 1464 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray end - i32.const 1760 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19572,7 +17031,14 @@ unreachable end global.get $std/array/sarr - i32.const 1784 + block $~lib/runtime/WRAPARRAY|inlined.29 (result i32) + i32.const 1488 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19584,13 +17050,27 @@ call $~lib/env/abort unreachable end - i32.const 1824 + block $~lib/runtime/WRAPARRAY|inlined.30 (result i32) + i32.const 1504 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/sarr global.get $std/array/sarr i32.const 2 i32.const 2 call $~lib/array/Array#splice - i32.const 1848 + block $~lib/runtime/WRAPARRAY|inlined.31 (result i32) + i32.const 1536 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19603,7 +17083,14 @@ unreachable end global.get $std/array/sarr - i32.const 1888 + block $~lib/runtime/WRAPARRAY|inlined.32 (result i32) + i32.const 1552 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19615,13 +17102,27 @@ call $~lib/env/abort unreachable end - i32.const 1928 + block $~lib/runtime/WRAPARRAY|inlined.33 (result i32) + i32.const 1576 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/sarr global.get $std/array/sarr i32.const 0 i32.const 1 call $~lib/array/Array#splice - i32.const 1952 + block $~lib/runtime/WRAPARRAY|inlined.34 (result i32) + i32.const 1608 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19634,7 +17135,14 @@ unreachable end global.get $std/array/sarr - i32.const 1992 + block $~lib/runtime/WRAPARRAY|inlined.35 (result i32) + i32.const 1624 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19646,17 +17154,27 @@ call $~lib/env/abort unreachable end - i32.const 2032 - global.set $std/array/sarr - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/array/sarr - i32.const -1 - i32.const 0 - call $~lib/array/Array#splice|trampoline + block $~lib/runtime/WRAPARRAY|inlined.36 (result i32) + i32.const 1648 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end + global.set $std/array/sarr + global.get $std/array/sarr + i32.const -1 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#splice + block $~lib/runtime/WRAPARRAY|inlined.37 (result i32) + i32.const 1680 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray end - i32.const 2056 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19669,7 +17187,14 @@ unreachable end global.get $std/array/sarr - i32.const 2096 + block $~lib/runtime/WRAPARRAY|inlined.38 (result i32) + i32.const 1696 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19681,17 +17206,27 @@ call $~lib/env/abort unreachable end - i32.const 2136 - global.set $std/array/sarr - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/array/sarr - i32.const -2 - i32.const 0 - call $~lib/array/Array#splice|trampoline + block $~lib/runtime/WRAPARRAY|inlined.39 (result i32) + i32.const 1720 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end + global.set $std/array/sarr + global.get $std/array/sarr + i32.const -2 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#splice + block $~lib/runtime/WRAPARRAY|inlined.40 (result i32) + i32.const 1752 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray end - i32.const 2160 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19704,7 +17239,14 @@ unreachable end global.get $std/array/sarr - i32.const 2200 + block $~lib/runtime/WRAPARRAY|inlined.41 (result i32) + i32.const 1768 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19716,13 +17258,27 @@ call $~lib/env/abort unreachable end - i32.const 2240 + block $~lib/runtime/WRAPARRAY|inlined.42 (result i32) + i32.const 1792 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/sarr global.get $std/array/sarr i32.const -2 i32.const 1 call $~lib/array/Array#splice - i32.const 2264 + block $~lib/runtime/WRAPARRAY|inlined.43 (result i32) + i32.const 1824 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19735,7 +17291,14 @@ unreachable end global.get $std/array/sarr - i32.const 2304 + block $~lib/runtime/WRAPARRAY|inlined.44 (result i32) + i32.const 1840 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19747,13 +17310,27 @@ call $~lib/env/abort unreachable end - i32.const 2344 + block $~lib/runtime/WRAPARRAY|inlined.45 (result i32) + i32.const 1864 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/sarr global.get $std/array/sarr i32.const -7 i32.const 1 call $~lib/array/Array#splice - i32.const 2368 + block $~lib/runtime/WRAPARRAY|inlined.46 (result i32) + i32.const 1896 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19766,7 +17343,14 @@ unreachable end global.get $std/array/sarr - i32.const 2408 + block $~lib/runtime/WRAPARRAY|inlined.47 (result i32) + i32.const 1912 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19778,13 +17362,27 @@ call $~lib/env/abort unreachable end - i32.const 2448 + block $~lib/runtime/WRAPARRAY|inlined.48 (result i32) + i32.const 1936 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/sarr global.get $std/array/sarr i32.const -2 i32.const -1 call $~lib/array/Array#splice - i32.const 2464 + block $~lib/runtime/WRAPARRAY|inlined.49 (result i32) + i32.const 1968 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19797,7 +17395,14 @@ unreachable end global.get $std/array/sarr - i32.const 2504 + block $~lib/runtime/WRAPARRAY|inlined.50 (result i32) + i32.const 1976 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19809,13 +17414,27 @@ call $~lib/env/abort unreachable end - i32.const 2544 + block $~lib/runtime/WRAPARRAY|inlined.51 (result i32) + i32.const 2008 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/sarr global.get $std/array/sarr i32.const 1 i32.const -2 call $~lib/array/Array#splice - i32.const 2560 + block $~lib/runtime/WRAPARRAY|inlined.52 (result i32) + i32.const 2040 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19828,7 +17447,14 @@ unreachable end global.get $std/array/sarr - i32.const 2600 + block $~lib/runtime/WRAPARRAY|inlined.53 (result i32) + i32.const 2048 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19840,13 +17466,27 @@ call $~lib/env/abort unreachable end - i32.const 2640 + block $~lib/runtime/WRAPARRAY|inlined.54 (result i32) + i32.const 2080 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/sarr global.get $std/array/sarr i32.const 4 i32.const 0 call $~lib/array/Array#splice - i32.const 2656 + block $~lib/runtime/WRAPARRAY|inlined.55 (result i32) + i32.const 2112 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19859,7 +17499,14 @@ unreachable end global.get $std/array/sarr - i32.const 2696 + block $~lib/runtime/WRAPARRAY|inlined.56 (result i32) + i32.const 2120 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19871,13 +17518,27 @@ call $~lib/env/abort unreachable end - i32.const 2736 + block $~lib/runtime/WRAPARRAY|inlined.57 (result i32) + i32.const 2152 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/sarr global.get $std/array/sarr i32.const 7 i32.const 0 call $~lib/array/Array#splice - i32.const 2752 + block $~lib/runtime/WRAPARRAY|inlined.58 (result i32) + i32.const 2184 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19890,7 +17551,14 @@ unreachable end global.get $std/array/sarr - i32.const 2792 + block $~lib/runtime/WRAPARRAY|inlined.59 (result i32) + i32.const 2192 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19902,13 +17570,27 @@ call $~lib/env/abort unreachable end - i32.const 2832 + block $~lib/runtime/WRAPARRAY|inlined.60 (result i32) + i32.const 2224 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end global.set $std/array/sarr global.get $std/array/sarr i32.const 7 i32.const 5 call $~lib/array/Array#splice - i32.const 2848 + block $~lib/runtime/WRAPARRAY|inlined.61 (result i32) + i32.const 2256 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19921,7 +17603,14 @@ unreachable end global.get $std/array/sarr - i32.const 2888 + block $~lib/runtime/WRAPARRAY|inlined.62 (result i32) + i32.const 2264 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -19934,21 +17623,21 @@ unreachable end global.get $std/array/arr + i32.load offset=4 i32.const 0 - i32.const 0 - call $~lib/array/Array#__set + i32.store global.get $std/array/arr + i32.load offset=4 i32.const 1 - i32.const 1 - call $~lib/array/Array#__set + i32.store offset=4 global.get $std/array/arr + i32.load offset=4 i32.const 2 - i32.const 2 - call $~lib/array/Array#__set + i32.store offset=8 global.get $std/array/arr + i32.load offset=4 i32.const 3 - i32.const 3 - call $~lib/array/Array#__set + i32.store offset=12 global.get $std/array/arr i32.const 1 call $~lib/array/Array#findIndex @@ -20013,12 +17702,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.24 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 8 i32.eq i32.eqz @@ -20074,12 +17759,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.25 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz @@ -20147,12 +17828,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.26 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 8 i32.eq i32.eqz @@ -20208,12 +17885,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.27 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz @@ -20281,12 +17954,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.28 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 8 i32.eq i32.eqz @@ -20342,12 +18011,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.29 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz @@ -20401,12 +18066,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.30 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 8 i32.eq i32.eqz @@ -20464,12 +18125,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.31 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz @@ -20492,12 +18149,8 @@ global.get $std/array/arr i32.const 21 call $~lib/array/Array#forEach - block $~lib/array/Array#get:length|inlined.32 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 100 i32.eq i32.eqz @@ -20550,12 +18203,8 @@ i32.const 22 call $~lib/array/Array#map global.set $std/array/newArr - block $~lib/array/Array#get:length|inlined.0 (result i32) - global.get $std/array/newArr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/newArr + call $~lib/array/Array#get:length i32.const 4 i32.eq i32.eqz @@ -20568,11 +18217,35 @@ unreachable end global.get $std/array/newArr + local.tee $0 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + f32.load global.get $std/array/arr + local.tee $0 + i32.load offset=4 i32.const 0 - call $~lib/array/Array#__get + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load f32.convert_i32_s f32.eq i32.eqz @@ -20602,12 +18275,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.33 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 8 i32.eq i32.eqz @@ -20667,12 +18336,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.34 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz @@ -20696,12 +18361,8 @@ i32.const 26 call $~lib/array/Array#filter global.set $std/array/filteredArr - block $~lib/array/Array#get:length|inlined.35 (result i32) - global.get $std/array/filteredArr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/filteredArr + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz @@ -20731,12 +18392,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.36 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 8 i32.eq i32.eqz @@ -20796,12 +18453,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.37 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz @@ -20910,12 +18563,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.38 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 8 i32.eq i32.eqz @@ -20973,12 +18622,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.39 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz @@ -21087,12 +18732,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.40 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 8 i32.eq i32.eqz @@ -21150,12 +18791,8 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#get:length|inlined.41 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 0 i32.eq i32.eqz @@ -21195,7 +18832,14 @@ end drop global.get $std/array/f32ArrayTyped - i32.const 3240 + block $~lib/runtime/WRAPARRAY|inlined.0 (result i32) + i32.const 2576 + local.set $0 + local.get $0 + i32.const 9 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -21216,7 +18860,14 @@ end drop global.get $std/array/f64ArrayTyped - i32.const 3512 + block $~lib/runtime/WRAPARRAY|inlined.0 (result i32) + i32.const 2712 + local.set $0 + local.get $0 + i32.const 10 + i32.const 3 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -21237,7 +18888,14 @@ end drop global.get $std/array/i32ArrayTyped - i32.const 3592 + block $~lib/runtime/WRAPARRAY|inlined.63 (result i32) + i32.const 2840 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -21258,7 +18916,14 @@ end drop global.get $std/array/u32ArrayTyped - i32.const 3672 + block $~lib/runtime/WRAPARRAY|inlined.5 (result i32) + i32.const 2928 + local.set $0 + local.get $0 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -21290,7 +18955,14 @@ global.get $std/array/reversed1 call $std/array/assertSortedDefault global.get $std/array/reversed1 - i32.const 3840 + block $~lib/runtime/WRAPARRAY|inlined.64 (result i32) + i32.const 3168 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -21305,7 +18977,14 @@ global.get $std/array/reversed2 call $std/array/assertSortedDefault global.get $std/array/reversed2 - i32.const 3864 + block $~lib/runtime/WRAPARRAY|inlined.65 (result i32) + i32.const 3184 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -21454,11 +19133,18 @@ i32.const 0 call $std/array/assertSorted|trampoline end - i32.const 4240 - i32.const 4216 + block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) + i32.const 3528 + local.set $0 + local.get $0 + i32.const 15 + i32.const 0 + call $~lib/runtime/doWrapArray + end + i32.const 3512 call $~lib/array/Array#join - i32.const 4248 - call $~lib/string/String.__eq + i32.const 3544 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21468,11 +19154,18 @@ call $~lib/env/abort unreachable end - i32.const 4872 - i32.const 3904 + block $~lib/runtime/WRAPARRAY|inlined.67 (result i32) + i32.const 4048 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end + i32.const 3264 call $~lib/array/Array#join - i32.const 4880 - call $~lib/string/String.__eq + i32.const 4072 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21482,11 +19175,18 @@ call $~lib/env/abort unreachable end - i32.const 4976 - i32.const 4936 + block $~lib/runtime/WRAPARRAY|inlined.7 (result i32) + i32.const 4136 + local.set $0 + local.get $0 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray + end + i32.const 4120 call $~lib/array/Array#join - i32.const 4880 - call $~lib/string/String.__eq + i32.const 4072 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21496,11 +19196,18 @@ call $~lib/env/abort unreachable end - i32.const 5032 - i32.const 5008 + block $~lib/runtime/WRAPARRAY|inlined.69 (result i32) + i32.const 4192 + local.set $0 + local.get $0 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end + i32.const 4176 call $~lib/array/Array#join - i32.const 5040 - call $~lib/string/String.__eq + i32.const 4208 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21510,11 +19217,18 @@ call $~lib/env/abort unreachable end - i32.const 6688 - i32.const 5168 + block $~lib/runtime/WRAPARRAY|inlined.2 (result i32) + i32.const 5432 + local.set $0 + local.get $0 + i32.const 10 + i32.const 3 + call $~lib/runtime/doWrapArray + end + i32.const 4320 call $~lib/array/Array#join - i32.const 6696 - call $~lib/string/String.__eq + i32.const 5488 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21524,11 +19238,18 @@ call $~lib/env/abort unreachable end - i32.const 6864 - i32.const 3904 + block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) + i32.const 5616 + local.set $0 + local.get $0 + i32.const 14 + i32.const 2 + call $~lib/runtime/doWrapArray + end + i32.const 3264 call $~lib/array/Array#join - i32.const 6784 - call $~lib/string/String.__eq + i32.const 5576 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21541,30 +19262,30 @@ block (result i32) i32.const 0 i32.const 3 - call $~lib/array/Array#constructor - local.set $3 - local.get $3 + call $~lib/array/Array#constructor + local.set $2 + local.get $2 i32.const 0 i32.const 0 call $std/array/Ref#constructor - call $~lib/array/Array#__unchecked_set - local.get $3 + call $~lib/array/Array#__set + local.get $2 i32.const 1 i32.const 0 - call $~lib/array/Array#__unchecked_set - local.get $3 + call $~lib/array/Array#__set + local.get $2 i32.const 2 i32.const 0 call $std/array/Ref#constructor - call $~lib/array/Array#__unchecked_set - local.get $3 + call $~lib/array/Array#__set + local.get $2 end global.set $std/array/refArr global.get $std/array/refArr - i32.const 4216 - call $~lib/array/Array#join - i32.const 6912 - call $~lib/string/String.__eq + i32.const 3512 + call $~lib/array/Array#join + i32.const 5680 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21574,15 +19295,10 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#toString|inlined.1 (result i32) - global.get $std/array/reversed0 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array#join - end - i32.const 3904 - call $~lib/string/String.__eq + global.get $std/array/reversed0 + call $~lib/array/Array#toString + i32.const 3264 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21592,15 +19308,10 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#toString|inlined.3 (result i32) - global.get $std/array/reversed1 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array#join - end - i32.const 6784 - call $~lib/string/String.__eq + global.get $std/array/reversed1 + call $~lib/array/Array#toString + i32.const 5576 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21610,15 +19321,10 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#toString|inlined.5 (result i32) - global.get $std/array/reversed2 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array#join - end - i32.const 6984 - call $~lib/string/String.__eq + global.get $std/array/reversed2 + call $~lib/array/Array#toString + i32.const 5752 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21628,15 +19334,10 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#toString|inlined.7 (result i32) - global.get $std/array/reversed4 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array#join - end - i32.const 7000 - call $~lib/string/String.__eq + global.get $std/array/reversed4 + call $~lib/array/Array#toString + i32.const 5768 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21646,15 +19347,17 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#toString|inlined.1 (result i32) - i32.const 7064 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array#join + block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) + i32.const 5808 + local.set $2 + local.get $2 + i32.const 20 + i32.const 0 + call $~lib/runtime/doWrapArray end - i32.const 7072 - call $~lib/string/String.__eq + call $~lib/array/Array#toString + i32.const 5824 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21664,15 +19367,17 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#toString|inlined.1 (result i32) - i32.const 7128 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array#join + block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) + i32.const 5864 + local.set $2 + local.get $2 + i32.const 21 + i32.const 1 + call $~lib/runtime/doWrapArray end - i32.const 7136 - call $~lib/string/String.__eq + call $~lib/array/Array#toString + i32.const 5880 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21682,15 +19387,17 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#toString|inlined.1 (result i32) - i32.const 7232 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array#join + block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) + i32.const 5944 + local.set $2 + local.get $2 + i32.const 16 + i32.const 3 + call $~lib/runtime/doWrapArray end - i32.const 7240 - call $~lib/string/String.__eq + call $~lib/array/Array#toString + i32.const 5976 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21700,15 +19407,17 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#toString|inlined.1 (result i32) - i32.const 7432 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array#join + block $~lib/runtime/WRAPARRAY|inlined.1 (result i32) + i32.const 6072 + local.set $2 + local.get $2 + i32.const 22 + i32.const 3 + call $~lib/runtime/doWrapArray end - i32.const 7440 - call $~lib/string/String.__eq + call $~lib/array/Array#toString + i32.const 6112 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21718,15 +19427,10 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#toString|inlined.1 (result i32) - global.get $std/array/randomStringsExpected - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array#join - end - i32.const 7528 - call $~lib/string/String.__eq + global.get $std/array/randomStringsExpected + call $~lib/array/Array#toString + i32.const 6208 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21736,15 +19440,17 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array#toString|inlined.3 (result i32) - i32.const 7648 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array#join + block $~lib/runtime/WRAPARRAY|inlined.3 (result i32) + i32.const 6304 + local.set $2 + local.get $2 + i32.const 14 + i32.const 2 + call $~lib/runtime/doWrapArray end - i32.const 7656 - call $~lib/string/String.__eq + call $~lib/array/Array#toString + i32.const 6328 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21754,15 +19460,40 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array>#toString|inlined.1 (result i32) - global.get $std/array/subarr32 + block (result i32) + i32.const 0 + i32.const 2 + call $~lib/array/Array>#constructor local.set $3 local.get $3 - i32.const 4216 - call $~lib/array/Array>#join + i32.const 0 + block $~lib/runtime/WRAPARRAY|inlined.70 (result i32) + i32.const 6352 + local.set $2 + local.get $2 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end + call $~lib/array/Array>#__set + local.get $3 + i32.const 1 + block $~lib/runtime/WRAPARRAY|inlined.71 (result i32) + i32.const 6368 + local.set $2 + local.get $2 + i32.const 4 + i32.const 2 + call $~lib/runtime/doWrapArray + end + call $~lib/array/Array>#__set + local.get $3 end - i32.const 7744 - call $~lib/string/String.__eq + global.set $std/array/subarr32 + global.get $std/array/subarr32 + call $~lib/array/Array>#toString + i32.const 6384 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21772,15 +19503,40 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array>#toString|inlined.1 (result i32) - global.get $std/array/subarr8 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array>#join + block (result i32) + i32.const 0 + i32.const 2 + call $~lib/array/Array>#constructor + local.set $4 + local.get $4 + i32.const 0 + block $~lib/runtime/WRAPARRAY|inlined.5 (result i32) + i32.const 6408 + local.set $3 + local.get $3 + i32.const 7 + i32.const 0 + call $~lib/runtime/doWrapArray + end + call $~lib/array/Array>#__set + local.get $4 + i32.const 1 + block $~lib/runtime/WRAPARRAY|inlined.6 (result i32) + i32.const 6424 + local.set $3 + local.get $3 + i32.const 7 + i32.const 0 + call $~lib/runtime/doWrapArray + end + call $~lib/array/Array>#__set + local.get $4 end - i32.const 7744 - call $~lib/string/String.__eq + global.set $std/array/subarr8 + global.get $std/array/subarr8 + call $~lib/array/Array>#toString + i32.const 6384 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21790,15 +19546,39 @@ call $~lib/env/abort unreachable end - block $~lib/array/Array>>#toString|inlined.1 (result i32) - global.get $std/array/subarrU32 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array>>#join + block (result i32) + i32.const 0 + i32.const 1 + call $~lib/array/Array>>#constructor + local.set $6 + local.get $6 + i32.const 0 + block (result i32) + i32.const 0 + i32.const 1 + call $~lib/array/Array>#constructor + local.set $5 + local.get $5 + i32.const 0 + block $~lib/runtime/WRAPARRAY|inlined.8 (result i32) + i32.const 6440 + local.set $4 + local.get $4 + i32.const 8 + i32.const 2 + call $~lib/runtime/doWrapArray + end + call $~lib/array/Array>#__set + local.get $5 + end + call $~lib/array/Array>>#__set + local.get $6 end - i32.const 6784 - call $~lib/string/String.__eq + global.set $std/array/subarrU32 + global.get $std/array/subarrU32 + call $~lib/array/Array>>#toString + i32.const 5576 + call $~lib/string/String.eq i32.eqz if i32.const 0 @@ -21809,9 +19589,9 @@ unreachable end ) - (func $start (; 227 ;) (type $FUNCSIG$v) + (func $start (; 258 ;) (type $FUNCSIG$v) call $start:std/array ) - (func $null (; 228 ;) (type $FUNCSIG$v) + (func $null (; 259 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 6983daf2..7fbd45db 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -1,32 +1,31 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$i (func (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 56) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 120) "\12\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 160) "\1b\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 224) "\08\00\00\00\00\00\00\00\01\00\00\00\02") - (data (i32.const 240) "\e0\00\00\00\02") - (data (i32.const 248) "\10\00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 56) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 96) "\01\00\00\00$\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 144) "\02\00\00\00\08\00\00\00\01\00\00\00\02") + (data (i32.const 160) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/arraybuffer/buffer (mut i32) (i32.const 0)) - (global $~lib/argc (mut i32) (i32.const 0)) (global $std/arraybuffer/sliced (mut i32) (i32.const 0)) (global $std/arraybuffer/arr8 (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -49,15 +48,15 @@ i32.add i32.const -8 i32.and - local.tee $2 + local.tee $0 current_memory - local.tee $3 + local.tee $2 i32.const 16 i32.shl i32.gt_u if - local.get $3 local.get $2 + local.get $0 local.get $1 i32.sub i32.const 65535 @@ -66,16 +65,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $0 + local.tee $3 + local.get $2 local.get $3 - local.get $0 i32.gt_s select grow_memory i32.const 0 i32.lt_s if - local.get $0 + local.get $3 grow_memory i32.const 0 i32.lt_s @@ -84,23 +83,12 @@ end end end - local.get $2 + local.get $0 global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/doAllocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 56 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end i32.const 1 i32.const 32 local.get $0 @@ -109,232 +97,288 @@ i32.clz i32.sub i32.shl - call $~lib/allocator/arena/__memory_allocate + call $~lib/memory/memory.allocate local.tee $1 - local.get $0 + i32.const -1520547049 i32.store local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 8 + i32.add ) - (func $~lib/internal/memory/memset (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) - local.get $1 - i32.eqz - if - return - end - local.get $0 - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 2 - i32.le_u - if - return - end - local.get $0 - i32.const 1 - i32.add - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.add - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $2 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 - i32.add - i32.const 0 - i32.store8 - local.get $0 - local.get $1 - i32.add - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 8 - i32.le_u - if - return - end - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $2 - local.get $0 - i32.add - local.tee $0 - i32.const 0 - i32.store - local.get $1 - local.get $2 - i32.sub - i32.const -4 - i32.and - local.tee $1 - local.get $0 - i32.add - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $1 - i32.const 8 - i32.le_u - if - return - end - local.get $0 - i32.const 4 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 8 - i32.add - i32.const 0 - i32.store - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $1 - i32.const 24 - i32.le_u - if - return - end - local.get $0 - i32.const 12 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 16 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 20 - i32.add - i32.const 0 - i32.store - local.get $0 - i32.const 24 - i32.add - i32.const 0 - i32.store - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 24 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $2 - i32.const 16 - i32.sub - i32.const 0 - i32.store - local.get $0 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $2 - local.get $0 - i32.add - local.set $0 - local.get $1 - local.get $2 - i32.sub - local.set $1 - loop $continue|0 + block $~lib/util/memory/memset|inlined.0 local.get $1 - i32.const 32 - i32.ge_u - if - local.get $0 - i64.const 0 - i64.store - local.get $0 - i32.const 8 - i32.add - i64.const 0 - i64.store - local.get $0 - i32.const 16 - i32.add - i64.const 0 - i64.store - local.get $0 - i32.const 24 - i32.add - i64.const 0 - i64.store + i32.eqz + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + i32.const 1 + i32.sub + i32.const 0 + i32.store8 + local.get $1 + i32.const 2 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 1 + i32.add + i32.const 0 + i32.store8 + local.get $0 + i32.const 2 + i32.add + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + local.tee $2 + i32.const 2 + i32.sub + i32.const 0 + i32.store8 + local.get $2 + i32.const 3 + i32.sub + i32.const 0 + i32.store8 + local.get $1 + i32.const 6 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 3 + i32.add + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + i32.const 4 + i32.sub + i32.const 0 + i32.store8 + local.get $1 + i32.const 8 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $1 + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.tee $2 + i32.sub + local.set $1 + local.get $0 + local.get $2 + i32.add + local.tee $0 + i32.const 0 + i32.store + local.get $1 + i32.const -4 + i32.and + local.tee $1 + local.get $0 + i32.add + i32.const 4 + i32.sub + i32.const 0 + i32.store + local.get $1 + i32.const 8 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 4 + i32.add + i32.const 0 + i32.store + local.get $0 + i32.const 8 + i32.add + i32.const 0 + i32.store + local.get $0 + local.get $1 + i32.add + local.tee $2 + i32.const 12 + i32.sub + i32.const 0 + i32.store + local.get $2 + i32.const 8 + i32.sub + i32.const 0 + i32.store + local.get $1 + i32.const 24 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 12 + i32.add + i32.const 0 + i32.store + local.get $0 + i32.const 16 + i32.add + i32.const 0 + i32.store + local.get $0 + i32.const 20 + i32.add + i32.const 0 + i32.store + local.get $0 + i32.const 24 + i32.add + i32.const 0 + i32.store + local.get $0 + local.get $1 + i32.add + local.tee $2 + i32.const 28 + i32.sub + i32.const 0 + i32.store + local.get $2 + i32.const 24 + i32.sub + i32.const 0 + i32.store + local.get $2 + i32.const 20 + i32.sub + i32.const 0 + i32.store + local.get $2 + i32.const 16 + i32.sub + i32.const 0 + i32.store + local.get $0 + i32.const 4 + i32.and + i32.const 24 + i32.add + local.tee $2 + local.get $0 + i32.add + local.set $0 + local.get $1 + local.get $2 + i32.sub + local.set $1 + loop $continue|0 local.get $1 i32.const 32 - i32.sub - local.set $1 - local.get $0 - i32.const 32 - i32.add - local.set $0 - br $continue|0 + i32.ge_u + if + local.get $0 + i64.const 0 + i64.store + local.get $0 + i32.const 8 + i32.add + i64.const 0 + i64.store + local.get $0 + i32.const 16 + i32.add + i64.const 0 + i64.store + local.get $0 + i32.const 24 + i32.add + i64.const 0 + i64.store + local.get $1 + i32.const 32 + i32.sub + local.set $1 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $continue|0 + end end end ) - (func $~lib/internal/memory/memcpy (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/runtime/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 200 + i32.le_u + if + i32.const 0 + i32.const 64 + i32.const 191 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.const 8 + i32.sub + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 64 + i32.const 192 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doRegister (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + i32.const 8 + i32.sub + local.get $1 + i32.store + local.get $0 + ) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 1073741816 + i32.gt_u + if + i32.const 0 + i32.const 16 + i32.const 24 + i32.const 43 + call $~lib/env/abort + unreachable + end + local.get $0 + call $~lib/runtime/doAllocate + local.tee $1 + local.get $0 + call $~lib/memory/memory.fill + local.get $1 + i32.const 2 + call $~lib/runtime/doRegister + ) + (func $~lib/util/memory/memcpy (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1231,64 +1275,106 @@ i32.store8 end ) - (func $~lib/internal/memory/memmove (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - local.get $1 - i32.eq - if - return - end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - i32.eqz - if + block $~lib/util/memory/memmove|inlined.0 local.get $0 + local.get $1 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $1 local.get $2 i32.add - local.get $1 + local.get $0 i32.le_u - local.set $3 - end - local.get $3 - if - local.get $0 - local.get $1 - local.get $2 - call $~lib/internal/memory/memcpy - return - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq + local.tee $3 + i32.eqz if - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $2 - i32.eqz + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + local.set $3 + end + local.get $3 + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 + local.get $0 + i32.const 7 + i32.and if - return + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $4 + local.get $3 + i32.load8_u + i32.store8 + br $continue|0 end + end + loop $continue|1 local.get $2 - i32.const 1 - i32.sub - local.set $2 + i32.const 8 + i32.ge_u + if + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|1 + end + end + end + loop $continue|2 + local.get $2 + if local.get $0 local.tee $4 i32.const 1 @@ -1303,79 +1389,69 @@ local.get $3 i32.load8_u i32.store8 - br $continue|0 - end - end - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $0 - local.get $1 - i64.load - i64.store local.get $2 - i32.const 8 + i32.const 1 i32.sub local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - br $continue|1 + br $continue|2 end end - end - loop $continue|2 - local.get $2 + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - local.get $0 - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $4 - local.get $3 - i32.load8_u - i32.store8 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $continue|2 - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if + loop $continue|3 + local.get $0 local.get $2 - i32.eqz + i32.add + i32.const 7 + i32.and if - return + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|3 end + end + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + local.get $2 + i32.const 8 + i32.sub + local.tee $2 + local.get $0 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + br $continue|4 + end + end + end + loop $continue|5 + local.get $2 + if local.get $2 i32.const 1 i32.sub @@ -1387,72 +1463,39 @@ i32.add i32.load8_u i32.store8 - br $continue|3 + br $continue|5 end end - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - local.get $2 - i32.const 8 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - br $continue|4 - end - end - end - loop $continue|5 - local.get $2 - if - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - local.get $0 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 - end end end ) - (func $~lib/arraybuffer/ArrayBuffer#slice (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#slice (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 - i32.load - local.set $3 + i32.const 8 + i32.sub + i32.load offset=4 + local.set $4 local.get $1 i32.const 0 i32.lt_s if (result i32) local.get $1 - local.get $3 - i32.add - local.tee $4 - i32.const 0 local.get $4 + i32.add + local.tee $3 + i32.const 0 + local.get $3 i32.const 0 i32.gt_s select else local.get $1 + local.tee $3 + local.get $4 local.get $3 - local.get $1 - local.get $3 + local.get $4 i32.lt_s select end @@ -1462,227 +1505,219 @@ i32.lt_s if (result i32) local.get $2 - local.get $3 - i32.add - local.tee $4 - i32.const 0 local.get $4 + i32.add + local.tee $3 + i32.const 0 + local.get $3 i32.const 0 i32.gt_s select else local.get $2 + local.tee $3 + local.get $4 local.get $3 - local.get $2 - local.get $3 + local.get $4 i32.lt_s select end local.get $1 i32.sub - local.tee $4 + local.tee $3 i32.const 0 - local.get $4 + local.get $3 i32.const 0 i32.gt_s select local.tee $3 - call $~lib/internal/arraybuffer/allocateUnsafe + call $~lib/runtime/doAllocate local.tee $2 - i32.const 8 - i32.add local.get $0 - i32.const 8 - i32.add local.get $1 i32.add local.get $3 - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy local.get $2 + i32.const 2 + call $~lib/runtime/doRegister ) - (func $~lib/arraybuffer/ArrayBuffer#slice|trampoline (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/runtime/ArrayBufferView#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $1 - end - i32.const 1073741816 - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/arraybuffer/ArrayBuffer#slice - ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) i32.const 1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.tee $1 - i32.const 8 - i32.add - i32.const 1 - call $~lib/internal/memory/memset - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/allocator/arena/__memory_allocate - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 + i32.const 1073741816 local.get $1 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 1 - i32.store offset=8 - local.get $0 - ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - i32.const 4 - call $~lib/internal/arraybuffer/allocateUnsafe - local.tee $1 - i32.const 8 - i32.add - i32.const 4 - call $~lib/internal/memory/memset - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/allocator/arena/__memory_allocate - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - local.get $1 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 4 - i32.store offset=8 - local.get $0 - ) - (func $~lib/dataview/DataView#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - block (result i32) - local.get $1 - i32.const -2147483648 - i32.eq - if - local.get $0 - i32.load - local.set $1 - end - local.get $1 - i32.const 1073741816 - i32.gt_u - end + i32.shr_u + i32.gt_u if i32.const 0 - i32.const 248 - i32.const 15 - i32.const 44 + i32.const 64 + i32.const 226 + i32.const 57 call $~lib/env/abort unreachable end + i32.const 1 local.get $1 + i32.shl + local.tee $2 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $1 local.get $0 + i32.eqz + if + i32.const 12 + call $~lib/runtime/doAllocate + i32.const 3 + call $~lib/runtime/doRegister + local.set $0 + end + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 + local.get $2 + i32.store offset=8 + local.get $0 + ) + (func $~lib/runtime/doWrapArray (; 11 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + (local $1 i32) + (local $2 i32) + i32.const 16 + call $~lib/runtime/doAllocate + i32.const 5 + call $~lib/runtime/doRegister + local.tee $0 + i32.const 148 i32.load - i32.gt_s + local.tee $1 + call $~lib/runtime/doAllocate + i32.const 5 + call $~lib/runtime/doRegister + local.tee $2 + i32.store + local.get $0 + local.get $2 + i32.store offset=4 + local.get $0 + local.get $1 + i32.store offset=8 + local.get $0 + local.get $1 + i32.const 2 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 152 + local.get $1 + call $~lib/memory/memory.copy + local.get $0 + ) + (func $~lib/dataview/DataView#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.const 8 + i32.sub + i32.load offset=4 + local.tee $2 + i32.const 1073741816 + i32.gt_u if i32.const 0 - i32.const 248 - i32.const 16 - i32.const 53 + i32.const 168 + i32.const 18 + i32.const 47 + call $~lib/env/abort + unreachable + end + local.get $2 + local.get $0 + i32.const 8 + i32.sub + i32.load offset=4 + i32.gt_u + if + i32.const 0 + i32.const 168 + i32.const 19 + i32.const 63 call $~lib/env/abort unreachable end i32.const 12 - call $~lib/allocator/arena/__memory_allocate - local.tee $2 - local.get $0 + call $~lib/runtime/doAllocate + i32.const 7 + call $~lib/runtime/doRegister + local.tee $1 + i32.const 0 i32.store - local.get $2 + local.get $1 i32.const 0 i32.store offset=4 - local.get $2 local.get $1 + i32.const 0 i32.store offset=8 + local.get $1 + local.get $0 + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 local.get $2 + i32.store offset=8 + local.get $1 ) - (func $start:std/arraybuffer (; 11 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i32) - i32.const 288 + (func $start:std/arraybuffer (; 13 ;) (type $FUNCSIG$v) + i32.const 200 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset i32.const 8 - call $~lib/internal/arraybuffer/allocateUnsafe - local.tee $0 - i32.const 8 - i32.add - i32.const 8 - call $~lib/internal/memory/memset - local.get $0 + call $~lib/arraybuffer/ArrayBuffer#constructor global.set $std/arraybuffer/buffer global.get $std/arraybuffer/buffer - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 8 i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 5 i32.const 0 call $~lib/env/abort unreachable end - i32.const 0 - global.set $~lib/argc global.get $std/arraybuffer/buffer i32.const 0 - call $~lib/arraybuffer/ArrayBuffer#slice|trampoline + i32.const 1073741816 + call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 8 i32.ne if i32.const 0 - i32.const 120 + i32.const 104 i32.const 9 i32.const 0 call $~lib/env/abort @@ -1693,55 +1728,46 @@ i32.eq if i32.const 0 - i32.const 120 + i32.const 104 i32.const 10 i32.const 0 call $~lib/env/abort unreachable end - global.get $std/arraybuffer/sliced - global.get $std/arraybuffer/buffer - i32.eq - if - i32.const 0 - i32.const 120 - i32.const 11 - i32.const 0 - call $~lib/env/abort - unreachable - end - i32.const 1 - global.set $~lib/argc global.get $std/arraybuffer/buffer i32.const 1 - call $~lib/arraybuffer/ArrayBuffer#slice|trampoline + i32.const 1073741816 + call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 7 i32.ne if i32.const 0 - i32.const 120 - i32.const 15 + i32.const 104 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/arraybuffer/buffer i32.const -1 - call $~lib/arraybuffer/ArrayBuffer#slice|trampoline + i32.const 1073741816 + call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 1 i32.ne if i32.const 0 - i32.const 120 - i32.const 19 + i32.const 104 + i32.const 18 i32.const 0 call $~lib/env/abort unreachable @@ -1752,13 +1778,15 @@ call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.ne if i32.const 0 - i32.const 120 - i32.const 23 + i32.const 104 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -1769,13 +1797,15 @@ call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 6 i32.ne if i32.const 0 - i32.const 120 - i32.const 27 + i32.const 104 + i32.const 26 i32.const 0 call $~lib/env/abort unreachable @@ -1786,13 +1816,15 @@ call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 2 i32.ne if i32.const 0 - i32.const 120 - i32.const 31 + i32.const 104 + i32.const 30 i32.const 0 call $~lib/env/abort unreachable @@ -1803,29 +1835,32 @@ call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + i32.const 8 + i32.sub + i32.load offset=4 i32.const 4 i32.ne if i32.const 0 - i32.const 120 - i32.const 35 + i32.const 104 + i32.const 34 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/arraybuffer/buffer i32.const 42 - call $~lib/arraybuffer/ArrayBuffer#slice|trampoline + i32.const 1073741816 + call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + i32.const 8 + i32.sub + i32.load offset=4 if i32.const 0 - i32.const 120 - i32.const 39 + i32.const 104 + i32.const 38 i32.const 0 call $~lib/env/abort unreachable @@ -1834,16 +1869,21 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 40 + i32.const 104 + i32.const 39 i32.const 0 call $~lib/env/abort unreachable end i32.const 12 - call $~lib/allocator/arena/__memory_allocate - call $~lib/internal/typedarray/TypedArray#constructor + call $~lib/runtime/doAllocate + i32.const 4 + call $~lib/runtime/doRegister + i32.const 0 + call $~lib/runtime/ArrayBufferView#constructor global.set $std/arraybuffer/arr8 + call $~lib/runtime/doWrapArray + drop i32.const 1 i32.const 0 global.get $std/arraybuffer/arr8 @@ -1851,75 +1891,56 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 + i32.const 49 + i32.const 0 + call $~lib/env/abort + unreachable + end + block $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView13 (result i32) + i32.const 1 + i32.const 12 + call $~lib/runtime/doAllocate + i32.const 6 + call $~lib/runtime/doRegister + i32.const 2 + call $~lib/runtime/ArrayBufferView#constructor + br_if $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView13 + drop + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 104 i32.const 50 i32.const 0 call $~lib/env/abort unreachable end - block $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView5 (result i32) - i32.const 0 - i32.const 12 - call $~lib/allocator/arena/__memory_allocate - call $~lib/internal/typedarray/TypedArray#constructor - i32.eqz - br_if $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView5 - drop + block $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView14 (result i32) i32.const 1 + global.get $std/arraybuffer/arr8 + i32.load + call $~lib/dataview/DataView#constructor + br_if $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView14 + drop + i32.const 0 end i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 51 i32.const 0 call $~lib/env/abort unreachable end - i32.const 1 - global.set $~lib/argc - block $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView6 (result i32) - global.get $std/arraybuffer/arr8 - i32.load - local.set $1 - i32.const 0 - local.set $0 - block $2of2 - block $1of2 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $1of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const -2147483648 - local.set $0 - end - i32.const 0 - local.get $1 - local.get $0 - call $~lib/dataview/DataView#constructor - i32.eqz - br_if $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView6 - drop - i32.const 1 - end - i32.eqz - if - i32.const 0 - i32.const 120 - i32.const 52 - i32.const 0 - call $~lib/env/abort - unreachable - end ) - (func $start (; 12 ;) (type $FUNCSIG$v) + (func $start (; 14 ;) (type $FUNCSIG$v) call $start:std/arraybuffer ) - (func $null (; 13 ;) (type $FUNCSIG$v) + (func $null (; 15 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/arraybuffer.ts b/tests/compiler/std/arraybuffer.ts index db69fe13..59232119 100644 --- a/tests/compiler/std/arraybuffer.ts +++ b/tests/compiler/std/arraybuffer.ts @@ -7,7 +7,6 @@ assert(buffer.byteLength == 8); var sliced = buffer.slice(); assert(sliced.byteLength == 8); -assert(sliced.data != buffer.data); assert(sliced !== buffer); sliced = buffer.slice(1); diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index 2b73c719..992570e8 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -1,50 +1,41 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) + (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 56) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 120) "\12\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 160) "\1b\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 224) "\08\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 240) "\e0\00\00\00\02\00\00\00") - (data (i32.const 248) "\10\00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 56) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 96) "\01\00\00\00$\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 144) "\02\00\00\00\08\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 160) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/arraybuffer/buffer (mut i32) (i32.const 0)) - (global $~lib/argc (mut i32) (i32.const 0)) (global $std/arraybuffer/sliced (mut i32) (i32.const 0)) (global $std/arraybuffer/arr8 (mut i32) (i32.const 0)) (global $~lib/builtins/i32.MIN_VALUE i32 (i32.const -2147483648)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 284)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 200)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $start:~lib/allocator/arena (; 1 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - ) - (func $~lib/internal/arraybuffer/computeSize (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 - i32.const 8 + global.get $~lib/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -52,408 +43,442 @@ i32.sub i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $1 - local.get $1 - local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $4 - current_memory - local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $4 + (local $7 i32) + block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) + local.get $0 + local.set $1 local.get $1 - i32.sub - i32.const 65535 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $2 + local.get $2 + local.get $1 + local.tee $3 + i32.const 1 + local.tee $4 + local.get $3 + local.get $4 + i32.gt_u + select i32.add - i32.const 65535 + i32.const 7 + i32.add + i32.const 7 i32.const -1 i32.xor i32.and - i32.const 16 - i32.shr_u - local.set $2 - local.get $5 - local.tee $3 - local.get $2 - local.tee $6 - local.get $3 - local.get $6 - i32.gt_s - select local.set $3 + current_memory + local.set $4 local.get $3 - grow_memory - i32.const 0 - i32.lt_s + local.get $4 + i32.const 16 + i32.shl + i32.gt_u if + local.get $3 local.get $2 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $4 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $6 + local.get $6 grow_memory i32.const 0 i32.lt_s if - unreachable + local.get $5 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + end + local.get $3 + global.set $~lib/allocator/arena/offset + local.get $2 + end + return + ) + (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/runtime/ADJUSTOBLOCK + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add + ) + (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i64) + block $~lib/util/memory/memset|inlined.0 + local.get $2 + i32.eqz + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 1 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 2 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 1 + i32.add + local.get $1 + i32.store8 + local.get $0 + i32.const 2 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 2 + i32.sub + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 3 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 6 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 3 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.set $3 + local.get $0 + local.get $3 + i32.add + local.set $0 + local.get $2 + local.get $3 + i32.sub + local.set $2 + local.get $2 + i32.const -4 + i32.and + local.set $2 + i32.const -1 + i32.const 255 + i32.div_u + local.get $1 + i32.const 255 + i32.and + i32.mul + local.set $4 + local.get $0 + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $4 + i32.store + local.get $2 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 12 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 8 + i32.sub + local.get $4 + i32.store + local.get $2 + i32.const 24 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 16 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 20 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 24 + i32.add + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 28 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 24 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 20 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 16 + i32.sub + local.get $4 + i32.store + i32.const 24 + local.get $0 + i32.const 4 + i32.and + i32.add + local.set $3 + local.get $0 + local.get $3 + i32.add + local.set $0 + local.get $2 + local.get $3 + i32.sub + local.set $2 + local.get $4 + i64.extend_i32_u + local.get $4 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $5 + block $break|0 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + block + local.get $0 + local.get $5 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $5 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $5 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $5 + i64.store + local.get $2 + i32.const 32 + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + end + br $continue|0 + end end end end - local.get $4 - global.set $~lib/allocator/arena/offset - local.get $1 ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - i32.const 1073741816 - i32.le_u + global.get $~lib/memory/HEAP_BASE + i32.gt_u i32.eqz if i32.const 0 - i32.const 56 - i32.const 26 + i32.const 64 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable end - block $~lib/memory/memory.allocate|inlined.0 (result i32) - local.get $0 - call $~lib/internal/arraybuffer/computeSize - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end - local.set $1 - local.get $1 local.get $0 - i32.store - local.get $1 - ) - (func $~lib/internal/memory/memset (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i64) - local.get $2 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq i32.eqz - if - return - end - local.get $0 - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 1 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 2 - i32.le_u - if - return - end - local.get $0 - i32.const 1 - i32.add - local.get $1 - i32.store8 - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 2 - i32.sub - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 3 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u - if - return - end - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $2 - i32.const -4 - i32.and - local.set $2 - i32.const -1 - i32.const 255 - i32.div_u - local.get $1 - i32.const 255 - i32.and - i32.mul - local.set $4 - local.get $0 - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 8 - i32.le_u - if - return - end - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 12 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 8 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 24 - i32.le_u - if - return - end - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 16 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 20 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 24 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 28 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 24 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 20 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 16 - i32.sub - local.get $4 - i32.store - i32.const 24 - local.get $0 - i32.const 4 - i32.and - i32.add - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $4 - i64.extend_i32_u - local.get $4 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $5 - block $break|0 - loop $continue|0 - local.get $2 - i32.const 32 - i32.ge_u - if - block - local.get $0 - local.get $5 - i64.store - local.get $0 - i32.const 8 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 16 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 24 - i32.add - local.get $5 - i64.store - local.get $2 - i32.const 32 - i32.sub - local.set $2 - local.get $0 - i32.const 32 - i32.add - local.set $0 - end - br $continue|0 - end - end - end - ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - i32.const 1073741816 - i32.gt_u if i32.const 0 - i32.const 8 - i32.const 47 - i32.const 40 + i32.const 64 + i32.const 192 + i32.const 2 call $~lib/env/abort unreachable end - local.get $1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - local.get $2 - i32.const 0 - i32.ne - i32.eqz - if - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $1 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - local.get $3 ) - (func $~lib/internal/memory/memcpy (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + local.get $1 + i32.store + local.get $0 + ) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + global.get $~lib/runtime/MAX_BYTELENGTH + i32.gt_u + if + i32.const 0 + i32.const 16 + i32.const 24 + i32.const 43 + call $~lib/env/abort + unreachable + end + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end + local.set $3 + local.get $3 + i32.const 0 + local.get $1 + call $~lib/memory/memory.fill + block $~lib/runtime/REGISTER|inlined.0 (result i32) + local.get $3 + local.set $2 + local.get $2 + i32.const 2 + call $~lib/runtime/doRegister + end + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/util/memory/memcpy (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1654,64 +1679,122 @@ i32.store8 end ) - (func $~lib/internal/memory/memmove (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - local.get $0 - local.get $1 - i32.eq - if - return - end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.le_u - local.tee $3 - if (result i32) - local.get $3 - else - local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - end - if + block $~lib/util/memory/memmove|inlined.0 local.get $0 local.get $1 - local.get $2 - call $~lib/internal/memory/memcpy - return - end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and i32.eq if - block $break|0 - loop $continue|0 - local.get $0 - i32.const 7 - i32.and + br $~lib/util/memory/memmove|inlined.0 + end + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + local.tee $3 + if (result i32) + local.get $3 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|0 + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + block (result i32) + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + end + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + end + i32.load8_u + i32.store8 + end + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $0 + local.get $1 + i64.load + i64.store + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + i32.const 8 + i32.add + local.set $0 + local.get $1 + i32.const 8 + i32.add + local.set $1 + end + br $continue|1 + end + end + end + end + block $break|2 + loop $continue|2 + local.get $2 if block - local.get $2 - i32.eqz - if - return - end - local.get $2 - i32.const 1 - i32.sub - local.set $2 block (result i32) local.get $0 local.tee $3 @@ -1730,165 +1813,109 @@ end i32.load8_u i32.store8 - end - br $continue|0 - end - end - end - block $break|1 - loop $continue|1 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $0 - local.get $1 - i64.load - i64.store local.get $2 - i32.const 8 + i32.const 1 i32.sub local.set $2 - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 end - br $continue|1 + br $continue|2 end end end - end - block $break|2 - loop $continue|2 - local.get $2 - if - block - block (result i32) - local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $3 + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + block $break|3 + loop $continue|3 + local.get $0 + local.get $2 + i32.add + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + end + br $continue|3 end - block (result i32) - local.get $1 - local.tee $3 - i32.const 1 - i32.add - local.set $1 - local.get $3 + end + end + block $break|4 + loop $continue|4 + local.get $2 + i32.const 8 + i32.ge_u + if + block + local.get $2 + i32.const 8 + i32.sub + local.set $2 + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.add + i64.load + i64.store + end + br $continue|4 end - i32.load8_u - i32.store8 + end + end + end + block $break|5 + loop $continue|5 + local.get $2 + if + local.get $0 local.get $2 i32.const 1 i32.sub - local.set $2 + local.tee $2 + i32.add + local.get $1 + local.get $2 + i32.add + i32.load8_u + i32.store8 + br $continue|5 end - br $continue|2 - end - end - end - else - local.get $1 - i32.const 7 - i32.and - local.get $0 - i32.const 7 - i32.and - i32.eq - if - block $break|3 - loop $continue|3 - local.get $0 - local.get $2 - i32.add - i32.const 7 - i32.and - if - block - local.get $2 - i32.eqz - if - return - end - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - end - br $continue|3 - end - end - end - block $break|4 - loop $continue|4 - local.get $2 - i32.const 8 - i32.ge_u - if - block - local.get $2 - i32.const 8 - i32.sub - local.set $2 - local.get $0 - local.get $2 - i32.add - local.get $1 - local.get $2 - i32.add - i64.load - i64.store - end - br $continue|4 - end - end - end - end - block $break|5 - loop $continue|5 - local.get $2 - if - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.add - local.get $1 - local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 end end end end ) - (func $~lib/arraybuffer/ArrayBuffer#slice (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#slice (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) local.get $0 - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength local.set $3 local.get $1 i32.const 0 @@ -1950,153 +1977,105 @@ local.get $5 i32.gt_s select - local.set $3 - local.get $3 - call $~lib/internal/arraybuffer/allocateUnsafe local.set $6 - block $~lib/memory/memory.copy|inlined.0 + block $~lib/runtime/ALLOCATE|inlined.1 (result i32) local.get $6 - i32.const 8 - i32.add local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.add - local.set $5 - local.get $3 - local.set $7 local.get $4 - local.get $5 - local.get $7 - call $~lib/internal/memory/memmove - end - local.get $6 - ) - (func $~lib/arraybuffer/ArrayBuffer#slice|trampoline (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $1 - end - i32.const 1073741816 - local.set $2 + call $~lib/runtime/doAllocate end + local.set $7 + local.get $7 local.get $0 local.get $1 - local.get $2 - call $~lib/arraybuffer/ArrayBuffer#slice + i32.add + local.get $6 + call $~lib/memory/memory.copy + block $~lib/runtime/REGISTER|inlined.1 (result i32) + local.get $7 + local.set $4 + local.get $4 + i32.const 2 + call $~lib/runtime/doRegister + end ) - (func $~lib/arraybuffer/ArrayBuffer.isView> (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer.isView> (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 0 - i32.eq if - i32.const 0 + nop + end + i32.const 0 + ) + (func $~lib/arraybuffer/ArrayBuffer.isView (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + if + nop + end + i32.const 0 + ) + (func $~lib/arraybuffer/ArrayBuffer.isView (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + if + i32.const 1 return end i32.const 0 ) - (func $~lib/arraybuffer/ArrayBuffer.isView (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer.isView (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 0 - i32.eq if - i32.const 0 + i32.const 1 return end i32.const 0 ) - (func $~lib/arraybuffer/ArrayBuffer.isView (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer.isView (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 0 - i32.eq if - i32.const 0 + i32.const 1 return end - i32.const 1 - return - ) - (func $~lib/arraybuffer/ArrayBuffer.isView (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 i32.const 0 - i32.eq - if - i32.const 0 - return - end - i32.const 1 - return ) - (func $~lib/arraybuffer/ArrayBuffer.isView (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ALLOCATE (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 0 - i32.eq - if - i32.const 0 - return - end - i32.const 1 - return + call $~lib/runtime/doAllocate ) - (func $~lib/memory/memory.allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/allocator/arena/__memory_allocate - return - ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/runtime/ArrayBufferView#constructor (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $1 - i32.const 1073741816 + global.get $~lib/runtime/MAX_BYTELENGTH + local.get $2 + i32.shr_u i32.gt_u if i32.const 0 - i32.const 160 - i32.const 23 - i32.const 34 + i32.const 64 + i32.const 226 + i32.const 57 call $~lib/env/abort unreachable end - local.get $1 i32.const 0 - i32.shl - local.set $2 + local.get $1 local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe + i32.shl + local.tee $1 + call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 - block $~lib/memory/memory.fill|inlined.1 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end block (result i32) local.get $0 i32.eqz if - i32.const 12 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 12 + call $~lib/runtime/ALLOCATE + local.set $4 + local.get $4 + i32.const 3 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -2113,138 +2092,109 @@ local.get $3 i32.store local.get $0 - i32.const 0 + local.get $3 i32.store offset=4 local.get $0 - local.get $2 + local.get $1 i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Uint8Array#constructor (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#constructor (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 - i32.eqz - if + if (result i32) + local.get $0 + else i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 4 + call $~lib/runtime/doRegister end - local.get $0 local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor + i32.const 0 + call $~lib/runtime/ArrayBufferView#constructor local.set $0 local.get $0 ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/runtime/doWrapArray (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) + i32.const 16 + call $~lib/runtime/doAllocate local.get $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 160 - i32.const 23 - i32.const 34 - call $~lib/env/abort - unreachable + call $~lib/runtime/doRegister + local.set $3 + local.get $0 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + local.get $4 + call $~lib/runtime/doAllocate + local.get $1 + call $~lib/runtime/doRegister + local.set $5 + local.get $3 + local.get $5 + i32.store + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $4 + i32.store offset=8 + local.get $3 + local.get $4 + local.get $2 + i32.shr_u + i32.store offset=12 + local.get $5 + local.get $0 + local.get $4 + call $~lib/memory/memory.copy + local.get $3 + ) + (func $~lib/typedarray/Int32Array#constructor (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + if (result i32) + local.get $0 + else + i32.const 12 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 6 + call $~lib/runtime/doRegister end local.get $1 i32.const 2 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/memory/memory.fill|inlined.2 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - block (result i32) - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - end - local.get $3 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - local.get $2 - i32.store offset=8 - local.get $0 - ) - (func $~lib/typedarray/Int32Array#constructor (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor + call $~lib/runtime/ArrayBufferView#constructor local.set $0 local.get $0 ) - (func $~lib/dataview/DataView#constructor (; 21 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/dataview/DataView#constructor (; 22 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) local.get $3 global.get $~lib/builtins/i32.MIN_VALUE i32.eq if local.get $1 - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength local.get $2 i32.sub local.set $3 end - local.get $2 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 248 - i32.const 14 - i32.const 44 - call $~lib/env/abort - unreachable - end local.get $3 - i32.const 1073741816 + global.get $~lib/runtime/MAX_BYTELENGTH i32.gt_u if i32.const 0 - i32.const 248 - i32.const 15 - i32.const 44 + i32.const 168 + i32.const 18 + i32.const 47 call $~lib/env/abort unreachable end @@ -2252,177 +2202,150 @@ local.get $3 i32.add local.get $1 - i32.load - i32.gt_s + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + i32.gt_u if i32.const 0 - i32.const 248 - i32.const 16 - i32.const 53 + i32.const 168 + i32.const 19 + i32.const 63 call $~lib/env/abort unreachable end - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + block (result i32) + local.get $0 + i32.eqz + if + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 12 + call $~lib/runtime/ALLOCATE + local.set $4 + local.get $4 + i32.const 7 + call $~lib/runtime/doRegister + end + local.set $0 + end + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 end - local.get $0 local.get $1 i32.store - local.get $0 + local.get $1 local.get $2 + i32.add + local.set $5 + local.get $0 + local.get $5 i32.store offset=4 local.get $0 local.get $3 i32.store offset=8 local.get $0 ) - (func $~lib/dataview/DataView#constructor|trampoline (; 22 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $2 - end - global.get $~lib/builtins/i32.MIN_VALUE - local.set $3 - end + (func $~lib/typedarray/Uint8Array#get:buffer (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/dataview/DataView#constructor + i32.load ) - (func $start:std/arraybuffer (; 23 ;) (type $FUNCSIG$v) + (func $start:std/arraybuffer (; 24 ;) (type $FUNCSIG$v) (local $0 i32) - call $start:~lib/allocator/arena + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset i32.const 0 i32.const 8 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor global.set $std/arraybuffer/buffer global.get $std/arraybuffer/buffer - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.const 8 i32.eq i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 5 i32.const 0 call $~lib/env/abort unreachable end - block (result i32) - i32.const 0 - global.set $~lib/argc - global.get $std/arraybuffer/buffer - i32.const 0 - i32.const 0 - call $~lib/arraybuffer/ArrayBuffer#slice|trampoline - end + global.get $std/arraybuffer/buffer + i32.const 0 + global.get $~lib/runtime/MAX_BYTELENGTH + call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.const 8 i32.eq i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 i32.const 9 i32.const 0 call $~lib/env/abort unreachable end - block $~lib/arraybuffer/ArrayBuffer#get:data|inlined.0 (result i32) - global.get $std/arraybuffer/sliced - local.set $0 - local.get $0 - i32.const 8 - i32.add - end - block $~lib/arraybuffer/ArrayBuffer#get:data|inlined.1 (result i32) - global.get $std/arraybuffer/buffer - local.set $0 - local.get $0 - i32.const 8 - i32.add - end - i32.ne - i32.eqz - if - i32.const 0 - i32.const 120 - i32.const 10 - i32.const 0 - call $~lib/env/abort - unreachable - end global.get $std/arraybuffer/sliced global.get $std/arraybuffer/buffer i32.ne i32.eqz if i32.const 0 - i32.const 120 - i32.const 11 + i32.const 104 + i32.const 10 i32.const 0 call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/arraybuffer/buffer - i32.const 1 - i32.const 0 - call $~lib/arraybuffer/ArrayBuffer#slice|trampoline - end + global.get $std/arraybuffer/buffer + i32.const 1 + global.get $~lib/runtime/MAX_BYTELENGTH + call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.const 7 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 15 + i32.const 104 + i32.const 14 i32.const 0 call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/arraybuffer/buffer - i32.const -1 - i32.const 0 - call $~lib/arraybuffer/ArrayBuffer#slice|trampoline - end + global.get $std/arraybuffer/buffer + i32.const -1 + global.get $~lib/runtime/MAX_BYTELENGTH + call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 19 + i32.const 104 + i32.const 18 i32.const 0 call $~lib/env/abort unreachable @@ -2433,14 +2356,14 @@ call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 23 + i32.const 104 + i32.const 22 i32.const 0 call $~lib/env/abort unreachable @@ -2451,14 +2374,14 @@ call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.const 6 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 27 + i32.const 104 + i32.const 26 i32.const 0 call $~lib/env/abort unreachable @@ -2469,14 +2392,14 @@ call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 31 + i32.const 104 + i32.const 30 i32.const 0 call $~lib/env/abort unreachable @@ -2487,36 +2410,32 @@ call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.const 4 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 35 + i32.const 104 + i32.const 34 i32.const 0 call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/arraybuffer/buffer - i32.const 42 - i32.const 0 - call $~lib/arraybuffer/ArrayBuffer#slice|trampoline - end + global.get $std/arraybuffer/buffer + i32.const 42 + global.get $~lib/runtime/MAX_BYTELENGTH + call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 39 + i32.const 104 + i32.const 38 i32.const 0 call $~lib/env/abort unreachable @@ -2527,8 +2446,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 40 + i32.const 104 + i32.const 39 i32.const 0 call $~lib/env/abort unreachable @@ -2539,8 +2458,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 42 + i32.const 104 + i32.const 41 i32.const 0 call $~lib/env/abort unreachable @@ -2551,8 +2470,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 43 + i32.const 104 + i32.const 42 i32.const 0 call $~lib/env/abort unreachable @@ -2563,8 +2482,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 44 + i32.const 104 + i32.const 43 i32.const 0 call $~lib/env/abort unreachable @@ -2575,8 +2494,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 45 + i32.const 104 + i32.const 44 i32.const 0 call $~lib/env/abort unreachable @@ -2587,8 +2506,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 46 + i32.const 104 + i32.const 45 i32.const 0 call $~lib/env/abort unreachable @@ -2597,14 +2516,21 @@ i32.const 1 call $~lib/typedarray/Uint8Array#constructor global.set $std/arraybuffer/arr8 - i32.const 240 + block $~lib/runtime/WRAPARRAY|inlined.0 (result i32) + i32.const 152 + local.set $0 + local.get $0 + i32.const 5 + i32.const 2 + call $~lib/runtime/doWrapArray + end call $~lib/arraybuffer/ArrayBuffer.isView> i32.eqz i32.eqz if i32.const 0 - i32.const 120 - i32.const 49 + i32.const 104 + i32.const 48 i32.const 0 call $~lib/env/abort unreachable @@ -2614,8 +2540,8 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 50 + i32.const 104 + i32.const 49 i32.const 0 call $~lib/env/abort unreachable @@ -2627,36 +2553,32 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 104 + i32.const 50 + i32.const 0 + call $~lib/env/abort + unreachable + end + i32.const 0 + global.get $std/arraybuffer/arr8 + call $~lib/typedarray/Uint8Array#get:buffer + i32.const 0 + global.get $~lib/builtins/i32.MIN_VALUE + call $~lib/dataview/DataView#constructor + call $~lib/arraybuffer/ArrayBuffer.isView + i32.eqz + if + i32.const 0 + i32.const 104 i32.const 51 i32.const 0 call $~lib/env/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 0 - global.get $std/arraybuffer/arr8 - i32.load - i32.const 0 - i32.const 0 - call $~lib/dataview/DataView#constructor|trampoline - end - call $~lib/arraybuffer/ArrayBuffer.isView - i32.eqz - if - i32.const 0 - i32.const 120 - i32.const 52 - i32.const 0 - call $~lib/env/abort - unreachable - end ) - (func $start (; 24 ;) (type $FUNCSIG$v) + (func $start (; 25 ;) (type $FUNCSIG$v) call $start:std/arraybuffer ) - (func $null (; 25 ;) (type $FUNCSIG$v) + (func $null (; 26 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 9f3dc7da..b1122c5f 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -1,25 +1,24 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$fiii (func (param i32 i32 i32) (result f32))) (type $FUNCSIG$jj (func (param i64) (result i64))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$dii (func (param i32 i32) (result f64))) (type $FUNCSIG$jii (func (param i32 i32) (result i64))) (type $FUNCSIG$vifi (func (param i32 f32 i32))) (type $FUNCSIG$vidi (func (param i32 f64 i32))) - (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$viji (func (param i32 i64 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\1b\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 72) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 136) "\10\00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") - (data (i32.const 176) "\0f\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") + (data (i32.const 8) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 48) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 96) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") + (data (i32.const 136) "\01\00\00\00\1e\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) @@ -29,7 +28,7 @@ (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -52,15 +51,15 @@ i32.add i32.const -8 i32.and - local.tee $2 + local.tee $0 current_memory - local.tee $3 + local.tee $2 i32.const 16 i32.shl i32.gt_u if - local.get $3 local.get $2 + local.get $0 local.get $1 i32.sub i32.const 65535 @@ -69,16 +68,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $0 + local.tee $3 + local.get $2 local.get $3 - local.get $0 i32.gt_s select grow_memory i32.const 0 i32.lt_s if - local.get $0 + local.get $3 grow_memory i32.const 0 i32.lt_s @@ -87,11 +86,32 @@ end end end - local.get $2 + local.get $0 global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/internal/memory/memset (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/runtime/doAllocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 7 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/memory/memory.allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 8 + i32.add + ) + (func $~lib/memory/memory.fill (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.const 0 @@ -135,22 +155,60 @@ i32.const 0 i32.store8 ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - i32.const 16 - call $~lib/allocator/arena/__memory_allocate - local.tee $1 + (func $~lib/runtime/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 176 + i32.le_u + if + i32.const 0 + i32.const 16 + i32.const 191 + i32.const 2 + call $~lib/env/abort + unreachable + end + local.get $0 i32.const 8 - i32.store + i32.sub + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 16 + i32.const 192 + i32.const 2 + call $~lib/env/abort + unreachable + end + ) + (func $~lib/runtime/doRegister (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + i32.const 8 + i32.sub local.get $1 + i32.store + local.get $0 + ) + (func $~lib/runtime/ArrayBufferView#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) i32.const 8 - i32.add - call $~lib/internal/memory/memset + call $~lib/runtime/doAllocate + local.tee $1 + call $~lib/memory/memory.fill + local.get $1 + i32.const 2 + call $~lib/runtime/doRegister + local.set $1 local.get $0 i32.eqz if i32.const 12 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/doAllocate + i32.const 3 + call $~lib/runtime/doRegister local.set $0 end local.get $0 @@ -166,144 +224,114 @@ local.get $1 i32.store local.get $0 - i32.const 0 + local.get $1 i32.store offset=4 local.get $0 i32.const 8 i32.store offset=8 local.get $0 ) - (func $~lib/internal/typedarray/TypedArray#__set (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $1 - local.get $0 - i32.load offset=8 - i32.ge_u + (func $~lib/dataview/DataView#constructor (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + block (result i32) + local.get $2 + i32.const -2147483648 + i32.eq + if + local.get $0 + i32.const 8 + i32.sub + i32.load offset=4 + local.get $1 + i32.sub + local.set $2 + end + local.get $2 + i32.const 1073741816 + i32.gt_u + end if i32.const 0 - i32.const 8 - i32.const 50 + i32.const 104 + i32.const 18 + i32.const 47 + call $~lib/env/abort + unreachable + end + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.const 8 + i32.sub + i32.load offset=4 + i32.gt_u + if + i32.const 0 + i32.const 104 + i32.const 19 i32.const 63 call $~lib/env/abort unreachable end - local.get $0 - i32.load offset=4 - local.get $1 - local.get $0 - i32.load - i32.add - i32.add - local.get $2 - i32.store8 offset=8 - ) - (func $~lib/dataview/DataView#constructor (; 5 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $2 - i32.const -2147483648 - i32.eq - if - local.get $0 - i32.load - local.get $1 - i32.sub - local.set $2 - end - local.get $1 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 136 - i32.const 14 - i32.const 44 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 136 - i32.const 15 - i32.const 44 - call $~lib/env/abort - unreachable - end - local.get $1 - local.get $2 - i32.add - local.get $0 - i32.load - i32.gt_s - if - i32.const 0 - i32.const 136 - i32.const 16 - i32.const 53 - call $~lib/env/abort - unreachable - end i32.const 12 - call $~lib/allocator/arena/__memory_allocate + call $~lib/runtime/doAllocate + i32.const 5 + call $~lib/runtime/doRegister local.tee $3 + i32.const 0 + i32.store + local.get $3 + i32.const 0 + i32.store offset=4 + local.get $3 + i32.const 0 + i32.store offset=8 + local.get $3 local.get $0 i32.store local.get $3 + local.get $0 local.get $1 + i32.add i32.store offset=4 local.get $3 local.get $2 i32.store offset=8 local.get $3 ) - (func $~lib/dataview/DataView#getFloat32 (; 6 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) - (local $3 i32) - (local $4 i32) + (func $~lib/dataview/DataView#getFloat32 (; 8 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 4 + i32.add local.get $0 i32.load offset=8 - local.set $4 - local.get $1 - local.tee $3 - i32.const 1073741816 - i32.gt_u - local.tee $1 - if (result i32) - local.get $1 - else - local.get $3 - i32.const 4 - i32.add - local.get $4 - i32.gt_s - end + i32.gt_s + i32.or if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 + i32.const 104 + i32.const 42 + i32.const 6 call $~lib/env/abort unreachable end local.get $2 if (result f32) - local.get $0 - i32.load local.get $0 i32.load offset=4 + local.get $1 i32.add - local.get $3 - i32.add - f32.load offset=8 + f32.load else - local.get $0 - i32.load local.get $0 i32.load offset=4 + local.get $1 i32.add - local.get $3 - i32.add - i32.load offset=8 + i32.load local.tee $0 i32.const -16711936 i32.and @@ -318,7 +346,7 @@ f32.reinterpret_i32 end ) - (func $~lib/polyfills/bswap (; 7 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/polyfills/bswap (; 9 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) local.get $0 i64.const 8 i64.shr_u @@ -344,112 +372,75 @@ i64.const 32 i64.rotr ) - (func $~lib/dataview/DataView#getFloat64 (; 8 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/dataview/DataView#getFloat64 (; 10 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) i32.const 8 local.get $0 i32.load offset=8 i32.gt_s if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 + i32.const 104 + i32.const 56 + i32.const 7 call $~lib/env/abort unreachable end local.get $1 if (result f64) - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add - f64.load offset=8 + f64.load else - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add - i64.load offset=8 + i64.load call $~lib/polyfills/bswap f64.reinterpret_i64 end ) - (func $~lib/dataview/DataView#getInt8 (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) + (func $~lib/dataview/DataView#getInt8 (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 local.get $0 i32.load offset=8 - local.set $3 - local.get $1 - local.tee $2 - i32.const 1073741816 - i32.gt_u - local.tee $1 - i32.eqz - if - local.get $2 - i32.const 1 - i32.add - local.get $3 - i32.gt_s - local.set $1 - end - local.get $1 + i32.ge_u if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 + i32.const 104 + i32.const 67 + i32.const 49 call $~lib/env/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 + local.get $1 i32.add - local.get $2 - i32.add - i32.load8_s offset=8 + i32.load8_s ) - (func $~lib/dataview/DataView#getInt16 (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) + (func $~lib/dataview/DataView#getInt16 (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 2 + i32.add local.get $0 i32.load offset=8 - local.set $4 - local.get $1 - local.tee $3 - i32.const 1073741816 - i32.gt_u - local.tee $1 - if (result i32) - local.get $1 - else - local.get $3 - i32.const 2 - i32.add - local.get $4 - i32.gt_s - end + i32.gt_s + i32.or if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 + i32.const 104 + i32.const 75 + i32.const 7 call $~lib/env/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 + local.get $1 i32.add - local.get $3 - i32.add - i32.load16_s offset=8 + i32.load16_s local.set $0 local.get $2 if (result i32) @@ -468,42 +459,30 @@ i32.or end ) - (func $~lib/dataview/DataView#getInt32 (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) + (func $~lib/dataview/DataView#getInt32 (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 4 + i32.add local.get $0 i32.load offset=8 - local.set $4 - local.get $1 - local.tee $3 - i32.const 1073741816 - i32.gt_u - local.tee $1 - if (result i32) - local.get $1 - else - local.get $3 - i32.const 4 - i32.add - local.get $4 - i32.gt_s - end + i32.gt_s + i32.or if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 + i32.const 104 + i32.const 84 + i32.const 7 call $~lib/env/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 + local.get $1 i32.add - local.get $3 - i32.add - i32.load offset=8 + i32.load local.set $0 local.get $2 if (result i32) @@ -522,7 +501,7 @@ i32.or end ) - (func $~lib/dataview/DataView#getInt64 (; 12 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/dataview/DataView#getInt64 (; 14 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) (local $2 i64) i32.const 8 local.get $0 @@ -530,18 +509,15 @@ i32.gt_s if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 + i32.const 104 + i32.const 178 + i32.const 6 call $~lib/env/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add - i64.load offset=8 + i64.load local.set $2 local.get $1 if (result i64) @@ -551,80 +527,49 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#getUint8 (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) + (func $~lib/dataview/DataView#getUint8 (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 local.get $0 i32.load offset=8 - local.set $3 - local.get $1 - local.tee $2 - i32.const 1073741816 - i32.gt_u - local.tee $1 - i32.eqz - if - local.get $2 - i32.const 1 - i32.add - local.get $3 - i32.gt_s - local.set $1 - end - local.get $1 + i32.ge_u if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 + i32.const 104 + i32.const 90 + i32.const 49 call $~lib/env/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 + local.get $1 i32.add - local.get $2 - i32.add - i32.load8_u offset=8 + i32.load8_u ) - (func $~lib/dataview/DataView#getUint16 (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) + (func $~lib/dataview/DataView#getUint16 (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 2 + i32.add local.get $0 i32.load offset=8 - local.set $4 - local.get $1 - local.tee $3 - i32.const 1073741816 - i32.gt_u - local.tee $1 - if (result i32) - local.get $1 - else - local.get $3 - i32.const 2 - i32.add - local.get $4 - i32.gt_s - end + i32.gt_s + i32.or if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 + i32.const 104 + i32.const 98 + i32.const 6 call $~lib/env/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 + local.get $1 i32.add - local.get $3 - i32.add - i32.load16_u offset=8 + i32.load16_u local.set $0 local.get $2 if (result i32) @@ -641,34 +586,96 @@ i32.or end ) - (func $~lib/dataview/DataView#setFloat32 (; 15 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) + (func $~lib/dataview/DataView#getUint32 (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 4 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 107 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + i32.load + local.set $0 + local.get $2 + if (result i32) + local.get $0 + else + local.get $0 + i32.const -16711936 + i32.and + i32.const 8 + i32.rotl + local.get $0 + i32.const 16711935 + i32.and + i32.const 8 + i32.rotr + i32.or + end + ) + (func $~lib/dataview/DataView#getUint64 (; 18 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (local $2 i64) + i32.const 8 + local.get $0 + i32.load offset=8 + i32.gt_s + if + i32.const 0 + i32.const 104 + i32.const 187 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + i64.load + local.set $2 + local.get $1 + if (result i64) + local.get $2 + else + local.get $2 + call $~lib/polyfills/bswap + end + ) + (func $~lib/dataview/DataView#setFloat32 (; 19 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) i32.const 4 local.get $0 i32.load offset=8 i32.gt_s if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 + i32.const 104 + i32.const 116 + i32.const 6 call $~lib/env/abort unreachable end local.get $2 if - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 - f32.store offset=8 + f32.store else - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 i32.reinterpret_f32 local.tee $0 @@ -682,82 +689,70 @@ i32.const 8 i32.rotr i32.or - i32.store offset=8 + i32.store end ) - (func $~lib/dataview/DataView#setFloat64 (; 16 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) + (func $~lib/dataview/DataView#setFloat64 (; 20 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) i32.const 8 local.get $0 i32.load offset=8 i32.gt_s if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 + i32.const 104 + i32.const 125 + i32.const 6 call $~lib/env/abort unreachable end local.get $2 if - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 - f64.store offset=8 + f64.store else - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 i64.reinterpret_f64 call $~lib/polyfills/bswap - i64.store offset=8 + i64.store end ) - (func $~lib/dataview/DataView#setInt8 (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 1 + (func $~lib/dataview/DataView#setInt8 (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 0 local.get $0 i32.load offset=8 - i32.gt_s + i32.ge_u if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 + i32.const 104 + i32.const 131 + i32.const 49 call $~lib/env/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add - local.get $1 - i32.store8 offset=8 + i32.const 108 + i32.store8 ) - (func $~lib/dataview/DataView#setInt16 (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setInt16 (; 22 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 2 local.get $0 i32.load offset=8 i32.gt_s if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 + i32.const 104 + i32.const 139 + i32.const 6 call $~lib/env/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add local.set $0 local.get $2 i32.eqz @@ -777,26 +772,23 @@ end local.get $0 local.get $1 - i32.store16 offset=8 + i32.store16 ) - (func $~lib/dataview/DataView#setInt32 (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setInt32 (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 4 local.get $0 i32.load offset=8 i32.gt_s if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 + i32.const 104 + i32.const 147 + i32.const 6 call $~lib/env/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add local.set $0 local.get $2 i32.eqz @@ -816,26 +808,23 @@ end local.get $0 local.get $1 - i32.store offset=8 + i32.store ) - (func $~lib/dataview/DataView#setInt64 (; 20 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/dataview/DataView#setInt64 (; 24 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) i32.const 8 local.get $0 i32.load offset=8 i32.gt_s if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 + i32.const 104 + i32.const 196 + i32.const 6 call $~lib/env/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add local.get $2 if (result i64) local.get $1 @@ -843,26 +832,41 @@ local.get $1 call $~lib/polyfills/bswap end - i64.store offset=8 + i64.store ) - (func $~lib/dataview/DataView#setUint16 (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setUint8 (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 0 + local.get $0 + i32.load offset=8 + i32.ge_u + if + i32.const 0 + i32.const 104 + i32.const 152 + i32.const 49 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 238 + i32.store8 + ) + (func $~lib/dataview/DataView#setUint16 (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 2 local.get $0 i32.load offset=8 i32.gt_s if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 + i32.const 104 + i32.const 160 + i32.const 6 call $~lib/env/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add local.set $0 local.get $2 i32.eqz @@ -880,56 +884,123 @@ end local.get $0 local.get $1 - i32.store16 offset=8 + i32.store16 ) - (func $start:std/dataview (; 22 ;) (type $FUNCSIG$v) + (func $~lib/dataview/DataView#setUint32 (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 4 + local.get $0 + i32.load offset=8 + i32.gt_s + if + i32.const 0 + i32.const 104 + i32.const 168 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.set $0 + local.get $2 + i32.eqz + if + local.get $1 + i32.const -16711936 + i32.and + i32.const 8 + i32.rotl + local.get $1 + i32.const 16711935 + i32.and + i32.const 8 + i32.rotr + i32.or + local.set $1 + end + local.get $0 + local.get $1 + i32.store + ) + (func $~lib/dataview/DataView#setUint64 (; 28 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + i32.const 8 + local.get $0 + i32.load offset=8 + i32.gt_s + if + i32.const 0 + i32.const 104 + i32.const 204 + i32.const 6 + call $~lib/env/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $2 + if (result i64) + local.get $1 + else + local.get $1 + call $~lib/polyfills/bswap + end + i64.store + ) + (func $start:std/dataview (; 29 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 216 + (local $1 i32) + i32.const 176 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset i32.const 12 - call $~lib/allocator/arena/__memory_allocate - call $~lib/internal/typedarray/TypedArray#constructor + call $~lib/runtime/doAllocate + i32.const 4 + call $~lib/runtime/doRegister + call $~lib/runtime/ArrayBufferView#constructor global.set $std/dataview/array global.get $std/dataview/array - i32.const 0 - i32.const 246 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/dataview/array - i32.const 1 - i32.const 224 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/dataview/array - i32.const 2 - i32.const 88 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/dataview/array - i32.const 3 - i32.const 159 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/dataview/array - i32.const 4 - i32.const 130 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/dataview/array - i32.const 5 - i32.const 101 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/dataview/array - i32.const 6 - i32.const 67 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/dataview/array - i32.const 7 - i32.const 95 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/dataview/array + local.tee $1 local.tee $0 + i32.load offset=4 + i32.const 246 + i32.store8 + local.get $0 + i32.load offset=4 + i32.const 224 + i32.store8 offset=1 + local.get $0 + i32.load offset=4 + i32.const 88 + i32.store8 offset=2 + local.get $0 + i32.load offset=4 + i32.const 159 + i32.store8 offset=3 + local.get $0 + i32.load offset=4 + i32.const 130 + i32.store8 offset=4 + local.get $0 + i32.load offset=4 + i32.const 101 + i32.store8 offset=5 + local.get $0 + i32.load offset=4 + i32.const 67 + i32.store8 offset=6 + local.get $0 + i32.load offset=4 + i32.const 95 + i32.store8 offset=7 + local.get $0 i32.load local.get $0 i32.load offset=4 local.get $0 + i32.load + i32.sub + local.get $1 i32.load offset=8 call $~lib/dataview/DataView#constructor global.set $std/dataview/view @@ -941,7 +1012,7 @@ f32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 16 i32.const 0 call $~lib/env/abort @@ -955,7 +1026,7 @@ f32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 17 i32.const 0 call $~lib/env/abort @@ -969,7 +1040,7 @@ f32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 18 i32.const 0 call $~lib/env/abort @@ -983,7 +1054,7 @@ f32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 19 i32.const 0 call $~lib/env/abort @@ -997,7 +1068,7 @@ f32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 20 i32.const 0 call $~lib/env/abort @@ -1011,7 +1082,7 @@ f32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 22 i32.const 0 call $~lib/env/abort @@ -1025,7 +1096,7 @@ f32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 23 i32.const 0 call $~lib/env/abort @@ -1039,7 +1110,7 @@ f32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 24 i32.const 0 call $~lib/env/abort @@ -1053,7 +1124,7 @@ f32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 25 i32.const 0 call $~lib/env/abort @@ -1067,7 +1138,7 @@ f32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 26 i32.const 0 call $~lib/env/abort @@ -1080,7 +1151,7 @@ f64.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 28 i32.const 0 call $~lib/env/abort @@ -1093,7 +1164,7 @@ f64.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 29 i32.const 0 call $~lib/env/abort @@ -1106,7 +1177,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 31 i32.const 0 call $~lib/env/abort @@ -1119,7 +1190,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 32 i32.const 0 call $~lib/env/abort @@ -1132,7 +1203,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 33 i32.const 0 call $~lib/env/abort @@ -1145,7 +1216,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 34 i32.const 0 call $~lib/env/abort @@ -1158,7 +1229,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 35 i32.const 0 call $~lib/env/abort @@ -1171,7 +1242,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 36 i32.const 0 call $~lib/env/abort @@ -1184,7 +1255,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 37 i32.const 0 call $~lib/env/abort @@ -1197,7 +1268,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 38 i32.const 0 call $~lib/env/abort @@ -1213,7 +1284,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 40 i32.const 0 call $~lib/env/abort @@ -1229,7 +1300,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 41 i32.const 0 call $~lib/env/abort @@ -1245,7 +1316,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 42 i32.const 0 call $~lib/env/abort @@ -1261,7 +1332,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 43 i32.const 0 call $~lib/env/abort @@ -1277,7 +1348,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 44 i32.const 0 call $~lib/env/abort @@ -1293,7 +1364,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 45 i32.const 0 call $~lib/env/abort @@ -1309,7 +1380,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 46 i32.const 0 call $~lib/env/abort @@ -1325,7 +1396,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 48 i32.const 0 call $~lib/env/abort @@ -1341,7 +1412,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 49 i32.const 0 call $~lib/env/abort @@ -1357,7 +1428,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 50 i32.const 0 call $~lib/env/abort @@ -1373,7 +1444,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 51 i32.const 0 call $~lib/env/abort @@ -1389,7 +1460,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 52 i32.const 0 call $~lib/env/abort @@ -1405,7 +1476,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 53 i32.const 0 call $~lib/env/abort @@ -1421,7 +1492,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 54 i32.const 0 call $~lib/env/abort @@ -1435,7 +1506,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 56 i32.const 0 call $~lib/env/abort @@ -1449,7 +1520,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 57 i32.const 0 call $~lib/env/abort @@ -1463,7 +1534,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 58 i32.const 0 call $~lib/env/abort @@ -1477,7 +1548,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 59 i32.const 0 call $~lib/env/abort @@ -1491,7 +1562,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 60 i32.const 0 call $~lib/env/abort @@ -1505,7 +1576,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 62 i32.const 0 call $~lib/env/abort @@ -1519,7 +1590,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 63 i32.const 0 call $~lib/env/abort @@ -1533,7 +1604,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 64 i32.const 0 call $~lib/env/abort @@ -1547,7 +1618,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 65 i32.const 0 call $~lib/env/abort @@ -1561,7 +1632,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 66 i32.const 0 call $~lib/env/abort @@ -1574,7 +1645,7 @@ i64.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 68 i32.const 0 call $~lib/env/abort @@ -1587,7 +1658,7 @@ i64.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 69 i32.const 0 call $~lib/env/abort @@ -1600,7 +1671,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 71 i32.const 0 call $~lib/env/abort @@ -1613,7 +1684,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 72 i32.const 0 call $~lib/env/abort @@ -1626,7 +1697,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 73 i32.const 0 call $~lib/env/abort @@ -1639,7 +1710,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 74 i32.const 0 call $~lib/env/abort @@ -1652,7 +1723,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 75 i32.const 0 call $~lib/env/abort @@ -1665,7 +1736,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 76 i32.const 0 call $~lib/env/abort @@ -1678,7 +1749,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 77 i32.const 0 call $~lib/env/abort @@ -1691,7 +1762,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 78 i32.const 0 call $~lib/env/abort @@ -1707,7 +1778,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 80 i32.const 0 call $~lib/env/abort @@ -1723,7 +1794,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 81 i32.const 0 call $~lib/env/abort @@ -1739,7 +1810,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 82 i32.const 0 call $~lib/env/abort @@ -1755,7 +1826,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 83 i32.const 0 call $~lib/env/abort @@ -1771,7 +1842,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 84 i32.const 0 call $~lib/env/abort @@ -1787,7 +1858,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 85 i32.const 0 call $~lib/env/abort @@ -1803,7 +1874,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 86 i32.const 0 call $~lib/env/abort @@ -1819,7 +1890,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 88 i32.const 0 call $~lib/env/abort @@ -1835,7 +1906,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 89 i32.const 0 call $~lib/env/abort @@ -1851,7 +1922,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 90 i32.const 0 call $~lib/env/abort @@ -1867,7 +1938,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 91 i32.const 0 call $~lib/env/abort @@ -1883,7 +1954,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 92 i32.const 0 call $~lib/env/abort @@ -1899,7 +1970,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 93 i32.const 0 call $~lib/env/abort @@ -1915,7 +1986,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 94 i32.const 0 call $~lib/env/abort @@ -1924,12 +1995,12 @@ global.get $std/dataview/view i32.const 0 i32.const 1 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const -1621565194 i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 96 i32.const 0 call $~lib/env/abort @@ -1938,12 +2009,12 @@ global.get $std/dataview/view i32.const 1 i32.const 1 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const -2103486240 i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 97 i32.const 0 call $~lib/env/abort @@ -1952,12 +2023,12 @@ global.get $std/dataview/view i32.const 2 i32.const 1 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const 1703059288 i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 98 i32.const 0 call $~lib/env/abort @@ -1966,12 +2037,12 @@ global.get $std/dataview/view i32.const 3 i32.const 1 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const 1130726047 i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 99 i32.const 0 call $~lib/env/abort @@ -1980,12 +2051,12 @@ global.get $std/dataview/view i32.const 4 i32.const 1 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const 1598252418 i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 100 i32.const 0 call $~lib/env/abort @@ -1994,12 +2065,12 @@ global.get $std/dataview/view i32.const 0 i32.const 0 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const -153069409 i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 102 i32.const 0 call $~lib/env/abort @@ -2008,12 +2079,12 @@ global.get $std/dataview/view i32.const 1 i32.const 0 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const -531062910 i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 103 i32.const 0 call $~lib/env/abort @@ -2022,12 +2093,12 @@ global.get $std/dataview/view i32.const 2 i32.const 0 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const 1486848613 i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 104 i32.const 0 call $~lib/env/abort @@ -2036,12 +2107,12 @@ global.get $std/dataview/view i32.const 3 i32.const 0 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const -1618844349 i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 105 i32.const 0 call $~lib/env/abort @@ -2050,12 +2121,12 @@ global.get $std/dataview/view i32.const 4 i32.const 0 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const -2107292833 i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 106 i32.const 0 call $~lib/env/abort @@ -2063,12 +2134,12 @@ end global.get $std/dataview/view i32.const 1 - call $~lib/dataview/DataView#getInt64 + call $~lib/dataview/DataView#getUint64 i64.const 6864441868736323830 i64.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 108 i32.const 0 call $~lib/env/abort @@ -2076,12 +2147,12 @@ end global.get $std/dataview/view i32.const 0 - call $~lib/dataview/DataView#getInt64 + call $~lib/dataview/DataView#getUint64 i64.const -657428103485373601 i64.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 109 i32.const 0 call $~lib/env/abort @@ -2099,7 +2170,7 @@ f32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 112 i32.const 0 call $~lib/env/abort @@ -2117,7 +2188,7 @@ f32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 115 i32.const 0 call $~lib/env/abort @@ -2134,7 +2205,7 @@ f64.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 118 i32.const 0 call $~lib/env/abort @@ -2151,14 +2222,13 @@ f64.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 121 i32.const 0 call $~lib/env/abort unreachable end global.get $std/dataview/view - i32.const 108 call $~lib/dataview/DataView#setInt8 global.get $std/dataview/view i32.const 0 @@ -2167,7 +2237,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 124 i32.const 0 call $~lib/env/abort @@ -2187,7 +2257,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 127 i32.const 0 call $~lib/env/abort @@ -2207,7 +2277,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 130 i32.const 0 call $~lib/env/abort @@ -2225,7 +2295,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 133 i32.const 0 call $~lib/env/abort @@ -2243,7 +2313,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 136 i32.const 0 call $~lib/env/abort @@ -2260,7 +2330,7 @@ i64.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 139 i32.const 0 call $~lib/env/abort @@ -2277,15 +2347,14 @@ i64.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 142 i32.const 0 call $~lib/env/abort unreachable end global.get $std/dataview/view - i32.const 238 - call $~lib/dataview/DataView#setInt8 + call $~lib/dataview/DataView#setUint8 global.get $std/dataview/view i32.const 0 call $~lib/dataview/DataView#getUint8 @@ -2293,7 +2362,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 145 i32.const 0 call $~lib/env/abort @@ -2313,7 +2382,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 148 i32.const 0 call $~lib/env/abort @@ -2333,7 +2402,7 @@ i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 151 i32.const 0 call $~lib/env/abort @@ -2342,16 +2411,16 @@ global.get $std/dataview/view i32.const -846805744 i32.const 1 - call $~lib/dataview/DataView#setInt32 + call $~lib/dataview/DataView#setUint32 global.get $std/dataview/view i32.const 0 i32.const 1 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const -846805744 i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 154 i32.const 0 call $~lib/env/abort @@ -2360,16 +2429,16 @@ global.get $std/dataview/view i32.const -1510791631 i32.const 0 - call $~lib/dataview/DataView#setInt32 + call $~lib/dataview/DataView#setUint32 global.get $std/dataview/view i32.const 0 i32.const 0 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const -1510791631 i32.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 157 i32.const 0 call $~lib/env/abort @@ -2378,15 +2447,15 @@ global.get $std/dataview/view i64.const 2334704782995986958 i32.const 1 - call $~lib/dataview/DataView#setInt64 + call $~lib/dataview/DataView#setUint64 global.get $std/dataview/view i32.const 1 - call $~lib/dataview/DataView#getInt64 + call $~lib/dataview/DataView#getUint64 i64.const 2334704782995986958 i64.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 160 i32.const 0 call $~lib/env/abort @@ -2395,25 +2464,25 @@ global.get $std/dataview/view i64.const -7123186897289856329 i32.const 0 - call $~lib/dataview/DataView#setInt64 + call $~lib/dataview/DataView#setUint64 global.get $std/dataview/view i32.const 0 - call $~lib/dataview/DataView#getInt64 + call $~lib/dataview/DataView#getUint64 i64.const -7123186897289856329 i64.ne if i32.const 0 - i32.const 176 + i32.const 144 i32.const 163 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 23 ;) (type $FUNCSIG$v) + (func $start (; 30 ;) (type $FUNCSIG$v) call $start:std/dataview ) - (func $null (; 24 ;) (type $FUNCSIG$v) + (func $null (; 31 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index 4d7b3a32..0a3e00ee 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -1,52 +1,46 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$fiii (func (param i32 i32 i32) (result f32))) (type $FUNCSIG$diii (func (param i32 i32 i32) (result f64))) (type $FUNCSIG$jj (func (param i64) (result i64))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$jiii (func (param i32 i32 i32) (result i64))) (type $FUNCSIG$viifi (func (param i32 i32 f32 i32))) (type $FUNCSIG$viidi (func (param i32 i32 f64 i32))) (type $FUNCSIG$viiji (func (param i32 i32 i64 i32))) + (type $FUNCSIG$v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\1b\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 72) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 136) "\10\00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") - (data (i32.const 176) "\0f\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 48) "\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 96) "\01\00\00\00 \00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") + (data (i32.const 136) "\01\00\00\00\1e\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) + (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/dataview/array (mut i32) (i32.const 0)) (global $~lib/builtins/i32.MIN_VALUE i32 (i32.const -2147483648)) (global $std/dataview/view (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 212)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 176)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) - (func $start:~lib/allocator/arena (; 1 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - ) - (func $~lib/internal/arraybuffer/computeSize (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 - i32.const 8 + global.get $~lib/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -54,417 +48,474 @@ i32.sub i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.const 1073741824 - i32.gt_u - if - unreachable - end - global.get $~lib/allocator/arena/offset - local.set $1 - local.get $1 - local.get $0 - local.tee $2 - i32.const 1 - local.tee $3 - local.get $2 - local.get $3 - i32.gt_u - select - i32.add - i32.const 7 - i32.add - i32.const 7 - i32.const -1 - i32.xor - i32.and - local.set $4 - current_memory - local.set $5 - local.get $4 - local.get $5 - i32.const 16 - i32.shl - i32.gt_u - if - local.get $4 + (local $7 i32) + block $~lib/allocator/arena/__memory_allocate|inlined.0 (result i32) + local.get $0 + local.set $1 local.get $1 - i32.sub - i32.const 65535 + i32.const 1073741824 + i32.gt_u + if + unreachable + end + global.get $~lib/allocator/arena/offset + local.set $2 + local.get $2 + local.get $1 + local.tee $3 + i32.const 1 + local.tee $4 + local.get $3 + local.get $4 + i32.gt_u + select i32.add - i32.const 65535 + i32.const 7 + i32.add + i32.const 7 i32.const -1 i32.xor i32.and - i32.const 16 - i32.shr_u - local.set $2 - local.get $5 - local.tee $3 - local.get $2 - local.tee $6 - local.get $3 - local.get $6 - i32.gt_s - select local.set $3 + current_memory + local.set $4 local.get $3 - grow_memory - i32.const 0 - i32.lt_s + local.get $4 + i32.const 16 + i32.shl + i32.gt_u if + local.get $3 local.get $2 + i32.sub + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $5 + local.get $4 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + local.set $6 + local.get $6 grow_memory i32.const 0 i32.lt_s if - unreachable + local.get $5 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + end + local.get $3 + global.set $~lib/allocator/arena/offset + local.get $2 + end + return + ) + (func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/runtime/ADJUSTOBLOCK + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + global.get $~lib/runtime/HEADER_SIZE + i32.add + ) + (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i64) + block $~lib/util/memory/memset|inlined.0 + local.get $2 + i32.eqz + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 1 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 2 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 1 + i32.add + local.get $1 + i32.store8 + local.get $0 + i32.const 2 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 2 + i32.sub + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 3 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 6 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 3 + i32.add + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.set $3 + local.get $0 + local.get $3 + i32.add + local.set $0 + local.get $2 + local.get $3 + i32.sub + local.set $2 + local.get $2 + i32.const -4 + i32.and + local.set $2 + i32.const -1 + i32.const 255 + i32.div_u + local.get $1 + i32.const 255 + i32.and + i32.mul + local.set $4 + local.get $0 + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 4 + i32.sub + local.get $4 + i32.store + local.get $2 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 12 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 8 + i32.sub + local.get $4 + i32.store + local.get $2 + i32.const 24 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 12 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 16 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 20 + i32.add + local.get $4 + i32.store + local.get $0 + i32.const 24 + i32.add + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 28 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 24 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 20 + i32.sub + local.get $4 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 16 + i32.sub + local.get $4 + i32.store + i32.const 24 + local.get $0 + i32.const 4 + i32.and + i32.add + local.set $3 + local.get $0 + local.get $3 + i32.add + local.set $0 + local.get $2 + local.get $3 + i32.sub + local.set $2 + local.get $4 + i64.extend_i32_u + local.get $4 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $5 + block $break|0 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + block + local.get $0 + local.get $5 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $5 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $5 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $5 + i64.store + local.get $2 + i32.const 32 + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + end + br $continue|0 + end end end end - local.get $4 - global.set $~lib/allocator/arena/offset - local.get $1 ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - i32.const 1073741816 - i32.le_u + global.get $~lib/memory/HEAP_BASE + i32.gt_u i32.eqz if i32.const 0 - i32.const 72 - i32.const 26 + i32.const 16 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable end - block $~lib/memory/memory.allocate|inlined.0 (result i32) - local.get $0 - call $~lib/internal/arraybuffer/computeSize - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end - local.set $1 - local.get $1 local.get $0 - i32.store - local.get $1 - ) - (func $~lib/internal/memory/memset (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i64) - local.get $2 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load + global.get $~lib/runtime/HEADER_MAGIC + i32.eq i32.eqz - if - return - end - local.get $0 - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 1 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 2 - i32.le_u - if - return - end - local.get $0 - i32.const 1 - i32.add - local.get $1 - i32.store8 - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 2 - i32.sub - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 3 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 - i32.add - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u - if - return - end - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $2 - i32.const -4 - i32.and - local.set $2 - i32.const -1 - i32.const 255 - i32.div_u - local.get $1 - i32.const 255 - i32.and - i32.mul - local.set $4 - local.get $0 - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 8 - i32.le_u - if - return - end - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 12 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 8 - i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 24 - i32.le_u - if - return - end - local.get $0 - i32.const 12 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 16 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 20 - i32.add - local.get $4 - i32.store - local.get $0 - i32.const 24 - i32.add - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 28 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 24 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 20 - i32.sub - local.get $4 - i32.store - local.get $0 - local.get $2 - i32.add - i32.const 16 - i32.sub - local.get $4 - i32.store - i32.const 24 - local.get $0 - i32.const 4 - i32.and - i32.add - local.set $3 - local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $4 - i64.extend_i32_u - local.get $4 - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - local.set $5 - block $break|0 - loop $continue|0 - local.get $2 - i32.const 32 - i32.ge_u - if - block - local.get $0 - local.get $5 - i64.store - local.get $0 - i32.const 8 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 16 - i32.add - local.get $5 - i64.store - local.get $0 - i32.const 24 - i32.add - local.get $5 - i64.store - local.get $2 - i32.const 32 - i32.sub - local.set $2 - local.get $0 - i32.const 32 - i32.add - local.set $0 - end - br $continue|0 - end - end - end - ) - (func $~lib/memory/memory.allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/allocator/arena/__memory_allocate - return - ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - i32.const 1073741816 - i32.gt_u if i32.const 0 - i32.const 8 - i32.const 23 - i32.const 34 + i32.const 16 + i32.const 192 + i32.const 2 call $~lib/env/abort unreachable end + ) + (func $~lib/runtime/doRegister (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/runtime/assertUnregistered + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub local.get $1 - i32.const 0 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/memory/memory.fill|inlined.0 - local.get $3 - i32.const 8 - i32.add - local.set $4 + i32.store + local.get $0 + ) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + global.get $~lib/runtime/MAX_BYTELENGTH + i32.gt_u + if i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset + i32.const 56 + i32.const 24 + i32.const 43 + call $~lib/env/abort + unreachable end + block $~lib/runtime/ALLOCATE|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/runtime/doAllocate + end + local.set $3 + local.get $3 + i32.const 0 + local.get $1 + call $~lib/memory/memory.fill + block $~lib/runtime/REGISTER|inlined.0 (result i32) + local.get $3 + local.set $2 + local.get $2 + i32.const 2 + call $~lib/runtime/doRegister + end + ) + (func $~lib/runtime/ALLOCATE (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/runtime/doAllocate + ) + (func $~lib/runtime/ArrayBufferView#constructor (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + local.get $1 + global.get $~lib/runtime/MAX_BYTELENGTH + local.get $2 + i32.shr_u + i32.gt_u + if + i32.const 0 + i32.const 16 + i32.const 226 + i32.const 57 + call $~lib/env/abort + unreachable + end + i32.const 0 + local.get $1 + local.get $2 + i32.shl + local.tee $1 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $3 block (result i32) local.get $0 i32.eqz if - i32.const 12 - call $~lib/memory/memory.allocate + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 12 + call $~lib/runtime/ALLOCATE + local.set $4 + local.get $4 + i32.const 3 + call $~lib/runtime/doRegister + end local.set $0 end local.get $0 @@ -481,98 +532,59 @@ local.get $3 i32.store local.get $0 - i32.const 0 + local.get $3 i32.store offset=4 local.get $0 - local.get $2 + local.get $1 i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Uint8Array#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 - i32.eqz - if + if (result i32) + local.get $0 + else i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + call $~lib/runtime/ALLOCATE + local.set $2 + local.get $2 + i32.const 4 + call $~lib/runtime/doRegister end - local.get $0 local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor + i32.const 0 + call $~lib/runtime/ArrayBufferView#constructor local.set $0 local.get $0 ) - (func $~lib/internal/typedarray/TypedArray#__set (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/dataview/DataView#constructor (; 12 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) - (local $6 i32) - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 0 - i32.shr_u - i32.ge_u - if - i32.const 0 - i32.const 8 - i32.const 50 - i32.const 63 - call $~lib/env/abort - unreachable - end - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $0 - i32.load - local.set $3 - local.get $1 - local.set $4 - local.get $2 - local.set $5 - local.get $0 - i32.load offset=4 - local.set $6 - local.get $3 - local.get $4 - i32.const 0 - i32.shl - i32.add - local.get $6 - i32.add - local.get $5 - i32.store8 offset=8 - end - ) - (func $~lib/dataview/DataView#constructor (; 10 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 global.get $~lib/builtins/i32.MIN_VALUE i32.eq if local.get $1 - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength local.get $2 i32.sub local.set $3 end - local.get $2 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 136 - i32.const 14 - i32.const 44 - call $~lib/env/abort - unreachable - end local.get $3 - i32.const 1073741816 + global.get $~lib/runtime/MAX_BYTELENGTH i32.gt_u if i32.const 0 - i32.const 136 - i32.const 15 - i32.const 44 + i32.const 104 + i32.const 18 + i32.const 47 call $~lib/env/abort unreachable end @@ -580,35 +592,71 @@ local.get $3 i32.add local.get $1 - i32.load - i32.gt_s + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + i32.gt_u if i32.const 0 - i32.const 136 - i32.const 16 - i32.const 53 + i32.const 104 + i32.const 19 + i32.const 63 call $~lib/env/abort unreachable end - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + block (result i32) + local.get $0 + i32.eqz + if + block $~lib/runtime/REGISTER|inlined.0 (result i32) + i32.const 12 + call $~lib/runtime/ALLOCATE + local.set $4 + local.get $4 + i32.const 5 + call $~lib/runtime/doRegister + end + local.set $0 + end + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 end - local.get $0 local.get $1 i32.store - local.get $0 + local.get $1 local.get $2 + i32.add + local.set $5 + local.get $0 + local.get $5 i32.store offset=4 local.get $0 local.get $3 i32.store offset=8 local.get $0 ) - (func $~lib/polyfills/bswap (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#get:buffer (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load + ) + (func $~lib/runtime/ArrayBufferView#get:byteOffset (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $0 + i32.load + i32.sub + ) + (func $~lib/runtime/ArrayBufferView#get:byteLength (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=8 + ) + (func $~lib/polyfills/bswap (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const -16711936 i32.and @@ -622,67 +670,45 @@ i32.or return ) - (func $~lib/dataview/DataView#getFloat32 (; 12 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - block $~lib/dataview/checkOffset|inlined.0 - local.get $1 - local.set $3 - i32.const 4 - local.set $4 - local.get $0 - i32.load offset=8 - local.set $5 - local.get $3 - i32.const 1073741816 - i32.gt_u - local.tee $6 - if (result i32) - local.get $6 - else - local.get $3 - local.get $4 - i32.add - local.get $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end + (func $~lib/dataview/DataView#getFloat32 (; 17 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 4 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 42 + i32.const 6 + call $~lib/env/abort + unreachable end local.get $2 i32.const 0 i32.ne if (result f32) - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - f32.load offset=8 + f32.load else - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - i32.load offset=8 + i32.load call $~lib/polyfills/bswap f32.reinterpret_i32 end ) - (func $~lib/polyfills/bswap (; 13 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/polyfills/bswap (; 18 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) (local $1 i64) (local $2 i64) (local $3 i64) @@ -721,111 +747,64 @@ i64.rotr return ) - (func $~lib/dataview/DataView#getFloat64 (; 14 ;) (type $FUNCSIG$diii) (param $0 i32) (param $1 i32) (param $2 i32) (result f64) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - block $~lib/dataview/checkOffset|inlined.1 - local.get $1 - local.set $3 - i32.const 8 - local.set $4 - local.get $0 - i32.load offset=8 - local.set $5 - local.get $3 - i32.const 1073741816 - i32.gt_u - local.tee $6 - if (result i32) - local.get $6 - else - local.get $3 - local.get $4 - i32.add - local.get $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end + (func $~lib/dataview/DataView#getFloat64 (; 19 ;) (type $FUNCSIG$diii) (param $0 i32) (param $1 i32) (param $2 i32) (result f64) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 8 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 56 + i32.const 7 + call $~lib/env/abort + unreachable end local.get $2 i32.const 0 i32.ne if (result f64) - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - f64.load offset=8 + f64.load else - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - i64.load offset=8 + i64.load call $~lib/polyfills/bswap f64.reinterpret_i64 end ) - (func $~lib/dataview/DataView#getInt8 (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $~lib/dataview/checkOffset|inlined.2 - local.get $1 - local.set $2 - i32.const 1 - local.set $3 - local.get $0 - i32.load offset=8 - local.set $4 - local.get $2 - i32.const 1073741816 - i32.gt_u - local.tee $5 - if (result i32) - local.get $5 - else - local.get $2 - local.get $3 - i32.add - local.get $4 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end + (func $~lib/dataview/DataView#getInt8 (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.ge_u + if + i32.const 0 + i32.const 104 + i32.const 67 + i32.const 49 + call $~lib/env/abort + unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - i32.load8_s offset=8 + i32.load8_s ) - (func $~lib/polyfills/bswap (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 8 i32.shl @@ -841,62 +820,43 @@ i32.or return ) - (func $~lib/dataview/DataView#getInt16 (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getInt16 (; 22 ;) (type $FUNCSIG$iiii) (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) - block $~lib/dataview/checkOffset|inlined.3 - local.get $1 - local.set $3 - i32.const 2 - local.set $4 - local.get $0 - i32.load offset=8 - local.set $5 - local.get $3 - i32.const 1073741816 - i32.gt_u - local.tee $6 - if (result i32) - local.get $6 - else - local.get $3 - local.get $4 - i32.add - local.get $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 2 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 75 + i32.const 7 + call $~lib/env/abort + unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - i32.load16_s offset=8 - local.set $7 + i32.load16_s + local.set $3 local.get $2 i32.const 0 i32.ne if (result i32) - local.get $7 + local.get $3 else - local.get $7 + local.get $3 call $~lib/polyfills/bswap end ) - (func $~lib/polyfills/bswap (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const -16711936 i32.and @@ -910,62 +870,43 @@ i32.or return ) - (func $~lib/dataview/DataView#getInt32 (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getInt32 (; 24 ;) (type $FUNCSIG$iiii) (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) - block $~lib/dataview/checkOffset|inlined.4 - local.get $1 - local.set $3 - i32.const 4 - local.set $4 - local.get $0 - i32.load offset=8 - local.set $5 - local.get $3 - i32.const 1073741816 - i32.gt_u - local.tee $6 - if (result i32) - local.get $6 - else - local.get $3 - local.get $4 - i32.add - local.get $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 4 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 84 + i32.const 7 + call $~lib/env/abort + unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - i32.load offset=8 - local.set $7 + i32.load + local.set $3 local.get $2 i32.const 0 i32.ne if (result i32) - local.get $7 + local.get $3 else - local.get $7 + local.get $3 call $~lib/polyfills/bswap end ) - (func $~lib/polyfills/bswap (; 20 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/polyfills/bswap (; 25 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) (local $1 i64) (local $2 i64) (local $3 i64) @@ -1004,106 +945,62 @@ i64.rotr return ) - (func $~lib/dataview/DataView#getInt64 (; 21 ;) (type $FUNCSIG$jiii) (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 i64) - block $~lib/dataview/checkOffset|inlined.5 - local.get $1 - local.set $3 - i32.const 8 - local.set $4 - local.get $0 - i32.load offset=8 - local.set $5 - local.get $3 - i32.const 1073741816 - i32.gt_u - local.tee $6 - if (result i32) - local.get $6 - else - local.get $3 - local.get $4 - i32.add - local.get $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end + (func $~lib/dataview/DataView#getInt64 (; 26 ;) (type $FUNCSIG$jiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i64) + (local $3 i64) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 8 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 178 + i32.const 6 + call $~lib/env/abort + unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - i64.load offset=8 - local.set $7 + i64.load + local.set $3 local.get $2 i32.const 0 i32.ne if (result i64) - local.get $7 + local.get $3 else - local.get $7 + local.get $3 call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#getUint8 (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $~lib/dataview/checkOffset|inlined.6 - local.get $1 - local.set $2 - i32.const 1 - local.set $3 - local.get $0 - i32.load offset=8 - local.set $4 - local.get $2 - i32.const 1073741816 - i32.gt_u - local.tee $5 - if (result i32) - local.get $5 - else - local.get $2 - local.get $3 - i32.add - local.get $4 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end + (func $~lib/dataview/DataView#getUint8 (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.ge_u + if + i32.const 0 + i32.const 104 + i32.const 90 + i32.const 49 + call $~lib/env/abort + unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - i32.load8_u offset=8 + i32.load8_u ) - (func $~lib/polyfills/bswap (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 8 i32.shl @@ -1117,380 +1014,235 @@ i32.or return ) - (func $~lib/dataview/DataView#getUint16 (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getUint16 (; 29 ;) (type $FUNCSIG$iiii) (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) - block $~lib/dataview/checkOffset|inlined.7 - local.get $1 - local.set $3 - i32.const 2 - local.set $4 - local.get $0 - i32.load offset=8 - local.set $5 - local.get $3 - i32.const 1073741816 - i32.gt_u - local.tee $6 - if (result i32) - local.get $6 - else - local.get $3 - local.get $4 - i32.add - local.get $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 2 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 98 + i32.const 6 + call $~lib/env/abort + unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - i32.load16_u offset=8 - local.set $7 + i32.load16_u + local.set $3 local.get $2 i32.const 0 i32.ne if (result i32) - local.get $7 + local.get $3 else - local.get $7 + local.get $3 call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#getUint32 (; 25 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getUint32 (; 30 ;) (type $FUNCSIG$iiii) (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) - block $~lib/dataview/checkOffset|inlined.8 - local.get $1 - local.set $3 - i32.const 4 - local.set $4 - local.get $0 - i32.load offset=8 - local.set $5 - local.get $3 - i32.const 1073741816 - i32.gt_u - local.tee $6 - if (result i32) - local.get $6 - else - local.get $3 - local.get $4 - i32.add - local.get $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 4 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 107 + i32.const 6 + call $~lib/env/abort + unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - i32.load offset=8 - local.set $7 + i32.load + local.set $3 local.get $2 i32.const 0 i32.ne if (result i32) - local.get $7 + local.get $3 else - local.get $7 + local.get $3 call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#getUint64 (; 26 ;) (type $FUNCSIG$jiii) (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 i64) - block $~lib/dataview/checkOffset|inlined.9 - local.get $1 - local.set $3 - i32.const 8 - local.set $4 - local.get $0 - i32.load offset=8 - local.set $5 - local.get $3 - i32.const 1073741816 - i32.gt_u - local.tee $6 - if (result i32) - local.get $6 - else - local.get $3 - local.get $4 - i32.add - local.get $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end + (func $~lib/dataview/DataView#getUint64 (; 31 ;) (type $FUNCSIG$jiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i64) + (local $3 i64) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 8 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 187 + i32.const 6 + call $~lib/env/abort + unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - i64.load offset=8 - local.set $7 + i64.load + local.set $3 local.get $2 i32.const 0 i32.ne if (result i64) - local.get $7 + local.get $3 else - local.get $7 + local.get $3 call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#setFloat32 (; 27 ;) (type $FUNCSIG$viifi) (param $0 i32) (param $1 i32) (param $2 f32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/dataview/checkOffset|inlined.10 - local.get $1 - local.set $4 - i32.const 4 - local.set $5 - local.get $0 - i32.load offset=8 - local.set $6 - local.get $4 - i32.const 1073741816 - i32.gt_u - local.tee $7 - if (result i32) - local.get $7 - else - local.get $4 - local.get $5 - i32.add - local.get $6 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end + (func $~lib/dataview/DataView#setFloat32 (; 32 ;) (type $FUNCSIG$viifi) (param $0 i32) (param $1 i32) (param $2 f32) (param $3 i32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 4 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 116 + i32.const 6 + call $~lib/env/abort + unreachable end local.get $3 i32.const 0 i32.ne if - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $2 - f32.store offset=8 + f32.store else - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $2 i32.reinterpret_f32 call $~lib/polyfills/bswap - i32.store offset=8 + i32.store end ) - (func $~lib/dataview/DataView#setFloat64 (; 28 ;) (type $FUNCSIG$viidi) (param $0 i32) (param $1 i32) (param $2 f64) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/dataview/checkOffset|inlined.11 - local.get $1 - local.set $4 - i32.const 8 - local.set $5 - local.get $0 - i32.load offset=8 - local.set $6 - local.get $4 - i32.const 1073741816 - i32.gt_u - local.tee $7 - if (result i32) - local.get $7 - else - local.get $4 - local.get $5 - i32.add - local.get $6 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end + (func $~lib/dataview/DataView#setFloat64 (; 33 ;) (type $FUNCSIG$viidi) (param $0 i32) (param $1 i32) (param $2 f64) (param $3 i32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 8 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 125 + i32.const 6 + call $~lib/env/abort + unreachable end local.get $3 i32.const 0 i32.ne if - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $2 - f64.store offset=8 + f64.store else - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $2 i64.reinterpret_f64 call $~lib/polyfills/bswap - i64.store offset=8 + i64.store end ) - (func $~lib/dataview/DataView#setInt8 (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - block $~lib/dataview/checkOffset|inlined.12 - local.get $1 - local.set $3 - i32.const 1 - local.set $4 - local.get $0 - i32.load offset=8 - local.set $5 - local.get $3 - i32.const 1073741816 - i32.gt_u - local.tee $6 - if (result i32) - local.get $6 - else - local.get $3 - local.get $4 - i32.add - local.get $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end + (func $~lib/dataview/DataView#setInt8 (; 34 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.ge_u + if + i32.const 0 + i32.const 104 + i32.const 131 + i32.const 49 + call $~lib/env/abort + unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $2 - i32.store8 offset=8 + i32.store8 ) - (func $~lib/dataview/DataView#setInt16 (; 30 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/dataview/checkOffset|inlined.13 - local.get $1 - local.set $4 - i32.const 2 - local.set $5 - local.get $0 - i32.load offset=8 - local.set $6 - local.get $4 - i32.const 1073741816 - i32.gt_u - local.tee $7 - if (result i32) - local.get $7 - else - local.get $4 - local.get $5 - i32.add - local.get $6 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end + (func $~lib/dataview/DataView#setInt16 (; 35 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 2 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 139 + i32.const 6 + call $~lib/env/abort + unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $3 @@ -1502,48 +1254,29 @@ local.get $2 call $~lib/polyfills/bswap end - i32.store16 offset=8 + i32.store16 ) - (func $~lib/dataview/DataView#setInt32 (; 31 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/dataview/checkOffset|inlined.14 - local.get $1 - local.set $4 - i32.const 4 - local.set $5 - local.get $0 - i32.load offset=8 - local.set $6 - local.get $4 - i32.const 1073741816 - i32.gt_u - local.tee $7 - if (result i32) - local.get $7 - else - local.get $4 - local.get $5 - i32.add - local.get $6 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end + (func $~lib/dataview/DataView#setInt32 (; 36 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 4 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 147 + i32.const 6 + call $~lib/env/abort + unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $3 @@ -1555,48 +1288,29 @@ local.get $2 call $~lib/polyfills/bswap end - i32.store offset=8 + i32.store ) - (func $~lib/dataview/DataView#setInt64 (; 32 ;) (type $FUNCSIG$viiji) (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/dataview/checkOffset|inlined.15 - local.get $1 - local.set $4 - i32.const 8 - local.set $5 - local.get $0 - i32.load offset=8 - local.set $6 - local.get $4 - i32.const 1073741816 - i32.gt_u - local.tee $7 - if (result i32) - local.get $7 - else - local.get $4 - local.get $5 - i32.add - local.get $6 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end + (func $~lib/dataview/DataView#setInt64 (; 37 ;) (type $FUNCSIG$viiji) (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 8 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 196 + i32.const 6 + call $~lib/env/abort + unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $3 @@ -1608,93 +1322,49 @@ local.get $2 call $~lib/polyfills/bswap end - i64.store offset=8 + i64.store ) - (func $~lib/dataview/DataView#setUint8 (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - block $~lib/dataview/checkOffset|inlined.16 - local.get $1 - local.set $3 - i32.const 1 - local.set $4 - local.get $0 - i32.load offset=8 - local.set $5 - local.get $3 - i32.const 1073741816 - i32.gt_u - local.tee $6 - if (result i32) - local.get $6 - else - local.get $3 - local.get $4 - i32.add - local.get $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end + (func $~lib/dataview/DataView#setUint8 (; 38 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.ge_u + if + i32.const 0 + i32.const 104 + i32.const 152 + i32.const 49 + call $~lib/env/abort + unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $2 - i32.store8 offset=8 + i32.store8 ) - (func $~lib/dataview/DataView#setUint16 (; 34 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/dataview/checkOffset|inlined.17 - local.get $1 - local.set $4 - i32.const 2 - local.set $5 - local.get $0 - i32.load offset=8 - local.set $6 - local.get $4 - i32.const 1073741816 - i32.gt_u - local.tee $7 - if (result i32) - local.get $7 - else - local.get $4 - local.get $5 - i32.add - local.get $6 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end + (func $~lib/dataview/DataView#setUint16 (; 39 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 2 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 160 + i32.const 6 + call $~lib/env/abort + unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $3 @@ -1706,48 +1376,29 @@ local.get $2 call $~lib/polyfills/bswap end - i32.store16 offset=8 + i32.store16 ) - (func $~lib/dataview/DataView#setUint32 (; 35 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/dataview/checkOffset|inlined.18 - local.get $1 - local.set $4 - i32.const 4 - local.set $5 - local.get $0 - i32.load offset=8 - local.set $6 - local.get $4 - i32.const 1073741816 - i32.gt_u - local.tee $7 - if (result i32) - local.get $7 - else - local.get $4 - local.get $5 - i32.add - local.get $6 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end + (func $~lib/dataview/DataView#setUint32 (; 40 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 4 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 168 + i32.const 6 + call $~lib/env/abort + unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $3 @@ -1759,48 +1410,29 @@ local.get $2 call $~lib/polyfills/bswap end - i32.store offset=8 + i32.store ) - (func $~lib/dataview/DataView#setUint64 (; 36 ;) (type $FUNCSIG$viiji) (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/dataview/checkOffset|inlined.19 - local.get $1 - local.set $4 - i32.const 8 - local.set $5 - local.get $0 - i32.load offset=8 - local.set $6 - local.get $4 - i32.const 1073741816 - i32.gt_u - local.tee $7 - if (result i32) - local.get $7 - else - local.get $4 - local.get $5 - i32.add - local.get $6 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end + (func $~lib/dataview/DataView#setUint64 (; 41 ;) (type $FUNCSIG$viiji) (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 8 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 104 + i32.const 204 + i32.const 6 + call $~lib/env/abort + unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $3 @@ -1812,53 +1444,62 @@ local.get $2 call $~lib/polyfills/bswap end - i64.store offset=8 + i64.store ) - (func $start:std/dataview (; 37 ;) (type $FUNCSIG$v) - call $start:~lib/allocator/arena + (func $start:std/dataview (; 42 ;) (type $FUNCSIG$v) + global.get $~lib/memory/HEAP_BASE + i32.const 7 + i32.add + i32.const 7 + i32.const -1 + i32.xor + i32.and + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset i32.const 0 i32.const 8 call $~lib/typedarray/Uint8Array#constructor global.set $std/dataview/array global.get $std/dataview/array - i32.const 0 + i32.load offset=4 i32.const 246 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/dataview/array - i32.const 1 - i32.const 224 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/dataview/array - i32.const 2 - i32.const 88 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/dataview/array - i32.const 3 - i32.const 159 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/dataview/array - i32.const 4 - i32.const 130 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/dataview/array - i32.const 5 - i32.const 101 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/dataview/array - i32.const 6 - i32.const 67 - call $~lib/internal/typedarray/TypedArray#__set - global.get $std/dataview/array - i32.const 7 - i32.const 95 - call $~lib/internal/typedarray/TypedArray#__set - i32.const 0 - global.get $std/dataview/array - i32.load + i32.store8 global.get $std/dataview/array i32.load offset=4 + i32.const 224 + i32.store8 offset=1 global.get $std/dataview/array - i32.load offset=8 + i32.load offset=4 + i32.const 88 + i32.store8 offset=2 + global.get $std/dataview/array + i32.load offset=4 + i32.const 159 + i32.store8 offset=3 + global.get $std/dataview/array + i32.load offset=4 + i32.const 130 + i32.store8 offset=4 + global.get $std/dataview/array + i32.load offset=4 + i32.const 101 + i32.store8 offset=5 + global.get $std/dataview/array + i32.load offset=4 + i32.const 67 + i32.store8 offset=6 + global.get $std/dataview/array + i32.load offset=4 + i32.const 95 + i32.store8 offset=7 + i32.const 0 + global.get $std/dataview/array + call $~lib/typedarray/Uint8Array#get:buffer + global.get $std/dataview/array + call $~lib/runtime/ArrayBufferView#get:byteOffset + global.get $std/dataview/array + call $~lib/runtime/ArrayBufferView#get:byteLength call $~lib/dataview/DataView#constructor global.set $std/dataview/view global.get $std/dataview/view @@ -1870,7 +1511,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 16 i32.const 0 call $~lib/env/abort @@ -1885,7 +1526,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 17 i32.const 0 call $~lib/env/abort @@ -1900,7 +1541,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 18 i32.const 0 call $~lib/env/abort @@ -1915,7 +1556,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 19 i32.const 0 call $~lib/env/abort @@ -1930,7 +1571,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 20 i32.const 0 call $~lib/env/abort @@ -1945,7 +1586,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 22 i32.const 0 call $~lib/env/abort @@ -1960,7 +1601,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 23 i32.const 0 call $~lib/env/abort @@ -1975,7 +1616,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 24 i32.const 0 call $~lib/env/abort @@ -1990,7 +1631,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 25 i32.const 0 call $~lib/env/abort @@ -2005,7 +1646,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 26 i32.const 0 call $~lib/env/abort @@ -2020,7 +1661,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 28 i32.const 0 call $~lib/env/abort @@ -2035,7 +1676,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 29 i32.const 0 call $~lib/env/abort @@ -2049,7 +1690,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 31 i32.const 0 call $~lib/env/abort @@ -2063,7 +1704,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 32 i32.const 0 call $~lib/env/abort @@ -2077,7 +1718,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 33 i32.const 0 call $~lib/env/abort @@ -2091,7 +1732,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 34 i32.const 0 call $~lib/env/abort @@ -2105,7 +1746,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 35 i32.const 0 call $~lib/env/abort @@ -2119,7 +1760,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 36 i32.const 0 call $~lib/env/abort @@ -2133,7 +1774,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 37 i32.const 0 call $~lib/env/abort @@ -2147,7 +1788,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 38 i32.const 0 call $~lib/env/abort @@ -2166,7 +1807,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 40 i32.const 0 call $~lib/env/abort @@ -2185,7 +1826,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 41 i32.const 0 call $~lib/env/abort @@ -2204,7 +1845,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 42 i32.const 0 call $~lib/env/abort @@ -2223,7 +1864,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 43 i32.const 0 call $~lib/env/abort @@ -2242,7 +1883,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 44 i32.const 0 call $~lib/env/abort @@ -2261,7 +1902,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 45 i32.const 0 call $~lib/env/abort @@ -2280,7 +1921,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 46 i32.const 0 call $~lib/env/abort @@ -2299,7 +1940,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 48 i32.const 0 call $~lib/env/abort @@ -2318,7 +1959,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 49 i32.const 0 call $~lib/env/abort @@ -2337,7 +1978,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 50 i32.const 0 call $~lib/env/abort @@ -2356,7 +1997,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 51 i32.const 0 call $~lib/env/abort @@ -2375,7 +2016,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 52 i32.const 0 call $~lib/env/abort @@ -2394,7 +2035,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 53 i32.const 0 call $~lib/env/abort @@ -2413,7 +2054,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 54 i32.const 0 call $~lib/env/abort @@ -2428,7 +2069,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 56 i32.const 0 call $~lib/env/abort @@ -2443,7 +2084,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 57 i32.const 0 call $~lib/env/abort @@ -2458,7 +2099,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 58 i32.const 0 call $~lib/env/abort @@ -2473,7 +2114,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 59 i32.const 0 call $~lib/env/abort @@ -2488,7 +2129,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 60 i32.const 0 call $~lib/env/abort @@ -2503,7 +2144,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 62 i32.const 0 call $~lib/env/abort @@ -2518,7 +2159,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 63 i32.const 0 call $~lib/env/abort @@ -2533,7 +2174,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 64 i32.const 0 call $~lib/env/abort @@ -2548,7 +2189,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 65 i32.const 0 call $~lib/env/abort @@ -2563,7 +2204,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 66 i32.const 0 call $~lib/env/abort @@ -2578,7 +2219,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 68 i32.const 0 call $~lib/env/abort @@ -2593,7 +2234,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 69 i32.const 0 call $~lib/env/abort @@ -2607,7 +2248,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 71 i32.const 0 call $~lib/env/abort @@ -2621,7 +2262,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 72 i32.const 0 call $~lib/env/abort @@ -2635,7 +2276,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 73 i32.const 0 call $~lib/env/abort @@ -2649,7 +2290,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 74 i32.const 0 call $~lib/env/abort @@ -2663,7 +2304,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 75 i32.const 0 call $~lib/env/abort @@ -2677,7 +2318,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 76 i32.const 0 call $~lib/env/abort @@ -2691,7 +2332,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 77 i32.const 0 call $~lib/env/abort @@ -2705,7 +2346,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 78 i32.const 0 call $~lib/env/abort @@ -2722,7 +2363,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 80 i32.const 0 call $~lib/env/abort @@ -2739,7 +2380,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 81 i32.const 0 call $~lib/env/abort @@ -2756,7 +2397,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 82 i32.const 0 call $~lib/env/abort @@ -2773,7 +2414,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 83 i32.const 0 call $~lib/env/abort @@ -2790,7 +2431,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 84 i32.const 0 call $~lib/env/abort @@ -2807,7 +2448,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 85 i32.const 0 call $~lib/env/abort @@ -2824,7 +2465,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 86 i32.const 0 call $~lib/env/abort @@ -2841,7 +2482,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 88 i32.const 0 call $~lib/env/abort @@ -2858,7 +2499,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 89 i32.const 0 call $~lib/env/abort @@ -2875,7 +2516,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 90 i32.const 0 call $~lib/env/abort @@ -2892,7 +2533,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 91 i32.const 0 call $~lib/env/abort @@ -2909,7 +2550,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 92 i32.const 0 call $~lib/env/abort @@ -2926,7 +2567,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 93 i32.const 0 call $~lib/env/abort @@ -2943,7 +2584,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 94 i32.const 0 call $~lib/env/abort @@ -2958,7 +2599,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 96 i32.const 0 call $~lib/env/abort @@ -2973,7 +2614,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 97 i32.const 0 call $~lib/env/abort @@ -2988,7 +2629,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 98 i32.const 0 call $~lib/env/abort @@ -3003,7 +2644,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 99 i32.const 0 call $~lib/env/abort @@ -3018,7 +2659,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 100 i32.const 0 call $~lib/env/abort @@ -3033,7 +2674,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 102 i32.const 0 call $~lib/env/abort @@ -3048,7 +2689,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 103 i32.const 0 call $~lib/env/abort @@ -3063,7 +2704,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 104 i32.const 0 call $~lib/env/abort @@ -3078,7 +2719,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 105 i32.const 0 call $~lib/env/abort @@ -3093,7 +2734,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 106 i32.const 0 call $~lib/env/abort @@ -3108,7 +2749,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 108 i32.const 0 call $~lib/env/abort @@ -3123,7 +2764,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 109 i32.const 0 call $~lib/env/abort @@ -3143,7 +2784,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 112 i32.const 0 call $~lib/env/abort @@ -3163,7 +2804,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 115 i32.const 0 call $~lib/env/abort @@ -3183,7 +2824,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 118 i32.const 0 call $~lib/env/abort @@ -3203,7 +2844,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 121 i32.const 0 call $~lib/env/abort @@ -3221,7 +2862,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 124 i32.const 0 call $~lib/env/abort @@ -3245,7 +2886,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 127 i32.const 0 call $~lib/env/abort @@ -3269,7 +2910,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 130 i32.const 0 call $~lib/env/abort @@ -3289,7 +2930,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 133 i32.const 0 call $~lib/env/abort @@ -3309,7 +2950,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 136 i32.const 0 call $~lib/env/abort @@ -3329,7 +2970,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 139 i32.const 0 call $~lib/env/abort @@ -3349,7 +2990,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 142 i32.const 0 call $~lib/env/abort @@ -3367,7 +3008,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 145 i32.const 0 call $~lib/env/abort @@ -3389,7 +3030,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 148 i32.const 0 call $~lib/env/abort @@ -3411,7 +3052,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 151 i32.const 0 call $~lib/env/abort @@ -3431,7 +3072,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 154 i32.const 0 call $~lib/env/abort @@ -3451,7 +3092,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 157 i32.const 0 call $~lib/env/abort @@ -3471,7 +3112,7 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 160 i32.const 0 call $~lib/env/abort @@ -3491,16 +3132,16 @@ i32.eqz if i32.const 0 - i32.const 176 + i32.const 144 i32.const 163 i32.const 0 call $~lib/env/abort unreachable end ) - (func $start (; 38 ;) (type $FUNCSIG$v) + (func $start (; 43 ;) (type $FUNCSIG$v) call $start:std/dataview ) - (func $null (; 39 ;) (type $FUNCSIG$v) + (func $null (; 44 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index 92c02146..16c498b0 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -90,7 +90,7 @@ if i32.const 0 i32.const 48 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -104,7 +104,7 @@ if i32.const 0 i32.const 48 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/date.untouched.wat b/tests/compiler/std/date.untouched.wat index a68b133f..949c6432 100644 --- a/tests/compiler/std/date.untouched.wat +++ b/tests/compiler/std/date.untouched.wat @@ -154,7 +154,7 @@ if i32.const 0 i32.const 48 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -169,7 +169,7 @@ if i32.const 0 i32.const 48 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index adbb3496..ffd13cd2 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -84,7 +84,7 @@ if i32.const 0 i32.const 16 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -98,7 +98,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/new.untouched.wat b/tests/compiler/std/new.untouched.wat index 50beb647..1e15eedf 100644 --- a/tests/compiler/std/new.untouched.wat +++ b/tests/compiler/std/new.untouched.wat @@ -147,7 +147,7 @@ if i32.const 0 i32.const 16 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -162,7 +162,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index ed1bd530..4a930e3c 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -167,7 +167,7 @@ if i32.const 0 i32.const 16 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -181,7 +181,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index 1fb8471e..9f0b83fa 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -215,7 +215,7 @@ if i32.const 0 i32.const 16 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -230,7 +230,7 @@ if i32.const 0 i32.const 16 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/runtime.optimized.wat b/tests/compiler/std/runtime.optimized.wat index f71d18fe..45871616 100644 --- a/tests/compiler/std/runtime.optimized.wat +++ b/tests/compiler/std/runtime.optimized.wat @@ -2651,7 +2651,7 @@ if i32.const 0 i32.const 232 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -2665,7 +2665,7 @@ if i32.const 0 i32.const 232 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat index 5f8b80c1..fc1f1ed7 100644 --- a/tests/compiler/std/runtime.untouched.wat +++ b/tests/compiler/std/runtime.untouched.wat @@ -3340,7 +3340,7 @@ if i32.const 0 i32.const 232 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -3355,7 +3355,7 @@ if i32.const 0 i32.const 232 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string-utf8.optimized.wat b/tests/compiler/std/string-utf8.optimized.wat index 5af63043..93a5f397 100644 --- a/tests/compiler/std/string-utf8.optimized.wat +++ b/tests/compiler/std/string-utf8.optimized.wat @@ -1514,7 +1514,7 @@ if i32.const 0 i32.const 136 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -1528,7 +1528,7 @@ if i32.const 0 i32.const 136 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string-utf8.untouched.wat b/tests/compiler/std/string-utf8.untouched.wat index b8d01298..7e6a864d 100644 --- a/tests/compiler/std/string-utf8.untouched.wat +++ b/tests/compiler/std/string-utf8.untouched.wat @@ -1926,7 +1926,7 @@ if i32.const 0 i32.const 136 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -1941,7 +1941,7 @@ if i32.const 0 i32.const 136 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 4e3a90ec..cdcc11fa 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -92,7 +92,7 @@ (data (i32.const 1592) "\01\00\00\00\0c\00\00\00,\00a\00,\00b\00,\00c") (data (i32.const 1616) "\01\00\00\00\0c\00\00\00a\00,\00b\00,\00c\00,") (data (i32.const 1640) "\02\00\00\00\90\01\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 2048) "\05\00\00\00\10\00\00\00p\06\00\00p\06\00\00\00\08\00\00d") + (data (i32.const 2048) "\05\00\00\00\10\00\00\00p\06\00\00p\06\00\00\90\01\00\00d") (data (i32.const 2072) "\01\00\00\00\02\00\00\008") (data (i32.const 2088) "\01\00\00\00\n\00\00\00-\001\000\000\000") (data (i32.const 2112) "\01\00\00\00\08\00\00\001\002\003\004") @@ -128,11 +128,11 @@ (data (i32.const 3056) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") (data (i32.const 3088) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y") (data (i32.const 3112) "\02\00\00\00\b8\02\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8#__set (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) @@ -6700,7 +6696,14 @@ local.tee $0 if (result i32) global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 312 call $~lib/string/String.eq @@ -6743,7 +6746,14 @@ local.tee $0 if (result i32) global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 312 call $~lib/string/String.eq @@ -6771,7 +6781,14 @@ local.tee $0 if (result i32) global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 1480 call $~lib/string/String.eq @@ -6801,7 +6818,14 @@ local.tee $0 if global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -6811,8 +6835,17 @@ end if global.get $std/string/sa + local.tee $0 i32.load offset=4 - i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq local.set $0 @@ -6821,8 +6854,17 @@ end if (result i32) global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else @@ -6851,7 +6893,14 @@ local.tee $0 if global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -6861,8 +6910,17 @@ end if global.get $std/string/sa + local.tee $0 i32.load offset=4 - i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq local.set $0 @@ -6871,8 +6929,17 @@ end if (result i32) global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else @@ -6902,7 +6969,14 @@ local.tee $0 if global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -6912,8 +6986,17 @@ end if global.get $std/string/sa + local.tee $0 i32.load offset=4 - i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq local.set $0 @@ -6922,8 +7005,17 @@ end if global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 312 call $~lib/string/String.eq local.set $0 @@ -6932,8 +7024,17 @@ end if (result i32) global.get $std/string/sa + local.tee $0 i32.load offset=4 - i32.load offset=12 + i32.const 12 + i32.add + i32.const -1 + i32.const 12 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else @@ -6963,7 +7064,14 @@ local.tee $0 if global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 312 call $~lib/string/String.eq @@ -6973,8 +7081,17 @@ end if global.get $std/string/sa + local.tee $0 i32.load offset=4 - i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 336 call $~lib/string/String.eq local.set $0 @@ -6983,8 +7100,17 @@ end if global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq local.set $0 @@ -6993,8 +7119,17 @@ end if (result i32) global.get $std/string/sa + local.tee $0 i32.load offset=4 - i32.load offset=12 + i32.const 12 + i32.add + i32.const -1 + i32.const 12 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else @@ -7024,7 +7159,14 @@ local.tee $0 if global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -7034,8 +7176,17 @@ end if global.get $std/string/sa + local.tee $0 i32.load offset=4 - i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq local.set $0 @@ -7044,8 +7195,17 @@ end if global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq local.set $0 @@ -7054,8 +7214,17 @@ end if (result i32) global.get $std/string/sa + local.tee $0 i32.load offset=4 - i32.load offset=12 + i32.const 12 + i32.add + i32.const -1 + i32.const 12 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 312 call $~lib/string/String.eq else @@ -7084,7 +7253,14 @@ local.tee $0 if global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -7094,8 +7270,17 @@ end if global.get $std/string/sa + local.tee $0 i32.load offset=4 - i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq local.set $0 @@ -7104,8 +7289,17 @@ end if (result i32) global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else @@ -7147,7 +7341,14 @@ local.tee $0 if (result i32) global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -7175,7 +7376,14 @@ local.tee $0 if (result i32) global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -7205,7 +7413,14 @@ local.tee $0 if global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -7215,8 +7430,17 @@ end if global.get $std/string/sa + local.tee $0 i32.load offset=4 - i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq local.set $0 @@ -7225,8 +7449,17 @@ end if (result i32) global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else @@ -7255,7 +7488,14 @@ local.tee $0 if global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -7265,8 +7505,17 @@ end if global.get $std/string/sa + local.tee $0 i32.load offset=4 - i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq local.set $0 @@ -7275,8 +7524,17 @@ end if (result i32) global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else @@ -7305,7 +7563,14 @@ local.tee $0 if global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const -1 + i32.const 0 + local.get $0 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -7315,8 +7580,17 @@ end if global.get $std/string/sa + local.tee $0 i32.load offset=4 - i32.load offset=4 + i32.const 4 + i32.add + i32.const -1 + i32.const 4 + local.get $0 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq local.set $0 @@ -7325,8 +7599,17 @@ end if (result i32) global.get $std/string/sa + local.tee $0 i32.load offset=4 + i32.const 8 + i32.add + i32.const -1 + i32.const 8 + local.get $0 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index 683f6bce..fa2e3a58 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -93,7 +93,7 @@ (data (i32.const 1592) "\01\00\00\00\0c\00\00\00,\00a\00,\00b\00,\00c\00") (data (i32.const 1616) "\01\00\00\00\0c\00\00\00a\00,\00b\00,\00c\00,\00") (data (i32.const 1640) "\02\00\00\00\90\01\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\00") - (data (i32.const 2048) "\05\00\00\00\10\00\00\00p\06\00\00p\06\00\00\00\08\00\00d\00\00\00") + (data (i32.const 2048) "\05\00\00\00\10\00\00\00p\06\00\00p\06\00\00\90\01\00\00d\00\00\00") (data (i32.const 2072) "\01\00\00\00\02\00\00\008\00") (data (i32.const 2088) "\01\00\00\00\n\00\00\00-\001\000\000\000\00") (data (i32.const 2112) "\01\00\00\00\08\00\00\001\002\003\004\00") @@ -129,11 +129,11 @@ (data (i32.const 3056) "\01\00\00\00\12\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00") (data (i32.const 3088) "\01\00\00\00\10\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00") (data (i32.const 3112) "\02\00\00\00\b8\02\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8#__set (; 42 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) @@ -8279,7 +8275,19 @@ local.tee $2 if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 312 call $~lib/string/String.eq @@ -8325,7 +8333,19 @@ local.tee $2 if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 312 call $~lib/string/String.eq @@ -8353,7 +8373,19 @@ local.tee $2 if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 1480 call $~lib/string/String.eq @@ -8381,7 +8413,19 @@ local.tee $2 if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -8389,25 +8433,55 @@ local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq else local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else local.get $2 end + i32.const 0 + i32.ne i32.eqz if i32.const 0 @@ -8429,7 +8503,19 @@ local.tee $2 if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -8437,25 +8523,55 @@ local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq else local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else local.get $2 end + i32.const 0 + i32.ne i32.eqz if i32.const 0 @@ -8477,7 +8593,19 @@ local.tee $2 if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -8485,35 +8613,79 @@ local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq else local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 312 call $~lib/string/String.eq else local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 - i32.load offset=12 + i32.const 3 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else local.get $2 end + i32.const 0 + i32.ne i32.eqz if i32.const 0 @@ -8535,7 +8707,19 @@ local.tee $2 if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 312 call $~lib/string/String.eq @@ -8543,35 +8727,79 @@ local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 336 call $~lib/string/String.eq else local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq else local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 - i32.load offset=12 + i32.const 3 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else local.get $2 end + i32.const 0 + i32.ne i32.eqz if i32.const 0 @@ -8593,7 +8821,19 @@ local.tee $2 if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -8601,35 +8841,79 @@ local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq else local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 - i32.load offset=12 + i32.const 3 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 312 call $~lib/string/String.eq else local.get $2 end + i32.const 0 + i32.ne i32.eqz if i32.const 0 @@ -8651,7 +8935,19 @@ local.tee $2 if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -8659,25 +8955,55 @@ local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq else local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else local.get $2 end + i32.const 0 + i32.ne i32.eqz if i32.const 0 @@ -8717,7 +9043,19 @@ local.tee $2 if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -8745,7 +9083,19 @@ local.tee $2 if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -8773,7 +9123,19 @@ local.tee $2 if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -8781,25 +9143,55 @@ local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq else local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else local.get $2 end + i32.const 0 + i32.ne i32.eqz if i32.const 0 @@ -8821,7 +9213,19 @@ local.tee $2 if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -8829,25 +9233,55 @@ local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq else local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else local.get $2 end + i32.const 0 + i32.ne i32.eqz if i32.const 0 @@ -8869,7 +9303,19 @@ local.tee $2 if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 0 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select i32.load i32.const 336 call $~lib/string/String.eq @@ -8877,25 +9323,55 @@ local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 - i32.load offset=4 + i32.const 1 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 + i32.load offset=8 + i32.lt_u + select + i32.load i32.const 824 call $~lib/string/String.eq else local.get $2 end local.tee $2 + i32.const 0 + i32.ne if (result i32) global.get $std/string/sa + local.tee $2 i32.load offset=4 + i32.const 2 + i32.const 2 + i32.shl + local.tee $1 + i32.add + i32.const -1 + local.get $1 + local.get $2 i32.load offset=8 + i32.lt_u + select + i32.load i32.const 1520 call $~lib/string/String.eq else local.get $2 end + i32.const 0 + i32.ne i32.eqz if i32.const 0 diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 284c8415..ce390ff4 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -144,7 +144,7 @@ if i32.const 0 i32.const 72 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -158,7 +158,7 @@ if i32.const 0 i32.const 72 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index 11c5894f..274f9b61 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -206,7 +206,7 @@ if i32.const 0 i32.const 72 - i32.const 188 + i32.const 191 i32.const 2 call $~lib/env/abort unreachable @@ -221,7 +221,7 @@ if i32.const 0 i32.const 72 - i32.const 189 + i32.const 192 i32.const 2 call $~lib/env/abort unreachable