use overloads for checked access

This commit is contained in:
dcode 2019-03-18 16:09:49 +01:00
parent c147e98a55
commit 0932cf17ed
20 changed files with 9141 additions and 11890 deletions

View File

@ -4120,103 +4120,52 @@ export function compileBuiltinArrayGet(
); );
} }
var flow = compiler.currentFlow;
var usizeType = compiler.options.usizeType; var usizeType = compiler.options.usizeType;
var nativeSizeType = compiler.options.nativeSizeType; var nativeSizeType = compiler.options.nativeSizeType;
var isUnchecked = flow.is(FlowFlags.UNCHECKED_CONTEXT);
var ptrExpr: ExpressionRef; var ptrExpr: ExpressionRef;
var constantOffset: i32 = 0; var constantOffset: i32 = 0;
if (isUnchecked) { // precompute byteOffset into a constant and a dynamic part
// precompute byteOffset into a constant and a dynamic part dynamicOffset = module.precomputeExpression(dynamicOffset);
dynamicOffset = module.precomputeExpression(dynamicOffset); if (getExpressionId(dynamicOffset) == ExpressionId.Const) {
if (getExpressionId(dynamicOffset) == ExpressionId.Const) { constantOffset = getConstValueI32(dynamicOffset);
constantOffset = getConstValueI32(dynamicOffset); dynamicOffset = 0;
dynamicOffset = 0; } else if (getExpressionId(dynamicOffset) == ExpressionId.Binary) {
} else if (getExpressionId(dynamicOffset) == ExpressionId.Binary) { if (getBinaryOp(dynamicOffset) == BinaryOp.AddI32) {
if (getBinaryOp(dynamicOffset) == BinaryOp.AddI32) { let left = getBinaryLeft(dynamicOffset);
let left = getBinaryLeft(dynamicOffset); let right = getBinaryRight(dynamicOffset);
let right = getBinaryRight(dynamicOffset); if (getExpressionId(left) == ExpressionId.Const) {
if (getExpressionId(left) == ExpressionId.Const) { constantOffset = getConstValueI32(left);
constantOffset = getConstValueI32(left); dynamicOffset = right;
dynamicOffset = right; } else if (getExpressionId(right) == ExpressionId.Const) {
} else if (getExpressionId(right) == ExpressionId.Const) { constantOffset = getConstValueI32(right);
constantOffset = getConstValueI32(right); dynamicOffset = left;
dynamicOffset = left;
}
} }
} }
// ptr = this.dataStart }
ptrExpr = module.createLoad(usizeType.byteSize, true, // ptr = this.dataStart
compiler.compileExpression( ptrExpr = module.createLoad(usizeType.byteSize, true,
thisExpression, compiler.compileExpression(
target.type, thisExpression,
ConversionKind.IMPLICIT, target.type,
WrapMode.NONE ConversionKind.IMPLICIT,
), WrapMode.NONE
nativeSizeType, (<Field>dataStart).memoryOffset ),
); nativeSizeType, (<Field>dataStart).memoryOffset
// ptr = ptr + <usize>dynamicOffset );
if (dynamicOffset) { // ptr = ptr + <usize>dynamicOffset
if (nativeSizeType == NativeType.I64) { if (dynamicOffset) {
ptrExpr = module.createBinary(BinaryOp.AddI64,
ptrExpr,
module.createUnary(UnaryOp.ExtendU32, dynamicOffset)
);
} else {
ptrExpr = module.createBinary(BinaryOp.AddI32,
ptrExpr,
dynamicOffset
);
}
}
} else /* checked */ {
let tempThis = flow.getTempLocal(usizeType, false);
let tempOffset = flow.getAndFreeTempLocal(Type.i32, false);
flow.freeTempLocal(tempThis);
// ptr = (tempThis = this).dataStart
ptrExpr = module.createLoad(usizeType.byteSize, true,
module.createTeeLocal(tempThis.index,
compiler.compileExpression(
thisExpression,
target.type,
ConversionKind.IMPLICIT,
WrapMode.NONE
)
),
nativeSizeType, (<Field>dataStart).memoryOffset
);
// ptr = ptr + <usize>(tempOffset = dynamicOffset)
if (nativeSizeType == NativeType.I64) { if (nativeSizeType == NativeType.I64) {
ptrExpr = module.createBinary(BinaryOp.AddI64, ptrExpr = module.createBinary(BinaryOp.AddI64,
ptrExpr, ptrExpr,
module.createUnary(UnaryOp.ExtendU32, module.createUnary(UnaryOp.ExtendU32, dynamicOffset)
module.createTeeLocal(tempOffset.index, dynamicOffset)
)
); );
} else { } else {
ptrExpr = module.createBinary(BinaryOp.AddI32, ptrExpr = module.createBinary(BinaryOp.AddI32,
ptrExpr, ptrExpr,
module.createTeeLocal(tempOffset.index, dynamicOffset) dynamicOffset
); );
} }
// ptr = select(ptr, -1, <u32>tempOffset < <u32>tempThis.dataLength)
// triggers "RuntimeError: memory access out of bounds" if OOB
ptrExpr = module.createSelect(
ptrExpr,
usizeType.toNativeNegOne(module),
module.createBinary(BinaryOp.LtU32,
module.createGetLocal(tempOffset.index, NativeType.I32),
module.createLoad(4, false,
module.createGetLocal(tempThis.index, nativeSizeType),
NativeType.I32, (<Field>dataLength).memoryOffset
)
)
);
} }
compiler.currentType = outType; compiler.currentType = outType;

View File

@ -4722,18 +4722,20 @@ export class Compiler extends DiagnosticEmitter {
case ElementKind.CLASS: { case ElementKind.CLASS: {
let elementExpression = resolver.currentElementExpression; let elementExpression = resolver.currentElementExpression;
if (elementExpression) { // indexed access if (elementExpression) { // indexed access
let arrayType = this.program.determineBuiltinArrayType(<Class>target);
if (arrayType) {
return compileBuiltinArraySet(
this,
<Class>target,
assert(this.resolver.currentThisExpression),
elementExpression,
valueExpression,
contextualType
);
}
let isUnchecked = flow.is(FlowFlags.UNCHECKED_CONTEXT); let isUnchecked = flow.is(FlowFlags.UNCHECKED_CONTEXT);
if (isUnchecked) {
let arrayType = this.program.determineBuiltinArrayType(<Class>target);
if (arrayType) {
return compileBuiltinArraySet(
this,
<Class>target,
assert(this.resolver.currentThisExpression),
elementExpression,
valueExpression,
contextualType
);
}
}
let indexedSet = (<Class>target).lookupOverload(OperatorKind.INDEXED_SET, isUnchecked); let indexedSet = (<Class>target).lookupOverload(OperatorKind.INDEXED_SET, isUnchecked);
if (!indexedSet) { if (!indexedSet) {
let indexedGet = (<Class>target).lookupOverload(OperatorKind.INDEXED_GET, isUnchecked); let indexedGet = (<Class>target).lookupOverload(OperatorKind.INDEXED_GET, isUnchecked);
@ -4956,18 +4958,20 @@ export class Compiler extends DiagnosticEmitter {
case ElementKind.CLASS: { case ElementKind.CLASS: {
let elementExpression = this.resolver.currentElementExpression; let elementExpression = this.resolver.currentElementExpression;
if (elementExpression) { if (elementExpression) {
let arrayType = this.program.determineBuiltinArrayType(<Class>target);
if (arrayType) {
return compileBuiltinArraySetWithValue(
this,
<Class>target,
assert(this.resolver.currentThisExpression),
elementExpression,
valueWithCorrectType,
tee
);
}
let isUnchecked = flow.is(FlowFlags.UNCHECKED_CONTEXT); let isUnchecked = flow.is(FlowFlags.UNCHECKED_CONTEXT);
if (isUnchecked) {
let arrayType = this.program.determineBuiltinArrayType(<Class>target);
if (arrayType) {
return compileBuiltinArraySetWithValue(
this,
<Class>target,
assert(this.resolver.currentThisExpression),
elementExpression,
valueWithCorrectType,
tee
);
}
}
let indexedGet = (<Class>target).lookupOverload(OperatorKind.INDEXED_GET, isUnchecked); let indexedGet = (<Class>target).lookupOverload(OperatorKind.INDEXED_GET, isUnchecked);
if (!indexedGet) { if (!indexedGet) {
this.error( this.error(
@ -5974,17 +5978,19 @@ export class Compiler extends DiagnosticEmitter {
if (!target) return this.module.createUnreachable(); if (!target) return this.module.createUnreachable();
switch (target.kind) { switch (target.kind) {
case ElementKind.CLASS: { case ElementKind.CLASS: {
let arrayType = this.program.determineBuiltinArrayType(<Class>target);
if (arrayType) {
return compileBuiltinArrayGet(
this,
<Class>target,
expression.expression,
expression.elementExpression,
contextualType
);
}
let isUnchecked = this.currentFlow.is(FlowFlags.UNCHECKED_CONTEXT); let isUnchecked = this.currentFlow.is(FlowFlags.UNCHECKED_CONTEXT);
if (isUnchecked) {
let arrayType = this.program.determineBuiltinArrayType(<Class>target);
if (arrayType) {
return compileBuiltinArrayGet(
this,
<Class>target,
expression.expression,
expression.elementExpression,
contextualType
);
}
}
let indexedGet = (<Class>target).lookupOverload(OperatorKind.INDEXED_GET, isUnchecked); let indexedGet = (<Class>target).lookupOverload(OperatorKind.INDEXED_GET, isUnchecked);
if (!indexedGet) { if (!indexedGet) {
this.error( this.error(

View File

@ -6,10 +6,9 @@ import { isArray as builtin_isArray } from "./builtins";
/** Ensures that the given array has _at least_ the specified capacity. */ /** Ensures that the given array has _at least_ the specified capacity. */
function ensureCapacity(array: ArrayBufferView, minCapacity: i32, alignLog2: u32): void { function ensureCapacity(array: ArrayBufferView, minCapacity: i32, alignLog2: u32): void {
var oldData = array.data; if (<u32>minCapacity > <u32>array.dataLength >>> alignLog2) {
var oldCapacity = oldData.byteLength >>> alignLog2;
if (<u32>minCapacity > <u32>oldCapacity) {
if (<u32>minCapacity > <u32>(MAX_BYTELENGTH >>> alignLog2)) throw new RangeError("Invalid array length"); if (<u32>minCapacity > <u32>(MAX_BYTELENGTH >>> alignLog2)) throw new RangeError("Invalid array length");
let oldData = array.data;
let newByteLength = minCapacity << alignLog2; let newByteLength = minCapacity << alignLog2;
let newData = REALLOCATE(changetype<usize>(oldData), <usize>newByteLength); // registers on move let newData = REALLOCATE(changetype<usize>(oldData), <usize>newByteLength); // registers on move
if (newData !== changetype<usize>(oldData)) { if (newData !== changetype<usize>(oldData)) {
@ -21,6 +20,11 @@ function ensureCapacity(array: ArrayBufferView, minCapacity: i32, alignLog2: u32
} }
export class Array<T> extends ArrayBufferView { export class Array<T> extends ArrayBufferView {
// Implementing ArrayBufferView isn't strictly necessary here but is done to allow glue code
// to work with typed and normal arrays interchangeably. Technically, normal arrays do not need
// `dataStart` (equals `data`) and `dataLength` (equals computed `data.byteLength`).
private length_: i32; private length_: i32;
static isArray<U>(value: U): bool { static isArray<U>(value: U): bool {
@ -59,8 +63,14 @@ export class Array<T> extends ArrayBufferView {
return -1; return -1;
} }
@operator("[]=") @operator("[]") // unchecked is built-in
private __set(index: i32, value: T): void { // unchecked is built-in private __get(index: i32): T {
if (<u32>index >= <u32>this.dataLength >>> alignof<T>()) throw new Error("Offset out of bounds");
return load<T>(this.dataStart + (<usize>index << alignof<T>()));
}
@operator("[]=") // unchecked is built-in
private __set(index: i32, value: T): void {
ensureCapacity(this, index + 1, alignof<T>()); ensureCapacity(this, index + 1, alignof<T>());
store<T>(this.dataStart + (<usize>index << alignof<T>()), value); store<T>(this.dataStart + (<usize>index << alignof<T>()), value);
if (isManaged<T>()) LINK(value, this); if (isManaged<T>()) LINK(value, this);

View File

@ -1,10 +1,6 @@
import { ALLOCATE, REGISTER, ArrayBufferView } from "./runtime"; import { ALLOCATE, REGISTER, ArrayBufferView } from "./runtime";
import { COMPARATOR, SORT as SORT_IMPL } from "./util/sort"; import { COMPARATOR, SORT as SORT_IMPL } from "./util/sort";
// function clampToByte(value: i32): i32 {
// return ~(value >> 31) & (((255 - value) >> 31) | value); // & 255
// }
export class Int8Array extends ArrayBufferView { export class Int8Array extends ArrayBufferView {
// @ts-ignore: decorator // @ts-ignore: decorator
@ -23,6 +19,18 @@ export class Int8Array extends ArrayBufferView {
return this.byteLength; return this.byteLength;
} }
@operator("[]") // unchecked is built-in
private __get(index: i32): i8 {
if (<u32>index >= <u32>this.dataLength) throw new Error("Offset out of bounds");
return load<i8>(this.dataStart + <usize>index);
}
@operator("[]=") // unchecked is built-in
private __set(index: i32, value: native<i8>): void {
if (<u32>index >= <u32>this.dataLength) throw new Error("Offset out of bounds");
store<i8>(this.dataStart + <usize>index, value);
}
fill(value: i32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int8Array { fill(value: i32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int8Array {
return FILL<Int8Array, i8>(this, value, start, end); return FILL<Int8Array, i8>(this, value, start, end);
} }
@ -92,6 +100,18 @@ export class Uint8Array extends ArrayBufferView {
return this.byteLength; return this.byteLength;
} }
@operator("[]") // unchecked is built-in
private __get(index: i32): u8 {
if (<u32>index >= <u32>this.dataLength) throw new Error("Offset out of bounds");
return load<u8>(this.dataStart + <usize>index);
}
@operator("[]=") // unchecked is built-in
private __set(index: i32, value: native<u8>): void {
if (<u32>index >= <u32>this.dataLength) throw new Error("Offset out of bounds");
store<u8>(this.dataStart + <usize>index, value);
}
fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint8Array { fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint8Array {
return FILL<Uint8Array, u8>(this, value, start, end); return FILL<Uint8Array, u8>(this, value, start, end);
} }
@ -143,18 +163,42 @@ export class Uint8Array extends ArrayBufferView {
} }
} }
export class Uint8ClampedArray extends Uint8Array { export class Uint8ClampedArray extends ArrayBufferView {
// @ts-ignore: decorator // @ts-ignore: decorator
@lazy @lazy
static readonly BYTES_PER_ELEMENT: usize = sizeof<u8>(); static readonly BYTES_PER_ELEMENT: usize = sizeof<u8>();
constructor(length: i32) {
super(length, alignof<u8>());
}
get buffer(): ArrayBuffer {
return this.data;
}
get length(): i32 {
return this.byteLength;
}
@operator("[]") // unchecked is built-in
private __get(index: i32): u8 {
if (<u32>index >= <u32>this.dataLength) throw new Error("Offset out of bounds");
return load<u8>(this.dataStart + <usize>index);
}
@operator("[]=") // unchecked is built-in
private __set(index: i32, value: native<u8>): void {
if (<u32>index >= <u32>this.dataLength) throw new Error("Offset out of bounds");
store<u8>(this.dataStart + <usize>index, ~(<i32>value >> 31) & (((255 - value) >> 31) | value));
}
fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint8ClampedArray { fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint8ClampedArray {
return changetype<Uint8ClampedArray>(super.fill(value, start, end)); // safe because '.fill' reuses 'this' return FILL<Uint8ClampedArray, u8>(this, value, start, end);
} }
sort(comparator: (a: u8, b: u8) => i32 = COMPARATOR<u8>()): Uint8ClampedArray { sort(comparator: (a: u8, b: u8) => i32 = COMPARATOR<u8>()): Uint8ClampedArray {
return changetype<Uint8ClampedArray>(super.sort(comparator)); // safe because '.sort' reuses 'this' return SORT<Uint8ClampedArray, u8>(this, comparator);
} }
subarray(begin: i32 = 0, end: i32 = 0x7fffffff): Uint8ClampedArray { subarray(begin: i32 = 0, end: i32 = 0x7fffffff): Uint8ClampedArray {
@ -218,6 +262,18 @@ export class Int16Array extends ArrayBufferView {
return this.byteLength >>> alignof<i16>(); return this.byteLength >>> alignof<i16>();
} }
@operator("[]") // unchecked is built-in
private __get(index: i32): i16 {
if (<u32>index >= <u32>this.dataLength >>> alignof<i16>()) throw new Error("Offset out of bounds");
return load<i16>(this.dataStart + (<usize>index << alignof<i16>()));
}
@operator("[]=") // unchecked is built-in
private __set(index: i32, value: native<i16>): void {
if (<u32>index >= <u32>this.dataLength >>> alignof<i16>()) throw new Error("Offset out of bounds");
store<i16>(this.dataStart + (<usize>index << alignof<i16>()), value);
}
fill(value: i32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int16Array { fill(value: i32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int16Array {
return FILL<Int16Array, i16>(this, value, start, end); return FILL<Int16Array, i16>(this, value, start, end);
} }
@ -287,6 +343,18 @@ export class Uint16Array extends ArrayBufferView {
return this.byteLength >>> alignof<u16>(); return this.byteLength >>> alignof<u16>();
} }
@operator("[]") // unchecked is built-in
private __get(index: i32): u16 {
if (<u32>index >= <u32>this.dataLength >>> alignof<u16>()) throw new Error("Offset out of bounds");
return load<u16>(this.dataStart + (<usize>index << alignof<u16>()));
}
@operator("[]=") // unchecked is built-in
private __set(index: i32, value: native<u16>): void {
if (<u32>index >= <u32>this.dataLength >>> alignof<u16>()) throw new Error("Offset out of bounds");
store<u16>(this.dataStart + (<usize>index << alignof<u16>()), value);
}
fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint16Array { fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint16Array {
return FILL<Uint16Array, u16>(this, value, start, end); return FILL<Uint16Array, u16>(this, value, start, end);
} }
@ -356,6 +424,18 @@ export class Int32Array extends ArrayBufferView {
return this.byteLength >>> alignof<i32>(); return this.byteLength >>> alignof<i32>();
} }
@operator("[]") // unchecked is built-in
private __get(index: i32): i32 {
if (<u32>index >= <u32>this.dataLength >>> alignof<i32>()) throw new Error("Offset out of bounds");
return load<i32>(this.dataStart + (<usize>index << alignof<i32>()));
}
@operator("[]=") // unchecked is built-in
private __set(index: i32, value: i32): void {
if (<u32>index >= <u32>this.dataLength >>> alignof<i32>()) throw new Error("Offset out of bounds");
store<i32>(this.dataStart + (<usize>index << alignof<i32>()), value);
}
fill(value: i32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int32Array { fill(value: i32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int32Array {
return FILL<Int32Array, i32>(this, value, start, end); return FILL<Int32Array, i32>(this, value, start, end);
} }
@ -425,6 +505,18 @@ export class Uint32Array extends ArrayBufferView {
return this.byteLength >>> alignof<u32>(); return this.byteLength >>> alignof<u32>();
} }
@operator("[]") // unchecked is built-in
private __get(index: i32): u32 {
if (<u32>index >= <u32>this.dataLength >>> alignof<u32>()) throw new Error("Offset out of bounds");
return load<u32>(this.dataStart + (<usize>index << alignof<u32>()));
}
@operator("[]=") // unchecked is built-in
private __set(index: i32, value: u32): void {
if (<u32>index >= <u32>this.dataLength >>> alignof<u32>()) throw new Error("Offset out of bounds");
store<u32>(this.dataStart + (<usize>index << alignof<u32>()), value);
}
fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint32Array { fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint32Array {
return FILL<Uint32Array, u32>(this, value, start, end); return FILL<Uint32Array, u32>(this, value, start, end);
} }
@ -494,6 +586,18 @@ export class Int64Array extends ArrayBufferView {
return this.byteLength >>> alignof<i64>(); return this.byteLength >>> alignof<i64>();
} }
@operator("[]") // unchecked is built-in
private __get(index: i32): i64 {
if (<u32>index >= <u32>this.dataLength >>> alignof<i64>()) throw new Error("Offset out of bounds");
return load<i64>(this.dataStart + (<usize>index << alignof<i64>()));
}
@operator("[]=") // unchecked is built-in
private __set(index: i32, value: i64): void {
if (<u32>index >= <u32>this.dataLength >>> alignof<i64>()) throw new Error("Offset out of bounds");
store<i64>(this.dataStart + (<usize>index << alignof<i64>()), value);
}
fill(value: i64, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int64Array { fill(value: i64, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int64Array {
return FILL<Int64Array, i64>(this, value, start, end); return FILL<Int64Array, i64>(this, value, start, end);
} }
@ -563,6 +667,18 @@ export class Uint64Array extends ArrayBufferView {
return this.byteLength >>> alignof<u64>(); return this.byteLength >>> alignof<u64>();
} }
@operator("[]") // unchecked is built-in
private __get(index: i32): u64 {
if (<u32>index >= <u32>this.dataLength >>> alignof<u64>()) throw new Error("Offset out of bounds");
return load<u64>(this.dataStart + (<usize>index << alignof<u64>()));
}
@operator("[]=") // unchecked is built-in
private __set(index: i32, value: u64): void {
if (<u32>index >= <u32>this.dataLength >>> alignof<u64>()) throw new Error("Offset out of bounds");
store<u64>(this.dataStart + (<usize>index << alignof<u64>()), value);
}
fill(value: u64, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint64Array { fill(value: u64, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint64Array {
return FILL<Uint64Array, u64>(this, value, start, end); return FILL<Uint64Array, u64>(this, value, start, end);
} }
@ -632,6 +748,18 @@ export class Float32Array extends ArrayBufferView {
return this.byteLength >>> alignof<f32>(); return this.byteLength >>> alignof<f32>();
} }
@operator("[]") // unchecked is built-in
private __get(index: i32): f32 {
if (<u32>index >= <u32>this.dataLength >>> alignof<f32>()) throw new Error("Offset out of bounds");
return load<f32>(this.dataStart + (<usize>index << alignof<f32>()));
}
@operator("[]=") // unchecked is built-in
private __set(index: i32, value: f32): void {
if (<u32>index >= <u32>this.dataLength >>> alignof<f32>()) throw new Error("Offset out of bounds");
store<f32>(this.dataStart + (<usize>index << alignof<f32>()), value);
}
fill(value: f32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Float32Array { fill(value: f32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Float32Array {
return FILL<Float32Array, f32>(this, value, start, end); return FILL<Float32Array, f32>(this, value, start, end);
} }
@ -701,6 +829,18 @@ export class Float64Array extends ArrayBufferView {
return this.byteLength >>> alignof<f64>(); return this.byteLength >>> alignof<f64>();
} }
@operator("[]") // unchecked is built-in
private __get(index: i32): f64 {
if (<u32>index >= <u32>this.dataLength >>> alignof<f64>()) throw new Error("Offset out of bounds");
return load<f64>(this.dataStart + (<usize>index << alignof<f64>()));
}
@operator("[]=") // unchecked is built-in
private __set(index: i32, value: f64): void {
if (<u32>index >= <u32>this.dataLength >>> alignof<f64>()) throw new Error("Offset out of bounds");
store<f64>(this.dataStart + (<usize>index << alignof<f64>()), value);
}
fill(value: f64, start: i32 = 0, end: i32 = i32.MAX_VALUE): Float64Array { fill(value: f64, start: i32 = 0, end: i32 = i32.MAX_VALUE): Float64Array {
return FILL<Float64Array, f64>(this, value, start, end); return FILL<Float64Array, f64>(this, value, start, end);
} }

View File

@ -1,8 +1,11 @@
(module (module
(type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32)))
(type $FUNCSIG$viiii (func (param i32 i32 i32 i32)))
(type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$i (func (result i32)))
(type $FUNCSIG$v (func)) (type $FUNCSIG$v (func))
(memory $0 0) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(memory $0 1)
(data (i32.const 8) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s")
(table $0 1 funcref) (table $0 1 funcref)
(elem (i32.const 0) $null) (elem (i32.const 0) $null)
(global $~lib/argc (mut i32) (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0))
@ -20,50 +23,55 @@
(export "testRet" (func $nonNullAssertion/testFn)) (export "testRet" (func $nonNullAssertion/testFn))
(export "testObjFn" (func $nonNullAssertion/testObjFn)) (export "testObjFn" (func $nonNullAssertion/testObjFn))
(export "testObjRet" (func $nonNullAssertion/testObjFn)) (export "testObjRet" (func $nonNullAssertion/testObjFn))
(func $nonNullAssertion/testVar (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $nonNullAssertion/testVar (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0 local.get $0
) )
(func $nonNullAssertion/testObj (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $nonNullAssertion/testObj (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0 local.get $0
i32.load i32.load
) )
(func $nonNullAssertion/testArr (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/array/Array<Foo>#__get (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
i32.load offset=4
i32.const -1
i32.const 0 i32.const 0
local.get $0 local.get $0
i32.load offset=8 i32.load offset=8
i32.lt_u i32.const 2
select i32.shr_u
i32.load i32.ge_u
) if
(func $nonNullAssertion/testAll (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0
i32.const 16
i32.const 68
i32.const 61
call $~lib/env/abort
unreachable
end
local.get $0 local.get $0
i32.load offset=4 i32.load offset=4
i32.const -1
i32.const 0
local.get $0
i32.load offset=8
i32.lt_u
select
i32.load
i32.load i32.load
) )
(func $nonNullAssertion/testFn (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $nonNullAssertion/testArr (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
call $~lib/array/Array<Foo>#__get
)
(func $nonNullAssertion/testAll (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
call $~lib/array/Array<Foo>#__get
i32.load
)
(func $nonNullAssertion/testFn (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 0 i32.const 0
global.set $~lib/argc global.set $~lib/argc
local.get $0 local.get $0
call_indirect (type $FUNCSIG$i) call_indirect (type $FUNCSIG$i)
) )
(func $nonNullAssertion/testObjFn (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $nonNullAssertion/testObjFn (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 0 i32.const 0
global.set $~lib/argc global.set $~lib/argc
local.get $0 local.get $0
i32.load offset=4 i32.load offset=4
call_indirect (type $FUNCSIG$i) call_indirect (type $FUNCSIG$i)
) )
(func $null (; 6 ;) (type $FUNCSIG$v) (func $null (; 8 ;) (type $FUNCSIG$v)
nop nop
) )
) )

View File

@ -1,12 +1,19 @@
(module (module
(type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32)))
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(type $FUNCSIG$viiii (func (param i32 i32 i32 i32)))
(type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$i (func (result i32)))
(type $FUNCSIG$v (func)) (type $FUNCSIG$v (func))
(memory $0 0) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(memory $0 1)
(data (i32.const 8) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00")
(table $0 1 funcref) (table $0 1 funcref)
(elem (i32.const 0) $null) (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/argc (mut i32) (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0))
(global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (global $~lib/memory/HEAP_BASE i32 (i32.const 44))
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "table" (table $0)) (export "table" (table $0))
(export "testVar" (func $nonNullAssertion/testVar)) (export "testVar" (func $nonNullAssertion/testVar))
@ -21,102 +28,92 @@
(export "testRet" (func $nonNullAssertion/testRet)) (export "testRet" (func $nonNullAssertion/testRet))
(export "testObjFn" (func $nonNullAssertion/testObjFn)) (export "testObjFn" (func $nonNullAssertion/testObjFn))
(export "testObjRet" (func $nonNullAssertion/testObjRet)) (export "testObjRet" (func $nonNullAssertion/testObjRet))
(func $nonNullAssertion/testVar (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $nonNullAssertion/testVar (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0 local.get $0
) )
(func $nonNullAssertion/testObj (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $nonNullAssertion/testObj (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0 local.get $0
i32.load i32.load
) )
(func $nonNullAssertion/testProp (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $nonNullAssertion/testProp (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0 local.get $0
i32.load i32.load
) )
(func $nonNullAssertion/testArr (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/array/Array<Foo>#__get (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(local $1 i32) local.get $1
(local $2 i32) local.get $0
i32.load offset=8
i32.const 2
i32.shr_u
i32.ge_u
if
i32.const 0
i32.const 16
i32.const 68
i32.const 61
call $~lib/env/abort
unreachable
end
local.get $0 local.get $0
local.tee $1
i32.load offset=4 i32.load offset=4
i32.const 0 local.get $1
i32.const 2 i32.const 2
i32.shl i32.shl
local.tee $2
i32.add 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/testElem (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $nonNullAssertion/testArr (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
local.get $0 local.get $0
local.tee $1
i32.load offset=4
i32.const 0 i32.const 0
call $~lib/array/Array<Foo>#__get
)
(func $~lib/array/Array<Foo | null>#__get (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
local.get $1
local.get $0
i32.load offset=8
i32.const 2
i32.shr_u
i32.ge_u
if
i32.const 0
i32.const 16
i32.const 68
i32.const 61
call $~lib/env/abort
unreachable
end
local.get $0
i32.load offset=4
local.get $1
i32.const 2 i32.const 2
i32.shl i32.shl
local.tee $2
i32.add 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/testAll (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $nonNullAssertion/testElem (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
local.get $0 local.get $0
local.tee $1
i32.load offset=4
i32.const 0 i32.const 0
i32.const 2 call $~lib/array/Array<Foo | null>#__get
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) (func $nonNullAssertion/testAll (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
local.get $0 local.get $0
local.tee $1
i32.load offset=4
i32.const 0 i32.const 0
i32.const 2 call $~lib/array/Array<Foo | null>#__get
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 i32.load
) )
(func $nonNullAssertion/testFn (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $nonNullAssertion/testAll2 (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
i32.const 0
call $~lib/array/Array<Foo | null>#__get
i32.load
)
(func $nonNullAssertion/testFn (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 0 i32.const 0
global.set $~lib/argc global.set $~lib/argc
local.get $0 local.get $0
call_indirect (type $FUNCSIG$i) call_indirect (type $FUNCSIG$i)
) )
(func $nonNullAssertion/testFn2 (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $nonNullAssertion/testFn2 (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
local.get $0 local.get $0
local.set $1 local.set $1
@ -125,26 +122,26 @@
local.get $1 local.get $1
call_indirect (type $FUNCSIG$i) call_indirect (type $FUNCSIG$i)
) )
(func $nonNullAssertion/testRet (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $nonNullAssertion/testRet (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 0 i32.const 0
global.set $~lib/argc global.set $~lib/argc
local.get $0 local.get $0
call_indirect (type $FUNCSIG$i) call_indirect (type $FUNCSIG$i)
) )
(func $nonNullAssertion/testObjFn (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $nonNullAssertion/testObjFn (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 0 i32.const 0
global.set $~lib/argc global.set $~lib/argc
local.get $0 local.get $0
i32.load offset=4 i32.load offset=4
call_indirect (type $FUNCSIG$i) call_indirect (type $FUNCSIG$i)
) )
(func $nonNullAssertion/testObjRet (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $nonNullAssertion/testObjRet (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 0 i32.const 0
global.set $~lib/argc global.set $~lib/argc
local.get $0 local.get $0
i32.load offset=4 i32.load offset=4
call_indirect (type $FUNCSIG$i) call_indirect (type $FUNCSIG$i)
) )
(func $null (; 12 ;) (type $FUNCSIG$v) (func $null (; 15 ;) (type $FUNCSIG$v)
) )
) )

View File

@ -1,13 +1,15 @@
(module (module
(type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32)))
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32)))
(type $FUNCSIG$v (func)) (type $FUNCSIG$v (func))
(type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32)))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(memory $0 1) (memory $0 1)
(data (i32.const 8) "\01") (data (i32.const 8) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s")
(data (i32.const 16) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") (data (i32.const 48) "\01")
(data (i32.const 56) "\01\00\00\00\08\00\00\00n\00u\00l\00l") (data (i32.const 56) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s")
(data (i32.const 96) "\01\00\00\00\08\00\00\00n\00u\00l\00l")
(table $0 1 funcref) (table $0 1 funcref)
(elem (i32.const 0) $null) (elem (i32.const 0) $null)
(export "memory" (memory $0)) (export "memory" (memory $0))
@ -17,48 +19,50 @@
(export "stringArrayMethodCall" (func $std/array-access/stringArrayMethodCall)) (export "stringArrayMethodCall" (func $std/array-access/stringArrayMethodCall))
(export "stringArrayArrayPropertyAccess" (func $std/array-access/stringArrayArrayPropertyAccess)) (export "stringArrayArrayPropertyAccess" (func $std/array-access/stringArrayArrayPropertyAccess))
(export "stringArrayArrayMethodCall" (func $std/array-access/stringArrayArrayMethodCall)) (export "stringArrayArrayMethodCall" (func $std/array-access/stringArrayArrayMethodCall))
(func $std/array-access/i32ArrayArrayElementAccess (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/array/Array<Array<i32>>#__get (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
local.get $0 local.get $1
i32.load offset=4
i32.const -1
i32.const 0
local.get $0 local.get $0
i32.load offset=8 i32.load offset=8
i32.lt_u i32.const 2
select i32.shr_u
i32.load i32.ge_u
local.tee $0 if
i32.const 0
i32.const 16
i32.const 68
i32.const 61
call $~lib/env/abort
unreachable
end
local.get $0
i32.load offset=4 i32.load offset=4
i32.const 4 local.get $1
i32.const 2
i32.shl
i32.add i32.add
i32.const -1
i32.const 4
local.get $0
i32.load offset=8
i32.lt_u
select
i32.load i32.load
) )
(func $std/array-access/stringArrayPropertyAccess (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $std/array-access/i32ArrayArrayElementAccess (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0 local.get $0
i32.load offset=4
i32.const -1
i32.const 0 i32.const 0
call $~lib/array/Array<Array<i32>>#__get
i32.const 1
call $~lib/array/Array<Array<i32>>#__get
)
(func $std/array-access/stringArrayPropertyAccess (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0 local.get $0
i32.load offset=8 i32.const 0
i32.lt_u call $~lib/array/Array<Array<i32>>#__get
select
i32.load
i32.const 8 i32.const 8
i32.sub i32.sub
i32.load offset=4 i32.load offset=4
i32.const 1 i32.const 1
i32.shr_u i32.shr_u
) )
(func $~lib/util/string/compareImpl (; 3 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $~lib/util/string/compareImpl (; 4 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
i32.const 16 i32.const 56
local.set $3 local.set $3
local.get $1 local.get $1
i32.const 1 i32.const 1
@ -97,7 +101,7 @@
end end
local.get $4 local.get $4
) )
(func $~lib/string/String#startsWith (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/string/String#startsWith (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -105,13 +109,13 @@
i32.eqz i32.eqz
if if
i32.const 0 i32.const 0
i32.const 24 i32.const 64
i32.const 161 i32.const 161
i32.const 4 i32.const 4
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 12 i32.const 52
i32.load i32.load
i32.const 1 i32.const 1
i32.shr_u i32.shr_u
@ -144,69 +148,33 @@
call $~lib/util/string/compareImpl call $~lib/util/string/compareImpl
i32.eqz i32.eqz
) )
(func $std/array-access/stringArrayMethodCall (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $std/array-access/stringArrayMethodCall (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0 local.get $0
i32.load offset=4
i32.const -1
i32.const 0 i32.const 0
local.get $0 call $~lib/array/Array<Array<i32>>#__get
i32.load offset=8
i32.lt_u
select
i32.load
call $~lib/string/String#startsWith call $~lib/string/String#startsWith
) )
(func $std/array-access/stringArrayArrayPropertyAccess (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $std/array-access/stringArrayArrayPropertyAccess (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0 local.get $0
i32.load offset=4
i32.const -1
i32.const 0 i32.const 0
local.get $0 call $~lib/array/Array<Array<i32>>#__get
i32.load offset=8 i32.const 1
i32.lt_u call $~lib/array/Array<Array<i32>>#__get
select
i32.load
local.tee $0
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 8 i32.const 8
i32.sub i32.sub
i32.load offset=4 i32.load offset=4
i32.const 1 i32.const 1
i32.shr_u i32.shr_u
) )
(func $std/array-access/stringArrayArrayMethodCall (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $std/array-access/stringArrayArrayMethodCall (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0 local.get $0
i32.load offset=4
i32.const -1
i32.const 0 i32.const 0
local.get $0 call $~lib/array/Array<Array<i32>>#__get
i32.load offset=8 i32.const 1
i32.lt_u call $~lib/array/Array<Array<i32>>#__get
select
i32.load
local.tee $0
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
call $~lib/string/String#startsWith call $~lib/string/String#startsWith
) )
(func $null (; 8 ;) (type $FUNCSIG$v) (func $null (; 9 ;) (type $FUNCSIG$v)
nop nop
) )
) )

View File

@ -1,20 +1,22 @@
(module (module
(type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32)))
(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$viiii (func (param i32 i32 i32 i32)))
(type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32)))
(type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32)))
(type $FUNCSIG$v (func)) (type $FUNCSIG$v (func))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(memory $0 1) (memory $0 1)
(data (i32.const 8) "\01\00\00\00\00\00\00\00") (data (i32.const 8) "\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00")
(data (i32.const 16) "\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 48) "\01\00\00\00\00\00\00\00")
(data (i32.const 56) "\01\00\00\00\08\00\00\00n\00u\00l\00l\00") (data (i32.const 56) "\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 96) "\01\00\00\00\08\00\00\00n\00u\00l\00l\00")
(table $0 1 funcref) (table $0 1 funcref)
(elem (i32.const 0) $null) (elem (i32.const 0) $null)
(global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0))
(global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8))
(global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049))
(global $~lib/memory/HEAP_BASE i32 (i32.const 72)) (global $~lib/memory/HEAP_BASE i32 (i32.const 112))
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "table" (table $0)) (export "table" (table $0))
(export "i32ArrayArrayElementAccess" (func $std/array-access/i32ArrayArrayElementAccess)) (export "i32ArrayArrayElementAccess" (func $std/array-access/i32ArrayArrayElementAccess))
@ -22,40 +24,83 @@
(export "stringArrayMethodCall" (func $std/array-access/stringArrayMethodCall)) (export "stringArrayMethodCall" (func $std/array-access/stringArrayMethodCall))
(export "stringArrayArrayPropertyAccess" (func $std/array-access/stringArrayArrayPropertyAccess)) (export "stringArrayArrayPropertyAccess" (func $std/array-access/stringArrayArrayPropertyAccess))
(export "stringArrayArrayMethodCall" (func $std/array-access/stringArrayArrayMethodCall)) (export "stringArrayArrayMethodCall" (func $std/array-access/stringArrayArrayMethodCall))
(func $std/array-access/i32ArrayArrayElementAccess (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/array/Array<Array<i32>>#__get (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(local $1 i32) local.get $1
(local $2 i32) local.get $0
i32.load offset=8
i32.const 2
i32.shr_u
i32.ge_u
if
i32.const 0
i32.const 16
i32.const 68
i32.const 61
call $~lib/env/abort
unreachable
end
local.get $0 local.get $0
local.tee $1
i32.load offset=4 i32.load offset=4
i32.const 0 local.get $1
i32.const 2 i32.const 2
i32.shl i32.shl
local.tee $2
i32.add 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.load
) )
(func $~lib/string/String#get:length (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/array/Array<i32>#__get (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
local.get $1
local.get $0
i32.load offset=8
i32.const 2
i32.shr_u
i32.ge_u
if
i32.const 0
i32.const 16
i32.const 68
i32.const 61
call $~lib/env/abort
unreachable
end
local.get $0
i32.load offset=4
local.get $1
i32.const 2
i32.shl
i32.add
i32.load
)
(func $std/array-access/i32ArrayArrayElementAccess (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
i32.const 0
call $~lib/array/Array<Array<i32>>#__get
i32.const 1
call $~lib/array/Array<i32>#__get
)
(func $~lib/array/Array<String>#__get (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
local.get $1
local.get $0
i32.load offset=8
i32.const 2
i32.shr_u
i32.ge_u
if
i32.const 0
i32.const 16
i32.const 68
i32.const 61
call $~lib/env/abort
unreachable
end
local.get $0
i32.load offset=4
local.get $1
i32.const 2
i32.shl
i32.add
i32.load
)
(func $~lib/string/String#get:length (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0 local.get $0
global.get $~lib/runtime/HEADER_SIZE global.get $~lib/runtime/HEADER_SIZE
i32.sub i32.sub
@ -63,27 +108,13 @@
i32.const 1 i32.const 1
i32.shr_u i32.shr_u
) )
(func $std/array-access/stringArrayPropertyAccess (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $std/array-access/stringArrayPropertyAccess (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
local.get $0 local.get $0
local.tee $1
i32.load offset=4
i32.const 0 i32.const 0
i32.const 2 call $~lib/array/Array<String>#__get
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 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) (func $~lib/util/string/compareImpl (; 7 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32)
(local $5 i32) (local $5 i32)
(local $6 i32) (local $6 i32)
(local $7 i32) (local $7 i32)
@ -136,7 +167,7 @@
end end
local.get $5 local.get $5
) )
(func $~lib/string/String#startsWith (; 5 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $~lib/string/String#startsWith (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
(local $5 i32) (local $5 i32)
@ -149,7 +180,7 @@
i32.eqz i32.eqz
if if
i32.const 0 i32.const 0
i32.const 24 i32.const 64
i32.const 161 i32.const 161
i32.const 4 i32.const 4
call $~lib/env/abort call $~lib/env/abort
@ -159,7 +190,7 @@
i32.const 0 i32.const 0
i32.eq i32.eq
if if
i32.const 64 i32.const 104
local.set $1 local.set $1
end end
local.get $2 local.get $2
@ -203,98 +234,55 @@
call $~lib/util/string/compareImpl call $~lib/util/string/compareImpl
i32.eqz i32.eqz
) )
(func $std/array-access/stringArrayMethodCall (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $std/array-access/stringArrayMethodCall (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
local.get $0 local.get $0
local.tee $1
i32.load offset=4
i32.const 0 i32.const 0
i32.const 2 call $~lib/array/Array<String>#__get
i32.shl i32.const 56
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 i32.const 0
call $~lib/string/String#startsWith call $~lib/string/String#startsWith
) )
(func $std/array-access/stringArrayArrayPropertyAccess (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/array/Array<Array<String>>#__get (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(local $1 i32) local.get $1
(local $2 i32) local.get $0
i32.load offset=8
i32.const 2
i32.shr_u
i32.ge_u
if
i32.const 0
i32.const 16
i32.const 68
i32.const 61
call $~lib/env/abort
unreachable
end
local.get $0 local.get $0
local.tee $1
i32.load offset=4 i32.load offset=4
local.get $1
i32.const 2
i32.shl
i32.add
i32.load
)
(func $std/array-access/stringArrayArrayPropertyAccess (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
i32.const 0 i32.const 0
i32.const 2 call $~lib/array/Array<Array<String>>#__get
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 1
i32.const 2 call $~lib/array/Array<String>#__get
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 call $~lib/string/String#get:length
) )
(func $std/array-access/stringArrayArrayMethodCall (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $std/array-access/stringArrayArrayMethodCall (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
local.get $0 local.get $0
local.tee $1
i32.load offset=4
i32.const 0 i32.const 0
i32.const 2 call $~lib/array/Array<Array<String>>#__get
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 1
i32.const 2 call $~lib/array/Array<String>#__get
i32.shl i32.const 56
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 i32.const 0
call $~lib/string/String#startsWith call $~lib/string/String#startsWith
) )
(func $null (; 9 ;) (type $FUNCSIG$v) (func $null (; 13 ;) (type $FUNCSIG$v)
) )
) )

View File

@ -12,16 +12,16 @@
(data (i32.const 8) "\01\00\00\00\03\00\00\00\00\01\02") (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\03\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 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 96) "\03\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s")
(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 136) "\01\00\00\00\0c\00\00\00\00\00\00\00\01\00\00\00\02")
(data (i32.const 144) "\01") (data (i32.const 160) "\04\00\00\00\10\00\00\00\90\00\00\00\90\00\00\00\0c\00\00\00\03")
(data (i32.const 152) "\04\00\00\00\10\00\00\00\98\00\00\00\98") (data (i32.const 184) "\01")
(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 192) "\04\00\00\00\10\00\00\00\c0\00\00\00\c0")
(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 216) "\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 264) "\03\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") (data (i32.const 256) "\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")
(table $0 1 funcref) (table $0 1 funcref)
(elem (i32.const 0) $null) (elem (i32.const 0) $null)
(global $std/array-literal/emptyArrayI32 (mut i32) (i32.const 160)) (global $std/array-literal/emptyArrayI32 (mut i32) (i32.const 200))
(global $std/array-literal/i (mut i32) (i32.const 0)) (global $std/array-literal/i (mut i32) (i32.const 0))
(global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0))
(global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0))
@ -32,7 +32,49 @@
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "table" (table $0)) (export "table" (table $0))
(start $start) (start $start)
(func $~lib/memory/memory.allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/array/Array<i8>#__get (; 1 ;) (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 68
i32.const 61
call $~lib/env/abort
unreachable
end
local.get $1
local.get $0
i32.load offset=4
i32.add
i32.load8_s
)
(func $~lib/array/Array<i32>#__get (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
local.get $1
local.get $0
i32.load offset=8
i32.const 2
i32.shr_u
i32.ge_u
if
i32.const 0
i32.const 104
i32.const 68
i32.const 61
call $~lib/env/abort
unreachable
end
local.get $0
i32.load offset=4
local.get $1
i32.const 2
i32.shl
i32.add
i32.load
)
(func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -94,7 +136,7 @@
global.set $~lib/allocator/arena/offset global.set $~lib/allocator/arena/offset
local.get $1 local.get $1
) )
(func $~lib/runtime/doAllocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/runtime/doAllocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
i32.const 1 i32.const 1
i32.const 32 i32.const 32
@ -115,7 +157,7 @@
i32.const 8 i32.const 8
i32.add i32.add
) )
(func $~lib/memory/memory.fill (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (func $~lib/memory/memory.fill (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(local $2 i32) (local $2 i32)
block $~lib/util/memory/memset|inlined.0 block $~lib/util/memory/memset|inlined.0
local.get $1 local.get $1
@ -326,13 +368,13 @@
end end
end end
) )
(func $~lib/runtime/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) (func $~lib/runtime/assertUnregistered (; 6 ;) (type $FUNCSIG$vi) (param $0 i32)
local.get $0 local.get $0
i32.const 300 i32.const 304
i32.le_u i32.le_u
if if
i32.const 0 i32.const 0
i32.const 184 i32.const 224
i32.const 191 i32.const 191
i32.const 2 i32.const 2
call $~lib/env/abort call $~lib/env/abort
@ -346,14 +388,14 @@
i32.ne i32.ne
if if
i32.const 0 i32.const 0
i32.const 184 i32.const 224
i32.const 192 i32.const 192
i32.const 2 i32.const 2
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
) )
(func $~lib/runtime/doRegister (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/runtime/doRegister (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
local.get $0 local.get $0
call $~lib/runtime/assertUnregistered call $~lib/runtime/assertUnregistered
local.get $0 local.get $0
@ -363,14 +405,14 @@
i32.store i32.store
local.get $0 local.get $0
) )
(func $~lib/arraybuffer/ArrayBuffer#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
local.get $0 local.get $0
i32.const 1073741816 i32.const 1073741816
i32.gt_u i32.gt_u
if if
i32.const 0 i32.const 0
i32.const 224 i32.const 264
i32.const 24 i32.const 24
i32.const 43 i32.const 43
call $~lib/env/abort call $~lib/env/abort
@ -385,7 +427,7 @@
i32.const 1 i32.const 1
call $~lib/runtime/doRegister call $~lib/runtime/doRegister
) )
(func $~lib/runtime/ArrayBufferView#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/runtime/ArrayBufferView#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
i32.const 3 i32.const 3
i32.const 1073741816 i32.const 1073741816
@ -394,7 +436,7 @@
i32.gt_u i32.gt_u
if if
i32.const 0 i32.const 0
i32.const 184 i32.const 224
i32.const 226 i32.const 226
i32.const 57 i32.const 57
call $~lib/env/abort call $~lib/env/abort
@ -435,7 +477,7 @@
i32.store offset=8 i32.store offset=8
local.get $0 local.get $0
) )
(func $~lib/util/memory/memcpy (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/util/memory/memcpy (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
(local $5 i32) (local $5 i32)
@ -1332,7 +1374,7 @@
i32.store8 i32.store8
end end
) )
(func $~lib/memory/memory.copy (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/memory/memory.copy (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
block $~lib/util/memory/memmove|inlined.0 block $~lib/util/memory/memmove|inlined.0
@ -1526,7 +1568,7 @@
end end
end end
) )
(func $~lib/runtime/doReallocate (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/runtime/doReallocate (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
@ -1550,7 +1592,7 @@
i32.shl i32.shl
i32.const 0 i32.const 0
local.get $0 local.get $0
i32.const 300 i32.const 304
i32.gt_u i32.gt_u
select select
i32.const 1 i32.const 1
@ -1590,11 +1632,11 @@
i32.eq i32.eq
if if
local.get $0 local.get $0
i32.const 300 i32.const 304
i32.le_u i32.le_u
if if
i32.const 0 i32.const 0
i32.const 184 i32.const 224
i32.const 100 i32.const 100
i32.const 8 i32.const 8
call $~lib/env/abort call $~lib/env/abort
@ -1620,15 +1662,11 @@
i32.store offset=4 i32.store offset=4
local.get $0 local.get $0
) )
(func $~lib/array/ensureCapacity (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/array/ensureCapacity (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32) (local $3 i32)
local.get $1 local.get $1
local.get $0 local.get $0
i32.load i32.load offset=8
local.tee $3
i32.const 8
i32.sub
i32.load offset=4
local.get $2 local.get $2
i32.shr_u i32.shr_u
i32.gt_u i32.gt_u
@ -1640,20 +1678,23 @@
i32.gt_u i32.gt_u
if if
i32.const 0 i32.const 0
i32.const 272 i32.const 104
i32.const 12 i32.const 10
i32.const 64 i32.const 64
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
local.get $3 local.get $0
local.get $3 i32.load
local.tee $3
local.get $1 local.get $1
local.get $2 local.get $2
i32.shl i32.shl
local.tee $2 local.tee $2
call $~lib/runtime/doReallocate call $~lib/runtime/doReallocate
local.tee $1 local.set $1
local.get $1
local.get $3
i32.ne i32.ne
if if
local.get $0 local.get $0
@ -1668,7 +1709,7 @@
i32.store offset=8 i32.store offset=8
end end
) )
(func $~lib/array/Array<i8>#__set (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/array/Array<i8>#__set (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
local.get $0 local.get $0
local.get $1 local.get $1
i32.const 1 i32.const 1
@ -1693,7 +1734,7 @@
i32.store offset=12 i32.store offset=12
end end
) )
(func $~lib/array/Array<i32>#__set (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/array/Array<i32>#__set (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
local.get $0 local.get $0
local.get $1 local.get $1
i32.const 1 i32.const 1
@ -1720,19 +1761,19 @@
i32.store offset=12 i32.store offset=12
end end
) )
(func $std/array-literal/Ref#constructor (; 14 ;) (type $FUNCSIG$i) (result i32) (func $std/array-literal/Ref#constructor (; 16 ;) (type $FUNCSIG$i) (result i32)
i32.const 0 i32.const 0
call $~lib/runtime/doAllocate call $~lib/runtime/doAllocate
i32.const 6 i32.const 6
call $~lib/runtime/doRegister call $~lib/runtime/doRegister
) )
(func $std/array-literal/RefWithCtor#constructor (; 15 ;) (type $FUNCSIG$i) (result i32) (func $std/array-literal/RefWithCtor#constructor (; 17 ;) (type $FUNCSIG$i) (result i32)
i32.const 0 i32.const 0
call $~lib/runtime/doAllocate call $~lib/runtime/doAllocate
i32.const 8 i32.const 8
call $~lib/runtime/doRegister call $~lib/runtime/doRegister
) )
(func $start:std/array-literal (; 16 ;) (type $FUNCSIG$v) (func $start:std/array-literal (; 18 ;) (type $FUNCSIG$v)
(local $0 i32) (local $0 i32)
i32.const 44 i32.const 44
i32.load i32.load
@ -1746,15 +1787,9 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 36 i32.const 32
i32.load
i32.const -1
i32.const 0 i32.const 0
i32.const 40 call $~lib/array/Array<i8>#__get
i32.load
i32.lt_u
select
i32.load8_s
if if
i32.const 0 i32.const 0
i32.const 56 i32.const 56
@ -1763,17 +1798,9 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 36 i32.const 32
i32.load
i32.const 1 i32.const 1
i32.add call $~lib/array/Array<i8>#__get
i32.const -1
i32.const 1
i32.const 40
i32.load
i32.lt_u
select
i32.load8_s
i32.const 1 i32.const 1
i32.ne i32.ne
if if
@ -1784,17 +1811,9 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 36 i32.const 32
i32.load
i32.const 2 i32.const 2
i32.add call $~lib/array/Array<i8>#__get
i32.const -1
i32.const 2
i32.const 40
i32.load
i32.lt_u
select
i32.load8_s
i32.const 2 i32.const 2
i32.ne i32.ne
if if
@ -1805,7 +1824,7 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 140 i32.const 180
i32.load i32.load
i32.const 3 i32.const 3
i32.ne i32.ne
@ -1817,15 +1836,9 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 132 i32.const 168
i32.load
i32.const -1
i32.const 0 i32.const 0
i32.const 136 call $~lib/array/Array<i32>#__get
i32.load
i32.lt_u
select
i32.load
if if
i32.const 0 i32.const 0
i32.const 56 i32.const 56
@ -1834,17 +1847,9 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 132 i32.const 168
i32.load i32.const 1
i32.const 4 call $~lib/array/Array<i32>#__get
i32.add
i32.const -1
i32.const 4
i32.const 136
i32.load
i32.lt_u
select
i32.load
i32.const 1 i32.const 1
i32.ne i32.ne
if if
@ -1855,17 +1860,9 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 132 i32.const 168
i32.load i32.const 2
i32.const 8 call $~lib/array/Array<i32>#__get
i32.add
i32.const -1
i32.const 8
i32.const 136
i32.load
i32.lt_u
select
i32.load
i32.const 2 i32.const 2
i32.ne i32.ne
if if
@ -1937,15 +1934,8 @@
unreachable unreachable
end end
global.get $std/array-literal/dynamicArrayI8 global.get $std/array-literal/dynamicArrayI8
local.tee $0
i32.load offset=4
i32.const -1
i32.const 0 i32.const 0
local.get $0 call $~lib/array/Array<i8>#__get
i32.load offset=8
i32.lt_u
select
i32.load8_s
if if
i32.const 0 i32.const 0
i32.const 56 i32.const 56
@ -1955,17 +1945,8 @@
unreachable unreachable
end end
global.get $std/array-literal/dynamicArrayI8 global.get $std/array-literal/dynamicArrayI8
local.tee $0
i32.load offset=4
i32.const 1 i32.const 1
i32.add call $~lib/array/Array<i8>#__get
i32.const -1
i32.const 1
local.get $0
i32.load offset=8
i32.lt_u
select
i32.load8_s
i32.const 1 i32.const 1
i32.ne i32.ne
if if
@ -1977,17 +1958,8 @@
unreachable unreachable
end end
global.get $std/array-literal/dynamicArrayI8 global.get $std/array-literal/dynamicArrayI8
local.tee $0
i32.load offset=4
i32.const 2 i32.const 2
i32.add call $~lib/array/Array<i8>#__get
i32.const -1
i32.const 2
local.get $0
i32.load offset=8
i32.lt_u
select
i32.load8_s
i32.const 2 i32.const 2
i32.ne i32.ne
if if
@ -2047,15 +2019,8 @@
unreachable unreachable
end end
global.get $std/array-literal/dynamicArrayI32 global.get $std/array-literal/dynamicArrayI32
local.tee $0
i32.load offset=4
i32.const -1
i32.const 0 i32.const 0
local.get $0 call $~lib/array/Array<i32>#__get
i32.load offset=8
i32.lt_u
select
i32.load
if if
i32.const 0 i32.const 0
i32.const 56 i32.const 56
@ -2065,17 +2030,8 @@
unreachable unreachable
end end
global.get $std/array-literal/dynamicArrayI32 global.get $std/array-literal/dynamicArrayI32
local.tee $0 i32.const 1
i32.load offset=4 call $~lib/array/Array<i32>#__get
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.const 1
i32.ne i32.ne
if if
@ -2087,17 +2043,8 @@
unreachable unreachable
end end
global.get $std/array-literal/dynamicArrayI32 global.get $std/array-literal/dynamicArrayI32
local.tee $0 i32.const 2
i32.load offset=4 call $~lib/array/Array<i32>#__get
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.const 2
i32.ne i32.ne
if if
@ -2185,10 +2132,10 @@
unreachable unreachable
end end
) )
(func $start (; 17 ;) (type $FUNCSIG$v) (func $start (; 19 ;) (type $FUNCSIG$v)
call $start:std/array-literal call $start:std/array-literal
) )
(func $null (; 18 ;) (type $FUNCSIG$v) (func $null (; 20 ;) (type $FUNCSIG$v)
nop nop
) )
) )

View File

@ -11,21 +11,21 @@
(data (i32.const 8) "\01\00\00\00\03\00\00\00\00\01\02") (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\03\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 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 96) "\03\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\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 136) "\01\00\00\00\0c\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00")
(data (i32.const 144) "\01\00\00\00\00\00\00\00") (data (i32.const 160) "\04\00\00\00\10\00\00\00\90\00\00\00\90\00\00\00\0c\00\00\00\03\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 184) "\01\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 192) "\04\00\00\00\10\00\00\00\c0\00\00\00\c0\00\00\00\00\00\00\00\00\00\00\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 216) "\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 264) "\03\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") (data (i32.const 256) "\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")
(table $0 1 funcref) (table $0 1 funcref)
(elem (i32.const 0) $null) (elem (i32.const 0) $null)
(global $std/array-literal/staticArrayI8 i32 (i32.const 32)) (global $std/array-literal/staticArrayI8 i32 (i32.const 32))
(global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0)) (global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0))
(global $~lib/runtime/HEADER_SIZE i32 (i32.const 8)) (global $~lib/runtime/HEADER_SIZE i32 (i32.const 8))
(global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) (global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049))
(global $std/array-literal/staticArrayI32 i32 (i32.const 128)) (global $std/array-literal/staticArrayI32 i32 (i32.const 168))
(global $std/array-literal/emptyArrayI32 (mut i32) (i32.const 160)) (global $std/array-literal/emptyArrayI32 (mut i32) (i32.const 200))
(global $std/array-literal/i (mut i32) (i32.const 0)) (global $std/array-literal/i (mut i32) (i32.const 0))
(global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816)) (global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741816))
(global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0))
@ -35,7 +35,7 @@
(global $std/array-literal/dynamicArrayI32 (mut i32) (i32.const 0)) (global $std/array-literal/dynamicArrayI32 (mut i32) (i32.const 0))
(global $std/array-literal/dynamicArrayRef (mut i32) (i32.const 0)) (global $std/array-literal/dynamicArrayRef (mut i32) (i32.const 0))
(global $std/array-literal/dynamicArrayRefWithCtor (mut i32) (i32.const 0)) (global $std/array-literal/dynamicArrayRefWithCtor (mut i32) (i32.const 0))
(global $~lib/memory/HEAP_BASE i32 (i32.const 300)) (global $~lib/memory/HEAP_BASE i32 (i32.const 304))
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "table" (table $0)) (export "table" (table $0))
(start $start) (start $start)
@ -43,11 +43,57 @@
local.get $0 local.get $0
i32.load offset=12 i32.load offset=12
) )
(func $~lib/array/Array<i32>#get:length (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/array/Array<i8>#__get (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result 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 104
i32.const 68
i32.const 61
call $~lib/env/abort
unreachable
end
local.get $0
i32.load offset=4
local.get $1
i32.const 0
i32.shl
i32.add
i32.load8_s
)
(func $~lib/array/Array<i32>#get:length (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0 local.get $0
i32.load offset=12 i32.load offset=12
) )
(func $~lib/runtime/ADJUSTOBLOCK (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/array/Array<i32>#__get (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
local.get $1
local.get $0
i32.load offset=8
i32.const 2
i32.shr_u
i32.ge_u
if
i32.const 0
i32.const 104
i32.const 68
i32.const 61
call $~lib/env/abort
unreachable
end
local.get $0
i32.load offset=4
local.get $1
i32.const 2
i32.shl
i32.add
i32.load
)
(func $~lib/runtime/ADJUSTOBLOCK (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1 i32.const 1
i32.const 32 i32.const 32
local.get $0 local.get $0
@ -59,7 +105,7 @@
i32.sub i32.sub
i32.shl i32.shl
) )
(func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/memory/memory.allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -144,7 +190,7 @@
end end
return return
) )
(func $~lib/runtime/doAllocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/runtime/doAllocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
local.get $0 local.get $0
call $~lib/runtime/ADJUSTOBLOCK call $~lib/runtime/ADJUSTOBLOCK
@ -160,7 +206,7 @@
global.get $~lib/runtime/HEADER_SIZE global.get $~lib/runtime/HEADER_SIZE
i32.add i32.add
) )
(func $~lib/memory/memory.fill (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/memory/memory.fill (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
(local $5 i64) (local $5 i64)
@ -416,14 +462,14 @@
end end
end end
) )
(func $~lib/runtime/assertUnregistered (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) (func $~lib/runtime/assertUnregistered (; 9 ;) (type $FUNCSIG$vi) (param $0 i32)
local.get $0 local.get $0
global.get $~lib/memory/HEAP_BASE global.get $~lib/memory/HEAP_BASE
i32.gt_u i32.gt_u
i32.eqz i32.eqz
if if
i32.const 0 i32.const 0
i32.const 184 i32.const 224
i32.const 191 i32.const 191
i32.const 2 i32.const 2
call $~lib/env/abort call $~lib/env/abort
@ -438,14 +484,14 @@
i32.eqz i32.eqz
if if
i32.const 0 i32.const 0
i32.const 184 i32.const 224
i32.const 192 i32.const 192
i32.const 2 i32.const 2
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
) )
(func $~lib/runtime/doRegister (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/runtime/doRegister (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
local.get $0 local.get $0
call $~lib/runtime/assertUnregistered call $~lib/runtime/assertUnregistered
local.get $0 local.get $0
@ -455,7 +501,7 @@
i32.store i32.store
local.get $0 local.get $0
) )
(func $~lib/arraybuffer/ArrayBuffer#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/arraybuffer/ArrayBuffer#constructor (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
local.get $1 local.get $1
@ -463,7 +509,7 @@
i32.gt_u i32.gt_u
if if
i32.const 0 i32.const 0
i32.const 224 i32.const 264
i32.const 24 i32.const 24
i32.const 43 i32.const 43
call $~lib/env/abort call $~lib/env/abort
@ -488,11 +534,11 @@
call $~lib/runtime/doRegister call $~lib/runtime/doRegister
end end
) )
(func $~lib/runtime/ALLOCATE (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/runtime/ALLOCATE (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0 local.get $0
call $~lib/runtime/doAllocate call $~lib/runtime/doAllocate
) )
(func $~lib/runtime/ArrayBufferView#constructor (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $~lib/runtime/ArrayBufferView#constructor (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
local.get $1 local.get $1
@ -502,7 +548,7 @@
i32.gt_u i32.gt_u
if if
i32.const 0 i32.const 0
i32.const 184 i32.const 224
i32.const 226 i32.const 226
i32.const 57 i32.const 57
call $~lib/env/abort call $~lib/env/abort
@ -550,7 +596,7 @@
i32.store offset=8 i32.store offset=8
local.get $0 local.get $0
) )
(func $~lib/array/Array<i8>#constructor (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/array/Array<i8>#constructor (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
local.get $0 local.get $0
if (result i32) if (result i32)
@ -575,13 +621,7 @@
i32.store offset=12 i32.store offset=12
local.get $0 local.get $0
) )
(func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/util/memory/memcpy (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
local.get $0
global.get $~lib/runtime/HEADER_SIZE
i32.sub
i32.load offset=4
)
(func $~lib/util/memory/memcpy (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
(local $5 i32) (local $5 i32)
@ -1782,7 +1822,7 @@
i32.store8 i32.store8
end end
) )
(func $~lib/memory/memory.copy (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/memory/memory.copy (; 16 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32) (local $3 i32)
block $~lib/util/memory/memmove|inlined.0 block $~lib/util/memory/memmove|inlined.0
local.get $0 local.get $0
@ -2011,12 +2051,12 @@
end end
end end
) )
(func $~lib/memory/memory.free (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) (func $~lib/memory/memory.free (; 17 ;) (type $FUNCSIG$vi) (param $0 i32)
(local $1 i32) (local $1 i32)
local.get $0 local.get $0
local.set $1 local.set $1
) )
(func $~lib/runtime/doReallocate (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/runtime/doReallocate (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
@ -2080,7 +2120,7 @@
i32.eqz i32.eqz
if if
i32.const 0 i32.const 0
i32.const 184 i32.const 224
i32.const 100 i32.const 100
i32.const 8 i32.const 8
call $~lib/env/abort call $~lib/env/abort
@ -2113,22 +2153,16 @@
i32.store offset=4 i32.store offset=4
local.get $0 local.get $0
) )
(func $~lib/array/ensureCapacity (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/array/ensureCapacity (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
(local $5 i32) (local $5 i32)
(local $6 i32) (local $6 i32)
(local $7 i32) local.get $1
local.get $0 local.get $0
i32.load i32.load offset=8
local.set $3
local.get $3
call $~lib/arraybuffer/ArrayBuffer#get:byteLength
local.get $2 local.get $2
i32.shr_u i32.shr_u
local.set $4
local.get $1
local.get $4
i32.gt_u i32.gt_u
if if
local.get $1 local.get $1
@ -2138,43 +2172,46 @@
i32.gt_u i32.gt_u
if if
i32.const 0 i32.const 0
i32.const 272 i32.const 104
i32.const 12 i32.const 10
i32.const 64 i32.const 64
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
local.get $0
i32.load
local.set $3
local.get $1 local.get $1
local.get $2 local.get $2
i32.shl i32.shl
local.set $5 local.set $4
block $~lib/runtime/REALLOCATE|inlined.0 (result i32) block $~lib/runtime/REALLOCATE|inlined.0 (result i32)
local.get $3 local.get $3
local.set $5
local.get $4
local.set $6 local.set $6
local.get $5 local.get $5
local.set $7
local.get $6 local.get $6
local.get $7
call $~lib/runtime/doReallocate call $~lib/runtime/doReallocate
end end
local.set $7 local.set $6
local.get $7 local.get $6
local.get $3 local.get $3
i32.ne i32.ne
if if
local.get $0 local.get $0
local.get $7 local.get $6
i32.store i32.store
local.get $0 local.get $0
local.get $7 local.get $6
i32.store offset=4 i32.store offset=4
end end
local.get $0 local.get $0
local.get $5 local.get $4
i32.store offset=8 i32.store offset=8
end end
) )
(func $~lib/array/Array<i8>#__set (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/array/Array<i8>#__set (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
local.get $0 local.get $0
local.get $1 local.get $1
i32.const 1 i32.const 1
@ -2201,7 +2238,7 @@
i32.store offset=12 i32.store offset=12
end end
) )
(func $~lib/array/Array<i32>#constructor (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/array/Array<i32>#constructor (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
local.get $0 local.get $0
if (result i32) if (result i32)
@ -2226,7 +2263,7 @@
i32.store offset=12 i32.store offset=12
local.get $0 local.get $0
) )
(func $~lib/array/Array<i32>#__set (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/array/Array<i32>#__set (; 22 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
local.get $0 local.get $0
local.get $1 local.get $1
i32.const 1 i32.const 1
@ -2253,7 +2290,7 @@
i32.store offset=12 i32.store offset=12
end end
) )
(func $std/array-literal/Ref#constructor (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $std/array-literal/Ref#constructor (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
local.get $0 local.get $0
i32.eqz i32.eqz
@ -2270,7 +2307,7 @@
end end
local.get $0 local.get $0
) )
(func $~lib/array/Array<Ref>#constructor (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/array/Array<Ref>#constructor (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
local.get $0 local.get $0
if (result i32) if (result i32)
@ -2295,7 +2332,7 @@
i32.store offset=12 i32.store offset=12
local.get $0 local.get $0
) )
(func $~lib/array/Array<Ref>#__set (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/array/Array<Ref>#__set (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
local.get $0 local.get $0
local.get $1 local.get $1
i32.const 1 i32.const 1
@ -2322,11 +2359,11 @@
i32.store offset=12 i32.store offset=12
end end
) )
(func $~lib/array/Array<Ref>#get:length (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/array/Array<Ref>#get:length (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0 local.get $0
i32.load offset=12 i32.load offset=12
) )
(func $std/array-literal/RefWithCtor#constructor (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $std/array-literal/RefWithCtor#constructor (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
local.get $0 local.get $0
i32.eqz i32.eqz
@ -2343,7 +2380,7 @@
end end
local.get $0 local.get $0
) )
(func $~lib/array/Array<RefWithCtor>#constructor (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/array/Array<RefWithCtor>#constructor (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
local.get $0 local.get $0
if (result i32) if (result i32)
@ -2368,7 +2405,7 @@
i32.store offset=12 i32.store offset=12
local.get $0 local.get $0
) )
(func $~lib/array/Array<RefWithCtor>#__set (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/array/Array<RefWithCtor>#__set (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
local.get $0 local.get $0
local.get $1 local.get $1
i32.const 1 i32.const 1
@ -2395,17 +2432,15 @@
i32.store offset=12 i32.store offset=12
end end
) )
(func $~lib/array/Array<RefWithCtor>#get:length (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/array/Array<RefWithCtor>#get:length (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0 local.get $0
i32.load offset=12 i32.load offset=12
) )
(func $start:std/array-literal (; 30 ;) (type $FUNCSIG$v) (func $start:std/array-literal (; 31 ;) (type $FUNCSIG$v)
(local $0 i32) (local $0 i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32)
(local $5 i32)
global.get $std/array-literal/staticArrayI8 global.get $std/array-literal/staticArrayI8
call $~lib/array/Array<i8>#get:length call $~lib/array/Array<i8>#get:length
i32.const 3 i32.const 3
@ -2420,18 +2455,8 @@
unreachable unreachable
end end
global.get $std/array-literal/staticArrayI8 global.get $std/array-literal/staticArrayI8
local.tee $0
i32.load offset=4
i32.const 0 i32.const 0
local.tee $1 call $~lib/array/Array<i8>#__get
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.const 0
i32.eq i32.eq
i32.eqz i32.eqz
@ -2444,18 +2469,8 @@
unreachable unreachable
end end
global.get $std/array-literal/staticArrayI8 global.get $std/array-literal/staticArrayI8
local.tee $0
i32.load offset=4
i32.const 1 i32.const 1
local.tee $1 call $~lib/array/Array<i8>#__get
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.const 1
i32.eq i32.eq
i32.eqz i32.eqz
@ -2468,18 +2483,8 @@
unreachable unreachable
end end
global.get $std/array-literal/staticArrayI8 global.get $std/array-literal/staticArrayI8
local.tee $0
i32.load offset=4
i32.const 2 i32.const 2
local.tee $1 call $~lib/array/Array<i8>#__get
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.const 2
i32.eq i32.eq
i32.eqz i32.eqz
@ -2505,20 +2510,8 @@
unreachable unreachable
end end
global.get $std/array-literal/staticArrayI32 global.get $std/array-literal/staticArrayI32
local.tee $0
i32.load offset=4
i32.const 0 i32.const 0
i32.const 2 call $~lib/array/Array<i32>#__get
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.const 0
i32.eq i32.eq
i32.eqz i32.eqz
@ -2531,20 +2524,8 @@
unreachable unreachable
end end
global.get $std/array-literal/staticArrayI32 global.get $std/array-literal/staticArrayI32
local.tee $0
i32.load offset=4
i32.const 1 i32.const 1
i32.const 2 call $~lib/array/Array<i32>#__get
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.const 1
i32.eq i32.eq
i32.eqz i32.eqz
@ -2557,20 +2538,8 @@
unreachable unreachable
end end
global.get $std/array-literal/staticArrayI32 global.get $std/array-literal/staticArrayI32
local.tee $0
i32.load offset=4
i32.const 2 i32.const 2
i32.const 2 call $~lib/array/Array<i32>#__get
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.const 2
i32.eq i32.eq
i32.eqz i32.eqz
@ -2609,12 +2578,12 @@
i32.const 0 i32.const 0
i32.const 3 i32.const 3
call $~lib/array/Array<i8>#constructor call $~lib/array/Array<i8>#constructor
local.set $2 local.set $0
local.get $2 local.get $0
i32.const 0 i32.const 0
global.get $std/array-literal/i global.get $std/array-literal/i
call $~lib/array/Array<i8>#__set call $~lib/array/Array<i8>#__set
local.get $2 local.get $0
i32.const 1 i32.const 1
block (result i32) block (result i32)
global.get $std/array-literal/i global.get $std/array-literal/i
@ -2624,7 +2593,7 @@
global.get $std/array-literal/i global.get $std/array-literal/i
end end
call $~lib/array/Array<i8>#__set call $~lib/array/Array<i8>#__set
local.get $2 local.get $0
i32.const 2 i32.const 2
block (result i32) block (result i32)
global.get $std/array-literal/i global.get $std/array-literal/i
@ -2634,7 +2603,7 @@
global.get $std/array-literal/i global.get $std/array-literal/i
end end
call $~lib/array/Array<i8>#__set call $~lib/array/Array<i8>#__set
local.get $2 local.get $0
end end
global.set $std/array-literal/dynamicArrayI8 global.set $std/array-literal/dynamicArrayI8
global.get $std/array-literal/dynamicArrayI8 global.get $std/array-literal/dynamicArrayI8
@ -2651,18 +2620,8 @@
unreachable unreachable
end end
global.get $std/array-literal/dynamicArrayI8 global.get $std/array-literal/dynamicArrayI8
local.tee $2
i32.load offset=4
i32.const 0 i32.const 0
local.tee $0 call $~lib/array/Array<i8>#__get
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.const 0
i32.eq i32.eq
i32.eqz i32.eqz
@ -2675,18 +2634,8 @@
unreachable unreachable
end end
global.get $std/array-literal/dynamicArrayI8 global.get $std/array-literal/dynamicArrayI8
local.tee $2
i32.load offset=4
i32.const 1 i32.const 1
local.tee $0 call $~lib/array/Array<i8>#__get
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.const 1
i32.eq i32.eq
i32.eqz i32.eqz
@ -2699,18 +2648,8 @@
unreachable unreachable
end end
global.get $std/array-literal/dynamicArrayI8 global.get $std/array-literal/dynamicArrayI8
local.tee $2
i32.load offset=4
i32.const 2 i32.const 2
local.tee $0 call $~lib/array/Array<i8>#__get
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.const 2
i32.eq i32.eq
i32.eqz i32.eqz
@ -2728,12 +2667,12 @@
i32.const 0 i32.const 0
i32.const 3 i32.const 3
call $~lib/array/Array<i32>#constructor call $~lib/array/Array<i32>#constructor
local.set $3 local.set $1
local.get $3 local.get $1
i32.const 0 i32.const 0
global.get $std/array-literal/i global.get $std/array-literal/i
call $~lib/array/Array<i32>#__set call $~lib/array/Array<i32>#__set
local.get $3 local.get $1
i32.const 1 i32.const 1
block (result i32) block (result i32)
global.get $std/array-literal/i global.get $std/array-literal/i
@ -2743,7 +2682,7 @@
global.get $std/array-literal/i global.get $std/array-literal/i
end end
call $~lib/array/Array<i32>#__set call $~lib/array/Array<i32>#__set
local.get $3 local.get $1
i32.const 2 i32.const 2
block (result i32) block (result i32)
global.get $std/array-literal/i global.get $std/array-literal/i
@ -2753,7 +2692,7 @@
global.get $std/array-literal/i global.get $std/array-literal/i
end end
call $~lib/array/Array<i32>#__set call $~lib/array/Array<i32>#__set
local.get $3 local.get $1
end end
global.set $std/array-literal/dynamicArrayI32 global.set $std/array-literal/dynamicArrayI32
global.get $std/array-literal/dynamicArrayI32 global.get $std/array-literal/dynamicArrayI32
@ -2770,20 +2709,8 @@
unreachable unreachable
end end
global.get $std/array-literal/dynamicArrayI32 global.get $std/array-literal/dynamicArrayI32
local.tee $3
i32.load offset=4
i32.const 0 i32.const 0
i32.const 2 call $~lib/array/Array<i32>#__get
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.const 0
i32.eq i32.eq
i32.eqz i32.eqz
@ -2796,20 +2723,8 @@
unreachable unreachable
end end
global.get $std/array-literal/dynamicArrayI32 global.get $std/array-literal/dynamicArrayI32
local.tee $3
i32.load offset=4
i32.const 1 i32.const 1
i32.const 2 call $~lib/array/Array<i32>#__get
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.const 1
i32.eq i32.eq
i32.eqz i32.eqz
@ -2822,20 +2737,8 @@
unreachable unreachable
end end
global.get $std/array-literal/dynamicArrayI32 global.get $std/array-literal/dynamicArrayI32
local.tee $3
i32.load offset=4
i32.const 2 i32.const 2
i32.const 2 call $~lib/array/Array<i32>#__get
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.const 2
i32.eq i32.eq
i32.eqz i32.eqz
@ -2851,23 +2754,23 @@
i32.const 0 i32.const 0
i32.const 3 i32.const 3
call $~lib/array/Array<Ref>#constructor call $~lib/array/Array<Ref>#constructor
local.set $4 local.set $2
local.get $4 local.get $2
i32.const 0 i32.const 0
i32.const 0 i32.const 0
call $std/array-literal/Ref#constructor call $std/array-literal/Ref#constructor
call $~lib/array/Array<Ref>#__set call $~lib/array/Array<Ref>#__set
local.get $4 local.get $2
i32.const 1 i32.const 1
i32.const 0 i32.const 0
call $std/array-literal/Ref#constructor call $std/array-literal/Ref#constructor
call $~lib/array/Array<Ref>#__set call $~lib/array/Array<Ref>#__set
local.get $4 local.get $2
i32.const 2 i32.const 2
i32.const 0 i32.const 0
call $std/array-literal/Ref#constructor call $std/array-literal/Ref#constructor
call $~lib/array/Array<Ref>#__set call $~lib/array/Array<Ref>#__set
local.get $4 local.get $2
end end
global.set $std/array-literal/dynamicArrayRef global.set $std/array-literal/dynamicArrayRef
global.get $std/array-literal/dynamicArrayRef global.get $std/array-literal/dynamicArrayRef
@ -2887,23 +2790,23 @@
i32.const 0 i32.const 0
i32.const 3 i32.const 3
call $~lib/array/Array<RefWithCtor>#constructor call $~lib/array/Array<RefWithCtor>#constructor
local.set $5 local.set $3
local.get $5 local.get $3
i32.const 0 i32.const 0
i32.const 0 i32.const 0
call $std/array-literal/RefWithCtor#constructor call $std/array-literal/RefWithCtor#constructor
call $~lib/array/Array<RefWithCtor>#__set call $~lib/array/Array<RefWithCtor>#__set
local.get $5 local.get $3
i32.const 1 i32.const 1
i32.const 0 i32.const 0
call $std/array-literal/RefWithCtor#constructor call $std/array-literal/RefWithCtor#constructor
call $~lib/array/Array<RefWithCtor>#__set call $~lib/array/Array<RefWithCtor>#__set
local.get $5 local.get $3
i32.const 2 i32.const 2
i32.const 0 i32.const 0
call $std/array-literal/RefWithCtor#constructor call $std/array-literal/RefWithCtor#constructor
call $~lib/array/Array<RefWithCtor>#__set call $~lib/array/Array<RefWithCtor>#__set
local.get $5 local.get $3
end end
global.set $std/array-literal/dynamicArrayRefWithCtor global.set $std/array-literal/dynamicArrayRefWithCtor
global.get $std/array-literal/dynamicArrayRefWithCtor global.get $std/array-literal/dynamicArrayRefWithCtor
@ -2920,9 +2823,9 @@
unreachable unreachable
end end
) )
(func $start (; 31 ;) (type $FUNCSIG$v) (func $start (; 32 ;) (type $FUNCSIG$v)
call $start:std/array-literal call $start:std/array-literal
) )
(func $null (; 32 ;) (type $FUNCSIG$v) (func $null (; 33 ;) (type $FUNCSIG$v)
) )
) )

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,12 @@
(module (module
(type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32)))
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(type $FUNCSIG$v (func)) (type $FUNCSIG$v (func))
(type $FUNCSIG$ii (func (param i32) (result i32)))
(type $FUNCSIG$vii (func (param i32 i32)))
(type $FUNCSIG$ji (func (param i32) (result i64)))
(type $FUNCSIG$fi (func (param i32) (result f32)))
(type $FUNCSIG$di (func (param i32) (result f64)))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(memory $0 1) (memory $0 1)
(data (i32.const 8) "\01\00\00\00\08\00\00\00\01\00\00\00\02") (data (i32.const 8) "\01\00\00\00\08\00\00\00\01\00\00\00\02")
@ -13,12 +19,488 @@
(data (i32.const 150) "\f4?\00\00\00\00\00\00\02@") (data (i32.const 150) "\f4?\00\00\00\00\00\00\02@")
(data (i32.const 160) "\05\00\00\00\10\00\00\00\90\00\00\00\90\00\00\00\10\00\00\00\02") (data (i32.const 160) "\05\00\00\00\10\00\00\00\90\00\00\00\90\00\00\00\10\00\00\00\02")
(data (i32.const 184) "\06\00\00\00&\00\00\00s\00t\00d\00/\00s\00t\00a\00t\00i\00c\00-\00a\00r\00r\00a\00y\00.\00t\00s") (data (i32.const 184) "\06\00\00\00&\00\00\00s\00t\00d\00/\00s\00t\00a\00t\00i\00c\00-\00a\00r\00r\00a\00y\00.\00t\00s")
(data (i32.const 232) "\06\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s")
(data (i32.const 272) "\06\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s")
(table $0 1 funcref) (table $0 1 funcref)
(elem (i32.const 0) $null) (elem (i32.const 0) $null)
(export "memory" (memory $0)) (export "memory" (memory $0))
(export "table" (table $0)) (export "table" (table $0))
(start $start) (start $start)
(func $start:std/static-array (; 1 ;) (type $FUNCSIG$v) (func $~lib/array/Array<i32>#__get (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
i32.const 40
i32.load
i32.const 2
i32.shr_u
i32.ge_u
if
i32.const 0
i32.const 240
i32.const 68
i32.const 61
call $~lib/env/abort
unreachable
end
i32.const 36
i32.load
local.get $0
i32.const 2
i32.shl
i32.add
i32.load
)
(func $~lib/memory/memory.fill (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(local $2 i32)
block $~lib/util/memory/memset|inlined.0
local.get $1
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.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/runtime/doReallocate (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 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
i32.const 7
i32.add
i32.clz
i32.sub
i32.shl
i32.const 0
local.get $0
i32.const 312
i32.gt_u
select
i32.const 1
i32.const 32
local.get $1
i32.const 7
i32.add
i32.clz
i32.sub
i32.shl
i32.lt_u
if
unreachable
else
local.get $0
local.get $2
i32.add
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/ensureCapacity (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(local $2 i32)
(local $3 i32)
i32.const 1
local.get $0
i32.load offset=8
local.get $1
i32.shr_u
i32.gt_u
if
i32.const 1
i32.const 1073741816
local.get $1
i32.shr_u
i32.gt_u
if
i32.const 0
i32.const 240
i32.const 10
i32.const 64
call $~lib/env/abort
unreachable
end
local.get $0
i32.load
local.tee $3
i32.const 1
local.get $1
i32.shl
local.tee $1
call $~lib/runtime/doReallocate
local.set $2
local.get $2
local.get $3
i32.ne
if
local.get $0
local.get $2
i32.store
local.get $0
local.get $2
i32.store offset=4
end
local.get $0
local.get $1
i32.store offset=8
end
)
(func $~lib/array/Array<i32>#__set (; 5 ;) (type $FUNCSIG$v)
i32.const 32
i32.const 2
call $~lib/array/ensureCapacity
i32.const 36
i32.load
i32.const 2
i32.store
i32.const 0
i32.const 44
i32.load
i32.ge_s
if
i32.const 44
i32.const 1
i32.store
end
)
(func $~lib/array/Array<i64>#__get (; 6 ;) (type $FUNCSIG$ji) (param $0 i32) (result i64)
local.get $0
i32.const 88
i32.load
i32.const 3
i32.shr_u
i32.ge_u
if
i32.const 0
i32.const 240
i32.const 68
i32.const 61
call $~lib/env/abort
unreachable
end
i32.const 84
i32.load
local.get $0
i32.const 3
i32.shl
i32.add
i64.load
)
(func $~lib/array/Array<i64>#__set (; 7 ;) (type $FUNCSIG$v)
i32.const 80
i32.const 3
call $~lib/array/ensureCapacity
i32.const 84
i32.load
i64.const 4
i64.store
i32.const 0
i32.const 92
i32.load
i32.ge_s
if
i32.const 92
i32.const 1
i32.store
end
)
(func $~lib/array/Array<f32>#__get (; 8 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32)
local.get $0
i32.const 128
i32.load
i32.const 2
i32.shr_u
i32.ge_u
if
i32.const 0
i32.const 240
i32.const 68
i32.const 61
call $~lib/env/abort
unreachable
end
i32.const 124
i32.load
local.get $0
i32.const 2
i32.shl
i32.add
f32.load
)
(func $~lib/array/Array<f32>#__set (; 9 ;) (type $FUNCSIG$v)
i32.const 120
i32.const 2
call $~lib/array/ensureCapacity
i32.const 124
i32.load
f32.const 2.5
f32.store
i32.const 0
i32.const 132
i32.load
i32.ge_s
if
i32.const 132
i32.const 1
i32.store
end
)
(func $~lib/array/Array<f64>#__get (; 10 ;) (type $FUNCSIG$di) (param $0 i32) (result f64)
local.get $0
i32.const 176
i32.load
i32.const 3
i32.shr_u
i32.ge_u
if
i32.const 0
i32.const 240
i32.const 68
i32.const 61
call $~lib/env/abort
unreachable
end
i32.const 172
i32.load
local.get $0
i32.const 3
i32.shl
i32.add
f64.load
)
(func $~lib/array/Array<f64>#__set (; 11 ;) (type $FUNCSIG$v)
i32.const 168
i32.const 3
call $~lib/array/ensureCapacity
i32.const 172
i32.load
f64.const 2.25
f64.store
i32.const 0
i32.const 180
i32.load
i32.ge_s
if
i32.const 180
i32.const 1
i32.store
end
)
(func $start:std/static-array (; 12 ;) (type $FUNCSIG$v)
i32.const 44 i32.const 44
i32.load i32.load
i32.const 2 i32.const 2
@ -31,15 +513,8 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 36
i32.load
i32.const -1
i32.const 0 i32.const 0
i32.const 40 call $~lib/array/Array<i32>#__get
i32.load
i32.lt_u
select
i32.load
i32.const 1 i32.const 1
i32.ne i32.ne
if if
@ -50,17 +525,8 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 36 i32.const 1
i32.load call $~lib/array/Array<i32>#__get
i32.const 4
i32.add
i32.const -1
i32.const 4
i32.const 40
i32.load
i32.lt_u
select
i32.load
i32.const 2 i32.const 2
i32.ne i32.ne
if if
@ -71,19 +537,9 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 36 call $~lib/array/Array<i32>#__set
i32.load
i32.const 2
i32.store
i32.const 36
i32.load
i32.const -1
i32.const 0 i32.const 0
i32.const 40 call $~lib/array/Array<i32>#__get
i32.load
i32.lt_u
select
i32.load
i32.const 2 i32.const 2
i32.ne i32.ne
if if
@ -106,15 +562,8 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 84
i32.load
i32.const -1
i32.const 0 i32.const 0
i32.const 88 call $~lib/array/Array<i64>#__get
i32.load
i32.lt_u
select
i64.load
i64.const 3 i64.const 3
i64.ne i64.ne
if if
@ -125,17 +574,8 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 84 i32.const 1
i32.load call $~lib/array/Array<i64>#__get
i32.const 8
i32.add
i32.const -1
i32.const 8
i32.const 88
i32.load
i32.lt_u
select
i64.load
i64.const 4 i64.const 4
i64.ne i64.ne
if if
@ -146,19 +586,9 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 84 call $~lib/array/Array<i64>#__set
i32.load
i64.const 4
i64.store
i32.const 84
i32.load
i32.const -1
i32.const 0 i32.const 0
i32.const 88 call $~lib/array/Array<i64>#__get
i32.load
i32.lt_u
select
i64.load
i64.const 4 i64.const 4
i64.ne i64.ne
if if
@ -181,15 +611,8 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 124
i32.load
i32.const -1
i32.const 0 i32.const 0
i32.const 128 call $~lib/array/Array<f32>#__get
i32.load
i32.lt_u
select
f32.load
f32.const 1.5 f32.const 1.5
f32.ne f32.ne
if if
@ -200,17 +623,8 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 124 i32.const 1
i32.load call $~lib/array/Array<f32>#__get
i32.const 4
i32.add
i32.const -1
i32.const 4
i32.const 128
i32.load
i32.lt_u
select
f32.load
f32.const 2.5 f32.const 2.5
f32.ne f32.ne
if if
@ -221,19 +635,9 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 124 call $~lib/array/Array<f32>#__set
i32.load
f32.const 2.5
f32.store
i32.const 124
i32.load
i32.const -1
i32.const 0 i32.const 0
i32.const 128 call $~lib/array/Array<f32>#__get
i32.load
i32.lt_u
select
f32.load
f32.const 2.5 f32.const 2.5
f32.ne f32.ne
if if
@ -256,15 +660,8 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 172
i32.load
i32.const -1
i32.const 0 i32.const 0
i32.const 176 call $~lib/array/Array<f64>#__get
i32.load
i32.lt_u
select
f64.load
f64.const 1.25 f64.const 1.25
f64.ne f64.ne
if if
@ -275,17 +672,8 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 172 i32.const 1
i32.load call $~lib/array/Array<f64>#__get
i32.const 8
i32.add
i32.const -1
i32.const 8
i32.const 176
i32.load
i32.lt_u
select
f64.load
f64.const 2.25 f64.const 2.25
f64.ne f64.ne
if if
@ -296,19 +684,9 @@
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
i32.const 172 call $~lib/array/Array<f64>#__set
i32.load
f64.const 2.25
f64.store
i32.const 172
i32.load
i32.const -1
i32.const 0 i32.const 0
i32.const 176 call $~lib/array/Array<f64>#__get
i32.load
i32.lt_u
select
f64.load
f64.const 2.25 f64.const 2.25
f64.ne f64.ne
if if
@ -320,10 +698,10 @@
unreachable unreachable
end end
) )
(func $start (; 2 ;) (type $FUNCSIG$v) (func $start (; 13 ;) (type $FUNCSIG$v)
call $start:std/static-array call $start:std/static-array
) )
(func $null (; 3 ;) (type $FUNCSIG$v) (func $null (; 14 ;) (type $FUNCSIG$v)
nop nop
) )
) )

File diff suppressed because it is too large Load Diff

View File

@ -3207,11 +3207,7 @@
(local $3 i32) (local $3 i32)
local.get $1 local.get $1
local.get $0 local.get $0
i32.load i32.load offset=8
local.tee $2
i32.const 8
i32.sub
i32.load offset=4
i32.const 2 i32.const 2
i32.shr_u i32.shr_u
i32.gt_u i32.gt_u
@ -3222,19 +3218,21 @@
if if
i32.const 0 i32.const 0
i32.const 1440 i32.const 1440
i32.const 12 i32.const 10
i32.const 64 i32.const 64
call $~lib/env/abort call $~lib/env/abort
unreachable unreachable
end end
local.get $2 local.get $0
local.get $2 i32.load
local.tee $2
local.get $1 local.get $1
i32.const 2 i32.const 2
i32.shl i32.shl
local.tee $3 local.tee $3
call $~lib/runtime/doReallocate call $~lib/runtime/doReallocate
local.tee $1 local.tee $1
local.get $2
i32.ne i32.ne
if if
local.get $0 local.get $0
@ -3541,7 +3539,30 @@
end end
local.get $6 local.get $6
) )
(func $~lib/util/number/decimalCount32 (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/array/Array<String>#__get (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
local.get $1
local.get $0
i32.load offset=8
i32.const 2
i32.shr_u
i32.ge_u
if
i32.const 0
i32.const 1440
i32.const 68
i32.const 61
call $~lib/env/abort
unreachable
end
local.get $0
i32.load offset=4
local.get $1
i32.const 2
i32.shl
i32.add
i32.load
)
(func $~lib/util/number/decimalCount32 (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0 local.get $0
i32.const 100000 i32.const 100000
i32.lt_u i32.lt_u
@ -3595,7 +3616,7 @@
end end
end end
) )
(func $~lib/util/number/utoa32_lut (; 40 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (func $~lib/util/number/utoa32_lut (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
i32.const 2060 i32.const 2060
@ -3705,7 +3726,7 @@
i32.store16 i32.store16
end end
) )
(func $~lib/util/number/itoa32 (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/util/number/itoa32 (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -3747,7 +3768,7 @@
i32.const 1 i32.const 1
call $~lib/runtime/doRegister call $~lib/runtime/doRegister
) )
(func $~lib/util/number/utoa32 (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (func $~lib/util/number/utoa32 (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
local.get $0 local.get $0
@ -3770,7 +3791,7 @@
i32.const 1 i32.const 1
call $~lib/runtime/doRegister call $~lib/runtime/doRegister
) )
(func $~lib/util/number/decimalCount64 (; 43 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (func $~lib/util/number/decimalCount64 (; 44 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32)
local.get $0 local.get $0
i64.const 1000000000000000 i64.const 1000000000000000
i64.lt_u i64.lt_u
@ -3824,7 +3845,7 @@
end end
end end
) )
(func $~lib/util/number/utoa64_lut (; 44 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (func $~lib/util/number/utoa64_lut (; 45 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
(local $5 i32) (local $5 i32)
@ -3921,7 +3942,7 @@
local.get $2 local.get $2
call $~lib/util/number/utoa32_lut call $~lib/util/number/utoa32_lut
) )
(func $~lib/util/number/utoa64 (; 45 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (func $~lib/util/number/utoa64 (; 46 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -3963,7 +3984,7 @@
i32.const 1 i32.const 1
call $~lib/runtime/doRegister call $~lib/runtime/doRegister
) )
(func $~lib/util/number/itoa64 (; 46 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (func $~lib/util/number/itoa64 (; 47 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
@ -4028,7 +4049,7 @@
i32.const 1 i32.const 1
call $~lib/runtime/doRegister call $~lib/runtime/doRegister
) )
(func $~lib/util/number/genDigits (; 47 ;) (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 (; 48 ;) (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 $7 i32)
(local $8 i32) (local $8 i32)
(local $9 i64) (local $9 i64)
@ -4446,7 +4467,7 @@
local.get $7 local.get $7
end end
) )
(func $~lib/util/number/prettify (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (func $~lib/util/number/prettify (; 49 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
local.get $2 local.get $2
@ -4707,7 +4728,7 @@
end end
end end
) )
(func $~lib/util/number/dtoa_core (; 49 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (func $~lib/util/number/dtoa_core (; 50 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32)
(local $2 i32) (local $2 i32)
(local $3 i64) (local $3 i64)
(local $4 i64) (local $4 i64)
@ -5019,7 +5040,7 @@
local.get $12 local.get $12
i32.add i32.add
) )
(func $~lib/string/String#substring (; 50 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (func $~lib/string/String#substring (; 51 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
(local $4 i32) (local $4 i32)
@ -5117,7 +5138,7 @@
i32.const 1 i32.const 1
call $~lib/runtime/doRegister call $~lib/runtime/doRegister
) )
(func $~lib/util/number/dtoa (; 51 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (func $~lib/util/number/dtoa (; 52 ;) (type $FUNCSIG$id) (param $0 f64) (result i32)
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
local.get $0 local.get $0
@ -5162,7 +5183,7 @@
call $~lib/runtime/assertUnregistered call $~lib/runtime/assertUnregistered
local.get $1 local.get $1
) )
(func $start:std/string (; 52 ;) (type $FUNCSIG$v) (func $start:std/string (; 53 ;) (type $FUNCSIG$v)
(local $0 i32) (local $0 i32)
global.get $std/string/str global.get $std/string/str
i32.const 16 i32.const 16
@ -6664,15 +6685,8 @@
local.tee $0 local.tee $0
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0
i32.load offset=4
i32.const -1
i32.const 0 i32.const 0
local.get $0 call $~lib/array/Array<String>#__get
i32.load offset=8
i32.lt_u
select
i32.load
i32.const 312 i32.const 312
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -6714,15 +6728,8 @@
local.tee $0 local.tee $0
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0
i32.load offset=4
i32.const -1
i32.const 0 i32.const 0
local.get $0 call $~lib/array/Array<String>#__get
i32.load offset=8
i32.lt_u
select
i32.load
i32.const 312 i32.const 312
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -6749,15 +6756,8 @@
local.tee $0 local.tee $0
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0
i32.load offset=4
i32.const -1
i32.const 0 i32.const 0
local.get $0 call $~lib/array/Array<String>#__get
i32.load offset=8
i32.lt_u
select
i32.load
i32.const 1480 i32.const 1480
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -6786,15 +6786,8 @@
local.tee $0 local.tee $0
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0
i32.load offset=4
i32.const -1
i32.const 0 i32.const 0
local.get $0 call $~lib/array/Array<String>#__get
i32.load offset=8
i32.lt_u
select
i32.load
i32.const 336 i32.const 336
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -6803,17 +6796,8 @@
end end
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0 i32.const 1
i32.load offset=4 call $~lib/array/Array<String>#__get
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 i32.const 824
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -6822,17 +6806,8 @@
end end
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0 i32.const 2
i32.load offset=4 call $~lib/array/Array<String>#__get
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 i32.const 1520
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -6861,15 +6836,8 @@
local.tee $0 local.tee $0
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0
i32.load offset=4
i32.const -1
i32.const 0 i32.const 0
local.get $0 call $~lib/array/Array<String>#__get
i32.load offset=8
i32.lt_u
select
i32.load
i32.const 336 i32.const 336
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -6878,17 +6846,8 @@
end end
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0 i32.const 1
i32.load offset=4 call $~lib/array/Array<String>#__get
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 i32.const 824
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -6897,17 +6856,8 @@
end end
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0 i32.const 2
i32.load offset=4 call $~lib/array/Array<String>#__get
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 i32.const 1520
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -6937,15 +6887,8 @@
local.tee $0 local.tee $0
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0
i32.load offset=4
i32.const -1
i32.const 0 i32.const 0
local.get $0 call $~lib/array/Array<String>#__get
i32.load offset=8
i32.lt_u
select
i32.load
i32.const 336 i32.const 336
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -6954,17 +6897,8 @@
end end
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0 i32.const 1
i32.load offset=4 call $~lib/array/Array<String>#__get
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 i32.const 824
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -6973,17 +6907,8 @@
end end
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0 i32.const 2
i32.load offset=4 call $~lib/array/Array<String>#__get
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 i32.const 312
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -6992,17 +6917,8 @@
end end
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0 i32.const 3
i32.load offset=4 call $~lib/array/Array<String>#__get
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 i32.const 1520
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -7032,15 +6948,8 @@
local.tee $0 local.tee $0
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0
i32.load offset=4
i32.const -1
i32.const 0 i32.const 0
local.get $0 call $~lib/array/Array<String>#__get
i32.load offset=8
i32.lt_u
select
i32.load
i32.const 312 i32.const 312
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -7049,17 +6958,8 @@
end end
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0 i32.const 1
i32.load offset=4 call $~lib/array/Array<String>#__get
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 i32.const 336
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -7068,17 +6968,8 @@
end end
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0 i32.const 2
i32.load offset=4 call $~lib/array/Array<String>#__get
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 i32.const 824
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -7087,17 +6978,8 @@
end end
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0 i32.const 3
i32.load offset=4 call $~lib/array/Array<String>#__get
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 i32.const 1520
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -7127,15 +7009,8 @@
local.tee $0 local.tee $0
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0
i32.load offset=4
i32.const -1
i32.const 0 i32.const 0
local.get $0 call $~lib/array/Array<String>#__get
i32.load offset=8
i32.lt_u
select
i32.load
i32.const 336 i32.const 336
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -7144,17 +7019,8 @@
end end
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0 i32.const 1
i32.load offset=4 call $~lib/array/Array<String>#__get
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 i32.const 824
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -7163,17 +7029,8 @@
end end
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0 i32.const 2
i32.load offset=4 call $~lib/array/Array<String>#__get
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 i32.const 1520
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -7182,17 +7039,8 @@
end end
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0 i32.const 3
i32.load offset=4 call $~lib/array/Array<String>#__get
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 i32.const 312
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -7221,15 +7069,8 @@
local.tee $0 local.tee $0
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0
i32.load offset=4
i32.const -1
i32.const 0 i32.const 0
local.get $0 call $~lib/array/Array<String>#__get
i32.load offset=8
i32.lt_u
select
i32.load
i32.const 336 i32.const 336
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -7238,17 +7079,8 @@
end end
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0 i32.const 1
i32.load offset=4 call $~lib/array/Array<String>#__get
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 i32.const 824
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -7257,17 +7089,8 @@
end end
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0 i32.const 2
i32.load offset=4 call $~lib/array/Array<String>#__get
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 i32.const 1520
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -7309,15 +7132,8 @@
local.tee $0 local.tee $0
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0
i32.load offset=4
i32.const -1
i32.const 0 i32.const 0
local.get $0 call $~lib/array/Array<String>#__get
i32.load offset=8
i32.lt_u
select
i32.load
i32.const 336 i32.const 336
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -7344,15 +7160,8 @@
local.tee $0 local.tee $0
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0
i32.load offset=4
i32.const -1
i32.const 0 i32.const 0
local.get $0 call $~lib/array/Array<String>#__get
i32.load offset=8
i32.lt_u
select
i32.load
i32.const 336 i32.const 336
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -7381,15 +7190,8 @@
local.tee $0 local.tee $0
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0
i32.load offset=4
i32.const -1
i32.const 0 i32.const 0
local.get $0 call $~lib/array/Array<String>#__get
i32.load offset=8
i32.lt_u
select
i32.load
i32.const 336 i32.const 336
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -7398,17 +7200,8 @@
end end
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0 i32.const 1
i32.load offset=4 call $~lib/array/Array<String>#__get
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 i32.const 824
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -7417,17 +7210,8 @@
end end
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0 i32.const 2
i32.load offset=4 call $~lib/array/Array<String>#__get
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 i32.const 1520
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -7456,15 +7240,8 @@
local.tee $0 local.tee $0
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0
i32.load offset=4
i32.const -1
i32.const 0 i32.const 0
local.get $0 call $~lib/array/Array<String>#__get
i32.load offset=8
i32.lt_u
select
i32.load
i32.const 336 i32.const 336
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -7473,17 +7250,8 @@
end end
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0 i32.const 1
i32.load offset=4 call $~lib/array/Array<String>#__get
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 i32.const 824
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -7492,17 +7260,8 @@
end end
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0 i32.const 2
i32.load offset=4 call $~lib/array/Array<String>#__get
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 i32.const 1520
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -7531,15 +7290,8 @@
local.tee $0 local.tee $0
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0
i32.load offset=4
i32.const -1
i32.const 0 i32.const 0
local.get $0 call $~lib/array/Array<String>#__get
i32.load offset=8
i32.lt_u
select
i32.load
i32.const 336 i32.const 336
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -7548,17 +7300,8 @@
end end
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0 i32.const 1
i32.load offset=4 call $~lib/array/Array<String>#__get
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 i32.const 824
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -7567,17 +7310,8 @@
end end
if if
global.get $std/string/sa global.get $std/string/sa
local.tee $0 i32.const 2
i32.load offset=4 call $~lib/array/Array<String>#__get
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 i32.const 1520
call $~lib/string/String.__eq call $~lib/string/String.__eq
local.set $0 local.set $0
@ -8776,13 +8510,13 @@
unreachable unreachable
end end
) )
(func $std/string/getString (; 53 ;) (type $FUNCSIG$i) (result i32) (func $std/string/getString (; 54 ;) (type $FUNCSIG$i) (result i32)
global.get $std/string/str global.get $std/string/str
) )
(func $start (; 54 ;) (type $FUNCSIG$v) (func $start (; 55 ;) (type $FUNCSIG$v)
call $start:std/string call $start:std/string
) )
(func $null (; 55 ;) (type $FUNCSIG$v) (func $null (; 56 ;) (type $FUNCSIG$v)
nop nop
) )
) )

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long